I want to create a custom registration page within the Moodle LMS. What this will need to do is add a link inside the course (with all the other lesson links). When a student chooses the link they will be presented a new page that has a drop down menu populated with a list of choices. They make their choice and it is registered for them in the database.
I am fairly new to Moodle so I need to know where to start. I found the below code and a statement that says "I'm going to assume you know what the first four lines are doing, if not you are starting in the wrong place". Well, I am not 100% sure what those first 4 lines do. Can anyone point me in the right direction?
// File: /mod/mymodulename/view.php
$cmid = required_param('id', PARAM_INT);
$cm = get_coursemodule_from_id('mymodulename', $cmid, 0, false, MUST_EXIST);
$course = $DB->get_record('course', array('id' => $cm->course), '*', MUST_EXIST);