From b18014ff31305072e5a5e25843f77ec6bb21318f Mon Sep 17 00:00:00 2001 From: Yannick Warnier Date: Thu, 15 Oct 2015 13:21:20 -0500 Subject: [PATCH] Fix missing cid in gradebook links --- main/gradebook/lib/be/evallink.class.php | 4 ++-- main/gradebook/lib/fe/displaygradebook.php | 2 +- main/gradebook/lib/fe/gradebooktable.class.php | 6 +++--- main/inc/lib/course.lib.php | 1 - 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/main/gradebook/lib/be/evallink.class.php b/main/gradebook/lib/be/evallink.class.php index 321e49bc8b..e604c10e3a 100755 --- a/main/gradebook/lib/be/evallink.class.php +++ b/main/gradebook/lib/be/evallink.class.php @@ -47,10 +47,10 @@ abstract class EvalLink extends AbstractLink $eval = $this->get_evaluation(); // course/platform admin can go to the view_results page if (api_is_allowed_to_edit()) { - return 'gradebook_view_result.php?selecteval=' . $eval->get_id(); + return 'gradebook_view_result.php?' . api_get_cidreq() . '&selecteval=' . $eval->get_id(); } // students can go to the statistics page (if custom display enabled) elseif (ScoreDisplay :: instance()->is_custom()) { - return 'gradebook_statistics.php?selecteval=' . $eval->get_id(); + return 'gradebook_statistics.php?' . api_get_cidreq() . '&selecteval=' . $eval->get_id(); } else { return null; } diff --git a/main/gradebook/lib/fe/displaygradebook.php b/main/gradebook/lib/fe/displaygradebook.php index 892deaeb70..14b95dfacb 100755 --- a/main/gradebook/lib/fe/displaygradebook.php +++ b/main/gradebook/lib/fe/displaygradebook.php @@ -110,7 +110,7 @@ class DisplayGradebook } if ($page != 'statistics') { if (api_is_allowed_to_edit(null, true)) { - $evalinfo .= '
' . Display::return_icon(('statistics.png'), get_lang('ViewStatistics'), '', ICON_SIZE_MEDIUM) . ''; + $evalinfo .= '
' . Display::return_icon(('statistics.png'), get_lang('ViewStatistics'), '', ICON_SIZE_MEDIUM) . ''; } } $evalinfo .= ''; diff --git a/main/gradebook/lib/fe/gradebooktable.class.php b/main/gradebook/lib/fe/gradebooktable.class.php index d18bb3bef7..d2fe3b6d85 100755 --- a/main/gradebook/lib/fe/gradebooktable.class.php +++ b/main/gradebook/lib/fe/gradebooktable.class.php @@ -977,20 +977,20 @@ class GradebookTable extends SortableTable $extra = ''; } return ' ' - . '' + . '' . $item->get_name() . ' '.$extra; } } elseif (ScoreDisplay :: instance()->is_custom() && $show_message===false) { // students can go to the statistics page (if custom display enabled) return ' ' - . '' + . '' . $item->get_name() . ''; } elseif ($show_message === false && !api_is_allowed_to_edit() && !ScoreDisplay :: instance()->is_custom()) { return ' ' - . '' + . '' . $item->get_name() . ''; } else { diff --git a/main/inc/lib/course.lib.php b/main/inc/lib/course.lib.php index 9798000bd4..91deae9eb4 100755 --- a/main/inc/lib/course.lib.php +++ b/main/inc/lib/course.lib.php @@ -310,7 +310,6 @@ class CourseManager { $courseInfo = api_get_course_info($course_code); $courseId = $courseInfo['real_id']; - $result = Database::fetch_array( Database::query( "SELECT status FROM " . Database::get_main_table(TABLE_MAIN_COURSE_USER) . "