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
This commit is contained in:
+5
-2
@@ -579,8 +579,11 @@ if ($pageid != LESSON_EOL) {
|
||||
$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"));
|
||||
|
||||
Reference in New Issue
Block a user