mirror of
https://github.com/moodle/moodle.git
synced 2025-07-26 00:31:35 +02:00
MDL-14679 fixed references to mod.html
This commit is contained in:
@@ -2573,7 +2573,7 @@ function course_in_meta ($course) {
|
||||
|
||||
|
||||
/**
|
||||
* Print standard form elements on module setup forms in mod/.../mod.html
|
||||
* Print standard form elements on module setup forms in mod/.../mod_form.php
|
||||
*/
|
||||
function print_standard_coursemodule_settings($form, $features=null) {
|
||||
global $DB;
|
||||
@@ -2588,7 +2588,7 @@ function print_standard_coursemodule_settings($form, $features=null) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Print groupmode form element on module setup forms in mod/.../mod.html
|
||||
* Print groupmode form element on module setup forms in mod/.../mod_form.php
|
||||
*/
|
||||
function print_groupmode_setting($form, $course=NULL) {
|
||||
global $DB;
|
||||
@@ -2622,7 +2622,7 @@ function print_groupmode_setting($form, $course=NULL) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Print groupmode form element on module setup forms in mod/.../mod.html
|
||||
* Print groupmode form element on module setup forms in mod/.../mod_form.php
|
||||
*/
|
||||
function print_grouping_settings($form, $course=NULL) {
|
||||
global $DB;
|
||||
@@ -2662,7 +2662,7 @@ function print_grouping_settings($form, $course=NULL) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Print visibility setting form element on module setup forms in mod/.../mod.html
|
||||
* Print visibility setting form element on module setup forms in mod/.../mod_form.php
|
||||
*/
|
||||
function print_visible_setting($form, $course=NULL) {
|
||||
global $DB;
|
||||
|
@@ -2,7 +2,7 @@
|
||||
require_once ($CFG->libdir.'/formslib.php');
|
||||
/**
|
||||
* This class adds extra methods to form wrapper specific to be used for module
|
||||
* add / update forms (mod/{modname}.mod_form.php replaces deprecated mod/{modname}/mod.html
|
||||
* add / update forms (mod/{modname}.mod_form.php replaces deprecated mod/{modname}/mod_form.php
|
||||
*
|
||||
*/
|
||||
class moodleform_mod extends moodleform {
|
||||
|
@@ -6,7 +6,7 @@ These are main modules in Moodle, allowing various activities.
|
||||
|
||||
Each of these modules contains a number of expected components:
|
||||
|
||||
mod.html: a form to setup/update a module instance
|
||||
mod_form.php: a form to setup/update a module instance
|
||||
|
||||
version.php: defines some meta-info and provides upgrading code
|
||||
|
||||
|
@@ -332,13 +332,13 @@ class assignment_base {
|
||||
* Create a new assignment activity
|
||||
*
|
||||
* Given an object containing all the necessary data,
|
||||
* (defined by the form in mod.html) this function
|
||||
* (defined by the form in mod_form.php) this function
|
||||
* will create a new instance and return the id number
|
||||
* of the new instance.
|
||||
* The due data is added to the calendar
|
||||
* This is common to all assignment types.
|
||||
*
|
||||
* @param $assignment object The data from the form on mod.html
|
||||
* @param $assignment object The data from the form on mod_form.php
|
||||
* @return int The id of the assignment
|
||||
*/
|
||||
function add_instance($assignment) {
|
||||
@@ -414,12 +414,12 @@ class assignment_base {
|
||||
* Updates a new assignment activity
|
||||
*
|
||||
* Given an object containing all the necessary data,
|
||||
* (defined by the form in mod.html) this function
|
||||
* (defined by the form in mod_form.php) this function
|
||||
* will update the assignment instance and return the id number
|
||||
* The due date is updated in the calendar
|
||||
* This is common to all assignment types.
|
||||
*
|
||||
* @param $assignment object The data from the form on mod.html
|
||||
* @param $assignment object The data from the form on mod_form.php
|
||||
* @return int The assignment id
|
||||
*/
|
||||
function update_instance($assignment) {
|
||||
|
@@ -24,7 +24,7 @@ $CHAT_DUMMY_DATA = "<!-- nix -->\n<!-- nix -->\n<!-- nix -->\n<!-- nix -->\n<!--
|
||||
|
||||
function chat_add_instance($chat) {
|
||||
/// Given an object containing all the necessary data,
|
||||
/// (defined by the form in mod.html) this function
|
||||
/// (defined by the form in mod_form.php) this function
|
||||
/// will create a new instance and return the id number
|
||||
/// of the new instance.
|
||||
|
||||
@@ -53,7 +53,7 @@ function chat_add_instance($chat) {
|
||||
|
||||
function chat_update_instance($chat) {
|
||||
/// Given an object containing all the necessary data,
|
||||
/// (defined by the form in mod.html) this function
|
||||
/// (defined by the form in mod_form.php) this function
|
||||
/// will update an existing instance with new data.
|
||||
|
||||
$chat->timemodified = time();
|
||||
|
@@ -49,7 +49,7 @@ function choice_user_complete($course, $user, $mod, $choice) {
|
||||
|
||||
function choice_add_instance($choice) {
|
||||
// Given an object containing all the necessary data,
|
||||
// (defined by the form in mod.html) this function
|
||||
// (defined by the form in mod_form.php) this function
|
||||
// will create a new instance and return the id number
|
||||
// of the new instance.
|
||||
|
||||
@@ -82,7 +82,7 @@ function choice_add_instance($choice) {
|
||||
|
||||
function choice_update_instance($choice) {
|
||||
// Given an object containing all the necessary data,
|
||||
// (defined by the form in mod.html) this function
|
||||
// (defined by the form in mod_form.php) this function
|
||||
// will update an existing instance with new data.
|
||||
|
||||
$choice->id = $choice->instance;
|
||||
|
@@ -30,7 +30,7 @@ define ('FORUM_AGGREGATE_SUM', 5);
|
||||
|
||||
/**
|
||||
* Given an object containing all the necessary data,
|
||||
* (defined by the form in mod.html) this function
|
||||
* (defined by the form in mod_form.php) this function
|
||||
* will create a new instance and return the id number
|
||||
* of the new instance.
|
||||
* @param object $forum add forum instance (with magic quotes)
|
||||
@@ -88,7 +88,7 @@ function forum_add_instance($forum) {
|
||||
|
||||
/**
|
||||
* Given an object containing all the necessary data,
|
||||
* (defined by the form in mod.html) this function
|
||||
* (defined by the form in mod_form.php) this function
|
||||
* will update an existing instance with new data.
|
||||
* @param object $forum forum instance (with magic quotes)
|
||||
* @return bool success
|
||||
|
@@ -22,7 +22,7 @@ define("GLOSSARY_APPROVAL_VIEW", 7);
|
||||
|
||||
function glossary_add_instance($glossary) {
|
||||
/// Given an object containing all the necessary data,
|
||||
/// (defined by the form in mod.html) this function
|
||||
/// (defined by the form in mod_form.php) this function
|
||||
/// will create a new instance and return the id number
|
||||
/// of the new instance.
|
||||
|
||||
@@ -64,7 +64,7 @@ function glossary_add_instance($glossary) {
|
||||
|
||||
function glossary_update_instance($glossary) {
|
||||
/// Given an object containing all the necessary data,
|
||||
/// (defined by the form in mod.html) this function
|
||||
/// (defined by the form in mod_form.php) this function
|
||||
/// will update an existing instance with new data.
|
||||
global $CFG;
|
||||
|
||||
|
@@ -183,7 +183,7 @@ define("HOTPOT_MAX_EVENT_LENGTH", "432000"); // 5 days maximum
|
||||
// true (or non-zero number):
|
||||
// continue to $hotpot->redirect (if set) OR hotpot/view.php (to displsay quiz)
|
||||
|
||||
// $hotpot is an object containing the values of the form in mod.html
|
||||
// $hotpot is an object containing the values of the form in mod_form.php
|
||||
// i.e. all the fields in the 'hotpot' table, plus the following:
|
||||
// $hotpot->course : an id in the 'course' table
|
||||
// $hotpot->coursemodule : an id in the 'course_modules' table
|
||||
|
@@ -7,7 +7,7 @@ define("LABEL_MAX_NAME_LENGTH", 50);
|
||||
|
||||
function label_add_instance($label) {
|
||||
/// Given an object containing all the necessary data,
|
||||
/// (defined by the form in mod.html) this function
|
||||
/// (defined by the form in mod_form.php) this function
|
||||
/// will create a new instance and return the id number
|
||||
/// of the new instance.
|
||||
$textlib = textlib_get_instance();
|
||||
@@ -24,7 +24,7 @@ function label_add_instance($label) {
|
||||
|
||||
function label_update_instance($label) {
|
||||
/// Given an object containing all the necessary data,
|
||||
/// (defined by the form in mod.html) this function
|
||||
/// (defined by the form in mod_form.php) this function
|
||||
/// will update an existing instance with new data.
|
||||
$textlib = textlib_get_instance();
|
||||
|
||||
|
@@ -59,7 +59,7 @@ define("QUIZ_MAX_EVENT_LENGTH", 5*24*60*60); // 5 days maximum
|
||||
|
||||
/**
|
||||
* Given an object containing all the necessary data,
|
||||
* (defined by the form in mod.html) this function
|
||||
* (defined by the form in mod_form.php) this function
|
||||
* will create a new instance and return the id number
|
||||
* of the new instance.
|
||||
*
|
||||
@@ -90,7 +90,7 @@ function quiz_add_instance($quiz) {
|
||||
|
||||
/**
|
||||
* Given an object containing all the necessary data,
|
||||
* (defined by the form in mod.html) this function
|
||||
* (defined by the form in mod_form.php) this function
|
||||
* will update an existing instance with new data.
|
||||
*
|
||||
* @param object $quiz the data that came from the form.
|
||||
|
@@ -206,7 +206,7 @@ class resource_base {
|
||||
|
||||
function add_instance($resource) {
|
||||
// Given an object containing all the necessary data,
|
||||
// (defined by the form in mod.html) this function
|
||||
// (defined by the form in mod_form.php) this function
|
||||
// will create a new instance and return the id number
|
||||
// of the new instance.
|
||||
|
||||
@@ -218,7 +218,7 @@ class resource_base {
|
||||
|
||||
function update_instance($resource) {
|
||||
// Given an object containing all the necessary data,
|
||||
// (defined by the form in mod.html) this function
|
||||
// (defined by the form in mod_form.php) this function
|
||||
// will update an existing instance with new data.
|
||||
|
||||
$resource->id = $resource->instance;
|
||||
|
@@ -2,7 +2,7 @@
|
||||
|
||||
/**
|
||||
* Given an object containing all the necessary data,
|
||||
* (defined by the form in mod.html) this function
|
||||
* (defined by the form in mod_form.php) this function
|
||||
* will create a new instance and return the id number
|
||||
* of the new instance.
|
||||
*
|
||||
@@ -61,13 +61,13 @@ function scorm_add_instance($scorm) {
|
||||
|
||||
return $id;
|
||||
} else {
|
||||
error(get_string('badpackage','scorm'));
|
||||
print_error('badpackage','scorm');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Given an object containing all the necessary data,
|
||||
* (defined by the form in mod.html) this function
|
||||
* (defined by the form in mod_form.php) this function
|
||||
* will update an existing instance with new data.
|
||||
*
|
||||
* @param mixed $scorm Form data
|
||||
|
@@ -26,7 +26,7 @@ define("SURVEY_CIQ", "5");
|
||||
|
||||
function survey_add_instance($survey) {
|
||||
// Given an object containing all the necessary data,
|
||||
// (defined by the form in mod.html) this function
|
||||
// (defined by the form in mod_form.php) this function
|
||||
// will create a new instance and return the id number
|
||||
// of the new instance.
|
||||
|
||||
@@ -45,7 +45,7 @@ function survey_add_instance($survey) {
|
||||
|
||||
function survey_update_instance($survey) {
|
||||
// Given an object containing all the necessary data,
|
||||
// (defined by the form in mod.html) this function
|
||||
// (defined by the form in mod_form.php) this function
|
||||
// will update an existing instance with new data.
|
||||
|
||||
if (!$template = get_record("survey", "id", $survey->template)) {
|
||||
|
@@ -57,7 +57,7 @@ function wiki_get_students($wiki, $groups='', $sort='u.lastaccess', $fields='u.*
|
||||
|
||||
function wiki_add_instance($wiki) {
|
||||
/// Given an object containing all the necessary data,
|
||||
/// (defined by the form in mod.html) this function
|
||||
/// (defined by the form in mod_form.php) this function
|
||||
/// will create a new instance and return the id number
|
||||
/// of the new instance.
|
||||
|
||||
@@ -74,7 +74,7 @@ function wiki_add_instance($wiki) {
|
||||
|
||||
function wiki_update_instance($wiki) {
|
||||
/// Given an object containing all the necessary data,
|
||||
/// (defined by the form in mod.html) this function
|
||||
/// (defined by the form in mod_form.php) this function
|
||||
/// will update an existing instance with new data.
|
||||
|
||||
/// Determine the pagename for this wiki.
|
||||
|
@@ -6,7 +6,7 @@ These are main modules in Moodle, allowing various activities.
|
||||
|
||||
Each of these modules contains a number of expected components:
|
||||
|
||||
mod.html: a form to setup/update a module instance
|
||||
mod_form.php: a form to setup/update a module instance
|
||||
|
||||
version.php: defines some meta-info and provides upgrading code
|
||||
|
||||
|
Reference in New Issue
Block a user