Browse Source

Fix #411 rename event for viewing session report, set copyright header correctly.

nwp90-nwp90-allsessionsreport
Dan Marsden 5 years ago
parent
commit
2066cca273
  1. 11
      classes/event/session_report_viewed.php
  2. 2
      lang/en/attendance.php
  3. 2
      version.php
  4. 2
      view.php

11
classes/event/student_attendance_sessions_viewed.php → classes/event/session_report_viewed.php

@ -18,7 +18,7 @@
* This file contains an event for when a student's attendance report is viewed.
*
* @package mod_attendance
* @copyright 2014 onwards Dan Marsden
* @copyright 2019 Nick Phillips
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
@ -35,11 +35,10 @@ defined('MOODLE_INTERNAL') || die();
* string mode Mode of the report viewed.
* }
* @package mod_attendance
* @since Moodle 2.7
* @copyright 2013 onwards Dan Marsden
* @copyright 2019 Nick Phillips
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class student_attendance_sessions_viewed extends \core\event\base {
class session_report_viewed extends \core\event\base {
/**
* Init method.
@ -75,9 +74,11 @@ class student_attendance_sessions_viewed extends \core\event\base {
* @return \moodle_url
*/
public function get_url() {
// Mode is optional.
$mode = empty($this->other['mode']) ? "" : $this->other['mode'];
return new \moodle_url('/mod/attendance/view.php', array('id' => $this->contextinstanceid,
'studentid' => $this->relateduserid,
'mode' => $this->other['mode'],
'mode' => $mode,
'view' => $this->other['view'],
'curdate' => $this->other['curdate']));
}

2
lang/en/attendance.php

@ -216,7 +216,7 @@ $string['eventsessionipshared'] = 'Attendance self-marking IP conflict';
$string['eventsessionupdated'] = 'Session updated';
$string['eventstatusadded'] = 'Status added';
$string['eventstatusupdated'] = 'Status updated';
$string['eventstudentattendancesessionsviewed'] = 'Student attendance sessions viewed';
$string['eventstudentattendancesessionsviewed'] = 'Session report viewed';
$string['eventtaken'] = 'Attendance taken';
$string['eventtakenbystudent'] = 'Attendance taken by student';
$string['export'] = 'Export';

2
version.php

@ -23,7 +23,7 @@
*/
defined('MOODLE_INTERNAL') || die();
$plugin->version = 2019080800;
$plugin->version = 2019080801;
$plugin->requires = 2019072500; // Requires 3.8.
$plugin->release = '3.8.0';
$plugin->maturity = MATURITY_STABLE;

2
view.php

@ -89,7 +89,7 @@ $filterparams = array(
'enddate' => $userdata->pageparams->enddate
);
$params = array_merge($userdata->pageparams->get_significant_params(), $filterparams);
$event = \mod_attendance\event\student_attendance_sessions_viewed::create(array(
$event = \mod_attendance\event\session_report_viewed::create(array(
'relateduserid' => $userdata->pageparams->studentid,
'context' => $context,
'other' => $params));

Loading…
Cancel
Save