fix some codechecker warnings.
authorDan Marsden <dan@danmarsden.com>
Fri, 28 Apr 2017 04:08:59 +0000 (16:08 +1200)
committerDan Marsden <dan@danmarsden.com>
Fri, 28 Apr 2017 04:08:59 +0000 (16:08 +1200)
attendance.php
sessions.php

index 1bd0891..d34d732 100644 (file)
@@ -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) {
 
index f805106..6208b40 100644 (file)
@@ -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);