Browse Source

coding guidline improvements.

MOODLE_32_STABLE
Dan Marsden 8 years ago
parent
commit
2eb0517644
  1. 3
      password.php
  2. 3
      password_ajax.php

3
password.php

@ -1,5 +1,4 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
@ -32,6 +31,8 @@ $session = required_param('session', PARAM_INT);
$session = $DB->get_record('attendance_sessions', array('id' => $session), '*', MUST_EXIST);
$cm = get_coursemodule_from_instance('attendance', $session->attendanceid);
require_login($cm->course, $cm);
$context = context_module::instance($cm->id);
$capabilities = array('mod/attendance:manageattendances', 'mod/attendance:takeattendances', 'mod/attendance:changeattendances');
if (!has_any_capability($capabilities, $context)) {

3
password_ajax.php

@ -1,5 +1,4 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
@ -32,6 +31,8 @@ $session = required_param('session', PARAM_INT);
$session = $DB->get_record('attendance_sessions', array('id' => $session), '*', MUST_EXIST);
$cm = get_coursemodule_from_instance('attendance', $session->attendanceid);
require_login($cm->course, $cm);
$context = context_module::instance($cm->id);
$capabilities = array('mod/attendance:manageattendances', 'mod/attendance:takeattendances', 'mod/attendance:changeattendances');
if (!has_any_capability($capabilities, $context)) {

Loading…
Cancel
Save