diff --git a/main/gradebook/lib/fe/displaygradebook.php b/main/gradebook/lib/fe/displaygradebook.php index 35b16d133f..bbe501dd5d 100755 --- a/main/gradebook/lib/fe/displaygradebook.php +++ b/main/gradebook/lib/fe/displaygradebook.php @@ -683,7 +683,6 @@ class DisplayGradebook $my_score_denom = ($score[1] == 0) ? 1 : $score[1]; $item_value += $score[0] / $my_score_denom * $item->get_weight(); } - $item_total += $item->get_weight(); } $item_value = api_number_format($item_value, 2); diff --git a/main/gradebook/user_stats.php b/main/gradebook/user_stats.php index 2b042db816..012323bc59 100755 --- a/main/gradebook/user_stats.php +++ b/main/gradebook/user_stats.php @@ -1,4 +1,5 @@ content_to_pdf($html); exit; } -$actions = '
'; +$actions = '
'; if (!empty($categoryId)) { $interbreadcrumb[] = [ 'url' => 'gradebook_flatview.php?selectcat='.$categoryId.'&'.api_get_cidreq(), @@ -130,5 +131,5 @@ $actions .= '
'; Display::display_header(get_lang('ResultsPerUser')); echo $actions; DisplayGradebook::display_header_user($_GET['userid'], $category[0]->get_id()); -$user_table->display(); +$userTable->display(); Display::display_footer(); diff --git a/main/mySpace/work_stats.php b/main/mySpace/work_stats.php index c90a27b7c7..f7081b0925 100644 --- a/main/mySpace/work_stats.php +++ b/main/mySpace/work_stats.php @@ -2,10 +2,6 @@ /* For licensing terms, see /license.txt */ -/** - * Report on students subscribed to courses I am teaching. - */ - require_once __DIR__.'/../inc/global.inc.php'; require_once api_get_path(SYS_CODE_PATH).'work/work.lib.php'; @@ -77,7 +73,6 @@ function get_users($from, $number_of_items, $column, $direction) $workList = getWorkListTeacher(0, 100, null, null, null); - $totalCourseWorkTime = 0; $workTimeList = []; foreach ($workList as $work) { $fieldValue = new ExtraFieldValue('work'); @@ -102,7 +97,7 @@ function get_users($from, $number_of_items, $column, $direction) foreach ($students as $studentData) { $studentId = $studentData['user_id']; $studentData = api_get_user_info($studentId); - $urlDetails = $url."?student=$studentId"; + $urlDetails = $url."?student=$studentId&details=true&course=$courseCode&id_session=$sessionId"; $row = []; if ($is_western_name_order) { $first = Display::url($studentData['firstname'], $urlDetails); @@ -169,7 +164,6 @@ function get_users($from, $number_of_items, $column, $direction) } $is_western_name_order = api_is_western_name_order(); - $sort_by_first_name = api_sort_by_first_name(); $actionsLeft = ''; $toolbar = Display::toolbarAction('toolbar-student', [$actionsLeft]); @@ -188,7 +182,7 @@ $table = new SortableTable( $itemPerPage ); -$parameters =['cidReq' => $courseCode, 'id_session' => $sessionId]; +$parameters = ['cidReq' => $courseCode, 'id_session' => $sessionId]; $table->set_additional_parameters($parameters); if ($is_western_name_order) {