]> git.mjollnir.org Git - moodle.git/commitdiff
That link looks a little silly if we are viewing the quiz...
authordefacer <defacer>
Tue, 1 Feb 2005 06:40:50 +0000 (06:40 +0000)
committerdefacer <defacer>
Tue, 1 Feb 2005 06:40:50 +0000 (06:40 +0000)
blocks/quiz_results/block_quiz_results.php

index eebcb3ed370c0b925eb61e09e4f082bfa801bc23..eb32eb87f594fbd17eb96a43a9c34729ff418075 100644 (file)
@@ -151,7 +151,10 @@ class block_quiz_results extends block_base {
             // Ready for output!
             $gradeformat = intval(empty($this->config->gradeformat) ? GRADE_FORMAT_PCT : $this->config->gradeformat);
 
-            $this->content->text .= '<h1><a href="'.$CFG->wwwroot.'/mod/quiz/view.php?q='.$quizid.'">'.$quiz->name.'</a></h1>';
+            if($this->instance->pagetype != PAGE_QUIZ_VIEW) {
+                // Don't show header and link to the quiz if we ARE at the quiz...
+                $this->content->text .= '<h1><a href="'.$CFG->wwwroot.'/mod/quiz/view.php?q='.$quizid.'">'.$quiz->name.'</a></h1>';
+            }
 
             $rank = 0;
             if(!empty($best)) {
@@ -256,7 +259,10 @@ class block_quiz_results extends block_base {
 
             $gradeformat = intval(empty($this->config->gradeformat) ? GRADE_FORMAT_PCT : $this->config->gradeformat);
 
-            $this->content->text .= '<h1><a href="'.$CFG->wwwroot.'/mod/quiz/view.php?q='.$quizid.'">'.$quiz->name.'</a></h1>';
+            if($this->instance->pagetype != PAGE_QUIZ_VIEW) {
+                // Don't show header and link to the quiz if we ARE at the quiz...
+                $this->content->text .= '<h1><a href="'.$CFG->wwwroot.'/mod/quiz/view.php?q='.$quizid.'">'.$quiz->name.'</a></h1>';
+            }
 
             $rank = 0;
             if(!empty($best)) {