Browse files

MDL-20304 lesson: do not display gradebook link when in practice mode

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 17, 2014
1 parent fb374e6 commit 708b1070d5ffac07c6fc275c30e3bf8353673551
Showing with 5 additions and 2 deletions.
  1. +5 −2 mod/lesson/view.php
@@ -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"));

0 comments on commit 708b107

Please sign in to comment.