NEWMODULE Reference

Revision as of 17:01, 4 April 2008 by Daniele Cordella (talk | contribs) (user_complete (19))

Jump to: navigation, search

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.

delete_instance (20)

Deletes an assignment activity

Deletes all database records, files and calendar events for this newmodule. This is common to all assignment types.

newmodule_update_instance (20)

Updates a new newmodule activity

Given an object containing all the necessary data, (defined by the form in mod.html) this function will update the newmodule instance and return the id number The due date is updated in the calendar This is common to all assignment types.

newmodule_get_participants (19)

Returns the users with data in one newmodule

(users with records in ???)

newmodule_user_complete (19)

Print complete information about the user's interaction with the newmodule

user_outline (19)

Return an outline of the user's interaction with the assignment.

The default method prints the grade and timemodified.

get_post_actions (18)

get_view_actions (18)

cron (15)

reset_userdata (12)

This function is used by the reset_course_userdata function in moodlelib.

This function will remove all posts from the specified newmodule and clean up any related data.

print_recent_activity (11)

reset_course_form_defaults (10)

reset_course_form_definition (10)

Implementation of the function for printing the form elements that control whether the course reset functionality affects the assignment.

get_user_grades (8)

grade_item_delete (8)

grade_item_update (8)

grades (8)

update_grades (8)

reset_gradebook (7)

scale_used (7)

scale_used_anywhere (6)

get_recent_mod_activity (5)

log_info (5)

print_overview (5)

print_recent_mod_activity (5)

refresh_events (5)

file_area (4)

file_area_name (4)