Password options for all activities

Re: Password options for all activities

by Bernard Boucher -
Number of replies: 0
Hi Michael and Mark,
happy to see that others are working to expand Moodle time dependant fonctionnalitiessmile.

As mentionned above, I just have tested the quiz module and with only one type of calendar event and that works fine.

I used a different approach than yours: I don't use the eye.
I use the existing variable $available of the files /moodle/mod/quiz/view.php and /moodle/mod/quiz/attempt.php with a new fucntion isavailable().

That fucntion check in the event table, with Jon function calendar_sql_where(), to find if an or more events have the name of the quiz in the description field.
If so the value of $available is set to permit quiz attempt.

For the resource module, I will use the same function and a notice() with the appropriate message to restrict the access.
For the others modules and weeks and topics activities I will use similar approach. The worda to put in the description field are not yet choosenwink

As you suggest, it is good to put a conditionnal activation of that mecanisim in the admin page and to keep the default working as it is now.

I will be happy, if time permit ( I am a full time teacher with only personnal time developper ) to coordinate my work with your team.

Maybe it will be good to start a new topic for that.

Thanks for the proposal,

Bernard