Fix behat failure with calendar link change, tidy up a few warnings.
authorDan Marsden <dan@danmarsden.com>
Wed, 16 Nov 2016 00:15:45 +0000 (13:15 +1300)
committerDan Marsden <dan@danmarsden.com>
Wed, 16 Nov 2016 00:15:45 +0000 (13:15 +1300)
add_form.php
classes/calendar_helpers.php
classes/manage_page_params.php
classes/page_with_filter_controls.php
classes/preferences_page_params.php
classes/report_page_params.php
tests/behat/calendar_features.feature

index d69dfa0..e7bd185 100644 (file)
@@ -22,6 +22,8 @@
  * @license   http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
 
+defined('MOODLE_INTERNAL') || die();
+
 require_once($CFG->libdir.'/formslib.php');
 
 /**
@@ -66,10 +68,10 @@ class mod_attendance_add_form extends moodleform {
                 break;
             case VISIBLEGROUPS:
                 $radio = array();
-                $radio[] = &$mform->createElement('radio', 'sessiontype', '',
-                                                  get_string('commonsession', 'attendance'), mod_attendance_structure::SESSION_COMMON);
-                $radio[] = &$mform->createElement('radio', 'sessiontype', '',
-                                                  get_string('groupsession', 'attendance'), mod_attendance_structure::SESSION_GROUP);
+                $radio[] = &$mform->createElement('radio', 'sessiontype', '', get_string('commonsession', 'attendance'),
+                                                  mod_attendance_structure::SESSION_COMMON);
+                $radio[] = &$mform->createElement('radio', 'sessiontype', '', get_string('groupsession', 'attendance'),
+                                                  mod_attendance_structure::SESSION_GROUP);
                 $mform->addGroup($radio, 'sessiontype', get_string('sessiontype', 'attendance'), ' ', false);
                 $mform->setType('sessiontype', PARAM_INT);
                 $mform->addHelpButton('sessiontype', 'sessiontype', 'attendance');
index dc0e0f2..b6fd53f 100644 (file)
@@ -21,6 +21,8 @@
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
 
+defined('MOODLE_INTERNAL') || die();
+
 require_once(dirname(__FILE__).'/../../../calendar/lib.php');
 
 /**
index fc8c9cd..93ba64d 100644 (file)
@@ -22,6 +22,7 @@
  * @license   http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
 
+defined('MOODLE_INTERNAL') || die();
 /**
  * stores constants/data passed depending on view.
  *
index cadc9f1..e25d529 100644 (file)
@@ -21,6 +21,7 @@
  * @copyright  2016 Dan Marsden http://danmarsden.com
  * @license   http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
+defined('MOODLE_INTERNAL') || die();
 
 /**
  * base filter controls class - overridden by different views where needed.
index a7b8be3..9437b4c 100644 (file)
@@ -21,6 +21,7 @@
  * @copyright  2016 Dan Marsden http://danmarsden.com
  * @license   http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
+defined('MOODLE_INTERNAL') || die();
 
 /**
  * base preferences page param class
index e5b77f9..b40ac43 100644 (file)
@@ -21,6 +21,7 @@
  * @copyright  2016 Dan Marsden http://danmarsden.com
  * @license   http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
+defined('MOODLE_INTERNAL') || die();
 
 /**
  * contains specific data/functions for report_page.
index 7520793..8dbe24e 100644 (file)
@@ -30,9 +30,9 @@ Feature: Test the calendar related features in the attendance module
       | id_sestime_endhour   | 02 |
     And I click on "id_submitbutton" "button"
     And I follow "Course 1"
-    And I follow "Go to calendar"
+    And I follow "Calendar"
     Then I should see "Test attendance"
     And I log out
     And I log in as "student1"
-    And I follow "Go to calendar"
+    And I follow "Calendar"
     Then I should see "Test attendance"
\ No newline at end of file