diff --git a/main/gradebook/gradebook_flatview.php b/main/gradebook/gradebook_flatview.php index f5e7d1fe8b..f4f589d620 100644 --- a/main/gradebook/gradebook_flatview.php +++ b/main/gradebook/gradebook_flatview.php @@ -93,6 +93,10 @@ if (!empty($keyword)) { } } +$offset = isset($_GET['offset']) ? $_GET['offset'] : '0'; +$flatviewtable = new FlatViewTable($cat[0], $users, $alleval, $alllinks, true, $offset, $addparams); + + if (isset ($_GET['exportpdf'])) { $interbreadcrumb[] = array ( @@ -120,15 +124,23 @@ if (isset ($_GET['exportpdf'])) { $time = time(); $cat_name = trim($cat[0]->get_name()); $course_code = trim($cat[0]->get_course_code()); - $report_name = $course_code; - if (!empty($cat_name) && $report_name != $cat_name) { - $report_name .= ' - '.$cat_name; - } $organization = api_get_setting('Institution'); - $creator = api_get_person_name($GLOBALS['_user']['firstName'], $GLOBALS['_user']['lastName']); - + + $displayscore = ScoreDisplay :: instance(); + $customdisplays = $displayscore->get_custom_score_display_settings(); + + if (is_array($customdisplays) && count(($customdisplays))) { + $total = array(); + foreach($customdisplays as $custom) { + $total[$custom['display']] = 0; + } + $user_results = $flatviewtable->datagen->get_data_to_graph2(); + foreach($user_results as $user_result) { + $total[$user_result[count($user_result)-1][1]]++; + } + } + $html = ''; - $img = api_get_path(SYS_CODE_PATH).'css/'.api_get_visual_theme().'/images/header-logo.png'; if (file_exists($img)) { @@ -139,10 +151,41 @@ if (isset ($_GET['exportpdf'])) { $html .= '
'.$report_name.'
'; - $html .= ''.api_convert_and_format_date(date('Y-m-d', time()), 2).'
'; - $html .= ''.get_lang('By').': '.$creator.'
'; + $html .= '| ';
+
+ $html .= ' | ';
+
+ $html .= '