show the availability condition description even when the subject is available

show the availability condition description even when the subject is available

by Martin H -
Number of replies: 4

Hi

The availability condition API introduced since 2.7 is a very useful feature. However the problem is students just see the availability restriction description when they cannot access something.

Lets assume that I have created a page and set the condition to restrict it to be available until 20 May. Unfortunately students would not have a clue that access to the page has a deadline. They will understand this when it is too late.

The restriction description text ("Available until end of 19 May 2015") will only be shown to students after 20 May. Is there a way to make the restriction text to be always shown to students?



Average of ratings: -
In reply to Martin H

Re: show the availability condition description even when the subject is available

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

I don't think there is a way to do that automatically.

The simples way out would be to just add a Label above or below that item on the course page, with whatever message you want.

In reply to Tim Hunt

Re: show the availability condition description even when the subject is available

by Martin H -

Thanks Tim

Teachers always see the restriction hint, so I thought there might be a capability that I can grant to students as well. 

In reply to Martin H

Re: show the availability condition description even when the subject is available

by Shamim Rezaie -
Picture of Core developers Picture of Moodle HQ Picture of Peer reviewers Picture of Plugin developers Picture of Testers Picture of Translators

well....

I have the same issue and the thing is the capability you're looking for is moodle/course:viewhiddenactivities and usually no one wants to give this capability to students mixed

I am developing a new availability plugin that restricts the access of students to activities to X days after their enrolment. I'm sure many admins would like to have this feature. It is essential to let the students know about their exact due dates.

Tim, 

It's not possible to add a label to display due dates as each student has different due dates. I guess the situation leaves no choice other than a core hack sad

Don't you think it was a lot better if the line in the course_section_cm_availability function would check for another availability like moodle/availability:allwaysseedescription? or maybe it was good if the \core_availability\condition had a method named always_show_description() which returns false by default, but availability plugin developers had the opportunity to  override it and return true for their plugins if they needed.

In reply to Martin H

Re: show the availability condition description even when the subject is available

by Hartmut Scherer -

Hi Martin,

Have you considered the Dataform plugin with conditional access (see HERE)? Probably the filter setting for the time (available from/to) could also appear as text behind the activity so that students would know how long an activity will be accessible. Feel free to use the attached preset and adjust the field 'Conditional activity' according to your activities. You need to install the Dataform plugin and the plugin Restriction by dataform content. Documentation for the Availability_dataformcontent is HERE.

With kind regards,

Hartmut