Browse Source

Add lang strings for block and config course category report.

MOODLE_32_STABLE
Dan Marsden 8 years ago
parent
commit
38f5469cf6
  1. 4
      coursesummary.php
  2. 1
      lang/en/attendance.php

4
coursesummary.php

@ -36,10 +36,12 @@ require_login();
if (empty($category)) { if (empty($category)) {
$context = context_system::instance(); $context = context_system::instance();
$courses = array(); // Show all courses. $courses = array(); // Show all courses.
$PAGE->set_context(context_system::instance());
} else { } else {
$context = context_coursecat::instance($category); $context = context_coursecat::instance($category);
$coursecat = coursecat::get($category); $coursecat = coursecat::get($category);
$courses = $coursecat->get_courses(array('recursive' => true, 'idonly' => true)); $courses = $coursecat->get_courses(array('recursive' => true, 'idonly' => true));
$PAGE->set_category_by_id($category);
} }
// Check permissions. // Check permissions.
require_capability('mod/attendance:viewsummaryreports', $context); require_capability('mod/attendance:viewsummaryreports', $context);
@ -47,7 +49,7 @@ require_capability('mod/attendance:viewsummaryreports', $context);
$exportfilename = 'attendancecoursesummary.csv'; $exportfilename = 'attendancecoursesummary.csv';
$PAGE->set_url('/mod/attendance/coursesummary.php', array('category' => $category)); $PAGE->set_url('/mod/attendance/coursesummary.php', array('category' => $category));
$PAGE->set_context(context_system::instance());
$PAGE->set_heading($SITE->fullname); $PAGE->set_heading($SITE->fullname);
$table = new flexible_table('attendancecoursesummary'); $table = new flexible_table('attendancecoursesummary');

1
lang/en/attendance.php

@ -400,3 +400,4 @@ $string['autorecorded'] = 'system auto recorded';
$string['coursesummary'] = 'Course summary report'; $string['coursesummary'] = 'Course summary report';
$string['averageattendance'] = 'Average attendance'; $string['averageattendance'] = 'Average attendance';
$string['usedefaultsubnet'] = 'Use default'; $string['usedefaultsubnet'] = 'Use default';
$string['categoryreport'] = 'Course category report';
Loading…
Cancel
Save