MDL-36877 mod_lesson: Fix while MDL-38578 is not solved

This commit is contained in:
Jean-Michel Vedrine
2015-01-28 21:25:55 +01:00
parent cbc028dbae
commit fc0613cb0c
2 changed files with 21 additions and 6 deletions
+1 -1
View File
@@ -569,7 +569,7 @@ if ($pageid != LESSON_EOL) {
$lessoncontent .= html_writer::link($url, get_string('returnto', 'lesson', format_string($course->fullname, true)), array('class'=>'centerpadded lessonbutton standardbutton'));
if (has_capability('gradereport/user:view', context_course::instance($course->id))
&& $lesson->grade != 0 && !$lesson->practice) {
&& $course->showgrades && $lesson->grade != 0 && !$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'));