Minor - format code

pull/3388/head
Julio Montoya 5 years ago
parent aa7c5a2337
commit 0b7a24b741
  1. 1
      main/gradebook/lib/fe/displaygradebook.php
  2. 7
      main/gradebook/user_stats.php
  3. 10
      main/mySpace/work_stats.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);

@ -1,4 +1,5 @@
<?php
/* For licensing terms, see /license.txt */
require_once __DIR__.'/../inc/global.inc.php';
@ -37,7 +38,7 @@ if (!empty($categoryId)) {
];
}
$user_table = new UserTable($userId, $allevals, $alllinks, $addparams);
$userTable = new UserTable($userId, $allevals, $alllinks, $addparams);
if (isset($_GET['exportpdf'])) {
$datagen = new UserDataGenerator($userId, $allevals, $alllinks);
@ -96,8 +97,8 @@ if (isset($_GET['exportpdf'])) {
$pdf->content_to_pdf($html);
exit;
}
$actions = '<div class="actions">';
$actions = '<div class="actions">';
if (!empty($categoryId)) {
$interbreadcrumb[] = [
'url' => 'gradebook_flatview.php?selectcat='.$categoryId.'&'.api_get_cidreq(),
@ -130,5 +131,5 @@ $actions .= '</div>';
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();

@ -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) {

Loading…
Cancel
Save