Browse Source

Fix behat failure with calendar link change, tidy up a few warnings.

MOODLE_32_STABLE
Dan Marsden 8 years ago
parent
commit
a9cfdd6396
  1. 10
      add_form.php
  2. 2
      classes/calendar_helpers.php
  3. 1
      classes/manage_page_params.php
  4. 1
      classes/page_with_filter_controls.php
  5. 1
      classes/preferences_page_params.php
  6. 1
      classes/report_page_params.php
  7. 4
      tests/behat/calendar_features.feature

10
add_form.php

@ -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');

2
classes/calendar_helpers.php

@ -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');
/**

1
classes/manage_page_params.php

@ -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.
*

1
classes/page_with_filter_controls.php

@ -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.

1
classes/preferences_page_params.php

@ -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

1
classes/report_page_params.php

@ -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.

4
tests/behat/calendar_features.feature

@ -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"
Loading…
Cancel
Save