Feature request: Allow course format to overwrite section availability

Feature request: Allow course format to overwrite section availability

by Marina Glancy -
Number of replies: 7
Picture of Core developers Picture of Moodle HQ Picture of Moodle Workplace team Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

I've just created an issue MDL-46937 proposing to allow course formats to influence the section availability (which will be inherited to module availability)

I can see a use case for my course format (Flexible sections): if parent section has conditional availability the children section (and modules in them) should be unavailable as well

I assume the formats that what to create automatic time-based availability of sections would appreciate it too.

What do you think about the usefullness of this feature? Please feel free to comment on the tracker or here. Thanks

Average of ratings: -
In reply to Marina Glancy

Re: Feature request: Allow course format to overwrite section availability

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

Hi Marina,

An interesting proposition.

To currently solve this issue when criteria in the format dictate that a section should not be shown, then I currently do not output the section.  However this does break the 'Hidden sections' setting which from memory can be set to a form where the section is shown but grayed out and visible but not usable.  Therefore I can see where this proposition would have benefit.

Cheers,

Gareth

In reply to Gareth J Barnard

Re: Feature request: Allow course format to overwrite section availability

by Marina Glancy -
Picture of Core developers Picture of Moodle HQ Picture of Moodle Workplace team Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Testers
We have two attributes of the section - visible and available. "Visible" is one state for all users, "available" is dynamicly calculated for each user. Also "Use conditional availability" must be explicitly enabled on the server.
Another difference is that visibility does not inherit the the modules and availability does. So there potentially can be a visible module inside invisible section but there can not be available module inside unavalailable section.

With this patch I will add even more confusion to the situation (and this is something that I don't 100% like myself).

Obviously course format can have it's own logic about what and how to display. What I'm trying to achieve here is that the modules will be considered unavailable in all the course/user/grade reports
Average of ratings: Useful (1)
In reply to Marina Glancy

Re: Feature request: Allow course format to overwrite section availability

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

Hi Marina,

I see this in a perhaps different way or another way of understanding it.  Visibility is a manual thing set by the user and availability a calculated thing.  There are also degrees of granularity, so an individual module visibility state only matters if the section is visible.  The same is true of availability.  And  availability only matters if the corresponding level of granular visibility is visible (section -> section, module -> module).  Once this has been determined then that decision should be applied everywhere within the capability of the user.  So users with editing capability can still see the module regardless but know and can set its visibility / availability criteria.

Cheers,

Gareth

In reply to Gareth J Barnard

Re: Feature request: Allow course format to overwrite section availability

by Marina Glancy -
Picture of Core developers Picture of Moodle HQ Picture of Moodle Workplace team Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Hi Gareth, this is almost so. 

You say "so an individual module visibility state only matters if the section is visible". This is not exactly true.

The visibility of the section does not automatically inherit to modules. When (in topics or sections formats) you change the section visibility to 'hidden', the modules inside this section automatically change the visibility to 'hidden' as well. But after that you are perfectly able to change the visibility of the module to 'visible'. And in this case you will have a visible module inside a hidden section. This means that the module is not shown on the course view page but you can access it if you know the url. Also this module will be shown in reports, gradebook, etc.

There are always issues in tracker saying "why can I make module visible when the section is invisible? Fix this bug". And even more votes on the issue "allow modules to be accessible but not displayed on the course view page"


As for conditional availability, it is always inherited (if enabled).

In reply to Marina Glancy

Re: Feature request: Allow course format to overwrite section availability

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

Hi Marina,

Oh, perhaps when I say "so an individual module visibility state only matters if the section is visible", then should it be true?

Where is the visibility statement of user intent fully determined from?  If a section is invisible then surely the intent is for all items within that section to be invisible?  And thus invisible everywhere.

I do see however with 'There are always issues in tracker saying "why can I make module visible when the section is invisible? Fix this bug". And even more votes on the issue "allow modules to be accessible but not displayed on the course view page"' that there are two contradictory issues and only one can be implemented at the expense of the other.

So, perhaps its time to define, implement and document a finite policy, that visibility set at module level is overridden at section.  That a module remembers its visibility state as set for when a section becomes visible again.  When a section / module is then visible after applying the latter then availability kicks in with the same hierarchy, so if a section is available, then the module is individually tested to see if it is available.  If a section is unavailable, then so are the contained modules everywhere.

The section should be considered to be the container point of origin for all modules.  And thus the key decider.

Cheers,

Gareth

In reply to Marina Glancy

Re: Feature request: Allow course format to overwrite section availability

by Derek Chirnside -

Very interested in your post here Marina.

I had never thought of posting with this "Feature request:" title in the forums.

I will try it.

-Derek

In reply to Derek Chirnside

Re: Feature request: Allow course format to overwrite section availability

by Marina Glancy -
Picture of Core developers Picture of Moodle HQ Picture of Moodle Workplace team Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Derek, I'll tell you a big secret

The new feature requrests in tracker are more likely to be considered by moodle hq if they have lots of votes. The best way to attract users attention to the tracker issue and encourage them to vote is to post on the moodle forum smile