MDL-48750 Lesson: Fix attempt info displayed by course overview block

This commit is contained in:
Stephen Bourget
2015-01-13 10:59:36 +00:00
committed by Dan Poltawski
parent d3e6254b40
commit 8a15f3d25f
+1 -1
View File
@@ -286,7 +286,7 @@ function lesson_print_overview($courses, &$htmlarray) {
// Attempt information
if (has_capability('mod/lesson:manage', context_module::instance($lesson->coursemodule))) {
// Number of user attempts
$attempts = $DB->count_records('lesson_attempts', array('lessonid'=>$lesson->id));
$attempts = $DB->count_records('lesson_grades', array('lessonid' => $lesson->id));
$str .= $OUTPUT->box(get_string('xattempts', 'lesson', $attempts), 'info');
} else {
// Determine if the user has attempted the lesson or not