Internal: Database: Fix internal methods calls with name vs title (4) - refs #3581 #4706

pull/5081/head
Yannick Warnier 11 months ago
parent 9a31503194
commit 42b099c6a6
  1. 6
      public/main/admin/statistics/index.php
  2. 2
      public/main/inc/ajax/skill.ajax.php
  3. 9
      public/main/inc/ajax/statistics.ajax.php
  4. 4
      public/main/inc/lib/AnnouncementManager.php
  5. 2
      public/main/inc/lib/CourseChatUtils.php
  6. 10
      public/main/inc/lib/SkillModel.php
  7. 2
      public/main/inc/lib/agenda.lib.php
  8. 2
      public/main/inc/lib/course.lib.php
  9. 2
      public/main/inc/lib/webservices/Rest.php
  10. 2
      public/main/lp/lp_final_item.php
  11. 2
      public/main/my_space/myStudents.php
  12. 2
      public/main/skills/assign.php
  13. 2
      public/main/skills/criteria.php
  14. 10
      public/main/skills/issued.php
  15. 6
      public/main/skills/issued_all.php
  16. 2
      public/main/skills/skill.php
  17. 2
      public/main/skills/skill_badge_create.php
  18. 4
      public/main/skills/skill_list.php
  19. 2
      public/main/skills/skill_profile.php
  20. 2
      public/main/skills/skill_rel_course.php
  21. 4
      public/main/template/default/gamification/my_progress.html.twig
  22. 2
      public/main/ticket/categories.php
  23. 2
      public/main/ticket/ticket_details.php
  24. 2
      public/main/webservices/api/tests/CreateSessionFromModelTest.php
  25. 4
      public/main/work/work.lib.php
  26. 2
      public/plugin/bbb/admin.php
  27. 2
      public/plugin/bbb/listing.php
  28. 4
      public/plugin/buycourses/src/buy_course_plugin.class.php
  29. 2
      public/plugin/buycourses/src/buycourses.ajax.php
  30. 4
      public/plugin/buycourses/view/service_information.tpl
  31. 2
      public/plugin/whispeakauth/Entity/LogEventLp.php
  32. 2
      public/plugin/zoom/activity.php
  33. 2
      public/plugin/zoom/join_meeting.php
  34. 2
      public/plugin/zoom/meeting.php
  35. 4
      public/plugin/zoom/start.php
  36. 4
      src/CoreBundle/ApiResource/CourseTool.php
  37. 2
      src/CoreBundle/Controller/Api/CreateCGlossaryAction.php
  38. 6
      src/CoreBundle/Controller/Api/ExportCGlossaryAction.php
  39. 2
      src/CoreBundle/Controller/Api/ExportGlossaryToDocumentsAction.php
  40. 2
      src/CoreBundle/Controller/Api/GetGlossaryCollectionController.php
  41. 2
      src/CoreBundle/Controller/Api/ImportCGlossaryAction.php
  42. 2
      src/CoreBundle/Controller/Api/UpdateCGlossaryAction.php
  43. 6
      src/CoreBundle/Controller/CourseController.php
  44. 2
      src/CoreBundle/Controller/CreateResourceFileAction.php
  45. 2
      src/CoreBundle/DataTransformer/CourseToolDataTranformer.php
  46. 10
      src/CoreBundle/Entity/ContactCategory.php
  47. 14
      src/CoreBundle/Entity/Group.php
  48. 2
      src/CoreBundle/Entity/Listener/ResourceListener.php
  49. 2
      src/CoreBundle/Entity/Listener/SkillRelUserListener.php
  50. 14
      src/CoreBundle/Entity/ResourceFile.php
  51. 2
      src/CoreBundle/Entity/ResourceNode.php
  52. 4
      src/CoreBundle/Entity/User.php
  53. 4
      src/CoreBundle/Form/BranchType.php
  54. 4
      src/CoreBundle/Migrations/Schema/V200/Version20210930130343.php
  55. 59
      src/CoreBundle/Migrations/Schema/V200/Version20240114212100.php
  56. 8
      src/CoreBundle/Repository/ResourceRepository.php
  57. 6
      src/CoreBundle/Repository/SequenceResourceRepository.php
  58. 6
      src/CoreBundle/Resources/views/Session/about.html.twig
  59. 2
      src/CoreBundle/Settings/CourseSettingsSchema.php
  60. 4
      src/CourseBundle/Component/CourseCopy/CourseRestorer.php
  61. 2
      src/CourseBundle/Component/CourseCopy/Resources/LearnPathCategory.php
  62. 2
      src/CourseBundle/Entity/CToolIntro.php
  63. 2
      src/CourseBundle/Repository/CShortcutRepository.php
  64. 2
      src/LtiBundle/Entity/LineItem.php
  65. 2
      tests/CoreBundle/Repository/CareerRepositoryTest.php
  66. 2
      tests/CoreBundle/Repository/CourseCategoryRepositoryTest.php
  67. 2
      tests/CoreBundle/Repository/Node/IllustrationRepositoryTest.php
  68. 2
      tests/CoreBundle/Repository/PromotionRepositoryTest.php
  69. 2
      tests/CoreBundle/Repository/ResourceNodeRepositoryTest.php
  70. 24
      tests/CoreBundle/Repository/SkillRepositoryTest.php
  71. 4
      tests/CoreBundle/Repository/SysAnnouncementRepositoryTest.php
  72. 4
      tests/CoreBundle/Security/Authorization/Voter/GroupVoterTest.php
  73. 2
      tests/CoreBundle/Tool/ToolChainTest.php
  74. 4
      tests/CourseBundle/Repository/CAttendanceRepositoryTest.php
  75. 4
      tests/CourseBundle/Repository/CDocumentRepositoryTest.php
  76. 2
      tests/CourseBundle/Repository/CForumRepositoryTest.php
  77. 8
      tests/CourseBundle/Repository/CGroupRepositoryTest.php
  78. 4
      tests/CourseBundle/Repository/CLpCategoryRepositoryTest.php
  79. 2
      tests/CourseBundle/Repository/CLpItemRepositoryTest.php
  80. 12
      tests/CourseBundle/Repository/CLpRepositoryTest.php
  81. 4
      tests/CourseBundle/Repository/CThematicAdvanceRepositoryTest.php
  82. 6
      tests/scripts/fix_restored_learnpaths.php
  83. 4
      tests/scripts/migrate_item_property.php

@ -696,7 +696,8 @@ switch ($report) {
$content .= '<canvas class="col-md-12" id="canvas" height="300px" style="margin-bottom: 20px"></canvas>';
// total amount of courses
foreach ($categories as $category) {
$courses[$category->getName()] = $category->getCourses()->count();
/* @var Chamilo\CoreBundle\Entity\CourseCategory $category */
$courses[$category->getTitle()] = $category->getCourses()->count();
}
// courses for each course category
$content .= Statistics::printStats(get_lang('Courses'), $courses);
@ -1456,8 +1457,9 @@ switch ($report) {
$courseCategoryRepo = Container::getCourseCategoryRepository();
$categories = $courseCategoryRepo->findAll();
foreach ($categories as $category) {
/* @var Chamilo\CoreBundle\Entity\CourseCategory $category */
$code = $category->getCode();
$name = $category->getName();
$name = $category->getTitle();
$name = str_replace(get_lang('Department'), '', $name);
$teachers[$name] = Statistics::countUsers(COURSEMANAGER, $code, $countInvisible);
$students[$name] = Statistics::countUsers(STUDENT, $code, $countInvisible);

@ -387,7 +387,7 @@ switch ($action) {
foreach ($skills as $skill) {
$returnSkills[] = [
'id' => $skill->getSkill()->getId(),
'text' => $skill->getSkill()->getName(),
'text' => $skill->getSkill()->getTitle(),
];
}
echo json_encode([

@ -178,7 +178,8 @@ switch ($action) {
// total amount of courses
$all = [];
foreach ($categories as $category) {
$all[$category->getName()] = $category->getCourses()->count();
/* @var Chamilo\CoreBundle\Entity\CourseCategory $category */
$all[$category->getTitle()] = $category->getCourses()->count();
}
} elseif ('courses_by_language' == $action) {
$statsName = 'CountCourseByLanguage';
@ -202,8 +203,9 @@ switch ($action) {
$countInvisible = isset($_GET['count_invisible']) ? (int) $_GET['count_invisible'] : null;
$all = [];
foreach ($categories as $category) {
/* @var Chamilo\CoreBundle\Entity\CourseCategory $category */
$code = $category->getCode();
$name = $category->getName();
$name = $category->getTitle();
$name = str_replace(get_lang('Department'), '', $name);
$all[$name] = Statistics::countUsers(COURSEMANAGER, $code, $countInvisible);
}
@ -219,8 +221,9 @@ switch ($action) {
$countInvisible = isset($_GET['count_invisible']) ? (int) $_GET['count_invisible'] : null;
$all = [];
foreach ($categories as $category) {
/* @var Chamilo\CoreBundle\Entity\CourseCategory $category */
$code = $category->getCode();
$name = $category->getName();
$name = $category->getTitle();
$name = str_replace(get_lang('Department'), '', $name);
$all[$name] = Statistics::countUsers(STUDENT, $code, $countInvisible);
}

@ -1081,7 +1081,7 @@ class AnnouncementManager
}
$output[] =
'<br />'.
Display::label($groupList[$group_id]->getName(), 'info').
Display::label($groupList[$group_id]->getTitle(), 'info').
'&nbsp;'.implode(', ', $userToArray);
}
}
@ -1116,7 +1116,7 @@ class AnnouncementManager
}
$output[] =
'<br />'.
Display::label($groupList[$group_id]->getName(), 'info').
Display::label($groupList[$group_id]->getTitle(), 'info').
'&nbsp;'.implode(', ', $userToArray);
}
if (empty($sent_to_array['groups']) && empty($sent_to_array['users'])) {

@ -464,7 +464,7 @@ class CourseChatUtils
if (null === $resourceNode) {
$em = Database::getManager();
$resource = new CChatConversation();
$resource->setName($filename_chat);
$resource->setTitle($filename_chat);
$handle = tmpfile();
fwrite($handle, '');

@ -1868,7 +1868,7 @@ class SkillModel extends Model
if ($addHeader) {
$label .= '<span id="'.$skill->getId().'" class="user_skill" style="cursor:pointer">';
}
$label .= Display::label($skill->getName(), $type);
$label .= Display::label($skill->getTitle(), $type);
if ($addHeader) {
$label .= '</span>&nbsp;';
}
@ -1982,7 +1982,7 @@ class SkillModel extends Model
);
/** @var SkillRelItem $skillRelItem */
foreach ($items as $skillRelItem) {
$skillList[$skillRelItem->getSkill()->getId()] = $skillRelItem->getSkill()->getName();
$skillList[$skillRelItem->getSkill()->getId()] = $skillRelItem->getSkill()->getTitle();
}
}
@ -2063,7 +2063,7 @@ class SkillModel extends Model
/** @var CLp $item */
$item = $em->getRepository(CLp::class)->find($itemId);
if ($item) {
$itemInfo['name'] = $item->getName();
$itemInfo['name'] = $item->getTitle();
}
break;
case ITEM_TYPE_GRADEBOOK:
@ -2080,7 +2080,7 @@ class SkillModel extends Model
/** @var CAttendance $item */
$item = $em->getRepository(CAttendance::class)->find($itemId);
if ($item) {
$itemInfo['name'] = $item->getName();
$itemInfo['name'] = $item->getTitle();
}
break;
case ITEM_TYPE_SURVEY:
@ -2136,7 +2136,7 @@ class SkillModel extends Model
/** @var SkillRelItem $skillRelItem */
$skillList = [];
foreach ($skills as $skillRelItem) {
$skillList[] = Display::label($skillRelItem->getSkill()->getName(), 'success');
$skillList[] = Display::label($skillRelItem->getSkill()->getTitle(), 'success');
}
$skillToString = '&nbsp;'.implode(' ', $skillList);
}

@ -1942,7 +1942,7 @@ class Agenda
$count = $group->getMembers()->count();
$countUsers = " &ndash; $count ".get_lang('Users');
$option = [
'text' => $group->getName().$countUsers,
'text' => $group->getTitle().$countUsers,
'value' => "GROUP:".$groupId,
];

@ -2259,7 +2259,7 @@ class CourseManager
}
}
if ($asArray) {
$groupList[$group->getIid()] = ['id' => $group->getIid(), 'name' => $group->getName()];
$groupList[$group->getIid()] = ['id' => $group->getIid(), 'name' => $group->getTitle()];
} else {
$groupList[$group->getIid()] = $group;
}

@ -914,7 +914,7 @@ class Rest extends WebService
$categoryData[] = [
'id' => $category->getId(),
'name' => $category->getName(),
'name' => $category->getTitle(),
'learnpaths' => $listData,
];
}

@ -245,7 +245,7 @@ function generateLPFinalItemTemplateBadgeLinks($userId, $courseId, $sessionId =
</div>
</div>
<div class='col-md-8 col-xs-8'>
<h5><b>".$skill->getName()."</b></h5>
<h5><b>".$skill->getTitle()."</b></h5>
".$skill->getDescription()."
</div>
<div class='col-md-2 col-xs-12'>

@ -1647,7 +1647,7 @@ if (empty($details)) {
$flat_list = $list->get_flat_list();
$i = 0;
if (count($categories) > 1) {
echo Display::page_subheader2($item->getName());
echo Display::page_subheader2($item->getTitle());
}
echo '<div class="table-responsive">';

@ -345,7 +345,7 @@ if ($form->validate()) {
Display::return_message(
sprintf(
get_lang('The skill %s has been assigned to user %s'),
$skill->getName(),
$skill->getTitle(),
UserManager::formatUserFullName($user)
),
'success'

@ -21,7 +21,7 @@ $skill = $entityManager->find(\Chamilo\CoreBundle\Entity\Skill::class, $_GET['id
if ($skill) {
$skillInfo = [
'name' => $skill->getName(),
'name' => $skill->getTitle(),
'short_code' => $skill->getShortCode(),
'description' => $skill->getDescription(),
'criteria' => $skill->getCriteria(),

@ -62,7 +62,7 @@ $showLevels = ('false' === api_get_setting('skill.hide_skill_levels'));
$skillInfo = [
'id' => $skill->getId(),
'name' => $skill->getName(),
'name' => $skill->getTitle(),
'short_code' => $skill->getShortCode(),
'description' => $skill->getDescription(),
'criteria' => $skill->getCriteria(),
@ -77,7 +77,7 @@ $skillInfo = [
'courses' => [],
];
$titleContent = sprintf(get_lang('I have achieved skill %s on %s'), $skill->getName(), api_get_setting('siteName'));
$titleContent = sprintf(get_lang('I have achieved skill %s on %s'), $skill->getTitle(), api_get_setting('siteName'));
// Open Graph Markup
$htmlHeadXtra[] = "
@ -99,7 +99,7 @@ if (null !== $currentUser) {
$skillRelUserDate = api_get_local_time($skillRelUser->getAcquiredSkillAt());
$currentSkillLevel = get_lang('No level acquired yet');
if ($skillRelUser->getAcquiredLevel()) {
$currentSkillLevel = $skillLevelRepo->find(['id' => $skillRelUser->getAcquiredLevel()])->getName();
$currentSkillLevel = $skillLevelRepo->find(['id' => $skillRelUser->getAcquiredLevel()])->getTitle();
}
$author = api_get_user_info($skillRelUser->getArgumentationAuthorId());
@ -124,7 +124,7 @@ $skillRelUserInfo = [
'user_complete_name' => UserManager::formatUserFullName($skillRelUser->getUser()),
'skill_id' => $skillRelUser->getSkill()->getId(),
'skill_badge_image' => SkillModel::getWebIconPath($skillRelUser->getSkill()),
'skill_name' => $skillRelUser->getSkill()->getName(),
'skill_name' => $skillRelUser->getSkill()->getTitle(),
'skill_short_code' => $skillRelUser->getSkill()->getShortCode(),
'skill_description' => $skillRelUser->getSkill()->getDescription(),
'skill_criteria' => $skillRelUser->getSkill()->getCriteria(),
@ -183,7 +183,7 @@ if ($profile) {
$profileLevels = [];
foreach ($levels as $level) {
$profileLevels[$level->getPosition()][$level->getId()] = $level->getName();
$profileLevels[$level->getPosition()][$level->getId()] = $level->getTitle();
}
ksort($profileLevels); // Sort the array by Position.

@ -65,7 +65,7 @@ foreach ($userSkills as $index => $skillRelUser) {
$skillRelUserDate = api_get_local_time($skillRelUser->getAcquiredSkillAt());
$currentSkillLevel = get_lang('No level acquired yet');
if ($skillRelUser->getAcquiredLevel()) {
$currentSkillLevel = $skillLevelRepo->find($skillRelUser->getAcquiredLevel()->getId())->getName();
$currentSkillLevel = $skillLevelRepo->find($skillRelUser->getAcquiredLevel()->getId())->getTitle();
}
$argumentationAuthor = api_get_user_info($skillRelUser->getArgumentationAuthorId());
@ -84,7 +84,7 @@ foreach ($userSkills as $index => $skillRelUser) {
'user_complete_name' => UserManager::formatUserFullName($skillRelUser->getUser()),
'skill_id' => $skillRelUser->getSkill()->getId(),
'skill_badge_image' => SkillModel::getWebIconPath($skillRelUser->getSkill()),
'skill_name' => $skillRelUser->getSkill()->getName(),
'skill_name' => $skillRelUser->getSkill()->getTitle(),
'skill_short_code' => $skillRelUser->getSkill()->getShortCode(),
'skill_description' => $skillRelUser->getSkill()->getDescription(),
'skill_criteria' => $skillRelUser->getSkill()->getCriteria(),
@ -138,7 +138,7 @@ foreach ($userSkills as $index => $skillRelUser) {
]);
foreach ($levels as $level) {
$profileLevels[$level->getPosition()][$level->getId()] = $level->getName();
$profileLevels[$level->getPosition()][$level->getId()] = $level->getTitle();
}
ksort($profileLevels); // Sort the array by Position.

@ -48,7 +48,7 @@ if (!empty($item)) {
]
);
}
$form->addHeader($item->getName());
$form->addHeader($item->getTitle());
}
$formToDisplay = $form->returnForm();

@ -41,7 +41,7 @@ if ('POST' === $_SERVER['REQUEST_METHOD']) {
) {
$assetRepo = Container::getAssetRepository();
$skillRepo->deleteAsset($skill);
$title = sprintf("%s.png", $skill->getName());
$title = sprintf("%s.png", $skill->getTitle());
$asset = (new Asset())
->setCategory(Asset::SKILL)

@ -55,7 +55,7 @@ switch ($action) {
Display::addFlash(
Display::return_message(
sprintf(get_lang('Skill "%s" enabled'), $skill->getName()),
sprintf(get_lang('Skill "%s" enabled'), $skill->getTitle()),
'success'
)
);
@ -105,7 +105,7 @@ switch ($action) {
Display::addFlash(
Display::return_message(
sprintf(get_lang('Skill "%s" disabled'), $skill->getName()),
sprintf(get_lang('Skill "%s" disabled'), $skill->getTitle()),
'success'
)
);

@ -43,7 +43,7 @@ $form->addHidden('id', $id);
$form->addButtonSave(get_lang('Save'));
if (!empty($item)) {
$form->setDefaults(['name' => $item->getName()]);
$form->setDefaults(['name' => $item->getTitle()]);
}
$formToDisplay = $form->returnForm();

@ -41,7 +41,7 @@ $items = $em->getRepository(SkillRelCourse::class)->findBy(
);
/** @var SkillRelCourse $skillRelCourse */
foreach ($items as $skillRelCourse) {
$skillList[$skillRelCourse->getSkill()->getId()] = $skillRelCourse->getSkill()->getName();
$skillList[$skillRelCourse->getSkill()->getId()] = $skillRelCourse->getSkill()->getTitle();
}
$form->addHidden('course_id', $courseId);

@ -38,7 +38,7 @@
<ul class="list-course">
{% for session in sessions %}
<li><a href="{{ _p.self ~ '?' ~ {"session_id": session.getId}|url_encode() }}" class="list-course-item {{ current_session and session.getId == current_session.getId ? 'active' }}">
<em class="fa fa-chevron-circle-right"></em> {{ session.getName }}
<em class="fa fa-chevron-circle-right"></em> {{ session.getTitle }}
</a>
</li>
{% endfor %}
@ -50,7 +50,7 @@
<div class="col-md-9">
{% if current_session %}
<div class="panel panel-default">
<div class="panel-heading"><em class="fa fa-book"></em> {{ current_session.getName() }}</div>
<div class="panel-heading"><em class="fa fa-book"></em> {{ current_session.getTitle() }}</div>
<div class="panel-body">
{% for course_id, course in session_data %}
<h3> {{ 'ToolIcon::COURSE'|mdi_icon(32) }} {{ course.title }}</h3>

@ -65,7 +65,7 @@ $interbreadcrumb[] = [
$interbreadcrumb[] = [
'url' => api_get_path(WEB_CODE_PATH).'ticket/projects.php',
'name' => $project->getName(),
'name' => $project->getTitle(),
];
switch ($action) {

@ -296,7 +296,7 @@ if ($allowEdition
);
$oldStatusTitle = '-';
if ($oldStatus) {
$oldStatusTitle = $oldStatus->getName();
$oldStatusTitle = $oldStatus->getTitle();
}
$messageToSend .= sprintf(

@ -58,7 +58,7 @@ class CreateSessionFromModelTest extends V2TestCase
$this->assertIsObject($newSession);
// assert the new session got the right data
$this->assertSame($name, $newSession->getName());
$this->assertSame($name, $newSession->getTitle());
// FIXME account for UTC / local timezone shift
// $this->assertSame($endDate, $newSession->getDisplayEndDate());
// $this->assertSame($startDate, $newSession->getAccessStartDate());

@ -3987,7 +3987,7 @@ function getWorkComment(CStudentPublicationComment $commentEntity, array $course
$filePath = '';
$deleteUrl = api_get_path(WEB_CODE_PATH).
'work/view.php?'.api_get_cidreq().'&id='.$workId.'&action=delete_attachment&comment_id='.$id;
$fileName = $commentEntity->getResourceNode()->getResourceFile()->getName();
$fileName = $commentEntity->getResourceNode()->getResourceFile()->getTitle();
}
$comment['comment'] = $commentEntity->getComment();
$comment['delete_file_url'] = $deleteUrl;
@ -5969,7 +5969,7 @@ function getFileContents($id, $courseInfo, $sessionId = 0, $correction = false,
$title = $titleCorrection = $studentPublication->getCorrection()->getTitle();
}
if ($hasFile) {
$title = $studentPublication->getResourceNode()->getResourceFile()->getName();
$title = $studentPublication->getResourceNode()->getResourceFile()->getTitle();
}
$title = str_replace(' ', '_', $title);

@ -75,7 +75,7 @@ if ($action) {
1 == $meeting['status'] ? $plugin->get_lang('MeetingOpened') : $plugin->get_lang('MeetingClosed'),
1 == $meeting['record'] ? get_lang('Yes') : get_lang('No'),
$meeting['course'] ? $meeting['course']->getTitle() : '-',
$meeting['session'] ? $meeting['session']->getName() : '-',
$meeting['session'] ? $meeting['session']->getTitle() : '-',
isset($meeting['participants']) ? implode(PHP_EOL, $meeting['participants']) : null,
];
}

@ -430,7 +430,7 @@ if (false === $bbb->isGlobalConference() &&
foreach ($groups as $groupData) {
if ($groupData instanceof \Chamilo\CourseBundle\Entity\CGroup) {
$itemGroupId = $groupData->getIid();
$name = $groupData->getName();
$name = $groupData->getTitle();
} else {
$itemGroupId = $groupData['iid'];
$name = $groupData['name'];

@ -824,7 +824,7 @@ class BuyCoursesPlugin extends Plugin
$globalParameters = $this->getGlobalParameters();
$sessionInfo = [
'id' => $session->getId(),
'name' => $session->getName(),
'name' => $session->getTitle(),
'description' => $session->getDescription(),
'dates' => $sessionDates,
'courses' => [],
@ -913,7 +913,7 @@ class BuyCoursesPlugin extends Plugin
return false;
}
$productName = $session->getName();
$productName = $session->getTitle();
}
$price = $item['price'];

@ -477,7 +477,7 @@ switch ($action) {
$nodeType = get_lang('TemplateTitleCertificate');
/** @var CLp $lp */
$lp = $em->find('ChamiloCourseBundle:CLp', $serviceSale['node_id']);
$nodeName = $lp ? $lp->getName() : null;
$nodeName = $lp ? $lp->getTitle() : null;
}
}
}

@ -35,13 +35,13 @@
</a>
</li>
<li>
<a href="https://twitter.com/home?{{ {'status': session.getName() ~ ' ' ~ pageUrl}|url_encode }}"
<a href="https://twitter.com/home?{{ {'status': session.getTitle() ~ ' ' ~ pageUrl}|url_encode }}"
target="_blank" class="btn btn-twitter btn-inverse btn-xs">
<em class="fa fa-twitter"></em> Twitter
</a>
</li>
<li>
<a href="https://www.linkedin.com/shareArticle?{{ {'mini': 'true', 'url': pageUrl, 'title': session.getName() }|url_encode }}"
<a href="https://www.linkedin.com/shareArticle?{{ {'mini': 'true', 'url': pageUrl, 'title': session.getTitle() }|url_encode }}"
target="_blank" class="btn btn-linkedin btn-inverse btn-xs">
<em class="fa fa-linkedin"></em> Linkedin
</a>

@ -74,7 +74,7 @@ class LogEventLp extends LogEvent
*/
public function getTypeString()
{
$lpName = $this->lp->getName();
$lpName = $this->lp->getTitle();
$itemTitle = $this->getLpItem()->getTitle();
return "$lpName > $itemTitle";

@ -38,7 +38,7 @@ if ($meeting->isCourseMeeting()) {
];
$interbreadcrumb[] = [
'url' => api_get_path(WEB_CODE_PATH).'group/group_space.php?'.api_get_cidreq(),
'name' => get_lang('GroupSpace').' '.$meeting->getGroup()->getName(),
'name' => get_lang('GroupSpace').' '.$meeting->getGroup()->getTitle(),
];
}
}

@ -31,7 +31,7 @@ if ($meeting->isCourseMeeting()) {
];
$interbreadcrumb[] = [
'url' => api_get_path(WEB_CODE_PATH).'group/group_space.php?'.api_get_cidreq(),
'name' => get_lang('GroupSpace').' '.$meeting->getGroup()->getName(),
'name' => get_lang('GroupSpace').' '.$meeting->getGroup()->getTitle(),
];
}
}

@ -35,7 +35,7 @@ if ($meeting->isCourseMeeting()) {
];
$interbreadcrumb[] = [
'url' => api_get_path(WEB_CODE_PATH).'group/group_space.php?'.$urlExtra,
'name' => get_lang('GroupSpace').' '.$meeting->getGroup()->getName(),
'name' => get_lang('GroupSpace').' '.$meeting->getGroup()->getTitle(),
];
}
}

@ -30,7 +30,7 @@ if (null !== $group) {
];
$interbreadcrumb[] = [
'url' => api_get_path(WEB_CODE_PATH).'group/group_space.php?'.api_get_cidreq(),
'name' => get_lang('GroupSpace').' '.$group->getName(),
'name' => get_lang('GroupSpace').' '.$group->getTitle(),
];
}
@ -62,7 +62,7 @@ if ($isManager) {
/*if (isset($meetingsGroup[$itemGroupId]) && $meetingsGroup[$itemGroupId] == 1) {
$groupData['name'] .= ' ('.get_lang('Active').')';
}*/
$groupList[$itemGroupId] = $groupData->getName();
$groupList[$itemGroupId] = $groupData->getTitle();
}
$form->addSelect('group_id', get_lang('Groups'), $groupList, ['id' => 'group_select']);
$form->setDefaults(['group_id' => $groupId]);

@ -16,7 +16,7 @@ class CourseTool extends AbstractResource
public ?int $iid = null;
#[Groups(['ctool:read'])]
public string $name;
public string $title;
#[Groups(['ctool:read'])]
public ?bool $visibility = null;
@ -36,6 +36,6 @@ class CourseTool extends AbstractResource
#[Groups(['ctool:read'])]
public function getNameToTranslate(): string
{
return ucfirst(str_replace('_', ' ', $this->name));
return ucfirst(str_replace('_', ' ', $this->title));
}
}

@ -46,7 +46,7 @@ class CreateCGlossaryAction extends BaseResourceFileAction
}
$glossary = (new CGlossary())
->setName($title)
->setTitle($title)
->setDescription($description)
;

@ -81,7 +81,7 @@ class ExportCGlossaryAction
/** @var CGlossary $item */
foreach ($glossaryItems as $item) {
$csvContent .= $item->getName().','.$item->getDescription()."\n";
$csvContent .= $item->getTitle().','.$item->getDescription()."\n";
}
file_put_contents($csvFilePath, $csvContent);
@ -97,7 +97,7 @@ class ExportCGlossaryAction
/** @var CGlossary $item */
foreach ($glossaryItems as $index => $item) {
$row = $index + 1;
$sheet->setCellValue('A'.$row, $item->getName());
$sheet->setCellValue('A'.$row, $item->getTitle());
$sheet->setCellValue('B'.$row, $item->getDescription());
}
@ -120,7 +120,7 @@ class ExportCGlossaryAction
/** @var CGlossary $item */
foreach ($glossaryItems as $item) {
$html .= '<tr>';
$html .= '<td>'.$item->getName().'</td>';
$html .= '<td>'.$item->getTitle().'</td>';
$html .= '<td>'.$item->getDescription().'</td>';
$html .= '</tr>';
}

@ -72,7 +72,7 @@ class ExportGlossaryToDocumentsAction
/** @var CGlossary $item */
foreach ($glossaryItems as $item) {
$html .= '<tr>';
$html .= '<td>'.$item->getName().'</td>';
$html .= '<td>'.$item->getTitle().'</td>';
$html .= '<td>'.$item->getDescription().'</td>';
$html .= '</tr>';
}

@ -48,7 +48,7 @@ class GetGlossaryCollectionController extends BaseResourceFileAction
[
'iid' => $item->getIid(),
'id' => $item->getIid(),
'name' => $item->getName(),
'name' => $item->getTitle(),
'description' => $item->getDescription(),
];
}

@ -128,7 +128,7 @@ class ImportCGlossaryAction
$existingNewGlossaryTerm = $qb->getQuery()->getOneOrNullResult();
if (!$existingNewGlossaryTerm) {
$newGlossary = (new CGlossary())
->setName($term)
->setTitle($term)
->setDescription($description)
->setParent($course)
->addCourseLink($course, $session)

@ -45,7 +45,7 @@ class UpdateCGlossaryAction extends BaseResourceFileAction
throw new BadRequestHttpException('The glossary term already exists.');
}
$glossary->setName($title);
$glossary->setTitle($title);
$glossary->setDescription($description);
if (!empty($parentResourceNodeId)) {

@ -287,7 +287,7 @@ class CourseController extends ToolBaseController
throw new NotFoundHttpException($this->trans('Tool not found'));
}
$tool = $toolChain->getToolFromName($tool->getTool()->getName());
$tool = $toolChain->getToolFromName($tool->getTool()->getTitle());
$link = $tool->getLink();
if (strpos($link, 'nodeId')) {
@ -587,7 +587,7 @@ class CourseController extends ToolBaseController
}
$responseData['c_tool'] = [
'iid' => $ctool->getIid(),
'name' => $ctool->getName(),
'name' => $ctool->getTitle(),
];
}
@ -615,7 +615,7 @@ class CourseController extends ToolBaseController
$toolEntity = $toolRepo->findOneBy(['name' => 'course_homepage']);
$courseTool = (new CTool())
->setTool($toolEntity)
->setName('course_homepage')
->setTitle('course_homepage')
->setCourse($course)
->setPosition(1)
->setVisibility(true)

@ -20,7 +20,7 @@ class CreateResourceFileAction
}
$resourceFile = new ResourceFile();
$resourceFile->setName($uploadedFile->getFilename());
$resourceFile->setTitle($uploadedFile->getFilename());
$resourceFile->setFile($uploadedFile);
return $resourceFile;

@ -40,7 +40,7 @@ class CourseToolDataTranformer implements DataTransformerInterface
$cTool = new CourseTool();
$cTool->iid = $object->getIid();
$cTool->name = $object->getName();
$cTool->name = $object->getTitle();
$cTool->visibility = $object->getVisibility();
$cTool->resourceNode = $object->resourceNode;
$cTool->illustrationUrl = $object->illustrationUrl;

@ -22,7 +22,7 @@ class ContactCategory
private ?int $id = null;
#[Column(type: 'string', length: 255)]
private string $name;
private string $title;
#[Column(type: 'string', length: 255)]
private string $email;
@ -32,14 +32,14 @@ class ContactCategory
return $this->id;
}
public function getName(): string
public function getTitle(): string
{
return $this->name;
return $this->title;
}
public function setName(string $name): self
public function setTitle(string $title): self
{
$this->name = $name;
$this->title = $title;
return $this;
}

@ -36,8 +36,8 @@ class Group implements Stringable
public function __construct(
#[Assert\NotBlank]
#[ORM\Column(name: 'name', type: 'string', length: 255, unique: true, nullable: false)]
protected string $name,
#[ORM\Column(name: 'title', type: 'string', length: 255, unique: true, nullable: false)]
protected string $title,
#[ORM\Column(name: 'roles', type: 'array')]
protected array $roles = [
]
@ -47,7 +47,7 @@ class Group implements Stringable
public function __toString(): string
{
return $this->getName() ?: '';
return $this->getTitle() ?: '';
}
public function addRole(string $role): self
@ -79,14 +79,14 @@ class Group implements Stringable
return $this;
}
public function getName(): string
public function getTitle(): string
{
return $this->name;
return $this->title;
}
public function setName(string $name): self
public function setTitle(string $title): self
{
$this->name = $name;
$this->title = $title;
return $this;
}

@ -237,7 +237,7 @@ class ResourceListener
// File upload.
if ($uploadedFile instanceof UploadedFile) {
$resourceFile = (new ResourceFile())
->setName($uploadedFile->getFilename())
->setTitle($uploadedFile->getFilename())
->setOriginalName($uploadedFile->getFilename())
->setFile($uploadedFile)
;

@ -39,7 +39,7 @@ class SkillRelUserListener
$message = sprintf(
$this->translator->trans('Hi, %s. You have achieved the skill "%s". To see the details go here: %s.'),
$user->getFirstname(),
$skill->getName(),
$skill->getTitle(),
Display::url($url, $url)
);

@ -89,7 +89,7 @@ class ResourceFile implements Stringable
#[Assert\NotBlank]
#[Groups(['resource_file:read', 'resource_node:read', 'document:read'])]
#[ORM\Column(type: 'string', length: 255)]
protected ?string $name = null;
protected ?string $title = null;
#[Groups(['resource_file:read', 'resource_node:read', 'document:read', 'message:read'])]
#[ORM\Column(type: 'text', nullable: true)]
protected ?string $mimeType = null;
@ -106,7 +106,7 @@ class ResourceFile implements Stringable
/**
* @Vich\UploadableField(
* mapping="resources",
* fileNameProperty="name",
* fileNameProperty="title",
* size="size",
* mimeType="mimeType",
* originalName="originalName",
@ -115,7 +115,7 @@ class ResourceFile implements Stringable
*/
// #[Vich\UploadableField(
// mapping: 'resources',
// fileNameProperty: 'name',
// fileNameProperty: 'title',
// size: 'size',
// mimeType: 'mimeType',
// originalName: 'originalName',
@ -183,13 +183,13 @@ class ResourceFile implements Stringable
return str_contains($mimeType, 'audio');
}
public function getName(): ?string
public function getTitle(): ?string
{
return $this->name;
return $this->title;
}
public function setName(?string $name): self
public function setTitle(?string $title): self
{
$this->name = $name;
$this->title = $title;
return $this;
}

@ -501,7 +501,7 @@ class ResourceNode implements Stringable
$params = [
'id' => $this->getId(),
'tool' => $this->getResourceType()->getTool(),
'type' => $this->getResourceType()->getName(),
'type' => $this->getResourceType()->getTitle(),
'filter' => 'editor_thumbnail',
];
$url = $router->generate('chamilo_core_resource_view', $params);

@ -954,7 +954,7 @@ class User implements UserInterface, EquatableInterface, ResourceInterface, Reso
/** @var UsergroupRelUser $subscription */
foreach ($classSubscription as $subscription) {
$class = $subscription->getUsergroup();
$classList[] = $class->getName();
$classList[] = $class->getTitle();
}
$classString = empty($classList) ? null : ' ['.implode(', ', $classList).']';
@ -1375,7 +1375,7 @@ class User implements UserInterface, EquatableInterface, ResourceInterface, Reso
{
$names = [];
foreach ($this->getGroups() as $group) {
$names[] = $group->getName();
$names[] = $group->getTitle();
}
return $names;

@ -33,7 +33,7 @@ class BranchType extends AbstractType
}
$builder
->add('branch_name', 'text')
->add('title', 'text')
->add(
'branch_type',
'choice',
@ -93,7 +93,7 @@ class BranchType extends AbstractType
);
}
public function getName(): string
public function getTitle(): string
{
return 'branch';
}

@ -49,7 +49,7 @@ final class Version20210930130343 extends AbstractMigrationChamilo
$admin = $this->getAdmin();
$tool = $toolRepo->findOneBy(['name' => 'course_homepage']);
$cTool = (new CTool())
->setName('course_homepage')
->setTitle('course_homepage')
->setCourse($course)
->setTool($tool)
->setCreator($admin)
@ -92,7 +92,7 @@ final class Version20210930130343 extends AbstractMigrationChamilo
$course = $courseRepo->find($courseId);
$cTool = (new CTool())
->setName('course_homepage')
->setTitle('course_homepage')
->setCourse($course)
->setSession($session)
->setTool($tool)

@ -0,0 +1,59 @@
<?php
declare(strict_types=1);
namespace Chamilo\CoreBundle\Migrations\Schema\V200;
use Chamilo\CoreBundle\Migrations\AbstractMigrationChamilo;
use Doctrine\DBAL\Schema\Schema;
final class Version20240114212100 extends AbstractMigrationChamilo
{
public function getDescription(): string
{
return 'Replace "name" with "title" fields in tables (part 3)';
}
public function up(Schema $schema): void
{
if ($schema->hasTable('contact_form_contact_category')) {
$this->addSql(
'ALTER TABLE contact_form_contact_category CHANGE name title VARCHAR(255) NOT NULL'
);
}
if ($schema->hasTable('fos_group')) {
$this->addSql(
'ALTER TABLE fos_group CHANGE name title VARCHAR(255) NOT NULL'
);
}
if ($schema->hasTable('resource_file')) {
$this->addSql(
'ALTER TABLE fos_group CHANGE name title VARCHAR(255) NOT NULL'
);
}
}
public function down(Schema $schema): void
{
$table = $schema->getTable('resource_file');
if ($table->hasColumn('title')) {
$this->addSql('ALTER TABLE resource_file CHANGE title name VARCHAR(255) NOT NULL');
}
$table = $schema->getTable('fos_group');
if ($table->hasColumn('title')) {
$this->addSql('ALTER TABLE fos_group CHANGE title name VARCHAR(255) NOT NULL');
}
$table = $schema->getTable('contact_form_contact_category');
if ($table->hasColumn('title')) {
$this->addSql('ALTER TABLE contact_form_contact_category CHANGE title name VARCHAR(255) NOT NULL');
}
}
}

@ -244,7 +244,7 @@ abstract class ResourceRepository extends ServiceEntityRepository
$resourceFile
->setFile($file)
->setDescription($description)
->setName($resource->getResourceName())
->setTitle($resource->getResourceName())
->setResourceNode($resourceNode)
;
$em->persist($resourceFile);
@ -589,15 +589,15 @@ abstract class ResourceRepository extends ServiceEntityRepository
// if ($resourceNode->hasResourceFile()) {
// $resourceNode->getResourceFile()->getFile()->
// $resourceNode->getResourceFile()->setName($title);
// $resourceFile->setName($title);
// $resourceNode->getResourceFile()->setTitle($title);
// $resourceFile->setTitle($title);
/*$fileName = $this->getResourceNodeRepository()->getFilename($resourceFile);
error_log('$fileName');
error_log($fileName);
error_log($title);
$this->getResourceNodeRepository()->getFileSystem()->rename($fileName, $title);
$resourceFile->setName($title);
$resourceFile->setTitle($title);
$resourceFile->setOriginalName($title);*/
// }
}

@ -133,7 +133,7 @@ class SequenceResourceRepository extends ServiceEntityRepository
$from = $vertex->getVerticesEdgeFrom();
$sequenceInfo = [
'name' => $sequence->getName(),
'name' => $sequence->getTitle(),
'requirements' => [],
];
@ -201,7 +201,7 @@ class SequenceResourceRepository extends ServiceEntityRepository
$dependencies = $this->findVerticesEdges($to, $type);
$result[$sequence->getId()] = [
'name' => $sequence->getName(),
'name' => $sequence->getTitle(),
'requirements' => $requirements,
'dependencies' => $dependencies,
];
@ -249,7 +249,7 @@ class SequenceResourceRepository extends ServiceEntityRepository
case SequenceResource::SESSION_TYPE:
$id = $resource->getId();
$resourceItem = [
'name' => $resource->getName(),
'name' => $resource->getTitle(),
'status' => true,
];

@ -44,13 +44,13 @@
</a>
</li>
<li>
<a href="https://twitter.com/home?{{ {'status': session.getName() ~ ' ' ~ page_url }|url_encode }}"
<a href="https://twitter.com/home?{{ {'status': session.getTitle() ~ ' ' ~ page_url }|url_encode }}"
target="_blank" class="btn btn-twitter btn-inverse btn-xs">
<em class="fa fa-twitter"></em> Twitter
</a>
</li>
<li>
<a href="https://www.linkedin.com/shareArticle?{{ {'mini': 'true', 'url': page_url , 'title': session.getName() }|url_encode }}"
<a href="https://www.linkedin.com/shareArticle?{{ {'mini': 'true', 'url': page_url , 'title': session.getTitle() }|url_encode }}"
target="_blank" class="btn btn-linkedin btn-inverse btn-xs">
<em class="fa fa-linkedin"></em> Linkedin
</a>
@ -107,7 +107,7 @@
{{ sequence.name }} :
{% for requirement in sequence.requirements %}
<a href="{{ _p.web ~ 'session/' ~ requirement.getId ~ '/about/' }}">
{{ requirement.getName }}
{{ requirement.getTitle }}
</a>
{% endfor %}
</p>

@ -30,7 +30,7 @@ class CourseSettingsSchema extends AbstractSettingsSchema
/** @var AbstractTool $tool */
foreach ($this->toolChain->getTools() as $tool) {
$name = $tool->getName();
$name = $tool->getTitle();
$tools[$name] = $name;
}

@ -2664,7 +2664,7 @@ class CourseRestorer
$tblLpCategory,
[
'WHERE' => [
'c_id = ? AND name = ?' => [$this->destination_course_id, $lpCategory->getName()],
'c_id = ? AND name = ?' => [$this->destination_course_id, $lpCategory->getTitle()],
],
],
'first'
@ -2675,7 +2675,7 @@ class CourseRestorer
} else {
$values = [
'c_id' => $this->destination_course_id,
'name' => $lpCategory->getName(),
'name' => $lpCategory->getTitle(),
];
$categoryId = learnpath::createCategory($values);
}

@ -32,6 +32,6 @@ class LearnPathCategory extends Resource
public function show()
{
parent::show();
echo $this->object->getName();
echo $this->object->getTitle();
}
}

@ -77,7 +77,7 @@ class CToolIntro extends AbstractResource implements ResourceInterface, Resource
}
public function getResourceName(): string
{
return $this->getCourseTool()->getName();
return $this->getCourseTool()->getTitle();
}
public function setResourceName(string $name): self
{

@ -36,7 +36,7 @@ final class CShortcutRepository extends ResourceRepository
if (null === $shortcut) {
$shortcut = (new CShortcut())
->setName($resource->getResourceName())
->setTitle($resource->getResourceName())
->setShortCutNode($resource->getResourceNode())
->setCreator($user)
->setParent($course)

@ -117,7 +117,7 @@ class LineItem
$data = [
'scoreMaximum' => $this->evaluation->getMax(),
'label' => $this->evaluation->getName(),
'label' => $this->evaluation->getTitle(),
'tag' => $this->tag,
'resourceLinkId' => (string) $baseTool->getId(),
'resourceId' => $this->resourceId,

@ -30,7 +30,7 @@ class CareerRepositoryTest extends AbstractApiTest
$em->flush();
$this->assertSame(1, $repo->count([]));
$this->assertSame('Julio', $career->getName());
$this->assertSame('Julio', $career->getTitle());
$this->assertNotNull($career->getId());
}
}

@ -43,7 +43,7 @@ class CourseCategoryRepositoryTest extends AbstractApiTest
$this->assertSame('Course cat', $item->getCode());
$this->assertSame('Course cat (Course cat)', (string) $item);
$this->assertSame('desc', $item->getDescription());
$this->assertSame('Course cat', $item->getName());
$this->assertSame('Course cat', $item->getTitle());
$this->assertFalse($item->hasAsset());
$accessUrl = $this->getAccessUrl();

@ -69,7 +69,7 @@ class IllustrationRepositoryTest extends WebTestCase
$user = $this->createUser('test');
$illustration = (new Illustration())
->setName('test')
->setTitle('test')
->setResourceName('test')
->setCreator($user)
->setParent($user)

@ -38,7 +38,7 @@ class PromotionRepositoryTest extends AbstractApiTest
$em->persist($promotion);
$em->flush();
$this->assertSame('2000', $promotion->getName());
$this->assertSame('2000', $promotion->getTitle());
$this->assertSame('Promotion of 2000', $promotion->getDescription());
$this->assertNotNull($promotion->getId());
$this->assertSame(0, $promotion->getAnnouncements()->count());

@ -218,7 +218,7 @@ class ResourceNodeRepositoryTest extends AbstractApiTest
$uploadedFile = $this->getUploadedFile();
$resourceFile = (new ResourceFile())
->setName($uploadedFile->getFilename())
->setTitle($uploadedFile->getFilename())
->setOriginalName($uploadedFile->getFilename())
->setFile($uploadedFile)
->setDescription('desc')

@ -80,12 +80,12 @@ class SkillRepositoryTest extends AbstractApiTest
$em->persist($skillProfile);
$profile = (new Profile())
->setName('profile')
->setTitle('profile')
;
$em->persist($profile);
$level = (new Level())
->setName('level')
->setTitle('level')
->setPosition(1)
->setProfile($profile)
->setShortName('level')
@ -93,7 +93,7 @@ class SkillRepositoryTest extends AbstractApiTest
$em->persist($level);
$skill = (new Skill())
->setName('Dev')
->setTitle('Dev')
->setShortCode('Dev')
->setStatus(Skill::STATUS_ENABLED)
->setAccessUrlId($accessUrl->getId())
@ -102,7 +102,7 @@ class SkillRepositoryTest extends AbstractApiTest
$skillRepo->update($skill);
$subSkill = (new Skill())
->setName('php')
->setTitle('php')
->setShortCode('php')
->setStatus(Skill::STATUS_ENABLED)
->setAccessUrlId($accessUrl->getId())
@ -148,7 +148,7 @@ class SkillRepositoryTest extends AbstractApiTest
$skill->addToCourse($skillRelCourse);
$gradeBookCategory = (new GradebookCategory())
->setName('title')
->setTitle('title')
->setCourse($course)
->setVisible(true)
->setWeight(100)
@ -186,7 +186,7 @@ class SkillRepositoryTest extends AbstractApiTest
$this->assertTrue($skill->hasCourseAndSession($skillRelCourse));
$this->assertSame('profile', $profile->getName());
$this->assertSame('profile', $profile->getTitle());
$this->assertSame('profile', (string) $profile);
$this->assertSame(1, $profile->getLevels()->count());
$this->assertSame(1, $profile->getSkills()->count());
@ -205,7 +205,7 @@ class SkillRepositoryTest extends AbstractApiTest
$accessUrl = $this->getAccessUrl();
$skill = (new Skill())
->setName('php')
->setTitle('php')
->setShortCode('php')
->setDescription('desc')
->setStatus(Skill::STATUS_ENABLED)
@ -247,7 +247,7 @@ class SkillRepositoryTest extends AbstractApiTest
$this->assertSame(1, $skillRepo->count([]));
$skill = (new Skill())
->setName('php')
->setTitle('php')
->setShortCode('php')
->setAccessUrlId($accessUrl->getId())
;
@ -272,7 +272,7 @@ class SkillRepositoryTest extends AbstractApiTest
// Create skill.
$skill = (new Skill())
->setName('php')
->setTitle('php')
->setShortCode('php')
->setAccessUrlId($accessUrl->getId())
;
@ -281,7 +281,7 @@ class SkillRepositoryTest extends AbstractApiTest
// Create asset.
$asset = (new Asset())
->setTitle($skill->getName())
->setTitle($skill->getTitle())
->setCategory(Asset::SKILL)
->setFile($file)
;
@ -310,7 +310,7 @@ class SkillRepositoryTest extends AbstractApiTest
$accessUrl = $this->getAccessUrl();
$skill = (new Skill())
->setName('php')
->setTitle('php')
->setShortCode('php')
->setAccessUrlId($accessUrl->getId())
;
@ -318,7 +318,7 @@ class SkillRepositoryTest extends AbstractApiTest
$this->assertHasNoEntityViolations($skill);
$asset = (new Asset())
->setTitle($skill->getName())
->setTitle($skill->getTitle())
->setCategory(Asset::SKILL)
->setFile($file)
;

@ -86,7 +86,7 @@ class SysAnnouncementRepositoryTest extends WebTestCase
$session = $this->createSession('session');
$career = (new Career())
->setName('Doctor')
->setTitle('Doctor')
;
$em->persist($career);
@ -108,7 +108,7 @@ class SysAnnouncementRepositoryTest extends WebTestCase
$this->assertCount(1, $items);
$promotion = (new Promotion())
->setName('2000')
->setTitle('2000')
->setDescription('Promotion of 2000')
->setCareer($career)
->setStatus(1)

@ -53,7 +53,7 @@ class GroupVoterTest extends WebTestCase
$em->persist($publicCourse);
$group = (new CGroup())
->setName('Group')
->setTitle('Group')
->setParent($publicCourse)
->setCreator($admin)
->setMaxStudent(100)
@ -99,7 +99,7 @@ class GroupVoterTest extends WebTestCase
$admin = $this->getAdmin();
$group2 = (new CGroup())
->setName('Group2')
->setTitle('Group2')
->setParent($registeredCourse)
->setCreator($admin)
->setStatus(false)

@ -87,7 +87,7 @@ class ToolChainTest extends AbstractApiTest
$tools = $toolChain->getTools();
foreach ($tools as $tool) {
$name = $tool->getName();
$name = $tool->getTitle();
$this->assertNotEmpty($name);
$link = $tool->getLink();

@ -32,7 +32,7 @@ class CAttendanceRepositoryTest extends AbstractApiTest
$teacher = $this->createUser('teacher');
$item = (new CAttendance())
->setName('item')
->setTitle('item')
->setResourceName('item')
->setDescription('desc')
->setLocked(1)
@ -75,7 +75,7 @@ class CAttendanceRepositoryTest extends AbstractApiTest
$student = $this->createUser('student');
$attendance = (new CAttendance())
->setName('item')
->setTitle('item')
->setAttendanceWeight(100)
->setParent($course)
->setCreator($teacher)

@ -866,7 +866,7 @@ class CDocumentRepositoryTest extends AbstractApiTest
$em->flush();
$group = (new CGroup())
->setName('Group')
->setTitle('Group')
->setParent($course)
->setCreator($teacher)
->setMaxStudent(100)
@ -916,7 +916,7 @@ class CDocumentRepositoryTest extends AbstractApiTest
$this->assertSame($thirdLink->getGroup(), null);
$group2 = (new CGroup())
->setName('Group2')
->setTitle('Group2')
->setParent($course)
->setCreator($teacher)
->setMaxStudent(100)

@ -95,7 +95,7 @@ class CForumRepositoryTest extends AbstractApiTest
$teacher = $this->createUser('teacher');
$lp = (new CLp())
->setName('lp')
->setTitle('lp')
->setParent($course)
->setCreator($teacher)
->setLpType(CLp::LP_TYPE)

@ -29,7 +29,7 @@ class CGroupRepositoryTest extends AbstractApiTest
$teacher = $this->createUser('teacher');
$group = (new CGroup())
->setName('Group')
->setTitle('Group')
->setParent($course)
->setCreator($teacher)
->setStatus(true)
@ -95,7 +95,7 @@ class CGroupRepositoryTest extends AbstractApiTest
$em->flush();
$group = (new CGroup())
->setName('Group')
->setTitle('Group')
->setCategory($category)
->setParent($course)
->setCreator($teacher)
@ -128,7 +128,7 @@ class CGroupRepositoryTest extends AbstractApiTest
$courseId = $course->getId();
$group = (new CGroup())
->setName('Group')
->setTitle('Group')
->setParent($course)
->setCreator($teacher)
->setMaxStudent(100)
@ -192,7 +192,7 @@ class CGroupRepositoryTest extends AbstractApiTest
$teacher = $this->createUser('teacher');
$group = (new CGroup())
->setName('Group')
->setTitle('Group')
->setParent($course)
->setCreator($teacher)
->setMaxStudent(100)

@ -25,7 +25,7 @@ class CLpCategoryRepositoryTest extends AbstractApiTest
$teacher = $this->createUser('teacher');
$category = (new CLpCategory())
->setName('cat')
->setTitle('cat')
->setPosition(1)
->setParent($course)
->setCreator($teacher)
@ -54,7 +54,7 @@ class CLpCategoryRepositoryTest extends AbstractApiTest
$student2 = $this->createUser('student2');
$category = (new CLpCategory())
->setName('cat')
->setTitle('cat')
->setPosition(1)
->setParent($course)
->setCreator($teacher)

@ -31,7 +31,7 @@ class CLpItemRepositoryTest extends AbstractApiTest
$student = $this->createUser('student');
$lp = (new CLp())
->setName('lp')
->setTitle('lp')
->setParent($course)
->setCreator($teacher)
->setLpType(CLp::LP_TYPE)

@ -27,7 +27,7 @@ class CLpRepositoryTest extends AbstractApiTest
$teacher = $this->createUser('teacher');
$lp = (new CLp())
->setName('lp')
->setTitle('lp')
->setDescription('desc')
->setTheme('chamilo')
->setAccumulateScormTime(100)
@ -51,7 +51,7 @@ class CLpRepositoryTest extends AbstractApiTest
$this->assertHasNoEntityViolations($lp);
$repo->createLp($lp);
$this->assertSame('lp', $lp->getName());
$this->assertSame('lp', $lp->getTitle());
$this->assertSame('desc', $lp->getDescription());
$this->assertSame('chamilo', $lp->getTheme());
$this->assertSame('author', $lp->getAuthor());
@ -77,14 +77,14 @@ class CLpRepositoryTest extends AbstractApiTest
$teacher = $this->createUser('teacher');
$category = (new CLpCategory())
->setName('cat')
->setTitle('cat')
->setParent($course)
->setCreator($teacher)
;
$categoryRepo->create($category);
$lp = (new CLp())
->setName('lp')
->setTitle('lp')
->setTheme('chamilo')
->setAuthor('author')
->setParent($course)
@ -131,7 +131,7 @@ class CLpRepositoryTest extends AbstractApiTest
$forumRepo->create($forum2);
$lp = (new CLp())
->setName('lp')
->setTitle('lp')
->setParent($course)
->setCreator($teacher)
->setLpType(CLp::LP_TYPE)
@ -156,7 +156,7 @@ class CLpRepositoryTest extends AbstractApiTest
$teacher = $this->createUser('teacher');
$lp = (new CLp())
->setName('lp')
->setTitle('lp')
->setParent($course)
->setCreator($teacher)
->setLpType(CLp::LP_TYPE)

@ -35,7 +35,7 @@ class CThematicAdvanceRepositoryTest extends AbstractApiTest
$teacher = $this->createUser('teacher');
$attendance = (new CAttendance())
->setName('item')
->setTitle('item')
->setAttendanceWeight(100)
->setParent($course)
->setCreator($teacher)
@ -108,7 +108,7 @@ class CThematicAdvanceRepositoryTest extends AbstractApiTest
$teacher = $this->createUser('teacher');
$attendance = (new CAttendance())
->setName('item')
->setTitle('item')
->setAttendanceWeight(100)
->setParent($course)
->setCreator($teacher)

@ -25,7 +25,7 @@ $result1 = $qb1
/** @var CLp $lp */
foreach ($result1 as $i => $lp) {
echo ($i + 1)." LP {$lp->getId()}: {$lp->getName()}".PHP_EOL;
echo ($i + 1)." LP {$lp->getId()}: {$lp->getTitle()}".PHP_EOL;
$qb2 = $em->createQueryBuilder();
@ -42,7 +42,7 @@ foreach ($result1 as $i => $lp) {
)
->setParameters([
'link' => 'lp/lp_controller.php?action=view&lp_id=$new_lp_id&id_session=0',
'name' => $lp->getName(),
'name' => $lp->getTitle(),
'cid' => $lp->getCId()
])
->getQuery()
@ -53,6 +53,6 @@ foreach ($result1 as $i => $lp) {
$em->persist($tool);
$em->flush();
echo "\tTool: {$tool->getId()}: {$tool->getName()}".PHP_EOL;
echo "\tTool: {$tool->getId()}: {$tool->getTitle()}".PHP_EOL;
echo "\tNew link: {$tool->getLink()}".PHP_EOL;
}

@ -106,7 +106,7 @@ while ($row = Database::fetch_array($result, 'ASSOC')) {
// Creating node
$node = new ResourceNode();
$node
->setName($documentData['title'])
->setTitle($documentData['title'])
->setDescription($documentData['comment'] ?? '')
->setCreator($author)
->setParent($parentNode)
@ -191,7 +191,7 @@ while ($row = Database::fetch_array($result, 'ASSOC')) {
$resourceFile = new ResourceFile();
$resourceFile->setMedia($media);
$resourceFile->setName($documentData['title']);
$resourceFile->setTitle($documentData['title']);
$node->setResourceFile($resourceFile);
$em->persist($resourceFile);

Loading…
Cancel
Save