Browse Source

Fix coding guideline issues.

MOODLE_32_STABLE
Dan Marsden 8 years ago
parent
commit
9ef35c4ea4
  1. 2
      classes/observer.php
  2. 2
      db/events.php
  3. 2
      lib.php
  4. 2
      renderhelpers.php

2
classes/observer.php

@ -41,7 +41,7 @@ class mod_attendance_observer {
public static function course_content_deleted(\core\event\course_content_deleted $event) {
global $DB;
$attids = array_keys($DB->get_records('attendance', array('course' => $event->objectid), '', 'id'));
$attids = array_keys($DB->get_records('attendance', array('course' => $event->objectid), '', 'id'));
$sessids = array_keys($DB->get_records_list('attendance_sessions', 'attendanceid', $attids, '', 'id'));
if (attendance_existing_calendar_events_ids($sessids)) {
attendance_delete_calendar_events($sessids);

2
db/events.php

@ -23,6 +23,8 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
// List of observers.
$observers = array(

2
lib.php

@ -275,7 +275,7 @@ function attendance_grade_item_update($attendance, $grades=null) {
$params = array('itemname' => $attendance->name, 'idnumber' => $attendance->cmidnumber);
} else {
// MDL-14303.
$params = array('itemname' => $attendance->name/*, 'idnumber'=>$attendance->id*/);
$params = array('itemname' => $attendance->name);
}
if ($attendance->grade > 0) {

2
renderhelpers.php

@ -218,7 +218,7 @@ class user_sessions_cells_text_generator extends user_sessions_cells_generator {
}
}
// Used to print simple time - 1am instead of 1:00am
// Used to print simple time - 1am instead of 1:00am.
function attendance_strftimehm($time) {
$mins = userdate($time, '%M');
if ($mins == '00') {

Loading…
Cancel
Save