Conditional activities: Regulates the rights for groups in a course: Beta .1

Conditional activities: Regulates the rights for groups in a course: Beta .1

by Bernard Boucher -
Number of replies: 2
Hi all,
here is some code to test ( not for production system ) to regulate the rights for groups in a course based on calendar events.



1 - The regulation is calendar events dependant.

2 - Control at the course, module, group and time levels.

3 - All activities and resources are planned to be regulated ( only assignment, resource and quiz may be tested now ).

4 - One event may regulate as many activities and resources as you want for one time period.

4.1 - To activate one or many activities you create an event with the exact names of the activities ( one per line in text mode ) in the description of the event. ( Select from course view copy and paste of one or many works fine ) and specify who will have access during that period:

4.1.1 - Course events give access at all the participants.

4.1.2 - Group events give access to only members of the group during the specified period.

4.1.3 - Calendar repeat events are supported.

5 - When someone try to access an activity or a resource not available at the present time, a list of all events pertaining to that activity is presented to permit to check the available dates ( group dependant )

6 - It is possible for one course to enable the activation at the module level:

6.1 - One may choose to enable only the resource module with the regulation system. If so all other modules of the course will work as usual.

6.1.1 - For that create an event with that "reserved word" in it description: EnableModResource.

6.1.2 - That regulation will be applicable only durint the duration of the event:

6.1.3 - Before and after all Moodle resource of that course will be accessible as usual.

6.1.4 -During the EnableModResource event period, only the resources with an event containing their exact name in the description will be available.

7 - The internal working is not very invasive on Moodle internal, much less that activity linking.
7.1 No impact on course view page.
7.2 No new database fields.

8- If some interest, any help will be greatly appreciated to write it in intelligible english sentences.

Suggestions are welcome.

Have a good test,

Bernard
Average of ratings: -
In reply to Bernard Boucher

Re: Conditional activities: Regulates the rights for groups in a course: Beta .1

by Loren Winfrey -
I have added this and for some reason I cant get it to work. Is the purpose for onle not allowing one group to view a mod, or to allow the, lets say assignment to be given a seperate date for each group?

Loren Winfrey
In reply to Loren Winfrey

Re: Conditional activities: Regulates the rights for groups in a course: Beta .1

by Bernard Boucher -
Hi Loren,
first that hack work well with Moodle 1.4.2, for older versions I don't know. I has started adjusting it to 1.4.3 but with last news, I will probably do it for 1.5.

For example the way it works is for a course with 2 groups ( g1 and g2 ) and 2 assignments ( a1 and a2 with dues dates of 31 march 2005 ):

1 - If you install it and don't use the "reserved words" in your calendar events then nothing is changed in the working of your site: in particular your 2 assignments are available from now up to 31 march.

2 - If you use "only" the reserved word EnableModAssignment in an calendar course event with a starting date 1 february and ending date of 28 february then in January and in March yours 2 assignments will be available as usual but in February no student will have access to yours assignments because the regulation will be enabled during that month for that module for all the course.

3 - If you add a group event for group g1 with the name of your first assignment a1 covering the first week of February then during that first week all students of group g1 will have access to your assignment a1 only. The other students of group g2 will not have access to any of the assignments during the entire month of February.

4 - If you add a second group event for group g2 with the names of your 2 assignments a1 a2 ( one per line with editor in text mode ) covering the second week of February, then during that second week of February students of group g2 will have access to your 2 assignments. Students from group g1 will have no access to assignments during that period and until the end of February.

5- All the others modules are available as usual during all the course duration.

You may combine as many events, groups and modules as you want ( that may become very complicated but it works with the cases I had tested ) .

If you want a more appropriate example, more suited to yours needs, let me know your particular application and the Moodle version you are using.

Have a good hack,

Bernard