Where to start, new Moodle page

Re: Where to start, new Moodle page

by Davo Smith -
Number of replies: 0
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

In order, the lines do the following:

  1. Load the Moodle config + main library files
  2. Get the 'id' paramater from the URL (/mod/mymodulename/view.php?id=xxx) and store it in $cmid
  3. Use $cmid to load the course module record ( http://docs.moodle.org/dev/Course_module ), MUST_EXIST means an error will be shown if it is not found
  4. Load the $course record for the course that the course module is in (again, throw an error if it doesn't exist).