Minor - format code

pull/2762/head
Julio Montoya 7 years ago
parent 87fddfd17e
commit 2cff6d9eb8
  1. 3
      main/auth/courses.php
  2. 17
      main/gradebook/gradebook_display_summary.php
  3. 1
      main/gradebook/lib/GradebookUtils.php

@ -30,10 +30,9 @@ if (api_get_setting('course_catalog_published') !== 'true') {
}
// For students
$user_can_view_page = true;
if (api_get_setting('allow_students_to_browse_courses') === 'false') {
$user_can_view_page = false;
} else {
$user_can_view_page = true;
}
//For teachers/admins

@ -30,10 +30,6 @@ $userList = CourseManager::get_user_list_from_course_code(
switch ($action) {
case 'export_all':
$params = [];
$pdf = new PDF('A4', 'P', $params);
$pdfList = [];
$cats = Category::load($cat_id, null, null, null, null, null, false);
$studentList = CourseManager::get_user_list_from_course_code(
api_get_course_id(),
@ -44,7 +40,6 @@ switch ($action) {
);
$tpl = new Template('', false, false, false);
$courseInfo = api_get_course_info();
$params = [
'pdf_title' => sprintf(get_lang('GradeFromX'), $courseInfo['name']),
@ -56,22 +51,22 @@ switch ($action) {
'show_grade_generated_date' => true,
'show_real_course_teachers' => false,
'show_teacher_as_myself' => false,
'orientation' => 'P',
];
$pdf = new PDF('A4', $params['orientation'], $params, $tpl);
$htmlList = [];
foreach ($userList as $index => $value) {
$pdfList[] = GradebookUtils::generateTable(
$htmlList[] = GradebookUtils::generateTable(
$value['user_id'],
$cats,
false,
true,
true,
$studentList,
$pdf
);
}
if (!empty($pdfList)) {
if (!empty($htmlList)) {
// Print certificates (without the common header/footer/watermark
// stuff) and return as one multiple-pages PDF
/*$address = api_get_setting('institution_address');
@ -80,7 +75,7 @@ switch ($action) {
$pdf->custom_header = array('html' => "<h5 align='right'>$address <br />$phone</h5>");*/
// stuff) and return as one multiple-pages PDF
$pdf->html_to_pdf(
$pdfList,
$htmlList,
null,
null,
false,

@ -1618,6 +1618,7 @@ class GradebookUtils
$loadStats = [2];
}
}
$gradebooktable = new GradebookTable(
$cat,
$allcat,

Loading…
Cancel
Save