Permalink
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 c1eb2c3 commit 29006301ed62cbd7633f182ae36808d9ac6cefc9
Showing with 5 additions and 2 deletions.
  1. +5 −2 mod/lesson/view.php
View
@@ -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 2900630

Please sign in to comment.