Courses and course formats

Developers documentation for Course Formats

 
 
Picture of Marina Glancy
Developers documentation for Course Formats
Group DevelopersGroup Moodle HQGroup Particularly helpful MoodlersGroup Testers

I spent some time recently to write developers documentation for course formats

It is mostly for 2.4 but mentions 2.3- callbacks as well. Also it has links to other core APIs

Hope it helps

 
Average of ratings:Useful (2)
Brian
Re: Developers documentation for Course Formats
 

Hi Marina - many thanks again (as always)

re "Additional footer or header on any page inside the course" a couple of questions.

1. Is there an optimal method of finding out where in the course I am?  For example, I might be in a section or a mod, and currently I am doing a kludge by checking the current URL for /course/view.php or /mod/.

2. Can I please suggest a minor change in the core code to expect a class, rather than a style, from the rendered.  We can then build the CSS into either theme or course format.  I've made it work fine as is, but the variable called $background in core outputrenderers.php might confuse someone later.

I am very very pleased with progress to date, mostly thanks to you.  Hoping to release a beta version of "courseflow" format before Dublin.

 

 
Average of ratings: -
Picture of Marina Glancy
Re: Developers documentation for Course Formats
Group DevelopersGroup Moodle HQGroup Particularly helpful MoodlersGroup Testers

Hi Brian,

1. url is fine, this is how I check myself if I'm on course view page in my plugin: https://github.com/marinaglancy/moodle-format_flexsections/blob/master/lib.php#L433

If you are inside module, your method page_set_cm() will be called and page context will have module contextlevel

2. not quite sure where and what exact change you want. I suggest you to create an improvement tracker issue and maybe even add your patch to it

 
Average of ratings: -
Brian
Re: Developers documentation for Course Formats
 

Thanks Marina

1. I will alter my code to match your cleaner, neater code.

2. Most of the code is in the course format rather than the core, so anyone can have full control, but I will put in a small change suggestion and include the modified code required to testheaders format to put it into better effect.  I haven't had time to learn git (yes, it is on my radar), so will attach to the improvement tracker.

 
Average of ratings: -
Gareth J Barnard
Re: Developers documentation for Course Formats
Group DevelopersGroup Particularly helpful Moodlers

Simply awesome Marina, at a glance there looks like some really useful information smile

Is it worth recommending 'codechecker' - https://moodle.org/plugins/view.php?plugin=local_codechecker - on the documentation.  I was recommeneded it on MDL-37490 and intend to check my latest code.

Cheers,

Gareth

 
Average of ratings: -
Picture of Marina Glancy
Re: Developers documentation for Course Formats
Group DevelopersGroup Moodle HQGroup Particularly helpful MoodlersGroup Testers

Gareth, that's a good suggestion. Do you have access to editing pages in dev wiki yourself btw?

 
Average of ratings: -
Gareth J Barnard
Re: Developers documentation for Course Formats
Group DevelopersGroup Particularly helpful Moodlers

Dear Marina,

I do and just have smile - Only a minor change.  Does it need to be more 'in your face'?

Cheers,

Gareth

 
Average of ratings: -