Development:NEWMODULE Reference: Difference between revisions
No edit summary |
No edit summary |
||
Line 15: | Line 15: | ||
This is common to all assignment types. | This is common to all assignment types. | ||
== | == add_instance (20) == | ||
Create a new newmodule activity | Create a new newmodule activity | ||
Line 24: | Line 24: | ||
The due data is added to the calendar | The due data is added to the calendar | ||
This is common to all assignment types. | This is common to all assignment types. | ||
== delete_instance (20) == | |||
Deletes an assignment activity | |||
* | |||
* Deletes all database records, files and calendar events for this assignment. | |||
* @param $assignment object The assignment to be deleted | |||
* @return boolean False indicates error | |||
== update_instance (20) == | == update_instance (20) == | ||
Line 51: | Line 58: | ||
== file_area (4) == | == file_area (4) == | ||
== file_area_name (4) == | == file_area_name (4) == | ||
Revision as of 18:14, 3 April 2008
NEWMODULE Documentation > Reference
Note: This page is a work-in-progress. Feedback and suggested improvements are welcome. Please join the discussion on moodle.org or use the page comments.
This is a first draft of the list ot the functions more frequently used into Moodle modules. Between brakets the number of occurrences of each function in the following list of 20 modules: assignment, chat, choice, data, exercise, feedback, forum, glossary, hotpot, journal, label, lams, lesson, questionnaire, quiz, resource, scorm, survey, wiki, workshop.
- add_instance (20)
Create a new newmodule activity
Given an object containing all the necessary data, (defined by the form in mod.html) 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.
add_instance (20)
Create a new newmodule activity
Given an object containing all the necessary data, (defined by the form in mod.html) 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.
delete_instance (20)
Deletes an assignment activity
* * Deletes all database records, files and calendar events for this assignment. * @param $assignment object The assignment to be deleted * @return boolean False indicates error