Skip to content

Commit

Permalink
MDL-20304 lesson: do not display gradebook link when in practice mode
Browse files Browse the repository at this point in the history
Practice mode means the grades do not go to the gradebook, so do not
display the gradebook link at the end of the lesson
  • Loading branch information
danpoltawski committed Dec 23, 2014
1 parent c1eb2c3 commit 2900630
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions mod/lesson/view.php
Expand Up @@ -576,8 +576,11 @@
$url = new moodle_url('/course/view.php', array('id'=>$course->id));
$lessoncontent .= html_writer::link($url, get_string('returnto', 'lesson', format_string($course->fullname, true)), array('class'=>'centerpadded lessonbutton standardbutton'));

$url = new moodle_url('/grade/index.php', array('id'=>$course->id));
$lessoncontent .= html_writer::link($url, get_string('viewgrades', 'lesson'), array('class'=>'centerpadded lessonbutton standardbutton'));
if (!$lesson->practice) {
$url = new moodle_url('/grade/index.php', array('id' => $course->id));
$lessoncontent .= html_writer::link($url, get_string('viewgrades', 'lesson'),
array('class' => 'centerpadded lessonbutton standardbutton'));
}

lesson_add_fake_blocks($PAGE, $cm, $lesson, $timer);
echo $lessonoutput->header($lesson, $cm, $currenttab, $extraeditbuttons, $lessonpageid, get_string("congratulations", "lesson"));
Expand Down

0 comments on commit 2900630

Please sign in to comment.