From 38f5469cf60981ca73d416a1849464f66bf261c4 Mon Sep 17 00:00:00 2001 From: Dan Marsden Date: Mon, 29 May 2017 12:24:20 +1200 Subject: [PATCH] Add lang strings for block and config course category report. --- coursesummary.php | 4 +++- lang/en/attendance.php | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/coursesummary.php b/coursesummary.php index 6e6628f..7fb4d14 100644 --- a/coursesummary.php +++ b/coursesummary.php @@ -36,10 +36,12 @@ require_login(); if (empty($category)) { $context = context_system::instance(); $courses = array(); // Show all courses. + $PAGE->set_context(context_system::instance()); } else { $context = context_coursecat::instance($category); $coursecat = coursecat::get($category); $courses = $coursecat->get_courses(array('recursive' => true, 'idonly' => true)); + $PAGE->set_category_by_id($category); } // Check permissions. require_capability('mod/attendance:viewsummaryreports', $context); @@ -47,7 +49,7 @@ require_capability('mod/attendance:viewsummaryreports', $context); $exportfilename = 'attendancecoursesummary.csv'; $PAGE->set_url('/mod/attendance/coursesummary.php', array('category' => $category)); -$PAGE->set_context(context_system::instance()); + $PAGE->set_heading($SITE->fullname); $table = new flexible_table('attendancecoursesummary'); diff --git a/lang/en/attendance.php b/lang/en/attendance.php index 32bf5ca..e87a40d 100644 --- a/lang/en/attendance.php +++ b/lang/en/attendance.php @@ -399,4 +399,5 @@ $string['automarktask'] = 'Check for closed attendance sessions that require aut $string['autorecorded'] = 'system auto recorded'; $string['coursesummary'] = 'Course summary report'; $string['averageattendance'] = 'Average attendance'; -$string['usedefaultsubnet'] = 'Use default'; \ No newline at end of file +$string['usedefaultsubnet'] = 'Use default'; +$string['categoryreport'] = 'Course category report'; \ No newline at end of file