Skip to content

Commit

Permalink
Session: fix various name to title missing adaptation
Browse files Browse the repository at this point in the history
  • Loading branch information
NicoDucou committed Jun 6, 2024
1 parent 011e3af commit bbb6965
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion public/main/admin/add_sessions_to_promotion.php
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ function search_sessions($needle, $type)
$return = '';
if (!empty($needle) && !empty($type)) {
$session_list = SessionManager::get_sessions_list(
['s.name' => ['operator' => 'LIKE', 'value' => "$needle%"]]
['s.title' => ['operator' => 'LIKE', 'value' => "$needle%"]]
);
$return .= '<select id="session_not_in_promotion" name="session_not_in_promotion_name[]" multiple="multiple" size="15" style="width:360px;">';
foreach ($session_list as $row) {
Expand Down
4 changes: 2 additions & 2 deletions public/main/admin/add_sessions_to_usergroup.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,11 @@ function search_usergroup_sessions($needle, $type)
if (!empty($needle) && !empty($type)) {
if ('searchbox' == $type) {
$session_list = SessionManager::get_sessions_list(
['s.name' => ['operator' => 'LIKE', 'value' => "%$needle%"]]
['s.title' => ['operator' => 'LIKE', 'value' => "%$needle%"]]
);
} elseif ('single' != $type) {
$session_list = SessionManager::get_sessions_list(
['s.name' => ['operator' => 'LIKE', 'value' => "$needle%"]]
['s.title' => ['operator' => 'LIKE', 'value' => "$needle%"]]
);
}
if ('single' != $type) {
Expand Down
20 changes: 10 additions & 10 deletions public/main/admin/dashboard_add_sessions_to_user.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,15 +75,15 @@ function search_sessions($needle, $type)
}

if (api_is_multiple_url_enabled()) {
$sql = " SELECT s.id, s.name FROM $tbl_session s
$sql = " SELECT s.id, s.title FROM $tbl_session s
LEFT JOIN $tbl_session_rel_access_url a
ON (s.id = a.session_id)
WHERE
s.name LIKE '$needle%' $without_assigned_sessions AND
s.title LIKE '$needle%' $without_assigned_sessions AND
access_url_id = ".api_get_current_access_url_id();
} else {
$sql = "SELECT s.id, s.name FROM $tbl_session s
WHERE s.name LIKE '$needle%' $without_assigned_sessions ";
$sql = "SELECT s.id, s.title FROM $tbl_session s
WHERE s.title LIKE '$needle%' $without_assigned_sessions ";
}
$rs = Database::query($sql);
$return .= '<select class="form-control" id="origin" name="NoAssignedSessionsList[]" multiple="multiple" size="20">';
Expand Down Expand Up @@ -205,17 +205,17 @@ function remove_item(origin) {
}

if (api_is_multiple_url_enabled()) {
$sql = "SELECT s.id, s.name
$sql = "SELECT s.id, s.title
FROM $tbl_session s
LEFT JOIN $tbl_session_rel_access_url a ON (s.id = a.session_id)
WHERE
s.name LIKE '$needle%' $without_assigned_sessions AND
s.title LIKE '$needle%' $without_assigned_sessions AND
access_url_id = ".api_get_current_access_url_id().'
ORDER BY s.name';
ORDER BY s.title';
} else {
$sql = "SELECT s.id, s.name FROM $tbl_session s
WHERE s.name LIKE '$needle%' $without_assigned_sessions
ORDER BY s.name";
$sql = "SELECT s.id, s.title FROM $tbl_session s
WHERE s.title LIKE '$needle%' $without_assigned_sessions
ORDER BY s.title";
}
$result = Database::query($sql);
?>
Expand Down
2 changes: 1 addition & 1 deletion public/main/inc/lib/exercise.lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -1617,7 +1617,7 @@ public static function showTestsWhereQuestionIsUsed(int $questionId, int $exclud

$sql = "SELECT qz.title quiz_title,
c.title course_title,
s.name session_name,
s.title session_name,
qz.iid as quiz_id,
qz.c_id,
qz.session_id
Expand Down
2 changes: 1 addition & 1 deletion public/main/my_space/ti_report.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
$second = DateTime::createFromFormat('Y-m-d', $endDate);
$numberOfWeeks = floor($first->diff($second)->days / 7);

$sql = "SELECT sru.user_id, s.name, s.id as session_id, s.display_start_date, s.display_end_date
$sql = "SELECT sru.user_id, s.title, s.id as session_id, s.display_start_date, s.display_end_date
FROM $tblSession s
LEFT JOIN $tblSessionRelUser sru
ON (sru.session_id = s.id AND sru.relation_type = ".Session::GENERAL_COACH.")
Expand Down
4 changes: 2 additions & 2 deletions public/main/session/session_list_custom.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,14 +80,14 @@
$filter->groupOp = 'OR';

$filter = json_encode($filter);
$url = api_get_path(WEB_AJAX_PATH).'model.ajax.php?a=get_sessions&_force_search=true&rows=20&page=1&sidx=&sord=asc&filters='.$filter.'&searchField=s.name&searchString='.Security::remove_XSS($_REQUEST['keyword']).'&searchOper=in';
$url = api_get_path(WEB_AJAX_PATH).'model.ajax.php?a=get_sessions&_force_search=true&rows=20&page=1&sidx=&sord=asc&filters='.$filter.'&searchField=s.title&searchString='.Security::remove_XSS($_REQUEST['keyword']).'&searchOper=in';
}

if (isset($_REQUEST['id_category'])) {
$sessionCategory = SessionManager::get_session_category($_REQUEST['id_category']);
if (!empty($sessionCategory)) {
//Begin with see the searchOper param
$url = api_get_path(WEB_AJAX_PATH).'model.ajax.php?a=get_sessions&_force_search=true&rows=20&page=1&sidx=&sord=asc&filters=&searchField=sc.name&searchString='.Security::remove_XSS($sessionCategory['name']).'&searchOper=in';
$url = api_get_path(WEB_AJAX_PATH).'model.ajax.php?a=get_sessions&_force_search=true&rows=20&page=1&sidx=&sord=asc&filters=&searchField=sc.title&searchString='.Security::remove_XSS($sessionCategory['name']).'&searchOper=in';
}
}

Expand Down
4 changes: 2 additions & 2 deletions public/main/social/my_skills_report.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
if ($frmStudents->validate()) {
$selectedStudent = (int) $frmStudents->exportValue('student');

$sql = "SELECT s.name, sru.acquired_skill_at, c.title, c.directory, c.id as course_id
$sql = "SELECT s.title, sru.acquired_skill_at, c.title, c.directory, c.id as course_id
FROM $skillTable s
INNER JOIN $skillRelUserTable sru
ON s.id = sru.skill_id
Expand All @@ -88,7 +88,7 @@
while ($resultData = Database::fetch_assoc($result)) {
$tableRow = [
'complete_name' => $followedStudents[$selectedStudent]['completeName'],
'skill_name' => SkillModel::translateName($resultData['name']),
'skill_name' => SkillModel::translateName($resultData['title']),
'achieved_at' => api_format_date($resultData['acquired_skill_at'], DATE_FORMAT_NUMBER),
'course_image' => Display::return_icon(
'course.png',
Expand Down

0 comments on commit bbb6965

Please sign in to comment.