Internal: Database: Rename all name fields to title to implement common standard - refs #3581 #4706

pull/5081/head
Yannick Warnier 2 years ago
parent 5e2cbbcdf6
commit faeca06262
  1. 2
      assets/vue/components/Breadcrumb.vue
  2. 2
      assets/vue/components/course/CourseCard.vue
  3. 4
      assets/vue/components/course/ShortCutList.vue
  4. 2
      assets/vue/components/coursecategory/Filter.vue
  5. 12
      assets/vue/components/coursecategory/Form.vue
  6. 8
      assets/vue/components/glossary/GlossaryForm.vue
  7. 2
      assets/vue/components/glossary/GlossaryTermList.vue
  8. 2
      assets/vue/components/resource_links/ShowLinks.vue
  9. 2
      assets/vue/components/session/SessionCard.vue
  10. 2
      assets/vue/components/session/SessionCategoryListWrapper.vue
  11. 8
      assets/vue/graphql/queries/SessionRelUser.js
  12. 4
      assets/vue/views/ccalendarevent/CCalendarEventList.vue
  13. 6
      assets/vue/views/course/Catalog.vue
  14. 14
      assets/vue/views/course/CatalogSession.vue
  15. 10
      assets/vue/views/course/CourseHome.vue
  16. 419
      assets/vue/views/course/Home.vue
  17. 4
      assets/vue/views/course/Show.vue
  18. 4
      assets/vue/views/coursecategory/List.vue
  19. 4
      assets/vue/views/coursecategory/Show.vue
  20. 4
      assets/vue/views/ctoolintro/Show.vue
  21. 4
      assets/vue/views/documents/DocumentForHtmlEditor.vue
  22. 6
      assets/vue/views/documents/DocumentsList.vue
  23. 2
      assets/vue/views/glossary/GlossaryList.vue
  24. 4
      assets/vue/views/links/LinksList.vue
  25. 4
      assets/vue/views/page/List.vue
  26. 4
      assets/vue/views/personalfile/List.vue
  27. 4
      assets/vue/views/usergroup/List.vue
  28. 6
      public/main/admin/career_dashboard.php
  29. 2
      public/main/admin/course_edit.php
  30. 10
      public/main/admin/course_list.php
  31. 4
      public/main/admin/course_request_accepted.php
  32. 6
      public/main/admin/gradebook_list.php
  33. 2
      public/main/admin/resource_sequence.php
  34. 2
      public/main/admin/teacher_time_report.php
  35. 6
      public/main/admin/teachers_time_by_session_report.php
  36. 6
      public/main/admin/user_information.php
  37. 2
      public/main/announcements/announcements.php
  38. 6
      public/main/attendance/index.php
  39. 2
      public/main/auth/my_progress.php
  40. 2
      public/main/course_progress/index.php
  41. 6
      public/main/cron/course_finished.php
  42. 10
      public/main/dropbox/dropbox_functions.inc.php
  43. 24
      public/main/dropbox/index.php
  44. 2
      public/main/exercise/MultipleAnswerTrueFalseDegreeCertainty.php
  45. 4
      public/main/exercise/exercise.class.php
  46. 2
      public/main/exercise/exercise.php
  47. 2
      public/main/exercise/multiple_answer_true_false.class.php
  48. 2
      public/main/exercise/question.class.php
  49. 12
      public/main/forum/editpost.php
  50. 6
      public/main/forum/editthread.php
  51. 58
      public/main/forum/forumfunction.inc.php
  52. 12
      public/main/forum/forumqualify.php
  53. 2
      public/main/forum/forumsearch.php
  54. 2
      public/main/forum/iframe_thread.php
  55. 6
      public/main/forum/index.php
  56. 6
      public/main/forum/newthread.php
  57. 12
      public/main/forum/reply.php
  58. 12
      public/main/forum/viewforum.php
  59. 12
      public/main/forum/viewthread.php
  60. 2
      public/main/glossary/index.php
  61. 2
      public/main/gradebook/gradebook_add_link.php
  62. 4
      public/main/gradebook/gradebook_edit_all.php
  63. 2
      public/main/gradebook/gradebook_showlog_eval.php
  64. 2
      public/main/gradebook/gradebook_showlog_link.php
  65. 2
      public/main/gradebook/index.php
  66. 2
      public/main/gradebook/lib/be/abstractlink.class.php
  67. 2
      public/main/gradebook/lib/be/attendancelink.class.php
  68. 6
      public/main/gradebook/lib/be/category.class.php
  69. 10
      public/main/gradebook/lib/be/evaluation.class.php
  70. 2
      public/main/gradebook/lib/be/exerciselink.class.php
  71. 4
      public/main/gradebook/lib/be/forumthreadlink.class.php
  72. 2
      public/main/gradebook/lib/be/learnpathlink.class.php
  73. 6
      public/main/group/group_space.php
  74. 2
      public/main/group/member_settings.php
  75. 2
      public/main/group/settings.php
  76. 2
      public/main/group/tutor_settings.php
  77. 8
      public/main/inc/ajax/lp.ajax.php
  78. 11
      public/main/inc/ajax/model.ajax.php
  79. 6
      public/main/inc/ajax/session.ajax.php
  80. 5
      public/main/inc/lib/AnnouncementManager.php
  81. 10
      public/main/inc/lib/CoursesAndSessionsCatalog.class.php
  82. 6
      public/main/inc/lib/ExerciseCategoryManager.php
  83. 4
      public/main/inc/lib/SkillModel.php
  84. 26
      public/main/inc/lib/TicketManager.php
  85. 4
      public/main/inc/lib/VideoChat.php
  86. 4
      public/main/inc/lib/add_course.lib.inc.php
  87. 2
      public/main/inc/lib/api.lib.php
  88. 16
      public/main/inc/lib/attendance.lib.php
  89. 2
      public/main/inc/lib/career.lib.php
  90. 6
      public/main/inc/lib/course.lib.php
  91. 22
      public/main/inc/lib/course_category.lib.php
  92. 7
      public/main/inc/lib/dashboard.lib.php
  93. 1
      public/main/inc/lib/document.lib.php
  94. 18
      public/main/inc/lib/glossary.lib.php
  95. 4
      public/main/inc/lib/grade_model.lib.php
  96. 2
      public/main/inc/lib/gradebook.lib.php
  97. 20
      public/main/inc/lib/groupmanager.lib.php
  98. 4
      public/main/inc/lib/javascript/chat/video.php
  99. 12
      public/main/inc/lib/link.lib.php
  100. 10
      public/main/inc/lib/plugin.class.php
  101. Some files were not shown because too many files have changed in this diff Show More

@ -117,7 +117,7 @@ const foo = computed(() => {
let sessionTitle = ""
if (session.value) {
sessionTitle = " (" + session.value.name + ") "
sessionTitle = " (" + session.value.title + ") "
}
items.push({

@ -17,7 +17,7 @@
class="course-card__home-link"
>
<span v-if="session">
{{ session.name }} -
{{ session.title }} -
</span>
{{ course.title }}
</router-link>

@ -4,7 +4,7 @@
<div class="mx-auto">
<a :href="goToShortCut(shortcut)">
<img
:alt="shortcut.name"
:alt="shortcut.title"
:src="`/img/tools/${shortcut.type}.png`"
class="w-32 h-32 object-contain"
>
@ -13,7 +13,7 @@
<div class="flex flex-row gap-2 text-gray-500 pt-3">
<a>
{{ shortcut.name }}
{{ shortcut.title }}
</a>
</div>
</div>

@ -3,7 +3,7 @@
<v-row>
<v-col cols="12" sm="6" md="6">
<v-text-field
v-model="item.name"
v-model="item.title"
:label="$t('name')"
type="text"
/>

@ -4,12 +4,12 @@
<v-row>
<v-col cols="12" sm="6" md="6">
<v-text-field
v-model="item.name"
v-model="item.title"
:error-messages="nameErrors"
:label="$t('name')"
required
@input="$v.item.name.$touch()"
@blur="$v.item.name.$touch()"
@input="$v.item.title.$touch()"
@blur="$v.item.title.$touch()"
/>
</v-col>
@ -72,11 +72,11 @@ export default {
nameErrors() {
const errors = [];
if (!this.$v.item.name.$dirty) return errors;
if (!this.$v.item.title.$dirty) return errors;
has(this.violations, 'name') && errors.push(this.violations.name);
has(this.violations, 'title') && errors.push(this.violations.title);
!this.$v.item.name.required && errors.push(this.$t('Field is required'));
!this.$v.item.title.required && errors.push(this.$t('Field is required'));
return errors;
},

@ -2,8 +2,8 @@
<form class="mt-6 flex flex-col gap-2">
<BaseInputTextWithVuelidate
id="term-name"
v-model="formData.name"
:vuelidate-property="v$.name"
v-model="formData.title"
:vuelidate-property="v$.title"
:label="t('Term')"
/>
<BaseTextAreaWithVuelidate
@ -92,7 +92,7 @@ const fetchTerm = async () => {
}
try {
const glossary = await glossaryService.getGlossaryTerm(props.termId)
formData.name = glossary.name
formData.name = glossary.title
formData.description = glossary.description
} catch (error) {
console.error("Error glossary term:", error)
@ -108,7 +108,7 @@ const submitGlossaryForm = async () => {
}
const postData = {
name: formData.name,
title: formData.name,
description: formData.description,
parentResourceNodeId: parentResourceNodeId.value,
resourceLinkList: resourceLinkList.value,

@ -10,7 +10,7 @@
<template #header>
<div class="-mb-2 flex items-center justify-between gap-2 bg-gray-15 px-4 py-2">
<div>
{{ term.name }}
{{ term.title }}
</div>
<div v-if="securityStore.isAuthenticated && isCurrentTeacher">
<BaseButton

@ -17,7 +17,7 @@
:class="{ 'text-right text-body-2': editStatus }"
>
<span class="mdi mdi-book-open" />
{{ t('Session: {session}', {'session': link.session.name }) }}
{{ t('Session: {session}', {'session': link.session.title }) }}
</div>
<div

@ -1,5 +1,5 @@
<template>
<div class="text-h6 mt-4">{{ session.name }}</div>
<div class="text-h6 mt-4">{{ session.title }}</div>
<div class="grid gap-4 grid-cols-1 md:grid-cols-2 lg:grid-cols-4">
<div
v-for="course in courses"

@ -3,7 +3,7 @@
<div v-for="category in categories" :key="category.id">
<h5 class="mb-2">
<BaseIcon icon="folder-generic"/>
{{ category.name }}
{{ category.title }}
</h5>
<SessionListCategoryWrapper :sessions="getSessionsFromCategory(category)"/>
</div>

@ -12,11 +12,11 @@ export const GET_SESSION_REL_USER_CURRENT = gql`
node {
session {
_id
name
title
category {
_id
id
name
title
}
displayStartDate
displayEndDate
@ -70,11 +70,11 @@ export const GET_SESSION_REL_USER = gql`
node {
session {
_id
name
title
category {
_id
id
name
title
}
displayStartDate
displayEndDate

@ -190,7 +190,7 @@ async function getSessions({ startStr, endStr }) {
return sessions["hydra:member"].map((sessionRelUser) => ({
...sessionRelUser.session,
title: sessionRelUser.session.name,
title: sessionRelUser.session.title,
start: sessionRelUser.session.displayStartDate,
end: sessionRelUser.session.displayEndDate,
}))
@ -395,4 +395,4 @@ watch(
reFetch()
},
)
</script>
</script>

@ -2,7 +2,7 @@
<div class="card">
<DataTable
v-model:filters="filters"
:global-filter-fields="['title', 'description', 'category.name', 'courseLanguage']"
:global-filter-fields="['title', 'description', 'category.title', 'courseLanguage']"
:loading="status"
:paginator="true"
:rows="9"
@ -108,7 +108,7 @@
:key="category.id"
>
<em class="pi pi-tag course-category-icon" />
<span class="course-category">{{ category.name }}</span
<span class="course-category">{{ category.title }}</span
><br />
</span>
</template>
@ -284,4 +284,4 @@ export default {
},
},
}
</script>
</script>

@ -3,7 +3,7 @@
<DataTable
v-model:expandedRows="expandedRows"
v-model:filters="filters"
:global-filter-fields="['name', 'description', 'category', 'category.name', 'course.courseLanguage']"
:global-filter-fields="['title', 'description', 'category', 'category.title', 'course.courseLanguage']"
:loading="status"
:paginator="true"
:rows="9"
@ -63,11 +63,11 @@
:header="$t('Title')"
:sortable="true"
class="session-name"
field="name"
field="title"
style="min-width: 12rem"
>
<template #body="{ data }">
{{ data.name }}
{{ data.title }}
</template>
</Column>
<Column
@ -90,7 +90,7 @@
<template #body="{ data }">
<span v-if="data.category">
<em class="pi pi-tag course-category-icon" />
{{ data.category.name }}
{{ data.category.title }}
</span>
</template>
</Column>
@ -125,7 +125,7 @@
</Column>
<template #expansion="item">
<div class="orders-subtable">
<h5>{{ $t("Courses in this session") + " - " + item.data.name }}</h5>
<h5>{{ $t("Courses in this session") + " - " + item.data.title }}</h5>
<DataTable
:value="item.data.courses"
responsive-layout="scroll"
@ -171,7 +171,7 @@
:key="category.id"
>
<em class="pi pi-tag course-category-icon" />
<span class="course-category">{{ category.name }}</span
<span class="course-category">{{ category.title }}</span
><br />
</span>
</template>
@ -279,4 +279,4 @@ export default {
},
},
}
</script>
</script>

@ -78,7 +78,7 @@
<div class="section-header section-header--h2">
<h2 class="">
{{ course.title }}
<small v-if="session"> ({{ session.name }}) </small>
<small v-if="session"> ({{ session.title }}) </small>
</h2>
<div class="grow-0">
@ -182,7 +182,7 @@
:key="'tool-' + index.toString()"
:change-visibility="changeVisibility"
:data-index="index"
:data-tool="tool.name"
:data-tool="tool.title"
:go-to-setting-course-tool="goToSettingCourseTool"
:tool="tool"
/>
@ -251,7 +251,7 @@ const routerTools = ["document", "link", "glossary", "agenda", "student_publicat
courseService.loadCTools(course.value.id, session.value?.id)
.then((cTools) => {
tools.value = cTools.map(element => {
if (routerTools.includes(element.name)) {
if (routerTools.includes(element.title)) {
element.to = element.url
}
@ -294,7 +294,7 @@ const toggleCourseTMenu = (event) => {
}
function goToSettingCourseTool(tool) {
return "/course/" + course.value.id + "/settings/" + tool.tool.name + "?sid=" + session.value?.id
return "/course/" + course.value.id + "/settings/" + tool.tool.title + "?sid=" + session.value?.id
}
function goToShortCut(shortcut) {
@ -361,7 +361,7 @@ async function updateDisplayOrder(htmlItem, newIndex) {
if (typeof tools !== "undefined" && Array.isArray(tools.value)) {
const toolList = tools.value
toolItem = toolList.find((element) => element.name === tool)
toolItem = toolList.find((element) => element.title === tool)
} else {
console.error("Error: tools.value is undefined")
return

@ -0,0 +1,419 @@
<template>
<div
v-if="isCourseLoading"
class="flex flex-col gap-4"
>
<div class="flex gap-4 items-center">
<Skeleton
class="mr-auto"
height="2.5rem"
width="12rem"
/>
<Skeleton
v-if="isCurrentTeacher"
height="2.5rem"
width="8rem"
/>
<Skeleton
v-if="isCurrentTeacher"
height="2.5rem"
width="3rem"
/>
</div>
<Skeleton
height="16rem"
/>
<div class="flex items-center gap-6">
<Skeleton
height="1.5rem"
width="6rem"
/>
<Skeleton
v-if="isCurrentTeacher"
class="ml-auto"
height="1.5rem"
width="6rem"
/>
<Skeleton
v-if="isCurrentTeacher"
class="aspect-square"
height="1.5rem"
width="6rem"
/>
<Skeleton
v-if="isCurrentTeacher"
class="aspect-square"
height="1.5rem"
width="6rem"
/>
<Skeleton
v-if="isCurrentTeacher"
class="aspect-square"
height="1.5rem"
width="6rem"
/>
</div>
<hr class="mt-0 mb-4">
<div class="grid gap-y-12 sm:gap-x-5 md:gap-x-16 md:gap-y-12 justify-between grid-cols-course-tools">
<Skeleton
v-for="v in 30"
:key="v"
class="aspect-square"
height="auto"
width="7.5rem"
/>
</div>
</div>
<div
v-else
class="flex flex-col gap-4"
>
<div class="flex gap-4 items-center">
<h2
class="mr-auto"
>
{{ course.title }}
<small v-if="session">
({{ session.title }})
</small>
</h2>
<Button
v-if="course && isCurrentTeacher"
:label="t('See as student')"
class="p-button-outlined p-button-plain"
icon="pi pi-eye"
type="button"
/>
<Button
v-if="course && isCurrentTeacher"
aria-controls="course-tmenu"
aria-haspopup="true"
class="p-button-text p-button-plain"
icon="mdi mdi-cog"
type="button"
@click="toggleCourseTMenu"
/>
<TieredMenu
id="course-tmenu"
ref="courseTMenu"
:model="courseItems"
:popup="true"
/>
</div>
<div
v-if="isCurrentTeacher"
>
<div
v-if="intro"
class="flex flex-col gap-4"
>
<div v-html="intro.introText" />
<Button
v-if="createInSession && introTool"
:label="t('Course introduction')"
class="p-button-outlined ml-auto"
icon="mdi mdi-plus"
@click="addIntro(course, introTool)"
/>
<Button
v-else
:label="t('Update')"
class="p-button-outlined ml-auto"
icon="mdi mdi-pencil"
@click="updateIntro(intro)"
/>
</div>
<EmptyState
v-else-if="introTool"
:detail="t('Add a course introduction to display to your students.')"
:summary="t('You don\'t have any course content yet.')"
icon="mdi mdi-book-open-page-variant"
>
<Button
:label="t('Course introduction')"
class="mt-4 p-button-outlined"
icon="mdi mdi-plus"
@click="addIntro(course, introTool)"
/>
</EmptyState>
</div>
<div
v-else-if="intro"
v-html="intro.introText"
/>
<div class="flex items-center gap-6">
<h6 v-t="'Tools'" />
<Button
v-if="isCurrentTeacher"
:disabled="isSorting || isCustomizing"
:label="t('Show all')"
class="p-button-text p-button-plain p-button-sm ml-auto"
icon="mdi mdi-eye"
@click="onClickShowAll"
/>
<Button
v-if="isCurrentTeacher"
:disabled="isSorting || isCustomizing"
:label="t('Hide all')"
class="p-button-text p-button-plain p-button-sm"
icon="mdi mdi-eye-off"
@click="onClickHideAll"
/>
<ToggleButton
v-if="isCurrentTeacher"
v-model="isSorting"
:disabled="isCustomizing"
:off-label="t('Sort')"
:on-label="t('Sort')"
class="p-button-text p-button-plain p-button-sm"
off-icon="mdi mdi-swap-vertical"
on-icon="mdi mdi-swap-vertical"
/>
<ToggleButton
v-if="isCurrentTeacher"
v-model="isCustomizing"
:disabled="isSorting"
:off-label="t('Customize')"
:on-label="t('Customize')"
class="p-button-text p-button-plain p-button-sm"
off-icon="mdi mdi-format-paint"
on-icon="mdi mdi-format-paint"
/>
</div>
<hr class="mt-0 mb-4">
<div class="grid gap-y-12 sm:gap-x-5 md:gap-x-16 md:gap-y-12 grid-cols-course-tools">
<CourseToolList
v-for="(tool, index) in tools.authoring"
:key="index"
:change-visibility="changeVisibility"
:course="course"
:go-to-course-tool="goToCourseTool"
:go-to-setting-course-tool="goToSettingCourseTool"
:tool="tool"
/>
<CourseToolList
v-for="(tool, index) in tools.interaction"
:key="index"
:change-visibility="changeVisibility"
:course="course"
:go-to-course-tool="goToCourseTool"
:go-to-setting-course-tool="goToSettingCourseTool"
:tool="tool"
/>
<CourseToolList
v-for="(tool, index) in tools.plugin"
:key="index"
:change-visibility="changeVisibility"
:course="course"
:go-to-course-tool="goToCourseTool"
:go-to-setting-course-tool="goToSettingCourseTool"
:tool="tool"
/>
<ShortCutList
v-for="(shortcut, index) in shortcuts"
:key="index"
:change-visibility="changeVisibility"
:go-to-short-cut="goToShortCut"
:shortcut="shortcut"
/>
</div>
</div>
</template>
<script setup>
import { computed, provide, ref } from "vue";
import { useStore } from "vuex";
import { useRoute, useRouter } from "vue-router";
import { useI18n } from "vue-i18n";
import axios from "axios";
import { ENTRYPOINT } from "../../config/entrypoint";
import Button from "primevue/button";
import ToggleButton from "primevue/togglebutton";
import TieredMenu from "primevue/tieredmenu";
import CourseToolList from "../../components/course/CourseToolList.vue";
import ShortCutList from "../../components/course/ShortCutList.vue";
import translateHtml from "../../../js/translatehtml.js";
import EmptyState from "../../components/EmptyState";
import Skeleton from "primevue/skeleton";
const route = useRoute();
const store = useStore();
const router = useRouter();
const { t } = useI18n();
const course = ref(null);
const session = ref(null);
const tools = ref({});
const shortcuts = ref([]);
const intro = ref(null);
const introTool = ref(null);
const createInSession = ref(false);
let courseId = route.params.id;
let sessionId = route.query.sid ?? 0;
const isCourseLoading = ref(true);
const isCurrentTeacher = computed(() => store.getters["security/isCurrentTeacher"]);
const isSorting = ref(false);
const isCustomizing = ref(false);
provide("isSorting", isSorting);
provide("isCustomizing", isCustomizing);
// Remove the course session state.
store.dispatch("session/cleanSession");
const courseItems = ref([]);
axios
.get(ENTRYPOINT + `../course/${courseId}/home.json?sid=${sessionId}`)
.then(({ data }) => {
course.value = data.course;
session.value = data.session;
tools.value = data.tools;
shortcuts.value = data.shortcuts;
if (tools.value.admin) {
courseItems.value = tools.value.admin.map(tool => ({
label: tool.tool.nameToShow,
url: goToCourseTool(course, tool)
}));
}
getIntro();
isCourseLoading.value = false;
})
.catch(error => console.log(error));
const courseTMenu = ref(null);
const toggleCourseTMenu = event => {
courseTMenu.value.toggle(event);
};
async function getIntro() {
// Searching for the CTool called 'course_homepage'.
let currentIntroTool = course.value.tools.find(element => element.title === "course_homepage");
if (!introTool.value) {
introTool.value = currentIntroTool;
if (sessionId) {
createInSession.value = true;
}
// Search CToolIntro for this
const filter = {
courseTool: currentIntroTool.iid,
cid: courseId,
sid: sessionId
};
try {
const response = await store.dispatch("ctoolintro/findAll", filter);
if (response) {
if (sessionId) {
createInSession.value = false;
}
// first item
intro.value = response[0];
translateHtml();
}
} catch (e) {
console.error(e);
}
}
}
function addIntro(course, introTool) {
return router.push({
name: "ToolIntroCreate",
params: { "courseTool": introTool.iid },
query: {
"cid": courseId,
"sid": sessionId,
"parentResourceNodeId": course.resourceNode.id
}
});
}
function updateIntro(intro) {
return router.push({
name: "ToolIntroUpdate",
params: { "id": intro["@id"] },
query: {
"cid": courseId,
"sid": sessionId,
"id": intro["@id"]
}
});
}
function goToSettingCourseTool(course, tool) {
return "/course/" + courseId + "/settings/" + tool.tool.title + "?sid=" + sessionId;
}
function goToCourseTool(course, tool) {
return "/course/" + courseId + "/tool/" + tool.tool.title + "?sid=" + sessionId;
}
function goToShortCut(shortcut) {
const url = new URLSearchParams("?");
url.append("cid", courseId);
url.append("sid", sessionId);
return shortcut.url + "?" + url;
}
const setToolVisibility = (tool, visibility) => {
tool.ctool.resourceNode.resourceLinks[0].visibility = visibility;
};
function changeVisibility(course, tool) {
axios.post(ENTRYPOINT + "../r/course_tool/links/" + tool.ctool.resourceNode.id + "/change_visibility")
.then(response => setToolVisibility(tool, response.data.visibility))
.catch(error => console.log(error));
}
function onClickShowAll() {
axios.post(ENTRYPOINT + `../r/course_tool/links/change_visibility/show?cid=${courseId}&sid=${sessionId}`)
.then(() => {
tools.value.authoring.forEach(tool => setToolVisibility(tool, 2));
tools.value.interaction.forEach(tool => setToolVisibility(tool, 2));
tools.value.plugin.forEach(tool => setToolVisibility(tool, 2));
})
.catch(error => console.log(error));
}
function onClickHideAll() {
axios.post(ENTRYPOINT + `../r/course_tool/links/change_visibility/hide?cid=${courseId}&sid=${sessionId}`)
.then(() => {
tools.value.authoring.forEach(tool => setToolVisibility(tool, 0));
tools.value.interaction.forEach(tool => setToolVisibility(tool, 0));
tools.value.plugin.forEach(tool => setToolVisibility(tool, 0));
})
.catch(error => console.log(error));
}
</script>

@ -53,7 +53,7 @@
</td>
<td>
<div v-if="item['category']">
{{ item["category"].name }}
{{ item["category"].title }}
</div>
<div v-else>-</div>
</td>
@ -129,4 +129,4 @@ export default {
}),
},
}
</script>
</script>

@ -74,7 +74,7 @@ export default {
data() {
return {
headers: [
{ text: "name", value: "name" },
{ text: "title", value: "title" },
{ text: "code", value: "code" },
//{ text: 'description', value: 'description' },
{
@ -106,4 +106,4 @@ export default {
}),
},
}
</script>
</script>

@ -32,7 +32,7 @@
<strong>{{ $t("name") }}</strong>
</td>
<td>
{{ item["name"] }}
{{ item["title"] }}
</td>
<td>
@ -93,4 +93,4 @@ export default {
}),
},
}
</script>
</script>

@ -53,7 +53,7 @@
</td>
<td>
<div v-if="item['category']">
{{ item["category"].name }}
{{ item["category"].title }}
</div>
<div v-else>-</div>
</td>
@ -129,4 +129,4 @@ export default {
}),
},
}
</script>
</script>

@ -111,7 +111,7 @@
class="p-fluid"
>
<div class="p-field">
<label for="name">{{ $t("Name") }}</label>
<label for="title">{{ $t("Name") }}</label>
<InputText
id="title"
v-model.trim="item.title"
@ -368,4 +368,4 @@ export default {
}),
},
}
</script>
</script>

@ -221,12 +221,12 @@
:class="{ 'p-invalid': submitted && !item.title }"
autocomplete="off"
autofocus
name="name"
name="title"
required="true"
/>
<label
v-t="'Name'"
for="name"
for="title"
/>
</div>
<small
@ -392,7 +392,7 @@ const showBackButtonIfNotRootFolder = computed(() => {
if (!resourceNode.value) {
return false
}
return resourceNode.value.resourceType.name !== "courses"
return resourceNode.value.resourceType.title !== "courses"
})
function back() {

@ -157,7 +157,7 @@ const termToDeleteString = computed(() => {
if (termToDelete.value === null) {
return ""
}
return termToDelete.value.name
return termToDelete.value.title
})
onMounted(() => {

@ -92,7 +92,7 @@
icon="folder-generic"
size="big"
/>
<h5>{{ category.info.name }}</h5>
<h5>{{ category.info.title }}</h5>
</div>
<div class="flex gap-2" v-if="securityStore.isAuthenticated && isCurrentTeacher">
<BaseButton
@ -155,7 +155,7 @@
@cancel-clicked="isDeleteCategoryDialogVisible = false"
>
<div v-if="categoryToDelete">
<p class="mb-2 font-semibold">{{ categoryToDelete.info.name }}</p>
<p class="mb-2 font-semibold">{{ categoryToDelete.info.title }}</p>
<p>
{{ t("With links") }}: {{ (categoryToDelete.links || []).map((l) => l.title).join(", ") }}
</p>

@ -109,7 +109,7 @@
/>
<label
v-t="'Name'"
for="name"
for="title"
/>
</div>
<small
@ -334,4 +334,4 @@ const btnCofirmSingleDeleteOnClick = () => {
deleteItemDialog.value = false
}
</script>
</script>

@ -155,7 +155,7 @@
class="p-fluid"
>
<div class="p-field">
<label for="name">{{ $t("Name") }}</label>
<label for="title">{{ $t("Name") }}</label>
<InputText
id="title"
v-model.trim="item.title"
@ -511,4 +511,4 @@ export default {
}),
},
}
</script>
</script>

@ -224,7 +224,7 @@
class="p-fluid"
>
<div class="p-field">
<label for="name">{{ $t("Name") }}</label>
<label for="title">{{ $t("Name") }}</label>
<InputText
id="title"
v-model.trim="item.title"
@ -635,4 +635,4 @@ export default {
}),
},
}
</script>
</script>

@ -93,7 +93,7 @@ if (!empty($careers)) {
// Getting all promotions
$promotions = $promotion->get_all_promotions_by_career_id(
$career_item['id'],
'name ASC'
'title ASC'
);
$career_content = '';
$promotion_array = [];
@ -117,13 +117,13 @@ if (!empty($careers)) {
}
$promotion_array[$promotion_item['id']] = [
'id' => $promotion_item['id'],
'name' => $promotion_item['name'],
'name' => $promotion_item['title'],
'sessions' => $session_list,
];
}
}
$career_array[$career_item['id']] = [
'name' => $career_item['name'],
'name' => $career_item['title'],
'promotions' => $promotion_array,
];
$careerList = [

@ -152,7 +152,7 @@ $courseCategoryNames = [];
$courseCategoryIds = [];
foreach ($categories as $category) {
$courseCategoryNames[$category->getId()] = $category->getName();
$courseCategoryNames[$category->getId()] = $category->getTitle();
$courseCategoryIds[] = $category->getId();
}

@ -57,7 +57,7 @@ function get_course_data($from, $number_of_items, $column, $direction, $dataFunc
$select = "SELECT
course.code AS col0,
title AS col1,
course.title AS col1,
course.code AS col2,
course_language AS col3,
subscribe AS col5,
@ -91,7 +91,7 @@ function get_course_data($from, $number_of_items, $column, $direction, $dataFunc
if (isset($_GET['keyword'])) {
$keyword = Database::escape_string('%'.trim($_GET['keyword']).'%');
$sql .= " WHERE (
title LIKE '".$keyword."' OR
course.title LIKE '".$keyword."' OR
course.code LIKE '".$keyword."' OR
visual_code LIKE '".$keyword."'
)
@ -109,7 +109,7 @@ function get_course_data($from, $number_of_items, $column, $direction, $dataFunc
$sql .= " WHERE
(course.code LIKE '".$keyword_code."' OR visual_code LIKE '".$keyword_code."') AND
title LIKE '".$keyword_title."' AND
course.title LIKE '".$keyword_title."' AND
course_language LIKE '".$keyword_language."' AND
visibility LIKE '".$keyword_visibility."' AND
subscribe LIKE '".$keyword_subscribe."' AND
@ -151,14 +151,14 @@ function get_course_data($from, $number_of_items, $column, $direction, $dataFunc
$courseInfo = api_get_course_info_by_id($course['id']);
// get categories
$sqlCategoriesByCourseId = "SELECT category.name FROM $tblCourseCategory category
$sqlCategoriesByCourseId = "SELECT category.title FROM $tblCourseCategory category
INNER JOIN $tblCourseRelCategory course_rel_category ON category.id = course_rel_category.course_category_id
WHERE course_rel_category.course_id = ".$course['id'];
$resultCategories = Database::query($sqlCategoriesByCourseId);
$categories = [];
while ($category = Database::fetch_array($resultCategories)) {
$categories[] = $category['name'];
$categories[] = $category['title'];
}
// Place colour icons in front of courses.

@ -95,7 +95,7 @@ function get_request_data($from, $number_of_items, $column, $direction)
$sql = "SELECT
id AS col0,
code AS col1,
title AS col2,
course.title AS col2,
course_category.code AS col3,
tutor_name AS col4,
request_date AS col5,
@ -106,7 +106,7 @@ function get_request_data($from, $number_of_items, $column, $direction)
if ('' != $keyword) {
$sql .= " AND (
title LIKE '%".$keyword."%' OR
course.title LIKE '%".$keyword."%' OR
code LIKE '%".$keyword."%' OR
visual_code LIKE '%".$keyword."%'
)";

@ -122,7 +122,7 @@ switch ($action) {
}
$category = new GradebookCategory();
$category
->setName($values['name'])
->setTitle($values['name'])
->setWeight($values['weight'])
->setVisible(1)
->setLocked(0)
@ -222,7 +222,7 @@ switch ($action) {
$form->addButtonSave(get_lang('Edit'));
$defaults = [
'name' => $category->getName(),
'name' => $category->getTitle(),
'weight' => $category->getWeight(),
'gradebooks_to_validate_in_dependence' => $categoryData['gradebooks_to_validate_in_dependence'],
'depends' => array_keys($options),
@ -232,7 +232,7 @@ switch ($action) {
$contentForm = $form->returnForm();
if ($form->validate()) {
$values = $form->getSubmitValues();
$category->setName($values['name']);
$category->setTitle($values['name']);
$category->setWeight($values['weight']);
$em->persist($category);
$em->flush();

@ -35,7 +35,7 @@ $em = Database::getManager();
if ($formSequence->validate()) {
$values = $formSequence->exportValues();
$sequence = new Sequence();
$sequence->setName($values['name']);
$sequence->setTitle($values['name']);
$em->persist($sequence);
$em->flush();
Display::addFlash(Display::return_message(get_lang('Saved')));

@ -296,7 +296,7 @@ if (!empty($selectedTeacher)) {
$timeReport->data[] = [
'session' => [
'id' => $session->getId(),
'name' => $session->getName(),
'name' => $session->getTitle(),
],
'course' => [
'id' => $course->getId(),

@ -107,7 +107,7 @@ if (isset($_GET['export']) && $session && $coursesInfo && $usersInfo) {
$fileName = get_lang('Teachers time report').' '.api_get_local_time();
$dataToExport = [];
$dataToExport[] = [$toolName, $session->getName()];
$dataToExport[] = [$toolName, $session->getTitle()];
$dataToExport['headers'] = [
get_lang('Code'),
get_lang('Coach name'),
@ -147,7 +147,7 @@ if (isset($_GET['export']) && $session && $coursesInfo && $usersInfo) {
$contents[] = $course['time_spent_of_course'];
}
$dataToExport[] = [get_lang('Session'), $session->getName()];
$dataToExport[] = [get_lang('Session'), $session->getTitle()];
$dataToExport[] = $headers;
$dataToExport[] = $contents;
}
@ -174,7 +174,7 @@ $view = new Template($toolName);
$view->assign('form', $form->returnForm());
if ($session) {
$view->assign('session', ['id' => $session->getId(), 'name' => $session->getName()]);
$view->assign('session', ['id' => $session->getId(), 'name' => $session->getTitle()]);
$view->assign('courses', $coursesInfo);
$view->assign('users', $usersInfo);

@ -304,7 +304,7 @@ if (count($sessions) > 0) {
$personal_course_list = [];
$sessionId = $session->getId();
$csvContent[] = [$session->getName()];
$csvContent[] = [$session->getTitle()];
$csvContent[] = $headerList;
foreach ($session->getCourses() as $sessionRelCourse) {
$course = $sessionRelCourse->getCourse();
@ -391,7 +391,7 @@ if (count($sessions) > 0) {
);
$sessionInformation .= Display::page_subheader(
'<a href="'.api_get_path(WEB_CODE_PATH).'session/resume_session.php?id_session='.$sessionId.'">'.
$session->getName().'</a>',
$session->getTitle().'</a>',
$certificateLink.' '.$dates['access']
);
@ -695,7 +695,7 @@ if ('true' === api_get_setting('profile.allow_career_users')) {
$table->setHeaderContents(0, 0, get_lang('Career'));
$row = 1;
foreach ($careers as $carerData) {
$table->setCellContents($row, 0, $carerData['name']);
$table->setCellContents($row, 0, $carerData['title']);
$row++;
}
echo $table->toHtml();

@ -58,7 +58,7 @@ if (!empty($group_id)) {
];
$interbreadcrumb[] = [
'url' => api_get_path(WEB_CODE_PATH).'group/group_space.php?'.api_get_cidreq(),
'name' => get_lang('Group area').' '.$groupEntity->getName(),
'name' => get_lang('Group area').' '.$groupEntity->getTitle(),
];
if (false === $allowToEdit) {

@ -197,13 +197,13 @@ $interbreadcrumb[] = [
];
if ($attendanceEntity) {
$interbreadcrumb[] = ['url' => '#', 'name' => $attendanceEntity->getName()];
$interbreadcrumb[] = ['url' => '#', 'name' => $attendanceEntity->getTitle()];
}
if ('calendar_list' === $action || 'calendar_edit' === $action) {
$interbreadcrumb[] = [
'url' => 'index.php?'.api_get_cidreq().'&action=attendance_sheet_list&attendance_id='.$attendanceId,
'name' => $attendanceEntity->getName(),
'name' => $attendanceEntity->getTitle(),
];
$interbreadcrumb[] = ['url' => '#', 'name' => get_lang('Attendance calendar')];
}
@ -457,7 +457,7 @@ switch ($action) {
$groupList = isset($_POST['groups']) ? [$_POST['groups']] : [];
$interbreadcrumb[] = [
'url' => 'index.php?'.api_get_cidreq().'&action=attendance_sheet_list&attendance_id='.$attendanceId,
'name' => $attendanceEntity->getName(),
'name' => $attendanceEntity->getTitle(),
];
$interbreadcrumb[] = ['url' => '#', 'name' => get_lang('Add a date and time')];

@ -123,7 +123,7 @@ if ($show) {
$row = 1;
foreach ($careers as $careerData) {
$table->setCellContents($row, 0, $careerData['name']);
$table->setCellContents($row, 0, $careerData['title']);
$url = api_get_path(WEB_CODE_PATH).'user/career_diagram.php?career_id='.$careerData['id'];
$diagram = Display::url(get_lang('Diagram'), $url);
$table->setCellContents($row, 1, $diagram);

@ -163,7 +163,7 @@ $attendance_list = $attendance->getAttendanceList($course, $session);
$attendance_select = [];
$attendance_select[0] = get_lang('Select an attendance');
foreach ($attendance_list as $attendanceEntity) {
$attendance_select[$attendanceEntity->getIid()] = $attendanceEntity->getName();
$attendance_select[$attendanceEntity->getIid()] = $attendanceEntity->getTitle();
}
$token = Security::get_token();

@ -58,7 +58,7 @@ foreach ($sessions as $session) {
$user = $sessionUser->getUser();
$subjectTemplate = new Template(null, false, false, false, false, false);
$subjectTemplate->assign('session_name', $session->getName());
$subjectTemplate->assign('session_name', $session->getTitle());
$subjectLayout = $subjectTemplate->get_template(
'mail/cron_course_finished_subject.tpl'
@ -66,7 +66,7 @@ foreach ($sessions as $session) {
$bodyTemplate = new Template(null, false, false, false, false, false);
$bodyTemplate->assign('complete_user_name', UserManager::formatUserFullName($user));
$bodyTemplate->assign('session_name', $session->getName());
$bodyTemplate->assign('session_name', $session->getTitle());
$bodyLayout = $bodyTemplate->get_template(
'mail/cron_course_finished_body.tpl'
@ -83,7 +83,7 @@ foreach ($sessions as $session) {
echo '============'.PHP_EOL;
echo "Email sent to: ".UserManager::formatUserFullName($user)." ({$user->getEmail()})".PHP_EOL;
echo "Session: {$session->getName()}".PHP_EOL;
echo "Session: {$session->getTitle()}".PHP_EOL;
echo "End date: {$session->getAccessEndDate()->format('Y-m-d h:i')}".PHP_EOL;
}
}

@ -207,7 +207,7 @@ function display_move_form(
$options = ['0' => get_lang('root')];
foreach ($target as $category) {
$options[$category['cat_id']] = $category['cat_name'];
$options[$category['cat_id']] = $category['title'];
}
$form->addSelect('move_target', get_lang('Move file to'), $options);
$form->addButtonMove(get_lang('Move the file'), 'do_move');
@ -367,7 +367,7 @@ function store_addcategory()
WHERE
c_id = $course_id AND
user_id='".$_user['user_id']."' AND
cat_name='".Database::escape_string($_POST['category_name'])."' AND
title='".Database::escape_string($_POST['category_name'])."' AND
received='".$received."' AND
sent='$sent' AND
session_id='$session_id'";
@ -378,7 +378,7 @@ function store_addcategory()
$params = [
'cat_id' => 0,
'c_id' => $course_id,
'cat_name' => $_POST['category_name'],
'title' => $_POST['category_name'],
'received' => $received,
'sent' => $sent,
'user_id' => $_user['user_id'],
@ -397,7 +397,7 @@ function store_addcategory()
}
} else {
$params = [
'cat_name' => $_POST['category_name'],
'title' => $_POST['category_name'],
'received' => $received,
'sent' => $sent,
];
@ -446,7 +446,7 @@ function display_addcategory_form($category_name = '', $id = 0, $action = '')
// after an edit with an error we do not want to return to the
// original name but the name we already modified.
// (happens when createinrecievedfiles AND createinsentfiles are not checked)
$category_name = $row['cat_name'];
$category_name = $row['title'];
}
if ('1' == $row['received']) {
$target = 'received';

@ -249,7 +249,7 @@ if ('add' != $action) {
$actions .= '<a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category=0&view_sent_category='.$viewSentCategory.'&view='.$view.'">'.
Display::getMdiIcon(ActionIcon::UP, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('Up').' '.get_lang('root')).
"</a>";
$actions .= get_lang('Category').': <strong>'.Security::remove_XSS($dropbox_categories[$view_dropbox_category_received]['cat_name']).'</strong> ';
$actions .= get_lang('Category').': <strong>'.Security::remove_XSS($dropbox_categories[$view_dropbox_category_received]['title']).'</strong> ';
$movelist[0] = 'Root'; // move_received selectbox content
} else {
$actions .= '<a href="'.api_get_self().'?'.api_get_cidreq().'&action=addreceivedcategory&view='.$view.'">'.
@ -261,7 +261,7 @@ if ('add' != $action) {
if (0 != $view_dropbox_category_received && api_is_allowed_to_session_edit(false, true)) {
$actions .= '<a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category=0&view_sent_category='.$viewSentCategory.'&view='.$view.'">'.
Display::getMdiIcon(ActionIcon::UP, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('Up').' '.get_lang('root'))."</a>";
$actions .= get_lang('Category').': <strong>'.Security::remove_XSS($dropbox_categories[$view_dropbox_category_received]['cat_name']).'</strong> ';
$actions .= get_lang('Category').': <strong>'.Security::remove_XSS($dropbox_categories[$view_dropbox_category_received]['title']).'</strong> ';
$movelist[0] = 'Root'; // move_received selectbox content
} else {
$actions .= '<a href="'.api_get_self().'?'.api_get_cidreq().'&action=addreceivedcategory&view='.$view.'">'.
@ -293,7 +293,7 @@ if ('add' != $action) {
$actions .= '<a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.$viewReceivedCategory.'&view_sent_category=0&view='.$view.'">'.
Display::getMdiIcon(ActionIcon::UP, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('Up').' '.get_lang('root')).
"</a>";
$actions .= get_lang('Category').': <strong>'.Security::remove_XSS($dropbox_categories[$view_dropbox_category_sent]['cat_name']).'</strong> ';
$actions .= get_lang('Category').': <strong>'.Security::remove_XSS($dropbox_categories[$view_dropbox_category_sent]['title']).'</strong> ';
} else {
$actions .= "<a href=\"".api_get_self()."?".api_get_cidreq()."&view=".$view."&action=addsentcategory\">".
Display::getMdiIcon(ActionIcon::CREATE_FOLDER, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('Add a new folder'))."</a>\n";
@ -307,7 +307,7 @@ if ('add' != $action) {
"</a>";
}
if (0 != $view_dropbox_category_sent) {
$actions .= get_lang('You are in folder').': <strong>'.Security::remove_XSS($dropbox_categories[$view_dropbox_category_sent]['cat_name']).'</strong> ';
$actions .= get_lang('You are in folder').': <strong>'.Security::remove_XSS($dropbox_categories[$view_dropbox_category_sent]['title']).'</strong> ';
$actions .= '<a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.$viewReceivedCategory.'&view_sent_category=0&view='.$view.'">'.
Display::getMdiIcon(ActionIcon::UP, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('Up').' '.get_lang('root')).
"</a>";
@ -477,22 +477,22 @@ if ('add' != $action) {
$dropbox_received_category array;*/
$dropbox_category_data = [];
if ('1' == $category['received']) {
$movelist[$category['cat_id']] = $category['cat_name'];
$movelist[$category['cat_id']] = $category['title'];
// This is where the checkbox icon for the files appear
$dropbox_category_data[] = $category['cat_id'];
// The icon of the category
$link_open = '<a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.$category['cat_id'].'&view_sent_category='.$viewSentCategory.'&view='.$view.'">';
$dropbox_category_data[] = $link_open.DocumentManager::build_document_icon_tag('folder', $category['cat_name']).'</a>';
$dropbox_category_data[] = $link_open.DocumentManager::build_document_icon_tag('folder', $category['title']).'</a>';
$dropbox_category_data[] =
'<a href="'.api_get_path(WEB_CODE_PATH).'dropbox/dropbox_download.php?'.api_get_cidreq().'&cat_id='.$category['cat_id'].'&action=downloadcategory&sent_received=received">'.
Display::getMdiIcon(ActionIcon::SAVE_FORM, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Save')).'</a>'.$link_open.$category['cat_name'].'</a>';
Display::getMdiIcon(ActionIcon::SAVE_FORM, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Save')).'</a>'.$link_open.$category['title'].'</a>';
$dropbox_category_data[] = '';
$dropbox_category_data[] = '';
$dropbox_category_data[] = '';
$dropbox_category_data[] =
'<a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.$viewReceivedCategory.'&view_sent_category='.$viewSentCategory.'&view='.$view.'&action=editcategory&id='.$category['cat_id'].'">'.
Display::getMdiIcon(ActionIcon::EDIT, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Edit')).'</a>
<a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.$viewReceivedCategory.'&view_sent_category='.$viewSentCategory.'&view='.$view.'&action=deletereceivedcategory&id='.$category['cat_id'].'" onclick="javascript: return confirmation(\''.Security::remove_XSS($category['cat_name']).'\');">'.
<a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.$viewReceivedCategory.'&view_sent_category='.$viewSentCategory.'&view='.$view.'&action=deletereceivedcategory&id='.$category['cat_id'].'" onclick="javascript: return confirmation(\''.Security::remove_XSS($category['title']).'\');">'.
Display::getMdiIcon(ActionIcon::DELETE, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Delete')).'</a>';
}
if (is_array($dropbox_category_data) && count($dropbox_category_data) > 0) {
@ -657,19 +657,19 @@ if ('add' != $action) {
foreach ($dropbox_categories as $category) {
$dropbox_category_data = [];
if ('1' == $category['sent']) {
$moveList[$category['cat_id']] = $category['cat_name'];
$moveList[$category['cat_id']] = $category['title'];
$dropbox_category_data[] = $category['cat_id'];
// This is where the checkbox icon for the files appear.
$link_open = '<a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.$viewReceivedCategory.'&view_sent_category='.$category['cat_id'].'&view='.$view.'">';
$dropbox_category_data[] = $link_open.DocumentManager::build_document_icon_tag('folder', Security::remove_XSS($category['cat_name'])).'</a>';
$dropbox_category_data[] = $link_open.DocumentManager::build_document_icon_tag('folder', Security::remove_XSS($category['title'])).'</a>';
$dropbox_category_data[] = '<a href="'.api_get_path(WEB_CODE_PATH).'dropbox/dropbox_download.php?'.api_get_cidreq().'&cat_id='.$category['cat_id'].'&action=downloadcategory&sent_received=sent">'.
Display::getMdiIcon(ActionIcon::SAVE_FORM, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Save')).'</a>'.$link_open.Security::remove_XSS($category['cat_name']).'</a>';
Display::getMdiIcon(ActionIcon::SAVE_FORM, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Save')).'</a>'.$link_open.Security::remove_XSS($category['title']).'</a>';
$dropbox_category_data[] = '';
$dropbox_category_data[] = '';
$dropbox_category_data[] = '';
$dropbox_category_data[] = '<a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.$viewReceivedCategory.'&view_sent_category='.$viewSentCategory.'&view='.$view.'&action=editcategory&id='.$category['cat_id'].'">'.
Display::getMdiIcon(ActionIcon::EDIT, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Edit')).'</a>
<a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.$viewReceivedCategory.'&view_sent_category='.$viewSentCategory.'&view='.$view.'&action=deletesentcategory&id='.$category['cat_id'].'" onclick="javascript: return confirmation(\''.Security::remove_XSS($category['cat_name']).'\');">'.
<a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.$viewReceivedCategory.'&view_sent_category='.$viewSentCategory.'&view='.$view.'&action=deletesentcategory&id='.$category['cat_id'].'" onclick="javascript: return confirmation(\''.Security::remove_XSS($category['title']).'\');">'.
Display::getMdiIcon(ActionIcon::DELETE, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Delete')).'</a>';
}
if (is_array($dropbox_category_data) && count($dropbox_category_data) > 0) {

@ -250,7 +250,7 @@ class MultipleAnswerTrueFalseDegreeCertainty extends Question
if (!$options->isEmpty()) {
foreach ($options as $optionData) {
$optionData->setName($optionData->getName());
$optionData->setTitle($optionData->getTitle());
}
} else {
for ($i = 1; $i <= 8; $i++) {

@ -1869,7 +1869,7 @@ class Exercise
if (!empty($categories)) {
/** @var CExerciseCategory $category */
foreach ($categories as $category) {
$options[$category->getId()] = $category->getName();
$options[$category->getId()] = $category->getTitle();
}
}
@ -9913,7 +9913,7 @@ class Exercise
$courseId = (int) $courseId;
$sql = "SELECT
lp.name,
lp.title,
lpi.lp_id,
lpi.max_score
FROM $tableLpItem lpi

@ -433,7 +433,7 @@ if ('true' !== api_get_setting('exercise.allow_exercise_categories')) {
$down = Display::url(Display::getMdiIcon('arrow-down-bold', 'ch-tool-icon-disabled', null, ICON_SIZE_SMALL, get_lang('Move down')), '#');
}
}
echo Display::page_subheader($category->getName().$up.$down);
echo Display::page_subheader($category->getTitle().$up.$down);
echo Exercise::exerciseGridResource($category->getId(), $keyword);
}
} else {

@ -255,7 +255,7 @@ class MultipleAnswerTrueFalse extends Question
if (!$options->isEmpty()) {
foreach ($options as $optionData) {
$optionData->setName($optionData->getName());
$optionData->setTitle($optionData>getTitle());
}
} else {
for ($i = 1; $i <= 3; $i++) {

@ -1534,7 +1534,7 @@ abstract class Question
$option = new CQuizQuestionOption();
$option
->setQuestion($question)
->setName($name)
->setTitle($name)
->setPosition($position)
;
$em = Database::getManager();

@ -155,11 +155,11 @@ if ('group' === $origin && $group_id) {
];
$interbreadcrumb[] = [
'url' => api_get_path(WEB_CODE_PATH).'group/group_space.php?'.api_get_cidreq(),
'name' => get_lang('Group area').' '.$groupEntity->getName(),
'name' => get_lang('Group area').' '.$groupEntity->getTitle(),
];
$interbreadcrumb[] = [
'url' => api_get_path(WEB_CODE_PATH).'forum/viewforum.php?'.api_get_cidreq().'&forum='.$forumId,
'name' => prepare4display($forum->getForumTitle()),
'name' => prepare4display($forum->getTitle()),
];
$interbreadcrumb[] = ['url' => 'javascript: void (0);', 'name' => get_lang('Edit a post')];
} else {
@ -169,15 +169,15 @@ if ('group' === $origin && $group_id) {
];
$interbreadcrumb[] = [
'url' => api_get_path(WEB_CODE_PATH).'forum/index.php?forumcategory='.$category->getIid().'&'.api_get_cidreq(),
'name' => prepare4display($category->getCatTitle()),
'name' => prepare4display($category->getTitle()),
];
$interbreadcrumb[] = [
'url' => api_get_path(WEB_CODE_PATH).'forum/viewforum.php?forum='.$forumId.'&'.api_get_cidreq(),
'name' => prepare4display($forum->getForumTitle()),
'name' => prepare4display($forum->getTitle()),
];
$interbreadcrumb[] = [
'url' => api_get_path(WEB_CODE_PATH).'forum/viewthread.php?'.api_get_cidreq().'&forum='.$forumId.'&thread='.(int) ($_GET['thread']),
'name' => prepare4display($thread->getThreadTitle()),
'name' => prepare4display($thread->getTitle()),
];
$interbreadcrumb[] = ['url' => 'javascript: void (0);', 'name' => get_lang('Edit a post')];
}
@ -268,7 +268,7 @@ if ('learnpath' !== $origin) {
echo '<div class="forum_title">';
echo '<h1>';
echo Display::url(
prepare4display($forum->getForumTitle()),
prepare4display($forum->getTitle()),
'viewforum.php?'.api_get_cidreq().'&'.http_build_query([
'origin' => $origin,
'forum' => $forum->getIid(),

@ -167,7 +167,7 @@ if (!empty($groupId)) {
];
$interbreadcrumb[] = [
'url' => api_get_path(WEB_CODE_PATH).'forum/viewforum.php?'.$cidreq.'&forum='.$forumId,
'name' => $forum->getForumTitle(),
'name' => $forum->getTitle(),
];
$interbreadcrumb[] = [
'url' => api_get_path(WEB_CODE_PATH).'forum/newthread.php?'.$cidreq.'&forum='.$forumId,
@ -177,11 +177,11 @@ if (!empty($groupId)) {
$interbreadcrumb[] = ['url' => api_get_path(WEB_CODE_PATH).'forum/index.php?'.$cidreq, 'name' => $nameTools];
$interbreadcrumb[] = [
'url' => api_get_path(WEB_CODE_PATH).'forum/index.php?'.$cidreq.'&forumcategory='.$category->getIid(),
'name' => $category->getCatTitle(),
'name' => $category->getTitle(),
];
$interbreadcrumb[] = [
'url' => api_get_path(WEB_CODE_PATH).'forum/viewforum.php?'.$cidreq.'&forum='.$forumId,
'name' => $forum->getForumTitle(),
'name' => $forum->getTitle(),
];
$interbreadcrumb[] = ['url' => '#', 'name' => get_lang('Edit thread')];
}

@ -302,7 +302,7 @@ function forumForm(CForum $forum = null, int $lp_id = null): string
$forum_categories = get_forum_categories();
$forum_categories_titles = [];
foreach ($forum_categories as $value) {
$forum_categories_titles[$value->getIid()] = $value->getCatTitle();
$forum_categories_titles[$value->getIid()] = $value->getTitle();
}
$form->addSelect(
'forum_category',
@ -437,7 +437,7 @@ function forumForm(CForum $forum = null, int $lp_id = null): string
} else {
// the default values when editing = the data in the table
$defaults['forum_id'] = $forum->getIid();
$defaults['forum_title'] = prepare4display($forum->getForumTitle());
$defaults['forum_title'] = prepare4display($forum->getTitle());
$defaults['forum_comment'] = prepare4display($forum->getForumComment());
$defaults['start_time'] = api_get_local_time($forum->getStartTime());
$defaults['end_time'] = api_get_local_time($forum->getEndTime());
@ -541,7 +541,7 @@ function editForumCategoryForm(CForumCategory $category): string
// Setting the default values.
$defaultvalues['forum_category_id'] = $categoryId;
$defaultvalues['forum_category_title'] = $category->getCatTitle();
$defaultvalues['forum_category_title'] = $category->getTitle();
$defaultvalues['forum_category_comment'] = $category->getCatComment();
$form->setDefaults($defaultvalues);
@ -587,7 +587,7 @@ function saveForumCategory(array $values, array $courseInfo = [], bool $showMess
$category = $repo->find($values['forum_category_id']);
$category
->setCatComment($values['forum_category_comment'] ?? '')
->setCatTitle($values['forum_category_title'])
->setTitle($values['forum_category_title'])
;
$repo->update($category);
$message = get_lang('The forum category has been modified');
@ -607,7 +607,7 @@ function saveForumCategory(array $values, array $courseInfo = [], bool $showMess
$category = new CForumCategory();
$category
->setCatTitle($clean_cat_title)
->setTitle($clean_cat_title)
->setCatComment($values['forum_category_comment'] ?? '')
->setCatOrder($new_max)
->setParent($course)
@ -735,7 +735,7 @@ function store_forum(array $values, array $courseInfo = [], bool $returnId = fal
}
$forum
->setForumTitle($values['forum_title'])
->setTitle($values['forum_title'])
->setForumComment($values['forum_comment'] ?? '')
->setForumCategory($forumCategory)
->setAllowAnonymous($values['allow_anonymous_group']['allow_anonymous'] ?? 0)
@ -1285,7 +1285,7 @@ function getThreadInfo(int $threadId): Array
if ($forumThread) {
$thread['iid'] = $forumThread->getIid();
$thread['threadId'] = $forumThread->getIid();
$thread['threadTitle'] = $forumThread->getThreadTitle();
$thread['threadTitle'] = $forumThread->getTitle();
$thread['forumId'] = $forumThread->getForum() ? $forumThread->getForum()->getIid() : 0;
//$thread['sessionId'] = $forumThread->getSessionId();
$thread['threadSticky'] = $forumThread->getThreadSticky();
@ -1384,7 +1384,7 @@ function getPosts(
$postInfo = [
'iid' => $post->getIid(),
'post_id' => $post->getIid(),
'post_title' => $post->getPostTitle(),
'post_title' => $post->getTitle(),
'post_text' => $post->getPostText(),
'thread_id' => $post->getThread() ? $post->getThread()->getIid() : 0,
'forum_id' => $post->getForum()->getIid(),
@ -1693,7 +1693,7 @@ function updateThread($values)
// Simple update + set gradebook values to null
$params = [
'thread_title' => $values['thread_title'],
'title' => $values['thread_title'],
'thread_sticky' => $values['thread_sticky'] ?? 0,
];
$where = ['iid = ?' => [$values['thread_id']]];
@ -1801,7 +1801,7 @@ function saveThread(
// We first store an entry in the forum_thread table because the threadId is used in the forum_post table.
$thread = new CForumThread();
$thread
->setThreadTitle($clean_post_title)
->setTitle($clean_post_title)
->setForum($forum)
->setUser($user)
->setThreadDate($post_date)
@ -1859,7 +1859,7 @@ function saveThread(
// We now store the content in the table_post table.
$post = new CForumPost();
$post
->setPostTitle($clean_post_title)
->setTitle($clean_post_title)
->setPostText($values['post_text'])
->setThread($thread)
->setForum($forum)
@ -2123,7 +2123,7 @@ function show_add_post_form(CForum $forum, CForumThread $thread, CForumPost $pos
$form->addHidden('post_parent_id', $post->getIid());
// If we are replying or are quoting then we display a default title.
$posterName = UserManager::formatUserFullName($post->getUser());
$defaults['post_title'] = get_lang('Re:').api_html_entity_decode($post->getPostTitle(), ENT_QUOTES);
$defaults['post_title'] = get_lang('Re:').api_html_entity_decode($post->getTitle(), ENT_QUOTES);
// When we are quoting a message then we have to put that message into the wysiwyg editor.
// Note: The style has to be hardcoded here because using class="quote" didn't work.
if ('quote' === $action) {
@ -2814,7 +2814,7 @@ function store_reply(CForum $forum, CForumThread $thread, $values, $courseId = 0
$post = new CForumPost();
$text = empty($values['post_text']) ? '' : $values['post_text'];
$post
->setPostTitle($values['post_title'])
->setTitle($values['post_title'])
->setPostText($text)
->setThread($thread)
->setForum($forum)
@ -3032,7 +3032,7 @@ function show_edit_post_form(
$form->addButtonUpdate(get_lang('Edit'), 'SubmitPost');
// Setting the default values for the form elements.
$defaults['post_title'] = $post->getPostTitle();
$defaults['post_title'] = $post->getTitle();
$defaults['post_text'] = $post->getPostText();
if (1 == $post->getPostNotification()) {
@ -3100,7 +3100,7 @@ function store_edit_post(CForum $forum, $values)
if (!empty($first_post) && $first_post['post_id'] == $values['post_id']) {
// Simple edit
$params = [
'thread_title' => $values['post_title'],
'title' => $values['post_title'],
'thread_sticky' => isset($values['thread_sticky']) ? $values['thread_sticky'] : 0,
];
$where = ['iid = ?' => [$values['thread_id']]];
@ -3125,7 +3125,7 @@ function store_edit_post(CForum $forum, $values)
$post = $repo->find($postId);
if ($post) {
$post
->setPostTitle($values['post_title'])
->setTitle($values['post_title'])
->setPostText($values['post_text'])
->setPostNotification(isset($values['post_notification']))
;
@ -3440,16 +3440,16 @@ function send_mail($userInfo, CForum $forum, CForumThread $thread, CForumPost $p
$email_body = get_lang('Dear').' '.
api_get_person_name($userInfo['firstname'], $userInfo['lastname'], null, PERSON_NAME_EMAIL_ADDRESS).", <br />\n\r";
$email_body .= get_lang('New Post in the forum').
': '.$forum->getForumTitle().' - '.$thread->getThreadTitle()." <br />\n";
': '.$forum->getTitle().' - '.$thread->getTitle()." <br />\n";
$courseId = (int) api_get_setting('forum.global_forums_course_id');
$subject = get_lang('New Post in the forum').' - '.
$_course['official_code'].': '.$forum->getForumTitle().' - '.$thread->getThreadTitle()." <br />\n";
$_course['official_code'].': '.$forum->getTitle().' - '.$thread->getTitle()." <br />\n";
$courseInfoTitle = get_lang('Course').': '.$_course['name'].' - ['.$_course['official_code']."] - <br />\n";
if (!empty($courseId) && $_course['real_id'] == $courseId) {
$subject = get_lang('New Post in the forum').': '.
$forum->getForumTitle().' - '.$thread->getThreadTitle()." <br />\n";
$forum->getTitle().' - '.$thread->getTitle()." <br />\n";
$courseInfoTitle = " <br />\n";
}
$email_body .= $courseInfoTitle;
@ -3511,10 +3511,10 @@ function move_thread_form()
<div class="formw">';
$htmlcontent .= '<select name="forum">';
foreach ($forum_categories as $category) {
$htmlcontent .= '<optgroup label="'.$category->getCatTitle().'">';
$htmlcontent .= '<optgroup label="'.$category->getTitle().'">';
$forums = $category->getForums();
foreach ($forums as $forum) {
$htmlcontent .= '<option value="'.$forum->getIid().'">'.$forum->getForumTitle().'</option>';
$htmlcontent .= '<option value="'.$forum->getIid().'">'.$forum->getTitle().'</option>';
}
$htmlcontent .= '</optgroup>';
}
@ -3563,7 +3563,7 @@ function move_post_form()
$threads = get_threads($_GET['forum']);
$threads_list[0] = get_lang('A new thread');
foreach ($threads as $thread) {
$threads_list[$thread->getIid()] = $thread->getThreadTitle();
$threads_list[$thread->getIid()] = $thread->getTitle();
}
$form->addSelect('thread', get_lang('Move toThread'), $threads_list);
$form->applyFilter('thread', 'html_filter');
@ -3609,7 +3609,7 @@ function store_move_post($values)
$thread = new CForumThread();
$thread
->setThreadTitle($post->getPostTitle())
->setTitle($post->getTitle())
->setForum($post->getForum())
->setUser($post->getUser())
->setThreadLastPost($post)
@ -4650,7 +4650,7 @@ function get_name_thread_by_id(int $threadId): string
{
$tForumThread = Database::get_course_table(TABLE_FORUM_THREAD);
$course_id = api_get_course_int_id();
$sql = "SELECT thread_title
$sql = "SELECT title
FROM $tForumThread
WHERE iid = $threadId";
$result = Database::query($sql);
@ -4702,7 +4702,7 @@ function get_all_post_from_user(int $user_id, int $courseId): string
if (is_array($post_list) && count($post_list) > 0) {
$hand_forums .= '<div id="social-thread">';
$hand_forums .= Display::getMdiIcon('format-quote-open', 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Thread'));
$hand_forums .= '&nbsp;'.Security::remove_XSS($thread->getThreadTitle(), STUDENT);
$hand_forums .= '&nbsp;'.Security::remove_XSS($thread->getTitle(), STUDENT);
$hand_forums .= '</div>';
foreach ($post_list as $posts) {
@ -4720,7 +4720,7 @@ function get_all_post_from_user(int $user_id, int $courseId): string
$forum_results .= '<div id="social-forum">';
$forum_results .= '<div class="clear"></div><br />';
$forum_results .= '<div id="social-forum-title">'.
Display::getMdiIcon('comment-quote', 'ch-tool-icon', '', ICON_SIZE_SMALL, get_lang('Forum')).'&nbsp;'.Security::remove_XSS($forum->getForumTitle(), STUDENT).
Display::getMdiIcon('comment-quote', 'ch-tool-icon', '', ICON_SIZE_SMALL, get_lang('Forum')).'&nbsp;'.Security::remove_XSS($forum->getTitle(), STUDENT).
'<div style="float:right;margin-top:-35px">
<a href="../forum/viewforum.php?'.api_get_cidreq_params($courseId).'&forum='.$forum->getIid().' " >'.
get_lang('See forum').'
@ -4803,7 +4803,7 @@ function getForumCreatedByUser($userId, $courseInfo, $sessionId)
/** @var CForum $forum */
foreach ($items as $forum) {
$forumList[] = [
$forum->getForumTitle(),
$forum->getTitle(),
api_get_local_time($forum->getResourceNode()->getCreatedAt()),
api_get_local_time($forum->getResourceNode()->getUpdatedAt()),
];
@ -5492,7 +5492,7 @@ function reportPost(CForumPost $post, CForum $forumInfo, CForumThread $threadInf
$url = api_get_path(WEB_CODE_PATH).
'forum/viewthread.php?forum='.$forumInfo->getIid().'&thread='.$threadInfo->getIid().'&'.api_get_cidreq().'&post_id='.$postId.'#post_id_'.$postId;
$postLink = Display::url(
$post->getPostTitle(),
$post->getTitle(),
$url
);
$subject = get_lang('Post reported');
@ -5500,7 +5500,7 @@ function reportPost(CForumPost $post, CForum $forumInfo, CForumThread $threadInf
get_lang('User %s has reported the message %s in the forum %s'),
$currentUser['complete_name'],
$postLink,
$forumInfo->getForumTitle()
$forumInfo->getTitle()
);
foreach ($users as $userId) {
MessageManager::send_message_simple($userId, $subject, $content);

@ -176,12 +176,12 @@ if ('learnpath' === $origin) {
];
$interbreadcrumb[] = [
'url' => 'viewforum.php?'.api_get_cidreq().'&forum='.$forumId.'&search='.$search,
'name' => prepare4display($forumEntity->getForumTitle()),
'name' => prepare4display($forumEntity->getTitle()),
];
if ('PostDeletedSpecial' != $message) {
$interbreadcrumb[] = [
'url' => 'viewthread.php?'.api_get_cidreq().'&forum='.$forumId.'&thread='.$threadId,
'name' => prepare4display($threadEntity->getThreadTitle()),
'name' => prepare4display($threadEntity->getTitle()),
];
}
@ -200,17 +200,17 @@ if ('learnpath' === $origin) {
];
$interbreadcrumb[] = [
'url' => 'index.php?'.api_get_cidreq().'&forumcategory='.$category->getIid().'&search='.$search,
'name' => prepare4display($category->getCatTitle()),
'name' => prepare4display($category->getTitle()),
];
$interbreadcrumb[] = [
'url' => 'viewforum.php?'.api_get_cidreq().'&forum='.$forumId.'&search='.$search,
'name' => prepare4display($forumEntity->getForumTitle()),
'name' => prepare4display($forumEntity->getTitle()),
];
if ('PostDeletedSpecial' != $message) {
$interbreadcrumb[] = [
'url' => 'viewthread.php?'.api_get_cidreq().'&forum='.$forumId.'&thread='.$threadId,
'name' => prepare4display($threadEntity->getThreadTitle()),
'name' => prepare4display($threadEntity->getTitle()),
];
}
// the last element of the breadcrumb navigation is already set in interbreadcrumb, so give empty string
@ -275,7 +275,7 @@ $url = api_get_path(WEB_CODE_PATH).'forum/forumqualify.php?'.
$userToQualifyInfo = api_get_user_info($userIdToQualify);
$form = new FormValidator('forum-thread-qualify', 'post', $url);
$form->addHeader($userToQualifyInfo['complete_name']);
$form->addLabel(get_lang('Thread'), $threadEntity->getThreadTitle());
$form->addLabel(get_lang('Thread'), $threadEntity->getTitle());
$form->addLabel(get_lang('Users in course'), $result['user_course']);
$form->addLabel(get_lang('Number of posts'), $result['post']);
$form->addLabel(get_lang('Number of posts for this user'), $result['user_post']);

@ -116,7 +116,7 @@ if ('group' === $origin) {
];
$interbreadcrumb[] = [
'url' => api_get_path(WEB_CODE_PATH).'forum/viewforum.php?origin='.$origin.'&forum='.$forumId.'&'.api_get_cidreq(),
'name' => prepare4display($forumEntity->getForumTitle()),
'name' => prepare4display($forumEntity->getTitle()),
];
$interbreadcrumb[] = [
'url' => api_get_path(WEB_CODE_PATH).'forum/forumsearch.php?'.api_get_cidreq(),

@ -66,7 +66,7 @@ $course_id = api_get_course_int_id();
$table_posts = Database::get_course_table(TABLE_FORUM_POST);
$table_users = Database::get_main_table(TABLE_MAIN_USER);
$sql = "SELECT username, firstname, lastname, u.id, post_date, post_title, post_text
$sql = "SELECT username, firstname, lastname, u.id, post_date, title as post_title, post_text
FROM $table_posts posts
INNER JOIN $table_users u
ON (posts.poster_id = u.id)

@ -311,7 +311,7 @@ if (is_array($forumCategories)) {
//$categorySessionId = $forumCategory->getSessionId();
$categorySessionId = 0;
$forumCategoryInfo['id'] = $categoryId;
$forumCategoryInfo['title'] = $forumCategory->getCatTitle();
$forumCategoryInfo['title'] = $forumCategory->getTitle();
/*
if (empty($forumCategory['cat_title'])) {
$forumCategoryInfo['title'] = get_lang('Without category');
@ -409,7 +409,7 @@ if (is_array($forumCategories)) {
$form_count++;
$forumInfo['id'] = $forumId;
$forumInfo['forum_of_group'] = $forum->getForumOfGroup();
$forumInfo['title'] = $forum->getForumTitle();
$forumInfo['title'] = $forum->getTitle();
$forumInfo['forum_image'] = null;
// Showing the image
/*if (!empty($forum['forum_image'])) {
@ -448,7 +448,7 @@ if (is_array($forumCategories)) {
if (!empty($forum->getStartTime()) && !empty($forum->getEndTime())) {
$res = api_is_date_in_date_range($forum->getStartTime(), $forum->getEndTime());
if (!$res) {
$linkForum = $forum->getForumTitle();
$linkForum = $forum->getTitle();
}
}

@ -179,7 +179,7 @@ if (!empty($groupId)) {
];
$interbreadcrumb[] = [
'url' => api_get_path(WEB_CODE_PATH).'forum/viewforum.php?'.$cidreq.'&forum='.(int) ($_GET['forum']),
'name' => $forumEntity->getForumTitle(),
'name' => $forumEntity->getTitle(),
];
$interbreadcrumb[] = [
'url' => api_get_path(WEB_CODE_PATH).'forum/newthread.php?'.$cidreq.'&forum='.(int) ($_GET['forum']),
@ -190,12 +190,12 @@ if (!empty($groupId)) {
if ($current_forum_category) {
$interbreadcrumb[] = [
'url' => api_get_path(WEB_CODE_PATH).'forum/index.php?'.$cidreq.'&forumcategory='.$current_forum_category->getIid(),
'name' => $current_forum_category->getCatTitle(),
'name' => $current_forum_category->getTitle(),
];
}
$interbreadcrumb[] = [
'url' => api_get_path(WEB_CODE_PATH).'forum/viewforum.php?'.$cidreq.'&forum='.$forumId,
'name' => $forumEntity->getForumTitle(),
'name' => $forumEntity->getTitle(),
];
$interbreadcrumb[] = ['url' => '#', 'name' => get_lang('Create thread')];
}

@ -161,11 +161,11 @@ if (!empty($groupId)) {
$interbreadcrumb[] = [
'url' => api_get_path(WEB_CODE_PATH).'forum/viewforum.php?forum='.$forumId.'&'.api_get_cidreq(),
'name' => $forum->getForumTitle(),
'name' => $forum->getTitle(),
];
$interbreadcrumb[] = [
'url' => api_get_path(WEB_CODE_PATH).'forum/viewthread.php?forum='.$forumId.'&thread='.$threadId.'&'.api_get_cidreq(),
'name' => $threadEntity->getThreadTitle(),
'name' => $threadEntity->getTitle(),
];
$interbreadcrumb[] = [
@ -179,15 +179,15 @@ if (!empty($groupId)) {
];
$interbreadcrumb[] = [
'url' => api_get_path(WEB_CODE_PATH).'forum/index.php?forumcategory='.$current_forum_category->getIid().'&'.api_get_cidreq(),
'name' => $current_forum_category->getCatTitle(),
'name' => $current_forum_category->getTitle(),
];
$interbreadcrumb[] = [
'url' => api_get_path(WEB_CODE_PATH).'forum/viewforum.php?forum='.$forumId.'&'.api_get_cidreq(),
'name' => $forum->getForumTitle(),
'name' => $forum->getTitle(),
];
$interbreadcrumb[] = [
'url' => api_get_path(WEB_CODE_PATH).'forum/viewthread.php?forum='.$forumId.'&thread='.$threadId.'&'.api_get_cidreq(),
'name' => $threadEntity->getThreadTitle(),
'name' => $threadEntity->getTitle(),
];
$interbreadcrumb[] = ['url' => '#', 'name' => get_lang('Reply')];
}
@ -248,7 +248,7 @@ if ('learnpath' !== $origin) {
echo '<div class="forum_title">';
echo '<h1>';
echo Display::url(
prepare4display($forum->getForumTitle()),
prepare4display($forum->getTitle()),
'viewforum.php?'.api_get_cidreq().'&'.http_build_query(['forum' => $forumId]),
['class' => empty($forum->isVisible($courseEntity)) ? 'text-muted' : null]
);

@ -154,11 +154,11 @@ if (!empty($groupId)) {
];
$interbreadcrumb[] = [
'url' => api_get_path(WEB_CODE_PATH).'group/group_space.php?'.api_get_cidreq(),
'name' => get_lang('Group area').' '.$groupEntity->getName(),
'name' => get_lang('Group area').' '.$groupEntity->getTitle(),
];
$interbreadcrumb[] = [
'url' => '#',
'name' => get_lang('Forum').' '.Security::remove_XSS($forumEntity->getForumTitle()),
'name' => get_lang('Forum').' '.Security::remove_XSS($forumEntity->getTitle()),
];
} else {
$interbreadcrumb[] = [
@ -167,11 +167,11 @@ if (!empty($groupId)) {
];
$interbreadcrumb[] = [
'url' => $forumUrl.'index.php?forumcategory='.$category->getIid().'&'.api_get_cidreq(),
'name' => prepare4display($category->getCatTitle()),
'name' => prepare4display($category->getTitle()),
];
$interbreadcrumb[] = [
'url' => '#',
'name' => Security::remove_XSS($forumEntity->getForumTitle()),
'name' => Security::remove_XSS($forumEntity->getTitle()),
];
}
@ -330,7 +330,7 @@ $header = '';
if ('learnpath' !== $origin) {
$header .= Display::tag(
'h3',
$iconForum.' '.$forumEntity->getForumTitle(),
$iconForum.' '.$forumEntity->getTitle(),
[
'class' => 'title-forum', ]
);
@ -364,7 +364,7 @@ if (is_array($threads)) {
$title = '<a href="viewthread.php?'.api_get_cidreq().'&forum='.$forumId
."&thread={$threadId}&search="
.Security::remove_XSS(urlencode($my_search)).'">'
.$thread->getThreadTitle().'</a>';
.$thread->getTitle().'</a>';
// display the author name
$author = $thread->getUser();

@ -239,15 +239,15 @@ if (!empty($groupId)) {
];
$interbreadcrumb[] = [
'url' => api_get_path(WEB_CODE_PATH).'group/group_space.php?'.api_get_cidreq(),
'name' => get_lang('Group area').' '.$groupEntity->getName(),
'name' => get_lang('Group area').' '.$groupEntity->getTitle(),
];
$interbreadcrumb[] = [
'url' => api_get_path(WEB_CODE_PATH).'forum/viewforum.php?forum='.$forumId.'&'.api_get_cidreq().'&search='.Security::remove_XSS(urlencode($my_search)),
'name' => Security::remove_XSS($forumEntity->getForumTitle()),
'name' => Security::remove_XSS($forumEntity->getTitle()),
];
$interbreadcrumb[] = [
'url' => api_get_path(WEB_CODE_PATH).'forum/viewthread.php?forum='.$forumId.'&'.api_get_cidreq().'&thread='.$threadId,
'name' => Security::remove_XSS($threadEntity->getThreadTitle()),
'name' => Security::remove_XSS($threadEntity->getTitle()),
];
} else {
$my_search = isset($_GET['search']) ? $_GET['search'] : '';
@ -263,15 +263,15 @@ if (!empty($groupId)) {
'forum/index.php?forumcategory='.$current_forum_category->getIid().'&search='.Security::remove_XSS(
urlencode($my_search)
),
'name' => Security::remove_XSS($current_forum_category->getCatTitle()),
'name' => Security::remove_XSS($current_forum_category->getTitle()),
];
$interbreadcrumb[] = [
'url' => api_get_path(WEB_CODE_PATH).'forum/viewforum.php?'.api_get_cidreq().'&forum='.$forumId.'&search='.Security::remove_XSS(urlencode($my_search)),
'name' => Security::remove_XSS($forumEntity->getForumTitle()),
'name' => Security::remove_XSS($forumEntity->getTitle()),
];
$interbreadcrumb[] = [
'url' => '#',
'name' => Security::remove_XSS($threadEntity->getThreadTitle()),
'name' => Security::remove_XSS($threadEntity->getTitle()),
];
}
}

@ -200,7 +200,7 @@ switch ($action) {
$form->addButtonUpdate(get_lang('Update term'), 'SubmitGlossary');
$default = [
'glossary_id' => $glossaryData->getIid(),
'name' => $glossaryData->getName(),
'name' => $glossaryData->getTitle(),
'description' => $glossaryData->getDescription(),
];
$form->setDefaults($default);

@ -98,7 +98,7 @@ if (isset($typeSelected) && '0' != $typeSelected) {
5 == $typeSelected &&
(isset($addvalues['select_link']) && "" != $addvalues['select_link'])
) {
$sql1 = 'SELECT thread_title from '.$tbl_forum_thread.'
$sql1 = 'SELECT title from '.$tbl_forum_thread.'
WHERE
c_id = '.$course_info['real_id'].' AND
iid = '.$addvalues['select_link'];

@ -162,7 +162,7 @@ foreach ($links as &$row) {
$sql = "SELECT * FROM $table_evaluation
WHERE category_id = $my_selectcat
ORDER BY name";
ORDER BY title";
$result = Database::query($sql);
$evaluations = Database::store_result($result);
foreach ($evaluations as $evaluationRow) {
@ -179,7 +179,7 @@ foreach ($evaluations as $evaluationRow) {
$output .= '<tr>
<td>'.GradebookUtils::build_type_icon_tag('evalnotempty').'</td>
<td>'.$evaluationRow['name'].' '.Display::label(get_lang('Score')).'</td>';
<td>'.$evaluationRow['title'].' '.Display::label(get_lang('Score')).'</td>';
$output .= '<td>
<input type="hidden" name="eval_'.$evaluationRow['id'].'" value="1" />
<input

@ -29,7 +29,7 @@ $t_user = Database::get_main_table(TABLE_MAIN_USER);
$visible_log = Security::remove_XSS($_GET['visiblelog']);
$evaledit = Evaluation :: load($visible_log);
$sql = "SELECT le.name,le.description,le.weight,le.visible,le.type,le.created_at, us.id as user_id
$sql = "SELECT le.title,le.description,le.weight,le.visible,le.type,le.created_at, us.id as user_id
FROM $t_linkeval_log le
INNER JOIN $t_user us
ON le.user_id_log = us.id

@ -29,7 +29,7 @@ $t_user = Database::get_main_table(TABLE_MAIN_USER);
$t_link_log = Database::get_main_table(TABLE_MAIN_GRADEBOOK_LINKEVAL_LOG);
$visible_link = Security::remove_XSS($_GET['visiblelink']);
$evaledit = EvalLink:: load($visible_link);
$sql = "SELECT lk.name,lk.description,lk.weight,lk.visible,lk.type,lk.created_at,us.username
$sql = "SELECT lk.title,lk.description,lk.weight,lk.visible,lk.type,lk.created_at,us.username
FROM ".$t_link_log." lk inner join ".$t_user." us
ON lk.user_id_log=us.id
WHERE lk.id_linkeval_log=".$evaledit[0]->get_id()." AND lk.type='link';";

@ -968,7 +968,7 @@ if (isset($first_time) && 1 == $first_time && api_is_allowed_to_edit(null, true)
// Showing the grading system
if (!empty($grade_models[$grade_model_id])) {
echo Display::return_message(
get_lang('Grading model').': '.$grade_models[$grade_model_id]['name']
get_lang('Grading model').': '.$grade_models[$grade_model_id]['title']
);
}
}

@ -478,7 +478,7 @@ abstract class AbstractLink implements GradebookItem
$params = [
'id_linkeval_log' => $arreval['id'],
'name' => $name_log,
'title' => $name_log,
'description' => $description_log,
'created_at' => $now,
'weight' => $arreval['weight'],

@ -67,7 +67,7 @@ class AttendanceLink extends AbstractLink
if (!empty($title)) {
$cats[] = [$link->getIid(), $title];
} else {
$cats[] = [$link->getIid(), $link->getName()];
$cats[] = [$link->getIid(), $link->getTitle()];
}
}

@ -557,7 +557,7 @@ class Category implements GradebookItem
}
$category = new GradebookCategory();
$category->setName($this->name);
$category->setTitle($this->name);
$category->setDescription($this->description);
$category->setUser(api_get_user_entity($this->user_id));
$category->setCourse($course);
@ -648,7 +648,7 @@ class Category implements GradebookItem
}
$course = api_get_course_entity();
$category->setName($this->name);
$category->setTitle($this->name);
$category->setDescription($this->description);
$category->setUser(api_get_user_entity($this->user_id));
$category->setCourse($course);
@ -2557,7 +2557,7 @@ class Category implements GradebookItem
while ($data = Database::fetch_array($result)) {
$cat = new Category();
$cat->set_id($data['id']);
$cat->set_name($data['name']);
$cat->set_name($data['title']);
$cat->set_description($data['description']);
$cat->set_user_id($data['user_id']);
$courseInfo = api_get_course_info_by_id($data['c_id']);

@ -334,7 +334,7 @@ class Evaluation implements GradebookItem
$evaluation
->setDescription($this->description)
->setCourse(api_get_course_entity($courseId))
->setName($this->get_name())
->setTitle($this->get_name())
->setCategory($category)
->setUser(api_get_user_entity($this->get_user_id()))
->setWeight(api_float_val($this->get_weight()))
@ -369,7 +369,7 @@ class Evaluation implements GradebookItem
$current_date = api_get_utc_datetime();
$params = [
'id_linkeval_log' => $arreval['id'],
'name' => $arreval['name'],
'title' => $arreval['name'],
'description' => $arreval['description'],
'created_at' => $current_date,
'weight' => $row_old_weight['weight'],
@ -389,7 +389,7 @@ class Evaluation implements GradebookItem
{
$tbl_grade_evaluations = Database::get_main_table(TABLE_MAIN_GRADEBOOK_EVALUATION);
$sql = 'UPDATE '.$tbl_grade_evaluations
." SET name = '".Database::escape_string($this->get_name())."'"
." SET title = '".Database::escape_string($this->get_name())."'"
.', description = ';
if (isset($this->description)) {
$sql .= "'".Database::escape_string($this->get_description())."'";
@ -448,7 +448,7 @@ class Evaluation implements GradebookItem
$tbl_grade_evaluations = Database::get_main_table(TABLE_MAIN_GRADEBOOK_EVALUATION);
$sql = "SELECT count(id) AS number
FROM $tbl_grade_evaluations
WHERE name = '".Database::escape_string($name)."'";
WHERE title = '".Database::escape_string($name)."'";
if (api_is_allowed_to_edit()) {
$parent = Category::load($parent);
@ -947,7 +947,7 @@ class Evaluation implements GradebookItem
while ($data = Database::fetch_array($result)) {
$eval = new Evaluation();
$eval->set_id($data['id']);
$eval->set_name($data['name']);
$eval->set_name($data['title']);
$eval->set_description($data['description']);
$eval->set_user_id($data['user_id']);
$eval->setCourseId($data['c_id']);

@ -265,7 +265,7 @@ class ExerciseLink extends AbstractLink
} else {
$sql = "SELECT * FROM $tblHp hp
INNER JOIN $tblDoc doc
ON (hp.exe_name = doc.path AND doc.c_id = hp.c_id)
ON (hp.title = doc.path AND doc.c_id = hp.c_id)
WHERE
hp.c_id = $courseId AND
doc.iid = $exerciseId";

@ -76,7 +76,7 @@ class ForumThreadLink extends AbstractLink
$result = Database::query($sql);*/
$cats = [];
foreach ($threads as $thread) {
$title = $thread->getThreadTitle();
$title = $thread->getTitle();
$threadQualify = $thread->getThreadTitleQualify();
if (!empty($threadQualify)) {
$title = $threadQualify;
@ -246,7 +246,7 @@ class ForumThreadLink extends AbstractLink
public function get_name()
{
$this->getThreadData();
$thread_title = isset($this->exercise_data['thread_title']) ? $this->exercise_data['thread_title'] : '';
$thread_title = isset($this->exercise_data['title']) ? $this->exercise_data['title'] : '';
$thread_title_qualify = isset($this->exercise_data['thread_title_qualify']) ? $this->exercise_data['thread_title_qualify'] : '';
if (isset($thread_title_qualify) && '' != $thread_title_qualify) {
return $this->exercise_data['thread_title_qualify'];

@ -46,7 +46,7 @@ class LearnpathLink extends AbstractLink
$list = [];
/** @var CLp $lp */
foreach ($lps as $lp) {
$list[] = [$lp->getIid(), $lp->getName()];
$list[] = [$lp->getIid(), $lp->getTitle()];
}
return $list;

@ -67,7 +67,7 @@ if (!empty($_GET['selfUnReg']) &&
}
Display::display_header(
$nameTools.' '.Security::remove_XSS($groupEntity->getName()),
$nameTools.' '.Security::remove_XSS($groupEntity->getTitle()),
'Group'
);
@ -112,7 +112,7 @@ if (api_is_allowed_to_edit(false, true) ||
}
echo Display::page_header(
Security::remove_XSS($groupEntity->getName()).' '.$edit_url.' '.$subscribe_group.' '.$unsubscribe_group
Security::remove_XSS($groupEntity->getTitle()).' '.$edit_url.' '.$subscribe_group.' '.$unsubscribe_group
);
if (!empty($groupEntity->getDescription())) {
@ -134,7 +134,7 @@ if (api_is_allowed_to_edit(false, true) ||
$actions_array[] = [
'url' => api_get_path(WEB_CODE_PATH).
'forum/viewforum.php?forum='.$forum->getIid().'&'.api_get_cidreq().'&origin=group',
'content' => Display::getMdiIcon(ToolIcon::FORUM, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('Forum').': '.$forum->getForumTitle()),
'content' => Display::getMdiIcon(ToolIcon::FORUM, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('Forum').': '.$forum->getTitle()),
];
}
}

@ -15,7 +15,7 @@ $groupEntity = api_get_group_entity($group_id);
$nameTools = get_lang('Edit this group');
$interbreadcrumb[] = ['url' => 'group.php', 'name' => get_lang('Groups')];
$interbreadcrumb[] = ['url' => 'group_space.php?'.api_get_cidreq(), 'name' => $groupEntity->getName()];
$interbreadcrumb[] = ['url' => 'group_space.php?'.api_get_cidreq(), 'name' => $groupEntity->getTitle()];
$is_group_member = GroupManager::isTutorOfGroup(api_get_user_id(), $groupEntity);

@ -32,7 +32,7 @@ if (null === $groupEntity) {
$nameTools = get_lang('Edit this group');
$interbreadcrumb[] = ['url' => 'group.php?'.api_get_cidreq(), 'name' => get_lang('Groups')];
$interbreadcrumb[] = ['url' => 'group_space.php?'.api_get_cidreq(), 'name' => $groupEntity->getName()];
$interbreadcrumb[] = ['url' => 'group_space.php?'.api_get_cidreq(), 'name' => $groupEntity->getTitle()];
$groupMember = GroupManager::isTutorOfGroup(api_get_user_id(), $groupEntity);
if (!$groupMember && !api_is_allowed_to_edit(false, true)) {

@ -19,7 +19,7 @@ $current_group = GroupManager::get_group_properties($group_id);
$nameTools = get_lang('Edit this group');
$interbreadcrumb[] = ['url' => 'group.php?'.api_get_cidreq(), 'name' => get_lang('Groups')];
$interbreadcrumb[] = ['url' => 'group_space.php?'.api_get_cidreq(), 'name' => $groupEntity->getName()];
$interbreadcrumb[] = ['url' => 'group_space.php?'.api_get_cidreq(), 'name' => $groupEntity->getTitle()];
$is_group_member = GroupManager::isTutorOfGroup(api_get_user_id(), $groupEntity);

@ -46,7 +46,7 @@ switch ($action) {
$data = [];
if (!empty($lps)) {
foreach ($lps as $lp) {
$data[] = ['id' => $lp->getIid(), 'text' => html_entity_decode($lp->getName())];
$data[] = ['id' => $lp->getIid(), 'text' => html_entity_decode($lp->getTitle())];
}
}
echo json_encode($data);
@ -241,7 +241,7 @@ switch ($action) {
if (null === $forumCategory) {
$forumCategory = new CForumCategory();
$forumCategory
->setCatTitle(get_lang('Learning paths'))
->setTitle(get_lang('Learning paths'))
->setParent($course)
->addCourseLink($course, $session)
;
@ -250,7 +250,7 @@ switch ($action) {
$forum = new CForum();
$forum
->setForumTitle('forum2')
->setTitle('forum2')
->setForumCategory($forumCategory)
->setParent($course)
->setLp($lp)
@ -266,7 +266,7 @@ switch ($action) {
if (null === $thread) {
$thread = new CForumThread();
$thread
->setThreadTitle($title)
->setTitle($title)
->setForum($forum)
->setUser(api_get_user_entity())
->setParent($forum)

@ -289,6 +289,7 @@ if (($search || $forceSearch) && ('false' !== $search)) {
if (!$sidx) {
$sidx = 1;
}
$options = [];
//2. Selecting the count FIRST
//@todo rework this
@ -1048,7 +1049,7 @@ switch ($action) {
foreach ($items as $item) {
$result[] = [
'id' => $item->getId(),
'name' => $item->getName(),
'name' => $item->getTitle(),
];
}
/*$result = $manager->get_all([
@ -1957,9 +1958,9 @@ switch ($action) {
$sord = 'DESC';
}
} else {
$sidx = in_array($sidx, $columns) ? $sidx : 'name';
$sidx = in_array($sidx, $columns) ? $sidx : 'title';
}
$orderBy = "$sidx $sord, s.name";
$orderBy = "$sidx $sord, s.title";
$limit = 20;
$total_pages = 0;
if ($count > 0) {
@ -2060,6 +2061,8 @@ switch ($action) {
break;
case 'get_session_lp_progress':
$sessionId = 0;
$date_from = $_GET['date_from'];
$date_to = $_GET['date_to'];
if (!empty($_GET['session_id']) && !empty($_GET['course_id'])) {
$sessionId = (int) $_GET['session_id'];
$courseId = (int) $_GET['course_id'];
@ -2318,7 +2321,7 @@ switch ($action) {
}
$result = Database::select(
'p.id,p.name, p.description, c.name as career, p.status',
'p.id,p.name, p.description, c.title as career, p.status',
"$obj->table p LEFT JOIN ".Database::get_main_table(TABLE_CAREER)." c ON c.id = p.career_id ",
['order' => "$sidx $sord", 'LIMIT' => "$start , $limit"]
);

@ -47,7 +47,7 @@ switch ($action) {
if (api_is_platform_admin()) {
$sessions = SessionManager::get_sessions_list(
[
's.name' => [
's.title' => [
'operator' => 'LIKE',
'value' => "%".$_REQUEST['q']."%",
],
@ -77,7 +77,7 @@ switch ($action) {
if (api_is_platform_admin()) {
$results = SessionManager::get_sessions_list(
[
's.name' => ['operator' => 'like', 'value' => "%".$_REQUEST['q']."%"],
's.title' => ['operator' => 'like', 'value' => "%".$_REQUEST['q']."%"],
'c.id' => ['operator' => '=', 'value' => $_REQUEST['course_id']],
]
);
@ -106,7 +106,7 @@ switch ($action) {
if (api_is_platform_admin()) {
$results = SessionManager::get_sessions_list(
[
's.name' => ['operator' => 'like', 'value' => "%".$_REQUEST['q']."%"],
's.title' => ['operator' => 'like', 'value' => "%".$_REQUEST['q']."%"],
'c.id' => ['operator' => '=', 'value' => $_REQUEST['course_id']],
]
);

@ -657,8 +657,6 @@ class AnnouncementManager
$end_date = api_get_utc_datetime();
}
$order = self::getLastAnnouncementOrder($courseInfo);
$course = api_get_course_entity($courseId);
$session = api_get_session_entity($sessionId);
$group = api_get_group_entity();
@ -670,7 +668,6 @@ class AnnouncementManager
->setContent($content)
->setTitle($title)
->setEndDate(new DateTime($end_date))
->setDisplayOrder($order)
->setParent($course)
;
@ -740,7 +737,6 @@ class AnnouncementManager
$sendToUsersInSession = false
) {
$courseInfo = api_get_course_info();
$order = self::getLastAnnouncementOrder($courseInfo);
$em = Database::getManager();
$now = api_get_utc_datetime();
$courseId = api_get_course_int_id();
@ -754,7 +750,6 @@ class AnnouncementManager
->setContent($newContent)
->setTitle($title)
->setEndDate(new DateTime($now))
->setDisplayOrder($order)
->setParent($course)
;

@ -931,7 +931,7 @@ class CoursesAndSessionsCatalog
'url.sessionId = s.id'
)
->andWhere($qb->expr()->eq('url.accessUrlId', $urlId))
->andWhere('s.name LIKE :keyword')
->andWhere('s.title LIKE :keyword')
->andWhere($qb->expr()->gt('s.nbrCourses', 0))
->setParameter('keyword', "%$keyword%")
;
@ -1632,7 +1632,7 @@ class CoursesAndSessionsCatalog
$cat = null;
$catName = '';
} else {
$catName = $cat->getName();
$catName = $cat->getTitle();
}
$actions = null;
@ -1645,7 +1645,7 @@ class CoursesAndSessionsCatalog
$sessionsBlock = [
'id' => $session->getId(),
'name' => $session->getName(),
'name' => $session->getTitle(),
'image' => isset($imageField['value']) ? $imageField['value'] : null,
'nbr_courses' => $session->getNbrCourses(),
'nbr_users' => $session->getNbrUsers(),
@ -1663,12 +1663,12 @@ class CoursesAndSessionsCatalog
$session->getId(),
$userId
),
'icon' => self::getSessionIcon($session->getName()),
'icon' => self::getSessionIcon($session->getTitle()),
'date' => $sessionDates['display'],
'price' => !empty($isThisSessionOnSale['html']) ? $isThisSessionOnSale['html'] : '',
'subscribe_button' => isset($isThisSessionOnSale['buy_button']) ? $isThisSessionOnSale['buy_button'] : self::getRegisteredInSessionButton(
$session->getId(),
$session->getName(),
$session->getTitle(),
$hasRequirements
),
'show_description' => $session->getShowDescription(),

@ -57,7 +57,7 @@ class ExerciseCategoryManager extends Model
if (!empty($categories)) {
/** @var CExerciseCategory $category */
foreach ($categories as $category) {
$options[$category->getId()] = $category->getName();
$options[$category->getId()] = $category->getTitle();
}
}
@ -116,7 +116,7 @@ class ExerciseCategoryManager extends Model
if ($category) {
$category
->setName($params['name'])
->setTitle($params['name'])
->setDescription($params['description'])
;
@ -142,7 +142,7 @@ class ExerciseCategoryManager extends Model
$repo = Container::getExerciseCategoryRepository();
$category = new CExerciseCategory();
$category
->setName($params['name'])
->setTitle($params['name'])
->setCourse($course)
->setDescription($params['description'])
->setParent($course)

@ -339,7 +339,7 @@ class SkillModel extends Model
$row['asset'] = $assetRepo->getAssetUrl($skill->getAsset());
}
$row['name'] = self::translateName($skill->getName());
$row['name'] = self::translateName($skill->getTitle());
$row['short_code'] = self::translateCode($skill->getShortCode());
$skillRelSkill = new SkillRelSkillModel();
$parents = $skillRelSkill->getSkillParents($skillId);
@ -2094,7 +2094,7 @@ class SkillModel extends Model
/** @var CForumThread $item */
$item = $em->getRepository(CForumThread::class)->find($itemId);
if ($item) {
$itemInfo['name'] = $item->getThreadTitle();
$itemInfo['name'] = $item->getTitle();
}
break;
}

@ -1265,7 +1265,7 @@ class TicketManager
$row['lp_url'] = '<a
href="'.api_get_path(WEB_CODE_PATH).'lp/lp_controller.php?'.$urlParamsLp.'">'.
$lp->getName().
$lp->getTitle().
'</a>';
}
}
@ -1877,7 +1877,7 @@ class TicketManager
$list = [];
/** @var TicketStatus $row */
foreach ($items as $row) {
$list[$row->getId()] = $row->getName();
$list[$row->getId()] = $row->getTitle();
}
return $list;
@ -1928,7 +1928,7 @@ class TicketManager
$list = [];
/** @var TicketPriority $row */
foreach ($projects as $row) {
$list[$row->getId()] = $row->getName();
$list[$row->getId()] = $row->getTitle();
}
return $list;
@ -1947,7 +1947,7 @@ class TicketManager
$list[] = [
'id' => $row->getId(),
'0' => $row->getId(),
'1' => $row->getName(),
'1' => $row->getTitle(),
'2' => $row->getDescription(),
'3' => $row->getId(),
];
@ -1969,7 +1969,7 @@ class TicketManager
'id' => $row->getId(),
'0' => $row->getId(),
'1' => Display::url(
$row->getName(),
$row->getTitle(),
api_get_path(WEB_CODE_PATH).'ticket/tickets.php?project_id='.$row->getId()
),
'2' => $row->getDescription(),
@ -1996,7 +1996,7 @@ class TicketManager
public static function addProject($params)
{
$project = new TicketProject();
$project->setName($params['name']);
$project->setTitle($params['name']);
$project->setDescription($params['description']);
$project->setInsertUserId(api_get_user_id());
@ -2021,7 +2021,7 @@ class TicketManager
public static function updateProject($id, $params)
{
$project = self::getProject($id);
$project->setName($params['name']);
$project->setTitle($params['name']);
$project->setDescription($params['description']);
$project->setLastEditDateTime(new DateTime($params['sys_lastedit_datetime']));
$project->setLastEditUserId($params['sys_lastedit_user_id']);
@ -2070,7 +2070,7 @@ class TicketManager
'id' => $row->getId(),
'code' => $row->getCode(),
'0' => $row->getId(),
'1' => $row->getName(),
'1' => $row->getTitle(),
'2' => $row->getDescription(),
'3' => $row->getId(),
];
@ -2117,7 +2117,7 @@ class TicketManager
{
$item = new TicketStatus();
$item->setCode(URLify::filter($params['name']));
$item->setName($params['name']);
$item->setTitle($params['name']);
$item->setDescription($params['description']);
Database::getManager()->persist($item);
@ -2141,7 +2141,7 @@ class TicketManager
public static function updateStatus($id, $params)
{
$item = self::getStatus($id);
$item->setName($params['name']);
$item->setTitle($params['name']);
$item->setDescription($params['description']);
Database::getManager()->persist($item);
@ -2189,7 +2189,7 @@ class TicketManager
'id' => $row->getId(),
'code' => $row->getCode(),
'0' => $row->getId(),
'1' => $row->getName(),
'1' => $row->getTitle(),
'2' => $row->getDescription(),
'3' => $row->getId(),
];
@ -2217,7 +2217,7 @@ class TicketManager
$item = new TicketPriority();
$item
->setCode(URLify::filter($params['name']))
->setName($params['name'])
->setTitle($params['name'])
->setDescription($params['description'])
->setColor('')
->setInsertUserId(api_get_user_id())
@ -2245,7 +2245,7 @@ class TicketManager
public static function updatePriority($id, $params)
{
$item = self::getPriority($id);
$item->setName($params['name']);
$item->setTitle($params['name']);
$item->setDescription($params['description']);
Database::getManager()->persist($item);

@ -63,7 +63,7 @@ class VideoChat
[
'from_user' => $fromUser,
'to_user' => $toUser,
'room_name' => $chatName,
'title' => $chatName,
'datetime' => api_get_utc_datetime(),
]
);
@ -82,7 +82,7 @@ class VideoChat
'COUNT(1) AS count',
Database::get_main_table(TABLE_MAIN_CHAT_VIDEO),
[
'where' => ['room_name = ?' => $name],
'where' => ['title = ?' => $name],
],
'first'
);

@ -561,12 +561,12 @@ class AddCourse
$course_code = $courseInfo['code'];
// father gradebook
Database::query(
"INSERT INTO $TABLEGRADEBOOK (name, locked, generate_certificates, description, user_id, c_id, parent_id, weight, visible, certif_min_score, session_id, document_id)
"INSERT INTO $TABLEGRADEBOOK (title, locked, generate_certificates, description, user_id, c_id, parent_id, weight, visible, certif_min_score, session_id, document_id)
VALUES ('$course_code','0',0,'',1,$course_id,0,100,0,75,NULL,$certificateId)"
);
$gbid = Database::insert_id();
Database::query(
"INSERT INTO $TABLEGRADEBOOK (name, locked, generate_certificates, description, user_id, c_id, parent_id, weight, visible, certif_min_score, session_id, document_id)
"INSERT INTO $TABLEGRADEBOOK (title, locked, generate_certificates, description, user_id, c_id, parent_id, weight, visible, certif_min_score, session_id, document_id)
VALUES ('$course_code','0',0,'',1,$course_id,$gbid,100,1,75,NULL,$certificateId)"
);
$gbid = Database:: insert_id();

@ -5337,7 +5337,7 @@ function api_get_tool_information_by_name($name)
$course_id = api_get_course_int_id();
$sql = "SELECT id FROM tool
WHERE name = '".Database::escape_string($name)."' ";
WHERE title = '".Database::escape_string($name)."' ";
$rs = Database::query($sql);
$data = Database::fetch_array($rs);
if ($data) {

@ -181,7 +181,7 @@ class Attendance
foreach ($attendances as $attendance) {
$row = [];
$id = $attendance->getIid();
$name = $attendance->getName();
$name = $attendance->getTitle();
$active = $attendance->getActive();
$session_star = '';
/*if ($session_id == $attendance[6]) {
@ -347,7 +347,7 @@ class Attendance
$course = api_get_course_entity();
$attendance = new CAttendance();
$attendance
->setName($this->name)
->setTitle($this->name)
->setDescription($this->description)
->setAttendanceQualifyTitle($titleGradebook)
->setAttendanceWeight($weightCalification)
@ -411,7 +411,7 @@ class Attendance
if ($attendance) {
$attendanceId = $attendance->getIid();
$attendance
->setName($this->name)
->setTitle($this->name)
->setDescription($this->description)
->setAttendanceQualifyTitle($title_gradebook)
->setAttendanceWeight($weight_calification)
@ -2225,8 +2225,8 @@ class Attendance
$attendancesProcess[3] = $courseItem['real_id'];
$attendancesProcess['courseId'] = $courseItem['real_id'];
$attendancesProcess[4] = $attendanceData->getName();
$attendancesProcess['attendanceName'] = $attendanceData->getName();
$attendancesProcess[4] = $attendanceData->getTitle();
$attendancesProcess['attendanceName'] = $attendanceData->getTitle();
$attendancesProcess['courseCode'] = $courseItem['course_code'];
$attendancesProcess[5] = $attendanceId;
@ -2300,8 +2300,8 @@ class Attendance
$attendancesProcess['courseTitle'] = $courseItem['title'];
$attendancesProcess[3] = $courseItem['real_id'];
$attendancesProcess['courseId'] = $courseItem['real_id'];
$attendancesProcess[4] = $attendanceData->getName();
$attendancesProcess['attendanceName'] = $attendanceData->getName();
$attendancesProcess[4] = $attendanceData->getTitle();
$attendancesProcess['attendanceName'] = $attendanceData->getTitle();
$attendancesProcess[5] = $attendanceId;
$attendancesProcess['attendanceId'] = $attendanceId;
$attendancesProcess['courseCode'] = $courseItem['official_code'];
@ -2406,7 +2406,7 @@ class Attendance
if ($attendance) {
$default = [];
$default['title'] = Security::remove_XSS($attendance->getName());
$default['title'] = Security::remove_XSS($attendance->getTitle());
$default['description'] = Security::remove_XSS($attendance->getDescription(), STUDENT);
$default['attendance_qualify_title'] = $attendance->getAttendanceQualifyTitle();
$default['attendance_weight'] = $attendance->getAttendanceWeight();

@ -240,7 +240,7 @@ class Career extends Model
{
$career = new CareerEntity();
$career
->setName($params['name'])
->setTitle($params['name'])
->setStatus((int) $params['status'])
->setDescription($params['description']);

@ -639,7 +639,7 @@ class CourseManager
$endDate = new DateTime();
$endDate->add($duration);
$session = new SessionEntity();
$session->setName(
$session->setTitle(
sprintf(get_lang('FirstnameLastnameCourses'), $user->getFirstname(), $user->getLastname())
);
$session->setAccessEndDate($endDate);
@ -4111,7 +4111,7 @@ class CourseManager
$output['skill'] = null;
if ($skill) {
$output['skill']['name'] = $skill->getName();
$output['skill']['name'] = $skill->getTitle();
$output['skill']['icon'] = $skill->getIcon();
}
}
@ -5845,7 +5845,7 @@ class CourseManager
'disabled' => $userDisabled,
'value' => "GROUP:".$groupId,
// The space before "G" is needed in order to advmultiselect.php js puts groups first
'content' => " G: ".$thisGroup->getName()." - ".$userCount." ".$userLabel,
'content' => " G: ".$thisGroup->getTitle()." - ".$userCount." ".$userLabel,
];
}
}

@ -99,7 +99,7 @@ class CourseCategory
$sql = "SELECT
t1.id,
t1.name,
t1.title,
t1.code,
t1.parent_id,
t1.tree_pos,
@ -112,7 +112,7 @@ class CourseCategory
WHERE 1=1
$whereCondition
GROUP BY
t1.name,
t1.title,
t1.code,
t1.parent_id,
t1.tree_pos,
@ -152,7 +152,7 @@ class CourseCategory
$repo = Container::getCourseCategoryRepository();
$category = new CourseCategoryEntity();
$category
->setName($name)
->setTitle($name)
->setCode($code)
->setDescription($description)
->setTreePos($tree_pos)
@ -193,7 +193,7 @@ class CourseCategory
// First get to the highest level possible in the tree
$result = Database::query("SELECT parent_id FROM $table WHERE id = '$categoryId'");
$row = Database::fetch_array($result);
if (false !== $row && 0 != $row['parent_id']) {
if (false !== $row && !empty($row['parent_id'])) {
// if a parent was found, enter there to see if he's got one more parent
self::updateParentCategoryChildrenCount($row['parent_id'], $delta);
}
@ -216,7 +216,7 @@ class CourseCategory
$name = trim($name);
$category
->setCode($name)
->setName($name)
->setTitle($name)
->setDescription($description)
->setAuthCourseChild($canHaveCourses)
;
@ -428,7 +428,7 @@ class CourseCategory
null,
ICON_SIZE_SMALL,
get_lang('Open this category')
).' '.$category->getName().' ('.$code.')',
).' '.$category->getTitle().' ('.$code.')',
$url
);
@ -477,7 +477,7 @@ class CourseCategory
public static function getCategoriesToDisplayInHomePage()
{
$table = Database::get_main_table(TABLE_MAIN_CATEGORY);
$sql = "SELECT name FROM $table
$sql = "SELECT title FROM $table
WHERE parent_id IS NULL
ORDER BY tree_pos";
@ -496,7 +496,7 @@ class CourseCategory
$whereCondition = ' AND a.access_url_id = '.api_get_current_access_url_id();
$tbl_category = Database::get_main_table(TABLE_MAIN_CATEGORY);
$sql = "SELECT c.id, c.code, name
$sql = "SELECT c.id, c.code, c.title
FROM $tbl_category c
$conditions
WHERE (auth_course_child = 'TRUE' OR code = '".Database::escape_string($categoryCode)."')
@ -514,7 +514,7 @@ class CourseCategory
if (!empty($categoryToAvoid) && $categoryToAvoid == $categoryCode) {
continue;
}
$categories[$cat['id']] = '('.$cat['code'].') '.$cat['name'];
$categories[$cat['id']] = '('.$cat['code'].') '.$cat['title'];
ksort($categories);
}
@ -608,11 +608,11 @@ class CourseCategory
$keyword = Database::escape_string($keyword);
$sql = "SELECT c.*, c.name as text
$sql = "SELECT c.*, c.title as text
FROM $tableCategory c $conditions
WHERE
(
c.code LIKE '%$keyword%' OR name LIKE '%$keyword%'
c.code LIKE '%$keyword%' OR c.title LIKE '%$keyword%'
) AND auth_course_child = 'TRUE'
$whereCondition ";
$result = Database::query($sql);

@ -242,7 +242,7 @@ class DashboardManager
$plugin_controller = Database::escape_string($plugin_info['controller']);
}
$ins = "INSERT INTO $tbl_block(name, description, path, controller, active)
$ins = "INSERT INTO $tbl_block(title, description, path, controller, active)
VALUES ('$plugin_name', '$plugin_description', '$plugin_path', '$plugin_controller', 1)";
$result = Database::query($ins);
$affected_rows = Database::affected_rows($result);
@ -309,6 +309,9 @@ class DashboardManager
$rs_block = Database::query($sql);
if (Database::num_rows($rs_block) > 0) {
while ($row_block = Database::fetch_array($rs_block)) {
if (!isset($row_block['name'])) {
$row_block['name'] = $row_block['title'];
}
$block_data[] = $row_block;
}
}
@ -395,7 +398,7 @@ class DashboardManager
$html .= '<tr>';
// checkboxes
$html .= self::display_user_dashboard_list_checkboxes($user_id, $block['id']);
$html .= '<td>'.$block['name'].'</td>';
$html .= '<td>'.$block['title'].'</td>';
$html .= '<td>'.$block['description'].'</td>';
$html .= '<td>
<select class="selectpicker show-tick form-control" name="columns['.$block['id'].']">

@ -907,6 +907,7 @@ class DocumentManager
$courseParam = '&cid='.$course_id.'&id='.$id.'&sid='.$session_id.'&gid='.$groupId;
if ($result && 1 == Database::num_rows($result)) {
$row = Database::fetch_array($result, 'ASSOC');
//@todo need to clarify the name of the URLs not nice right now
$url_path = urlencode($row['path']);
$path = str_replace('%2F', '/', $url_path);

@ -44,7 +44,7 @@ class GlossaryManager
foreach ($glossaries as $item) {
$glossaryData[] = [
'id' => $item->getIid(),
'name' => $item->getName(),
'name' => $item->getTitle(),
'description' => $item->getDescription(),
];
}
@ -140,9 +140,9 @@ class GlossaryManager
WHERE
c_id = $course_id AND
(
name LIKE '".Database::escape_string($glossaryName)."'
title LIKE '".Database::escape_string($glossaryName)."'
OR
name LIKE '".Database::escape_string($parsed)."'
title LIKE '".Database::escape_string($parsed)."'
)
$sessionCondition
LIMIT 1
@ -192,7 +192,7 @@ class GlossaryManager
$sessionId = api_get_session_id();
$glossary
->setName($values['name'])
->setTitle($values['name'])
->setDescription($values['description'])
->setDisplayOrder($max_glossary_item + 1)
;
@ -251,7 +251,7 @@ class GlossaryManager
$glossary = $repo->find($values['glossary_id']);
if (null !== $glossary) {
$glossary
->setName($values['name'])
->setTitle($values['name'])
->setDescription($values['description']);
$repo->update($glossary);
}
@ -369,7 +369,7 @@ class GlossaryManager
/** @var CGlossary $item */
foreach ($glossaries as $item) {
if ($term == $item->getName() && $not_id != $item->getIid()) {
if ($term == $item->getTitle() && $not_id != $item->getIid()) {
return true;
}
}
@ -433,7 +433,7 @@ class GlossaryManager
if ($showMessage) {
Display::addFlash(
Display::return_message(
get_lang('Term removed').': '.Security::remove_XSS($glossary->getName()),
get_lang('Term removed').': '.Security::remove_XSS($glossary->getTitle()),
'normal',
false
)
@ -697,7 +697,7 @@ class GlossaryManager
/** @var CGlossary $glossary */
foreach ($glossaries as $glossary) {
$decoration = $repo->addTitleDecoration($glossary, $course, $session);
$array[0] = $glossary->getName().$decoration;
$array[0] = $glossary->getTitle().$decoration;
if (!$view || 'table' === $view) {
$array[1] = str_replace(['<p>', '</p>'], ['', '<br />'], $glossary->getDescription());
} else {
@ -812,7 +812,7 @@ class GlossaryManager
$repo = Container::getGlossaryRepository();
/** @var CGlossary $glossaryData */
$glossaryData = $repo->find($glossary_id);
$glossaryTerm = Security::remove_XSS(strip_tags($glossaryData->getName()));
$glossaryTerm = Security::remove_XSS(strip_tags($glossaryData->getTitle()));
if (api_is_allowed_to_edit(null, true)) {
$return .= '<a
href="'.api_get_self().'?action=delete_glossary&glossary_id='.$glossary_id.'&'.api_get_cidreq().'"

@ -25,7 +25,7 @@ class GradeModel extends Model
return Database::select(
'*',
$this->table,
['where' => $options, 'order' => 'name ASC']
['where' => $options, 'order' => 'title ASC']
);
}
@ -276,7 +276,7 @@ class GradeModel extends Model
$grade_model_options = ['-1' => get_lang('none')];
if (!empty($grade_models)) {
foreach ($grade_models as $item) {
$grade_model_options[$item['id']] = $item['name'];
$grade_model_options[$item['id']] = $item['title'];
}
}
$form->addSelect($name, get_lang('Grading model'), $grade_model_options);

@ -59,7 +59,7 @@ class Gradebook extends Model
$c_id = $c_id ? intval($c_id) : api_get_course_int_id();
$table = Database::get_course_table(TABLE_TOOL_LIST);
$sql = "SELECT * from $table
WHERE c_id = $c_id and name='$name'
WHERE c_id = $c_id and title = '$name'
LIMIT 1";
$result = Database::query($sql);
$item = Database::store_result($result, 'ASSOC');

@ -270,7 +270,7 @@ class GroupManager
/** @var CGroup $group */
$group = (new CGroup())
->setName($name)
->setTitle($name)
->setCategory($category)
->setMaxStudent($places)
->setDocState($docState)
@ -527,7 +527,7 @@ class GroupManager
if ($db_object) {
$result['id'] = $db_object->iid;
$result['iid'] = $db_object->iid;
$result['name'] = $db_object->name;
$result['name'] = $db_object->title;
$result['status'] = $db_object->status;
$result['description'] = $db_object->description;
$result['maximum_number_of_students'] = $db_object->max_student;
@ -647,7 +647,7 @@ class GroupManager
}
$group
->setName($name)
->setTitle($name)
->setCategory($category)
->setMaxStudent($maxStudent)
->setDocState($docState)
@ -1006,7 +1006,7 @@ class GroupManager
foreach ($groups as $group) {
self::set_group_properties(
$group['iid'],
$group['name'],
$group['title'],
$group['description'],
$maximum_number_of_students,
$doc_state,
@ -2022,7 +2022,7 @@ class GroupManager
$table_group = Database::get_course_table(TABLE_GROUP);
$user_id = intval($user_id);
$course_id = api_get_course_int_id();
$sql = "SELECT name
$sql = "SELECT title
FROM $table_group g
INNER JOIN $table_group_user gu
ON (gu.group_id = g.iid)
@ -2031,7 +2031,7 @@ class GroupManager
$res = Database::query($sql);
$groups = [];
while ($group = Database::fetch_array($res)) {
$groups[] .= $group['name'];
$groups[] .= $group['title'];
}
return $groups;
@ -2129,13 +2129,13 @@ class GroupManager
$group_name = '<a
class="'.$groupNameClass.'"
href="group_space.php?'.api_get_cidreq(true, false).'&gid='.$groupId.'">'.
Security::remove_XSS($group->getName()).'</a> ';
Security::remove_XSS($group->getTitle()).'</a> ';
$group_name2 = '';
if (api_get_configuration_value('extra')) {
$group_name2 = '<a
href="group_space_tracking.php?'.api_get_cidreq(true, false).'&gid='.$groupId.'">'.
get_lang('suivi_de').''.stripslashes($group->getName()).'</a>';
get_lang('suivi_de').''.stripslashes($group->getTitle()).'</a>';
}
/*
@ -2155,7 +2155,7 @@ class GroupManager
if ('true' === $hideGroup) {
continue;
}
$row[] = $group->getName().'<br />'.stripslashes(trim($group->getDescription()));
$row[] = $group->getTitle().'<br />'.stripslashes(trim($group->getDescription()));
}
// Tutor name
@ -2761,7 +2761,7 @@ class GroupManager
$content .= Display::tag(
'h3',
Display::url(
Security::remove_XSS($group['name']),
Security::remove_XSS($group['title']),
$url.'&gid='.$groupId
)
);

@ -45,7 +45,7 @@ Display::addFlash(
);
$template = new Template();
$template->assign('room_name', $chatVideo->getRoomName());
$template->assign('room_name', $chatVideo->getTitle());
$template->assign('chat_user', $chatUser);
$template->assign('user_local', $userLocal);
$template->assign('block_friends', $friend_html);
@ -55,7 +55,7 @@ $tpl = $template->get_template('chat/video.tpl');
$content = $template->fetch($tpl);
$templateHeader = Display::getMdiIcon('video')
. $chatVideo->getRoomName();
. $chatVideo->getTitle();
$template->assign('header', $templateHeader);
$template->assign('content', $content);

@ -216,7 +216,7 @@ class Link extends Model
$row = Database:: fetch_array($result);
$ic_slide->addValue(
'category',
$row['category_title']
$row['title']
);
}
}
@ -316,7 +316,7 @@ class Link extends Model
$sessionEntity = api_get_session_entity($session_id);
$category = (new CLinkCategory())
->setCategoryTitle($category_title)
->setTitle($category_title)
->setDescription($description)
// ->setDisplayOrder($order)
->setParent($courseEntity)
@ -605,7 +605,7 @@ class Link extends Model
$row = Database:: fetch_array($result);
$ic_slide->addValue(
'category',
$row['category_title']
$row['title']
);
}
}
@ -663,7 +663,7 @@ class Link extends Model
/** @var CLinkCategory $category */
$category = $repo->find($id);
$category
->setCategoryTitle($values['category_title'])
->setTitle($values['category_title'])
->setDescription($values['description'])
;
@ -1443,7 +1443,7 @@ Do you really want to delete this category and its links ?')."')) return false;\
href="'.api_get_self().'?'.api_get_cidreq().'&category_id='.$categoryItemId.'">';
$header .= Display::getMdiIcon(StateIcon::LIST_VIEW, 'ch-tool-icon', null, ICON_SIZE_SMALL);
}
$header .= Security::remove_XSS($category->getCategoryTitle()).'</a>';
$header .= Security::remove_XSS($category->getTitle()).'</a>';
if ($showActionLinks) {
if ($allowToEdit) {
@ -1547,7 +1547,7 @@ Do you really want to delete this category and its links ?')."')) return false;\
$options = ['0' => '--'];
if (!empty($resultcategories)) {
foreach ($resultcategories as $myrow) {
$options[$myrow->getIid()] = $myrow->getCategoryTitle();
$options[$myrow->getIid()] = $myrow->getTitle();
}
}

@ -625,9 +625,9 @@ class Plugin
$sql = "DELETE FROM $t_tool
WHERE c_id = $courseId AND
(
name = '$pluginName' OR
name = '$pluginName:student' OR
name = '$pluginName:teacher'
title = '$pluginName' OR
title = '$pluginName:student' OR
title = '$pluginName:teacher'
)";
Database::query($sql);
}
@ -1068,7 +1068,7 @@ class Plugin
$tool = $em
->getRepository(CTool::class)
->findOneBy([
'name' => $name,
'title' => $name,
'course' => $courseId,
'category' => 'plugin',
]);
@ -1080,7 +1080,7 @@ class Plugin
$tool = new CTool();
$tool
->setCourse(api_get_course_entity($courseId))
->setName($name.$visibilityPerStatus)
->setTitle($name.$visibilityPerStatus)
->setLink($link ?: "$pluginName/start.php")
->setImage($iconName ?: "$pluginName.png")
->setVisibility($visibility)

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save