Note:

If you want to create a new page for developers, you should create it on the Moodle Developer Resource site.

NEWMODULE Reference: Difference between revisions

From MoodleDocs
No edit summary
No edit summary
Line 33: Line 33:
*file_area (4)
*file_area (4)
*file_area_name (4)
*file_area_name (4)
------------------
---
add_instance
'''add_instance'''<br />
Create a new newmodule activity
Create a new newmodule activity


Line 43: Line 43:
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'''<br />
---
'''update_instance'''<br />
---
'''get_participants'''<br />
---
'''user_complete'''<br />
---
'''user_outline'''<br />
---
'''get_post_actions'''<br />
---
'''get_view_actions'''<br />
---
'''cron'''<br />
---
'''reset_userdata'''<br />
---
'''print_recent_activity'''<br />
---
'''reset_course_form_defaults'''<br />
---
'''reset_course_form_definition'''<br />
---
'''get_user_grades'''<br />
---
'''grade_item_delete'''<br />
---
'''grade_item_update'''<br />
---
'''grades'''<br />
---
'''update_grades'''<br />
---
'''reset_gradebook'''<br />
---
'''scale_used'''<br />
---
'''scale_used_anywhere'''<br />
---
'''get_recent_mod_activity'''<br />
---
'''log_info'''<br />
---
'''print_overview'''<br />
---
'''print_recent_mod_activity'''<br />
---
'''refresh_events'''<br />
---
'''file_area'''<br />
---
'''file_area_name'''<br />
---

Revision as of 18:01, 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)
  • delete_instance (20)
  • update_instance (20)
  • get_participants (19)
  • user_complete (19)
  • user_outline (19)
  • get_post_actions (18)
  • get_view_actions (18)
  • cron (15)
  • reset_userdata (12)
  • print_recent_activity (11)
  • reset_course_form_defaults (10)
  • reset_course_form_definition (10)
  • 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)

--- add_instance
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
--- update_instance
--- get_participants
--- user_complete
--- user_outline
--- get_post_actions
--- get_view_actions
--- cron
--- reset_userdata
--- print_recent_activity
--- reset_course_form_defaults
--- reset_course_form_definition
--- get_user_grades
--- grade_item_delete
--- grade_item_update
--- grades
--- update_grades
--- reset_gradebook
--- scale_used
--- scale_used_anywhere
--- get_recent_mod_activity
--- log_info
--- print_overview
--- print_recent_mod_activity
--- refresh_events
--- file_area
--- file_area_name
---