From 8850794bbfc44d882f822224936f212fd2bc25b5 Mon Sep 17 00:00:00 2001 From: Julio Montoya Date: Tue, 22 Feb 2011 14:04:27 +0100 Subject: [PATCH] Fixing bug when loading graphics see BT#2094 --- main/inc/lib/tracking.lib.php | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/main/inc/lib/tracking.lib.php b/main/inc/lib/tracking.lib.php index 5964635f54..ba4e61a742 100755 --- a/main/inc/lib/tracking.lib.php +++ b/main/inc/lib/tracking.lib.php @@ -2253,14 +2253,17 @@ class Tracking { $exercices['title'] = Display::url($exercices['title'], $url, array('target'=>'_blank')); $html .= Display::tag('td', $exercices['title']); - //Exercise configuration show results - if ($exercices['results_disabled'] == 0) { + + + //Exercise configuration show results show results or show only score + if ($exercices['results_disabled'] == 0 || $exercices['results_disabled'] == 2) { $latest_attempt_url = ''; $best_score = $position = $percentage_score_result = '-'; $graph = $normal_graph = null; - + + //Getting best results $best_score_data = get_best_score($exercices['id'], $course_info['code'], $session_id); - $best_score = show_score($best_score_data['exe_result'], $best_score_data['exe_weighting']); + $best_score = show_score($best_score_data['exe_result'], $best_score_data['exe_weighting']); if ($attempts > 0) { $latest_attempt_url .= ' '.Display::return_icon('quiz.gif', get_lang('Quiz')).' '; @@ -2293,11 +2296,11 @@ class Tracking { } else { // Exercise configuration NO results - $html .= Display::tag('td', 0, array('align'=>'center')); + $html .= Display::tag('td', $attempts, array('align'=>'center')); $html .= Display::tag('td', '-', array('align'=>'center')); $html .= Display::tag('td', '-', array('align'=>'center')); $html .= Display::tag('td', '-', array('align'=>'center')); - $html .= Display::tag('td', '-', array('align'=>'center')); + $html .= Display::tag('td', '-', array('align'=>'center')); } $html .= ''; }