format course options - how to change before creating course?

format course options - how to change before creating course?

by Melissa Newman -
Number of replies: 0

I am new to Moodle Plugin development.  I am trying to create a Course Format Plugin.  Actually, I am trying to modify the ooCalendar plugin.  

Issue 1:

This is scenario I want to use this course format form.  The course will run from Sept. 1 - June 30.  So I want the number of sections to be created based on those two dates, not a value entered into numsections.

I can see that the default sections are automatically created based on numsections in the "create_course" function.  I cannot figure how to automatically set the numsections variable between when the course options form is displayed and the course is created.  I can see that an event is throw, but I cannot figure out how to catch that event.

I want to add the line:

$numsections = ($data->enddate - $data->startdate) / 86400;

before the course_create function creates the sections, so that it will use this value as the $numsections value.

Issue 1:

How can I add a function to a course that is not actually an activity, but builds on an activity?

I want to create a course that goes from Sept 1 - June 30, and every single school day, I want to automatically create a "deskwork" page, "homework" page, and lesson part 1 (page), and lesson part 2 (page).  These will be created with default values, so the layout of the course of the course will automatically be created with appropriate values.  Then the teacher just needs to modify the item for the specific day.

Can this be done to autocreate pages in a book for the lessons?  

Can this be done to autocreate HTML pages? for the lessons?

Thanks for any help.


Average of ratings: -