Any course main page - what exactly does this mean?

Any course main page - what exactly does this mean?

by Przemek Kaszubski -
Number of replies: 3
Picture of Particularly helpful Moodlers Picture of Testers

I've been playing with course blocks recently and found myself not really knowing what "any course main page" actually means in the settings.

For example, why should blocks configured with this setting and added on a given course main page also show when clicking on the Navigation > Participants? (This is what I encounter when adding "Activities" or "Section links" blocks on the course main page and leaving the default "any course main page" for visibility - Moodle 2.8.2, but I think I've seen this behaviour in earlier versions as well.)

Is there a list anywhere specifying precisely which course contexts belong to the "any course main page" set?

I've tried to look for solutions but the blocks documentation is silent about that. Some good discussion is here https://moodle.org/mod/forum/discuss.php?d=231002 , but it doesn't quite hit the nail on the head for me.

Thanks,

Przemek

Average of ratings: -
In reply to Przemek Kaszubski

Re: Any course main page - what exactly does this mean?

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

It may help to understand this if you go to Site aministration -> Development -> Debugging and turn on the Show page information setting. (If you can do this on a test site, rather than your real teaching site, that is probably better.)

That will add a line like 

This page is: General type: admin. Context System (context id 1). Page type admin-setting-debugging.

or

This page is: General type: incourse. Context Course: CF101 Course Fullname 101 (context id 24). Page type course-view-weeks.

at the bottom of each page. That second example I copied from the bottom of the participants list, but it is identical to what is shown on the course page. I don't know why, but here is the key line in the code: https://github.com/moodle/moodle/blob/master/user/index.php#L160. Sadly there is no explanation of why it is like that.

This is very much an exception. The page time is almost always different on different pages.


In reply to Tim Hunt

Re: Any course main page - what exactly does this mean?

by Przemek Kaszubski -
Picture of Particularly helpful Moodlers Picture of Testers

I'll certainly look into that - thanks!

In reply to Przemek Kaszubski

Re: Any course main page - what exactly does this mean?

by Przemek Kaszubski -
Picture of Particularly helpful Moodlers Picture of Testers

Checked my test Moodle 2.6.6 site - confirmed. Participants list displays 

This page is: General type: incourse. Context Course: 0019 SCORM tests 2015-02-05 (context id 8826). Page type course-view-topics

BUT the real main course page says

In my example (Moodle 2.6.6) the course page says:

This page is: General type: course. Context Course: 0019 SCORM tests 2015-02-05 (context id 8826). Page type course-view-topics.

so the General type is "course" not "incourse"