From bfebaf64d82c62462a8f54146e3cebd225d963b3 Mon Sep 17 00:00:00 2001 From: Martin Dougiamas Date: Thu, 13 May 2010 02:02:05 +0000 Subject: [PATCH] MDL-22388 Added some checks to kill these scripts dead with an unequivocal notice unless included properly from a Moodle script. --- admin/dbtransfer/database_export_form.php | 4 ++ admin/dbtransfer/database_transfer_form.php | 4 ++ admin/mnet/profileform.php | 4 ++ admin/mnet/services_form.php | 4 ++ admin/uploadpicture_form.php | 39 +++++++++++-------- admin/uploaduser_form.php | 5 +++ admin/user/user_message_form.php | 4 ++ blocks/blog_recent/edit_form.php | 1 + blocks/blog_tags/edit_form.php | 2 +- blocks/edit_form.php | 4 ++ blog/edit_form.php | 4 ++ blog/external_blog_edit_form.php | 4 ++ blog/preferences_form.php | 4 ++ calendar/event_form.php | 6 ++- cohort/edit_form.php | 6 ++- course/completion_form.php | 4 ++ course/delete_category_form.php | 4 ++ course/edit_form.php | 4 ++ course/editcategory_form.php | 4 ++ course/editsection_form.php | 4 ++ course/import/activities/import_form.php | 4 ++ course/import/groups/import_form.php | 4 ++ course/recent_form.php | 4 ++ course/request_form.php | 4 ++ course/reset_form.php | 4 ++ enrol/authorize/config_form.php | 5 +++ enrol/authorize/enrol_form.php | 4 ++ filter/local_settings_form.php | 4 ++ grade/edit/letter/edit_form.php | 4 ++ grade/edit/outcome/edit_form.php | 4 ++ grade/edit/outcome/import_outcomes_form.php | 4 ++ grade/edit/scale/edit_form.php | 4 ++ grade/edit/settings/form.php | 4 ++ grade/edit/tree/calculation_form.php | 4 ++ grade/edit/tree/category_form.php | 4 ++ grade/edit/tree/grade_form.php | 4 ++ grade/edit/tree/item_form.php | 4 ++ grade/edit/tree/outcomeitem_form.php | 4 ++ grade/export/grade_export_form.php | 4 ++ grade/export/key_form.php | 4 ++ grade/import/grade_import_form.php | 4 ++ grade/import/key_form.php | 4 ++ grade/import/xml/grade_import_form.php | 4 ++ grade/report/grader/preferences_form.php | 4 ++ group/autogroup_form.php | 4 ++ group/group_form.php | 4 ++ group/grouping_form.php | 4 ++ login/change_password_form.php | 4 ++ login/forgot_password_form.php | 4 ++ login/restored_password_form.php | 4 ++ login/signup_form.php | 4 ++ message/send_form.php | 6 ++- mod/assignment/mod_form.php | 4 ++ mod/chat/mod_form.php | 4 ++ mod/choice/mod_form.php | 4 ++ mod/data/mod_form.php | 4 ++ mod/feedback/choose_group_form.php | 4 ++ mod/feedback/delete_completed_form.php | 4 ++ mod/feedback/delete_item_form.php | 4 ++ mod/feedback/delete_template_form.php | 4 ++ mod/feedback/edit_form.php | 4 ++ mod/feedback/import_form.php | 4 ++ mod/feedback/mod_form.php | 4 ++ mod/feedback/use_templ_form.php | 4 ++ mod/folder/mod_form.php | 4 ++ mod/forum/mod_form.php | 4 ++ mod/forum/post_form.php | 4 ++ mod/glossary/edit_form.php | 4 ++ mod/glossary/mod_form.php | 4 ++ mod/hotpot/mod_form.php | 4 ++ mod/imscp/mod_form.php | 4 ++ mod/label/mod_form.php | 4 ++ mod/lesson/essay_form.php | 6 ++- mod/lesson/mod_form.php | 4 ++ mod/lesson/view_form.php | 6 ++- mod/page/mod_form.php | 4 ++ mod/quiz/mod_form.php | 4 ++ mod/quiz/override_form.php | 4 ++ mod/resource/mod_form.php | 4 ++ mod/scorm/mod_form.php | 4 ++ mod/scorm/reportsettings_form.php | 4 ++ mod/survey/mod_form.php | 4 ++ mod/url/mod_form.php | 4 ++ mod/wiki/comments_form.php | 4 ++ mod/wiki/edit_form.php | 4 ++ mod/wiki/mod_form.php | 4 ++ notes/edit_form.php | 4 ++ question/category_form.php | 4 ++ question/contextmove_form.php | 4 ++ question/contextmoveq_form.php | 4 ++ question/export_form.php | 4 ++ question/import_form.php | 4 ++ question/move_form.php | 4 ++ .../type/truefalse/edit_truefalse_form.php | 4 ++ tag/edit_form.php | 4 ++ user/edit_form.php | 4 ++ user/editadvanced_form.php | 4 ++ user/profile/index_category_form.php | 4 ++ user/profile/index_field_form.php | 4 ++ 99 files changed, 415 insertions(+), 23 deletions(-) diff --git a/admin/dbtransfer/database_export_form.php b/admin/dbtransfer/database_export_form.php index 87f56144487e6..4982e9ed6fc48 100644 --- a/admin/dbtransfer/database_export_form.php +++ b/admin/dbtransfer/database_export_form.php @@ -1,5 +1,9 @@ libdir.'/formslib.php'; class database_export_form extends moodleform { diff --git a/admin/dbtransfer/database_transfer_form.php b/admin/dbtransfer/database_transfer_form.php index 2f42d6b6ab0cf..ec4c540c21d1a 100644 --- a/admin/dbtransfer/database_transfer_form.php +++ b/admin/dbtransfer/database_transfer_form.php @@ -1,5 +1,9 @@ libdir.'/formslib.php'; class database_transfer_form extends moodleform { diff --git a/admin/mnet/profileform.php b/admin/mnet/profileform.php index a322b5fbe3814..4d8bd4f547de7 100644 --- a/admin/mnet/profileform.php +++ b/admin/mnet/profileform.php @@ -23,6 +23,10 @@ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ +if (!defined('MOODLE_INTERNAL')) { + die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page +} + require_once($CFG->libdir . '/formslib.php'); /** diff --git a/admin/mnet/services_form.php b/admin/mnet/services_form.php index 76d2bbe960a83..247978499b3c9 100644 --- a/admin/mnet/services_form.php +++ b/admin/mnet/services_form.php @@ -24,6 +24,10 @@ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ +if (!defined('MOODLE_INTERNAL')) { + die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page +} + require_once($CFG->libdir . '/formslib.php'); class mnet_services_form extends moodleform { diff --git a/admin/uploadpicture_form.php b/admin/uploadpicture_form.php index a5d10cebaefeb..d2319ad9590f8 100644 --- a/admin/uploadpicture_form.php +++ b/admin/uploadpicture_form.php @@ -1,28 +1,33 @@ libdir.'/formslib.php'; - class admin_uploadpicture_form extends moodleform { - function definition (){ - global $CFG, $USER; +if (!defined('MOODLE_INTERNAL')) { + die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page +} - $mform =& $this->_form; +require_once $CFG->libdir.'/formslib.php'; - $this->set_upload_manager(new upload_manager('userpicturesfile', false, false, null, false, 0, true, true, false)); +class admin_uploadpicture_form extends moodleform { + function definition (){ + global $CFG, $USER; - $mform->addElement('header', 'settingsheader', get_string('upload')); + $mform =& $this->_form; - $mform->addElement('file', 'userpicturesfile', get_string('file'), 'size="40"'); - $mform->addRule('userpicturesfile', null, 'required'); + $this->set_upload_manager(new upload_manager('userpicturesfile', false, false, null, false, 0, true, true, false)); - $choices =& $this->_customdata; - $mform->addElement('select', 'userfield', get_string('uploadpicture_userfield', 'admin'), $choices); - $mform->setType('userfield', PARAM_INT); + $mform->addElement('header', 'settingsheader', get_string('upload')); - $choices = array( 0 => get_string('no'), 1 => get_string('yes') ); - $mform->addElement('select', 'overwritepicture', get_string('uploadpicture_overwrite', 'admin'), $choices); - $mform->setType('overwritepicture', PARAM_INT); + $mform->addElement('file', 'userpicturesfile', get_string('file'), 'size="40"'); + $mform->addRule('userpicturesfile', null, 'required'); - $this->add_action_buttons(false, get_string('uploadpictures', 'admin')); - } + $choices =& $this->_customdata; + $mform->addElement('select', 'userfield', get_string('uploadpicture_userfield', 'admin'), $choices); + $mform->setType('userfield', PARAM_INT); + + $choices = array( 0 => get_string('no'), 1 => get_string('yes') ); + $mform->addElement('select', 'overwritepicture', get_string('uploadpicture_overwrite', 'admin'), $choices); + $mform->setType('overwritepicture', PARAM_INT); + + $this->add_action_buttons(false, get_string('uploadpictures', 'admin')); } +} diff --git a/admin/uploaduser_form.php b/admin/uploaduser_form.php index f1117a4a5ec04..d2bd97476c5ba 100644 --- a/admin/uploaduser_form.php +++ b/admin/uploaduser_form.php @@ -1,4 +1,9 @@ libdir.'/formslib.php'; class admin_uploaduser_form1 extends moodleform { diff --git a/admin/user/user_message_form.php b/admin/user/user_message_form.php index 50f5a3db6d4cb..0e8205102bcf9 100644 --- a/admin/user/user_message_form.php +++ b/admin/user/user_message_form.php @@ -1,5 +1,9 @@ libdir.'/formslib.php'); class user_message_form extends moodleform { diff --git a/blocks/blog_recent/edit_form.php b/blocks/blog_recent/edit_form.php index 85f5ecd131397..0278895eead65 100644 --- a/blocks/blog_recent/edit_form.php +++ b/blocks/blog_recent/edit_form.php @@ -29,6 +29,7 @@ * @copyright 2009 Tim Hunt * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ + class block_blog_recent_edit_form extends block_edit_form { protected function specific_definition($mform) { // Fields for editing HTML block title and contents. diff --git a/blocks/blog_tags/edit_form.php b/blocks/blog_tags/edit_form.php index 2ea5b22365b98..7dd134eeb57f5 100644 --- a/blocks/blog_tags/edit_form.php +++ b/blocks/blog_tags/edit_form.php @@ -64,4 +64,4 @@ protected function specific_definition($mform) { $mform->addElement('select', 'config_sort', get_string('tagsort', 'blog'), $sort); $mform->setDefault('config_sort', BLOGDEFAULTSORT); } -} \ No newline at end of file +} diff --git a/blocks/edit_form.php b/blocks/edit_form.php index f8f0aacc323d6..7ed14d7ea65f5 100644 --- a/blocks/edit_form.php +++ b/blocks/edit_form.php @@ -26,6 +26,10 @@ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ +if (!defined('MOODLE_INTERNAL')) { + die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page +} + require_once($CFG->libdir . '/formslib.php'); /** diff --git a/blog/edit_form.php b/blog/edit_form.php index d255be0d0fc26..cd181b00c1631 100644 --- a/blog/edit_form.php +++ b/blog/edit_form.php @@ -15,6 +15,10 @@ // You should have received a copy of the GNU General Public License // along with Moodle. If not, see . +if (!defined('MOODLE_INTERNAL')) { + die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page +} + require_once($CFG->libdir.'/formslib.php'); class blog_edit_form extends moodleform { diff --git a/blog/external_blog_edit_form.php b/blog/external_blog_edit_form.php index 01cd34dc5ae75..14402ab6ce0bf 100644 --- a/blog/external_blog_edit_form.php +++ b/blog/external_blog_edit_form.php @@ -25,6 +25,10 @@ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ +if (!defined('MOODLE_INTERNAL')) { + die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page +} + require_once($CFG->libdir.'/formslib.php'); class blog_edit_external_form extends moodleform { diff --git a/blog/preferences_form.php b/blog/preferences_form.php index 4d94ec91fc584..a1fff640c7119 100644 --- a/blog/preferences_form.php +++ b/blog/preferences_form.php @@ -25,6 +25,10 @@ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ +if (!defined('MOODLE_INTERNAL')) { + die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page +} + require_once($CFG->libdir.'/formslib.php'); class blog_preferences_form extends moodleform { diff --git a/calendar/event_form.php b/calendar/event_form.php index 157c0b4c7d28d..341b4aafaa8e7 100644 --- a/calendar/event_form.php +++ b/calendar/event_form.php @@ -26,6 +26,10 @@ /** * Always include formslib */ +if (!defined('MOODLE_INTERNAL')) { + die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page +} + require_once($CFG->dirroot.'/lib/formslib.php'); /** @@ -175,4 +179,4 @@ function validation($data, $files) { return $errors; } -} \ No newline at end of file +} diff --git a/cohort/edit_form.php b/cohort/edit_form.php index c81c0c5f13113..cc4b571e73e6a 100644 --- a/cohort/edit_form.php +++ b/cohort/edit_form.php @@ -24,6 +24,10 @@ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ +if (!defined('MOODLE_INTERNAL')) { + die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page +} + require_once($CFG->dirroot . '/lib/formslib.php'); class cohort_edit_form extends moodleform { @@ -101,4 +105,4 @@ protected function get_category_options($currentcontextid) { return $options; } } - \ No newline at end of file + diff --git a/course/completion_form.php b/course/completion_form.php index a28ea4dfbf54e..560717030286e 100644 --- a/course/completion_form.php +++ b/course/completion_form.php @@ -23,6 +23,10 @@ // // /////////////////////////////////////////////////////////////////////////// +if (!defined('MOODLE_INTERNAL')) { + die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page +} + require_once($CFG->libdir.'/formslib.php'); class course_completion_form extends moodleform { diff --git a/course/delete_category_form.php b/course/delete_category_form.php index 5c02da496c397..7681bffb28eca 100644 --- a/course/delete_category_form.php +++ b/course/delete_category_form.php @@ -1,5 +1,9 @@ libdir.'/formslib.php'); require_once($CFG->libdir.'/questionlib.php'); diff --git a/course/edit_form.php b/course/edit_form.php index 5a4cb0aca4097..4d8ce16030bae 100644 --- a/course/edit_form.php +++ b/course/edit_form.php @@ -1,5 +1,9 @@ libdir.'/formslib.php'); class course_edit_form extends moodleform { diff --git a/course/editcategory_form.php b/course/editcategory_form.php index 3cc50d40edc95..3f86854c85e93 100644 --- a/course/editcategory_form.php +++ b/course/editcategory_form.php @@ -1,4 +1,8 @@ dirroot.'/course/moodleform_mod.php'); class editcategory_form extends moodleform { diff --git a/course/editsection_form.php b/course/editsection_form.php index 0958edbe4707e..09c20c4687c14 100644 --- a/course/editsection_form.php +++ b/course/editsection_form.php @@ -1,5 +1,9 @@ libdir.'/formslib.php'); class editsection_form extends moodleform { diff --git a/course/import/activities/import_form.php b/course/import/activities/import_form.php index 745933fece835..8e5a52b42a14b 100755 --- a/course/import/activities/import_form.php +++ b/course/import/activities/import_form.php @@ -1,5 +1,9 @@ libdir.'/formslib.php'); class course_import_activities_form_1 extends moodleform { diff --git a/course/import/groups/import_form.php b/course/import/groups/import_form.php index 8a15db4787d4a..c3388f1d3b804 100755 --- a/course/import/groups/import_form.php +++ b/course/import/groups/import_form.php @@ -1,5 +1,9 @@ libdir.'/formslib.php'); class course_import_groups_form extends moodleform { diff --git a/course/recent_form.php b/course/recent_form.php index dc76b14e32ca1..9424263f6b474 100644 --- a/course/recent_form.php +++ b/course/recent_form.php @@ -23,6 +23,10 @@ * @package course */ +if (!defined('MOODLE_INTERNAL')) { + die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page +} + require_once($CFG->libdir.'/formslib.php'); class recent_form extends moodleform { diff --git a/course/request_form.php b/course/request_form.php index 6ab802aa0a2b1..ed91bd02e20a2 100644 --- a/course/request_form.php +++ b/course/request_form.php @@ -31,6 +31,10 @@ * @package course */ +if (!defined('MOODLE_INTERNAL')) { + die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page +} + require_once($CFG->libdir.'/formslib.php'); /** diff --git a/course/reset_form.php b/course/reset_form.php index 68d8bfb3b44ec..20e5f546b880c 100644 --- a/course/reset_form.php +++ b/course/reset_form.php @@ -1,4 +1,8 @@ libdir.'/formslib.php'; class course_reset_form extends moodleform { diff --git a/enrol/authorize/config_form.php b/enrol/authorize/config_form.php index d9c244168e3d9..730654cd8ceaf 100755 --- a/enrol/authorize/config_form.php +++ b/enrol/authorize/config_form.php @@ -1,5 +1,10 @@ enrol_cost)) $frm->enrol_cost = '5'; if (!isset($frm->enrol_currency)) $frm->enrol_currency = 'USD'; if (!isset($frm->enrol_mailstudents)) $frm->enrol_mailstudents = ''; diff --git a/enrol/authorize/enrol_form.php b/enrol/authorize/enrol_form.php index a27157bafe62d..71716fcab3ef0 100755 --- a/enrol/authorize/enrol_form.php +++ b/enrol/authorize/enrol_form.php @@ -1,5 +1,9 @@ libdir.'/formslib.php'); class enrol_authorize_form extends moodleform diff --git a/filter/local_settings_form.php b/filter/local_settings_form.php index 81a182ac2211d..17aedba47fad0 100644 --- a/filter/local_settings_form.php +++ b/filter/local_settings_form.php @@ -29,6 +29,10 @@ * @license http://www.gnu.org/copyleft/gpl.html GNU Public License * @package moodlecore *//** */ +if (!defined('MOODLE_INTERNAL')) { + die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page +} + require_once($CFG->libdir . '/formslib.php'); abstract class filter_local_settings_form extends moodleform { diff --git a/grade/edit/letter/edit_form.php b/grade/edit/letter/edit_form.php index d8ab832a2d7fa..7a2ba2b1fdd31 100644 --- a/grade/edit/letter/edit_form.php +++ b/grade/edit/letter/edit_form.php @@ -15,6 +15,10 @@ // You should have received a copy of the GNU General Public License // along with Moodle. If not, see . +if (!defined('MOODLE_INTERNAL')) { + die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page +} + require_once $CFG->libdir.'/formslib.php'; class edit_letter_form extends moodleform { diff --git a/grade/edit/outcome/edit_form.php b/grade/edit/outcome/edit_form.php index 71e93bb9a6ebd..3b31f0891171d 100644 --- a/grade/edit/outcome/edit_form.php +++ b/grade/edit/outcome/edit_form.php @@ -15,6 +15,10 @@ // You should have received a copy of the GNU General Public License // along with Moodle. If not, see . +if (!defined('MOODLE_INTERNAL')) { + die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page +} + require_once $CFG->libdir.'/formslib.php'; class edit_outcome_form extends moodleform { diff --git a/grade/edit/outcome/import_outcomes_form.php b/grade/edit/outcome/import_outcomes_form.php index def8aa6495f36..019addc2a63c5 100644 --- a/grade/edit/outcome/import_outcomes_form.php +++ b/grade/edit/outcome/import_outcomes_form.php @@ -15,6 +15,10 @@ // You should have received a copy of the GNU General Public License // along with Moodle. If not, see . +if (!defined('MOODLE_INTERNAL')) { + die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page +} + require_once($CFG->dirroot.'/lib/formslib.php'); class import_outcomes_form extends moodleform { diff --git a/grade/edit/scale/edit_form.php b/grade/edit/scale/edit_form.php index 7879856f04de4..109490b139646 100644 --- a/grade/edit/scale/edit_form.php +++ b/grade/edit/scale/edit_form.php @@ -15,6 +15,10 @@ // You should have received a copy of the GNU General Public License // along with Moodle. If not, see . +if (!defined('MOODLE_INTERNAL')) { + die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page +} + require_once $CFG->libdir.'/formslib.php'; class edit_scale_form extends moodleform { diff --git a/grade/edit/settings/form.php b/grade/edit/settings/form.php index b024a56c5d836..e653755b0b1fc 100644 --- a/grade/edit/settings/form.php +++ b/grade/edit/settings/form.php @@ -15,6 +15,10 @@ // You should have received a copy of the GNU General Public License // along with Moodle. If not, see . +if (!defined('MOODLE_INTERNAL')) { + die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page +} + require_once($CFG->libdir.'/formslib.php'); /** diff --git a/grade/edit/tree/calculation_form.php b/grade/edit/tree/calculation_form.php index 2043aaeff525f..dd7ff9c7e46b6 100644 --- a/grade/edit/tree/calculation_form.php +++ b/grade/edit/tree/calculation_form.php @@ -15,6 +15,10 @@ // You should have received a copy of the GNU General Public License // along with Moodle. If not, see . +if (!defined('MOODLE_INTERNAL')) { + die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page +} + require_once $CFG->libdir.'/formslib.php'; class edit_calculation_form extends moodleform { diff --git a/grade/edit/tree/category_form.php b/grade/edit/tree/category_form.php index 47ec597bb043b..f60ca4dbe5604 100644 --- a/grade/edit/tree/category_form.php +++ b/grade/edit/tree/category_form.php @@ -15,6 +15,10 @@ // You should have received a copy of the GNU General Public License // along with Moodle. If not, see . +if (!defined('MOODLE_INTERNAL')) { + die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page +} + require_once $CFG->libdir.'/formslib.php'; class edit_category_form extends moodleform { diff --git a/grade/edit/tree/grade_form.php b/grade/edit/tree/grade_form.php index 63cdd0148063f..649be5de8df6f 100755 --- a/grade/edit/tree/grade_form.php +++ b/grade/edit/tree/grade_form.php @@ -15,6 +15,10 @@ // You should have received a copy of the GNU General Public License // along with Moodle. If not, see . +if (!defined('MOODLE_INTERNAL')) { + die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page +} + require_once $CFG->libdir.'/formslib.php'; class edit_grade_form extends moodleform { diff --git a/grade/edit/tree/item_form.php b/grade/edit/tree/item_form.php index 03b80d4d0ecbe..df9ef1b122d02 100644 --- a/grade/edit/tree/item_form.php +++ b/grade/edit/tree/item_form.php @@ -15,6 +15,10 @@ // You should have received a copy of the GNU General Public License // along with Moodle. If not, see . +if (!defined('MOODLE_INTERNAL')) { + die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page +} + require_once $CFG->libdir.'/formslib.php'; class edit_item_form extends moodleform { diff --git a/grade/edit/tree/outcomeitem_form.php b/grade/edit/tree/outcomeitem_form.php index bcd9871f609ae..3a66710f867fc 100644 --- a/grade/edit/tree/outcomeitem_form.php +++ b/grade/edit/tree/outcomeitem_form.php @@ -15,6 +15,10 @@ // You should have received a copy of the GNU General Public License // along with Moodle. If not, see . +if (!defined('MOODLE_INTERNAL')) { + die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page +} + require_once $CFG->libdir.'/formslib.php'; class edit_outcomeitem_form extends moodleform { diff --git a/grade/export/grade_export_form.php b/grade/export/grade_export_form.php index 35f80046062d8..467e9575aa68e 100755 --- a/grade/export/grade_export_form.php +++ b/grade/export/grade_export_form.php @@ -15,6 +15,10 @@ // You should have received a copy of the GNU General Public License // along with Moodle. If not, see . +if (!defined('MOODLE_INTERNAL')) { + die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page +} + require_once $CFG->libdir.'/formslib.php'; class grade_export_form extends moodleform { diff --git a/grade/export/key_form.php b/grade/export/key_form.php index 07a0044d31a29..c8580e1dc32bf 100644 --- a/grade/export/key_form.php +++ b/grade/export/key_form.php @@ -23,6 +23,10 @@ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ +if (!defined('MOODLE_INTERNAL')) { + die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page +} + require_once($CFG->dirroot.'/lib/formslib.php'); class key_form extends moodleform { diff --git a/grade/import/grade_import_form.php b/grade/import/grade_import_form.php index af2e71312ea0c..6b96573beb815 100755 --- a/grade/import/grade_import_form.php +++ b/grade/import/grade_import_form.php @@ -15,6 +15,10 @@ // You should have received a copy of the GNU General Public License // along with Moodle. If not, see . +if (!defined('MOODLE_INTERNAL')) { + die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page +} + require_once $CFG->libdir.'/formslib.php'; require_once($CFG->libdir.'/gradelib.php'); diff --git a/grade/import/key_form.php b/grade/import/key_form.php index a5e009ba1d3a8..a0ca3688ad95f 100644 --- a/grade/import/key_form.php +++ b/grade/import/key_form.php @@ -23,6 +23,10 @@ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ +if (!defined('MOODLE_INTERNAL')) { + die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page +} + require_once($CFG->dirroot.'/lib/formslib.php'); class key_form extends moodleform { diff --git a/grade/import/xml/grade_import_form.php b/grade/import/xml/grade_import_form.php index 51929b29126d1..fd229acdd985c 100644 --- a/grade/import/xml/grade_import_form.php +++ b/grade/import/xml/grade_import_form.php @@ -15,6 +15,10 @@ // You should have received a copy of the GNU General Public License // along with Moodle. If not, see . +if (!defined('MOODLE_INTERNAL')) { + die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page +} + require_once $CFG->libdir.'/formslib.php'; class grade_import_form extends moodleform { diff --git a/grade/report/grader/preferences_form.php b/grade/report/grader/preferences_form.php index 2f5ec29cc80e0..c5d635a9d6618 100644 --- a/grade/report/grader/preferences_form.php +++ b/grade/report/grader/preferences_form.php @@ -25,6 +25,10 @@ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ +if (!defined('MOODLE_INTERNAL')) { + die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page +} + require_once($CFG->libdir.'/formslib.php'); /** diff --git a/group/autogroup_form.php b/group/autogroup_form.php index ab5ea51cbc3cc..4ba42a0b71cbd 100644 --- a/group/autogroup_form.php +++ b/group/autogroup_form.php @@ -1,5 +1,9 @@ dirroot.'/lib/formslib.php'); require_once($CFG->dirroot.'/cohort/lib.php'); diff --git a/group/group_form.php b/group/group_form.php index 348457e9f540d..c2f70950f1610 100644 --- a/group/group_form.php +++ b/group/group_form.php @@ -10,6 +10,10 @@ * @package groups */ +if (!defined('MOODLE_INTERNAL')) { + die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page +} + require_once($CFG->dirroot.'/lib/formslib.php'); /// get url variables diff --git a/group/grouping_form.php b/group/grouping_form.php index 98d7a947f0bf2..5842602788dcd 100644 --- a/group/grouping_form.php +++ b/group/grouping_form.php @@ -9,6 +9,10 @@ * @package groups */ +if (!defined('MOODLE_INTERNAL')) { + die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page +} + require_once($CFG->dirroot.'/lib/formslib.php'); /// get url variables diff --git a/login/change_password_form.php b/login/change_password_form.php index f49a6654cd393..f127c0c27757b 100644 --- a/login/change_password_form.php +++ b/login/change_password_form.php @@ -1,5 +1,9 @@ libdir.'/formslib.php'; class login_change_password_form extends moodleform { diff --git a/login/forgot_password_form.php b/login/forgot_password_form.php index 0fa990e69389e..29f27c3d91547 100644 --- a/login/forgot_password_form.php +++ b/login/forgot_password_form.php @@ -1,5 +1,9 @@ libdir.'/formslib.php'; class login_forgot_password_form extends moodleform { diff --git a/login/restored_password_form.php b/login/restored_password_form.php index 76ecd5186d42b..2e4502d59c454 100644 --- a/login/restored_password_form.php +++ b/login/restored_password_form.php @@ -11,6 +11,10 @@ // part of each plugin, but now now. See MDL-20846 // for the rationale for this implementation. +if (!defined('MOODLE_INTERNAL')) { + die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page +} + require_once $CFG->libdir.'/formslib.php'; class login_forgot_password_form extends moodleform { diff --git a/login/signup_form.php b/login/signup_form.php index 37eaf9c15f133..ee89ec481a881 100644 --- a/login/signup_form.php +++ b/login/signup_form.php @@ -1,5 +1,9 @@ libdir.'/formslib.php'); require_once($CFG->dirroot.'/user/profile/lib.php'); diff --git a/message/send_form.php b/message/send_form.php index e9d12f14f075e..5eff71998cfb6 100644 --- a/message/send_form.php +++ b/message/send_form.php @@ -1,5 +1,9 @@ dirroot.'/lib/formslib.php'); class send_form extends moodleform { @@ -64,4 +68,4 @@ function reset_message() { } -?> \ No newline at end of file +?> diff --git a/mod/assignment/mod_form.php b/mod/assignment/mod_form.php index caa3df4933567..1b5857ae6f514 100644 --- a/mod/assignment/mod_form.php +++ b/mod/assignment/mod_form.php @@ -1,4 +1,8 @@ dirroot.'/course/moodleform_mod.php'); class mod_assignment_mod_form extends moodleform_mod { diff --git a/mod/chat/mod_form.php b/mod/chat/mod_form.php index ca9477f61046a..ee8ce8aaa7fbb 100644 --- a/mod/chat/mod_form.php +++ b/mod/chat/mod_form.php @@ -1,4 +1,8 @@ dirroot.'/course/moodleform_mod.php'); class mod_chat_mod_form extends moodleform_mod { diff --git a/mod/choice/mod_form.php b/mod/choice/mod_form.php index e8d6777d5830a..12ec459077d96 100644 --- a/mod/choice/mod_form.php +++ b/mod/choice/mod_form.php @@ -1,4 +1,8 @@ dirroot.'/course/moodleform_mod.php'); class mod_choice_mod_form extends moodleform_mod { diff --git a/mod/data/mod_form.php b/mod/data/mod_form.php index ded85b726b50c..7599ef8f46c2e 100644 --- a/mod/data/mod_form.php +++ b/mod/data/mod_form.php @@ -1,4 +1,8 @@ dirroot.'/course/moodleform_mod.php'); class mod_data_mod_form extends moodleform_mod { diff --git a/mod/feedback/choose_group_form.php b/mod/feedback/choose_group_form.php index a8f8574a53815..e5e8b3e17aefe 100644 --- a/mod/feedback/choose_group_form.php +++ b/mod/feedback/choose_group_form.php @@ -7,6 +7,10 @@ * @package feedback */ +if (!defined('MOODLE_INTERNAL')) { + die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page +} + require_once $CFG->libdir.'/formslib.php'; class feedback_choose_group_form extends moodleform { diff --git a/mod/feedback/delete_completed_form.php b/mod/feedback/delete_completed_form.php index 8724dca6bbbda..f53197ecfbd53 100644 --- a/mod/feedback/delete_completed_form.php +++ b/mod/feedback/delete_completed_form.php @@ -7,6 +7,10 @@ * @package feedback */ +if (!defined('MOODLE_INTERNAL')) { + die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page +} + require_once $CFG->libdir.'/formslib.php'; class mod_feedback_delete_completed_form extends moodleform { diff --git a/mod/feedback/delete_item_form.php b/mod/feedback/delete_item_form.php index 911669a39d042..0d0b0d4a3ffec 100644 --- a/mod/feedback/delete_item_form.php +++ b/mod/feedback/delete_item_form.php @@ -7,6 +7,10 @@ * @package feedback */ +if (!defined('MOODLE_INTERNAL')) { + die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page +} + require_once $CFG->libdir.'/formslib.php'; class mod_feedback_delete_item_form extends moodleform { diff --git a/mod/feedback/delete_template_form.php b/mod/feedback/delete_template_form.php index b8d55f36cb961..fcb07d7a1c4aa 100644 --- a/mod/feedback/delete_template_form.php +++ b/mod/feedback/delete_template_form.php @@ -7,6 +7,10 @@ * @package feedback */ +if (!defined('MOODLE_INTERNAL')) { + die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page +} + require_once $CFG->libdir.'/formslib.php'; class mod_feedback_delete_template_form extends moodleform { diff --git a/mod/feedback/edit_form.php b/mod/feedback/edit_form.php index b5f4714d0eed2..f4d995172af91 100644 --- a/mod/feedback/edit_form.php +++ b/mod/feedback/edit_form.php @@ -7,6 +7,10 @@ * @package feedback */ +if (!defined('MOODLE_INTERNAL')) { + die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page +} + require_once $CFG->libdir.'/formslib.php'; class feedback_edit_add_question_form extends moodleform { diff --git a/mod/feedback/import_form.php b/mod/feedback/import_form.php index 47f60e73ba178..4d773d9fb3883 100644 --- a/mod/feedback/import_form.php +++ b/mod/feedback/import_form.php @@ -7,6 +7,10 @@ * @package feedback */ +if (!defined('MOODLE_INTERNAL')) { + die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page +} + require_once $CFG->libdir.'/formslib.php'; class feedback_import_form extends moodleform { diff --git a/mod/feedback/mod_form.php b/mod/feedback/mod_form.php index 8f9f0292205b2..00f1315a91d67 100644 --- a/mod/feedback/mod_form.php +++ b/mod/feedback/mod_form.php @@ -7,6 +7,10 @@ * @package feedback */ +if (!defined('MOODLE_INTERNAL')) { + die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page +} + require_once ($CFG->dirroot.'/course/moodleform_mod.php'); class mod_feedback_mod_form extends moodleform_mod { diff --git a/mod/feedback/use_templ_form.php b/mod/feedback/use_templ_form.php index ad7834cf338f6..75adb62277e08 100644 --- a/mod/feedback/use_templ_form.php +++ b/mod/feedback/use_templ_form.php @@ -7,6 +7,10 @@ * @package feedback */ +if (!defined('MOODLE_INTERNAL')) { + die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page +} + require_once $CFG->libdir.'/formslib.php'; class mod_feedback_use_templ_form extends moodleform { diff --git a/mod/folder/mod_form.php b/mod/folder/mod_form.php index a110ea7e367da..bd532e2c3a819 100644 --- a/mod/folder/mod_form.php +++ b/mod/folder/mod_form.php @@ -23,6 +23,10 @@ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ +if (!defined('MOODLE_INTERNAL')) { + die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page +} + require_once ($CFG->dirroot.'/course/moodleform_mod.php'); class mod_folder_mod_form extends moodleform_mod { diff --git a/mod/forum/mod_form.php b/mod/forum/mod_form.php index e324171fbde11..bba66775433ac 100644 --- a/mod/forum/mod_form.php +++ b/mod/forum/mod_form.php @@ -21,6 +21,10 @@ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ +if (!defined('MOODLE_INTERNAL')) { + die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page +} + require_once ($CFG->dirroot.'/course/moodleform_mod.php'); class mod_forum_mod_form extends moodleform_mod { diff --git a/mod/forum/post_form.php b/mod/forum/post_form.php index 8b60031c905dc..5dc3a48c46036 100644 --- a/mod/forum/post_form.php +++ b/mod/forum/post_form.php @@ -21,6 +21,10 @@ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ +if (!defined('MOODLE_INTERNAL')) { + die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page +} + require_once($CFG->libdir.'/formslib.php'); class mod_forum_post_form extends moodleform { diff --git a/mod/glossary/edit_form.php b/mod/glossary/edit_form.php index ebfaeb2d3c06c..d45e7e263292b 100644 --- a/mod/glossary/edit_form.php +++ b/mod/glossary/edit_form.php @@ -1,4 +1,8 @@ dirroot.'/lib/formslib.php'); class mod_glossary_entry_form extends moodleform { diff --git a/mod/glossary/mod_form.php b/mod/glossary/mod_form.php index 9b5198cba93a7..c5209c1362897 100644 --- a/mod/glossary/mod_form.php +++ b/mod/glossary/mod_form.php @@ -1,4 +1,8 @@ dirroot.'/course/moodleform_mod.php'); class mod_glossary_mod_form extends moodleform_mod { diff --git a/mod/hotpot/mod_form.php b/mod/hotpot/mod_form.php index aaa108a824acc..a8be030572796 100644 --- a/mod/hotpot/mod_form.php +++ b/mod/hotpot/mod_form.php @@ -1,4 +1,8 @@ dirroot.'/course/moodleform_mod.php'); require_once ($CFG->dirroot.'/mod/hotpot/lib.php'); diff --git a/mod/imscp/mod_form.php b/mod/imscp/mod_form.php index 0c6723b9c9ceb..f49790d3d56a9 100644 --- a/mod/imscp/mod_form.php +++ b/mod/imscp/mod_form.php @@ -23,6 +23,10 @@ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ +if (!defined('MOODLE_INTERNAL')) { + die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page +} + require_once ($CFG->dirroot.'/course/moodleform_mod.php'); require_once($CFG->dirroot.'/mod/resource/locallib.php'); require_once($CFG->libdir.'/filelib.php'); diff --git a/mod/label/mod_form.php b/mod/label/mod_form.php index 38e4bad6b8387..13e60b676c98a 100644 --- a/mod/label/mod_form.php +++ b/mod/label/mod_form.php @@ -1,4 +1,8 @@ dirroot.'/course/moodleform_mod.php'); class mod_label_mod_form extends moodleform_mod { diff --git a/mod/lesson/essay_form.php b/mod/lesson/essay_form.php index 93c4b9c827540..d5fc8d166e52d 100644 --- a/mod/lesson/essay_form.php +++ b/mod/lesson/essay_form.php @@ -26,6 +26,10 @@ /** * Include formslib if it has not already been included */ +if (!defined('MOODLE_INTERNAL')) { + die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page +} + require_once($CFG->libdir.'/formslib.php'); /** @@ -61,4 +65,4 @@ public function definition() { $this->add_action_buttons(get_string('cancel'), get_string('savechanges')); } -} \ No newline at end of file +} diff --git a/mod/lesson/mod_form.php b/mod/lesson/mod_form.php index 2cddce92d5330..6ee478727dd8a 100644 --- a/mod/lesson/mod_form.php +++ b/mod/lesson/mod_form.php @@ -24,6 +24,10 @@ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or late **/ +if (!defined('MOODLE_INTERNAL')) { + die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page +} + require_once($CFG->dirroot.'/course/moodleform_mod.php'); require_once($CFG->dirroot.'/mod/lesson/locallib.php'); diff --git a/mod/lesson/view_form.php b/mod/lesson/view_form.php index 510a282530751..7f713fe1a0d11 100644 --- a/mod/lesson/view_form.php +++ b/mod/lesson/view_form.php @@ -26,6 +26,10 @@ /** * Include formslib if it has not already been included */ +if (!defined('MOODLE_INTERNAL')) { + die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page +} + require_once($CFG->libdir.'/formslib.php'); /** @@ -50,4 +54,4 @@ public function definition() { } -} \ No newline at end of file +} diff --git a/mod/page/mod_form.php b/mod/page/mod_form.php index 1e816e77b1126..948656b005b3d 100644 --- a/mod/page/mod_form.php +++ b/mod/page/mod_form.php @@ -23,6 +23,10 @@ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ +if (!defined('MOODLE_INTERNAL')) { + die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page +} + require_once($CFG->dirroot.'/course/moodleform_mod.php'); require_once($CFG->dirroot.'/mod/page/locallib.php'); require_once($CFG->libdir.'/filelib.php'); diff --git a/mod/quiz/mod_form.php b/mod/quiz/mod_form.php index cb3af1c0a229d..a1cdf87f27abb 100644 --- a/mod/quiz/mod_form.php +++ b/mod/quiz/mod_form.php @@ -23,6 +23,10 @@ // // /////////////////////////////////////////////////////////////////////////// +if (!defined('MOODLE_INTERNAL')) { + die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page +} + require_once($CFG->dirroot . '/course/moodleform_mod.php'); require_once($CFG->dirroot . '/mod/quiz/locallib.php'); diff --git a/mod/quiz/override_form.php b/mod/quiz/override_form.php index 2eb65d369b874..0097a03a5401f 100644 --- a/mod/quiz/override_form.php +++ b/mod/quiz/override_form.php @@ -24,6 +24,10 @@ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ +if (!defined('MOODLE_INTERNAL')) { + die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page +} + require_once $CFG->libdir.'/formslib.php'; class quiz_override_form extends moodleform { diff --git a/mod/resource/mod_form.php b/mod/resource/mod_form.php index 664f9acdcd374..f40de2dd127c7 100644 --- a/mod/resource/mod_form.php +++ b/mod/resource/mod_form.php @@ -23,6 +23,10 @@ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ +if (!defined('MOODLE_INTERNAL')) { + die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page +} + require_once($CFG->dirroot.'/course/moodleform_mod.php'); require_once($CFG->dirroot.'/mod/resource/locallib.php'); require_once($CFG->libdir.'/filelib.php'); diff --git a/mod/scorm/mod_form.php b/mod/scorm/mod_form.php index fc0fe4731b5ec..7a4632333edb8 100644 --- a/mod/scorm/mod_form.php +++ b/mod/scorm/mod_form.php @@ -1,4 +1,8 @@ dirroot.'/course/moodleform_mod.php'); require_once($CFG->dirroot.'/mod/scorm/locallib.php'); diff --git a/mod/scorm/reportsettings_form.php b/mod/scorm/reportsettings_form.php index ec3387cc7912e..583ecbdf72bb4 100644 --- a/mod/scorm/reportsettings_form.php +++ b/mod/scorm/reportsettings_form.php @@ -1,4 +1,8 @@ libdir/formslib.php"; class mod_scorm_report_settings extends moodleform { diff --git a/mod/survey/mod_form.php b/mod/survey/mod_form.php index ce225dc373d03..0650f8c2146ec 100644 --- a/mod/survey/mod_form.php +++ b/mod/survey/mod_form.php @@ -1,4 +1,8 @@ dirroot.'/course/moodleform_mod.php'); class mod_survey_mod_form extends moodleform_mod { diff --git a/mod/url/mod_form.php b/mod/url/mod_form.php index e0eff0d0cd6fe..95572084b1f72 100644 --- a/mod/url/mod_form.php +++ b/mod/url/mod_form.php @@ -23,6 +23,10 @@ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ +if (!defined('MOODLE_INTERNAL')) { + die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page +} + require_once ($CFG->dirroot.'/course/moodleform_mod.php'); require_once($CFG->dirroot.'/mod/url/locallib.php'); diff --git a/mod/wiki/comments_form.php b/mod/wiki/comments_form.php index 72c85aa97be92..0dc86403b3afa 100644 --- a/mod/wiki/comments_form.php +++ b/mod/wiki/comments_form.php @@ -1,5 +1,9 @@ dirroot . '/lib/formslib.php'); class mod_wiki_comments_form extends moodleform { diff --git a/mod/wiki/edit_form.php b/mod/wiki/edit_form.php index 9867f63cff521..807da65c5bf8f 100644 --- a/mod/wiki/edit_form.php +++ b/mod/wiki/edit_form.php @@ -27,6 +27,10 @@ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ +if (!defined('MOODLE_INTERNAL')) { + die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page +} + require_once($CFG->dirroot . "/mod/wiki/editors/wikieditor.php"); require_once($CFG->dirroot . "/mod/wiki/editors/wikifiletable.php"); diff --git a/mod/wiki/mod_form.php b/mod/wiki/mod_form.php index 2e7ea059dcf5d..be449f21cc368 100644 --- a/mod/wiki/mod_form.php +++ b/mod/wiki/mod_form.php @@ -31,6 +31,10 @@ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ +if (!defined('MOODLE_INTERNAL')) { + die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page +} + require_once('moodleform_mod.php'); require_once($CFG->dirroot . '/mod/wiki/locallib.php'); require_once($CFG->dirroot . '/lib/datalib.php'); diff --git a/notes/edit_form.php b/notes/edit_form.php index 2c9f2b0f6d284..8230b422927b7 100644 --- a/notes/edit_form.php +++ b/notes/edit_form.php @@ -1,5 +1,9 @@ libdir.'/formslib.php'); class note_edit_form extends moodleform { diff --git a/question/category_form.php b/question/category_form.php index 1fd9b6e0962af..131efd9fb881c 100644 --- a/question/category_form.php +++ b/question/category_form.php @@ -1,5 +1,9 @@ libdir.'/formslib.php'); class question_category_edit_form extends moodleform { diff --git a/question/contextmove_form.php b/question/contextmove_form.php index d2b412d9543a1..9a16a9730f7a2 100644 --- a/question/contextmove_form.php +++ b/question/contextmove_form.php @@ -1,5 +1,9 @@ libdir.'/formslib.php'); class question_context_move_form extends moodleform { diff --git a/question/contextmoveq_form.php b/question/contextmoveq_form.php index 945c6afe8c613..e77a627f9bbdb 100644 --- a/question/contextmoveq_form.php +++ b/question/contextmoveq_form.php @@ -1,5 +1,9 @@ libdir.'/formslib.php'); class question_context_move_question_form extends moodleform { diff --git a/question/export_form.php b/question/export_form.php index 68e3ea96cc13e..a3c33af2d3f1a 100644 --- a/question/export_form.php +++ b/question/export_form.php @@ -1,5 +1,9 @@ libdir.'/formslib.php'); class question_export_form extends moodleform { diff --git a/question/import_form.php b/question/import_form.php index fc7e52156c9f4..9e3e7fe0f1889 100644 --- a/question/import_form.php +++ b/question/import_form.php @@ -1,5 +1,9 @@ libdir.'/formslib.php'); class question_import_form extends moodleform { diff --git a/question/move_form.php b/question/move_form.php index b10f2bc1d1355..e5b6a4afcc59c 100644 --- a/question/move_form.php +++ b/question/move_form.php @@ -1,5 +1,9 @@ libdir.'/formslib.php'); class question_move_form extends moodleform { diff --git a/question/type/truefalse/edit_truefalse_form.php b/question/type/truefalse/edit_truefalse_form.php index 1bc8604b0538d..ad70e66a838b9 100644 --- a/question/type/truefalse/edit_truefalse_form.php +++ b/question/type/truefalse/edit_truefalse_form.php @@ -1,4 +1,8 @@ dirroot.'/question/type/edit_question_form.php'); /** * Defines the editing form for the thruefalse question type. diff --git a/tag/edit_form.php b/tag/edit_form.php index 7d318a66e327c..3b618b8520000 100644 --- a/tag/edit_form.php +++ b/tag/edit_form.php @@ -1,5 +1,9 @@ dirroot.'/lib/formslib.php'); class tag_edit_form extends moodleform { diff --git a/user/edit_form.php b/user/edit_form.php index b43d4c98b7d3a..2e5779745c064 100644 --- a/user/edit_form.php +++ b/user/edit_form.php @@ -1,5 +1,9 @@ dirroot.'/lib/formslib.php'); class user_edit_form extends moodleform { diff --git a/user/editadvanced_form.php b/user/editadvanced_form.php index ad6d7f1f84ab7..4e9ac141af89f 100644 --- a/user/editadvanced_form.php +++ b/user/editadvanced_form.php @@ -1,5 +1,9 @@ dirroot.'/lib/formslib.php'); class user_editadvanced_form extends moodleform { diff --git a/user/profile/index_category_form.php b/user/profile/index_category_form.php index 0be8ac99876b0..ee8acc4877075 100644 --- a/user/profile/index_category_form.php +++ b/user/profile/index_category_form.php @@ -1,5 +1,9 @@ dirroot.'/lib/formslib.php'); class category_form extends moodleform { diff --git a/user/profile/index_field_form.php b/user/profile/index_field_form.php index 751bed5674c3e..a891504e92f91 100644 --- a/user/profile/index_field_form.php +++ b/user/profile/index_field_form.php @@ -1,5 +1,9 @@ dirroot.'/lib/formslib.php'); class field_form extends moodleform {