Browse Source

fix some codechecker warnings.

MOODLE_33_STABLE
Dan Marsden 8 years ago
parent
commit
b73e46b8cd
  1. 2
      attendance.php
  2. 4
      sessions.php

2
attendance.php

@ -67,7 +67,7 @@ if ($mform->is_cancelled()) {
$url = new moodle_url('/mod/attendance/view.php', array('id' => $cm->id));
redirect($url);
} else if ($fromform = $mform->get_data()) {
// check if password required and if set correctly.
// Check if password required and if set correctly.
if (!empty($attforsession->studentpassword) &&
$attforsession->studentpassword !== $fromform->studentpassword) {

4
sessions.php

@ -300,7 +300,9 @@ function construct_sessions_data_for_add($formdata) {
$sess->timemodified = $now;
$sess->studentscanmark = 0;
$sess->studentpassword = '';
if (isset($formdata->studentscanmark) && !empty($formdata->studentscanmark)) { // Students will be able to mark their own attendance.
if (isset($formdata->studentscanmark) && !empty($formdata->studentscanmark)) {
// Students will be able to mark their own attendance.
$sess->studentscanmark = 1;
if (!empty($formdata->randompassword)) {
$sess->studentpassword = random_string(5);

Loading…
Cancel
Save