Conditional activities: Activity Locking v2.1 (for Moodle 1.6)

Re: AL lock is temp on in a localhost 1.6

by Bernard Boucher -
Number of replies: 10
Hi all,
         I just tested Chardelle and John versions: they are very similar and they share a small bug in the logic: as soon as a student have accessed an activity locked ( respecting the lock(s) )  if you change the locks conditions ( with the same activities ) the students will allways have access to the locked activity because only the presence of a record in the Moodle log file is sufficient to unlock the activity.

To be more clear ( I am sure it is possible but not necessary in that paragraph ) if a resource is dependent of a quiz qrade, after an attempt of the quiz, even if the teacher delete the quiz attempt, the student will be granted access to the resource because a trace of the access to the quiz is present in the log file.

You will find the slighty modified locklib.php attached that try to correct that bug.  Modified lines are commented with //bb

Test it carefully: maybe I created others bugs.

I hope it may help,

Bernard

p.s. I will be out and mute for the next 10 days
In reply to Bernard Boucher

Re: AL lock is temp on in a localhost 1.6

by Chardelle Busch -
Picture of Core developers
Just to clarify--my version is John's version which is one of Stuart's versions--just updated.

Ok. I'll try the new locklib.php Bernard.  And yes, that is exactly the problem.  So, does the version you posted NOT use the logs??? (I haven't had time to look at it yet).

And, by the way, thanks for keeping up on this.  Everyone should know that it was Bernard who started all this with a hack to lock the certificate based on a quiz score waaaay back when (probably over two years ago).  It was great!


In reply to Chardelle Busch

Re: AL lock is temp on in a localhost 1.6

by John Gschnaidner -

Thank you Bernard,

I will check it out. If it works out and I find the time, I will update my version and also my chapter in the moodle docs.

Regards
  John

In reply to John Gschnaidner

Re: AL lock is temp on in a localhost 1.6

by Bernard Boucher -
Hi John,
             if the new locklib works fine and if there are some  needs,  I think it will not be too difficult  to integrate the sectionlock  option in your ( Chardelle and You ) version of AL.

Thanks for testing and debugging,

Bernard

In reply to Chardelle Busch

Re: AL lock is temp on in a localhost 1.6

by Bernard Boucher -
Hi Chardelle,
                   first thanks for your kind words.

    I just updated AL V 2.0 for 1.6 that I posted before with some bugs fixed: hide and section lock works now. I updated also Moodle docs and I put that version of AL in Modules and Plugins Database.

I hope it may help,

Bernard





In reply to Bernard Boucher

Re: AL lock is temp on in a localhost 1.6

by Simon Williams -
Bernard,

thanks 4 all your efforts.

Unfortunately the link to download does not work.

http://206.167.134.155/bb/authoring1/activityLocking2_0_for_1_6_july1006.zip

-Simon
In reply to Simon Williams

Re: AL lock is temp on in a localhost 1.6

by Bernard Boucher -
Hi Simon,
              I just re-check it and it works for me. Maybe you tried it when some part of my organisation network was down.

Better luck next time wink,

Bernard
In reply to Bernard Boucher

Re: AL lock is temp on in a localhost 1.6

by Simon Williams -
Bernard

Link still doesnt seem to work - maybe not availble to the outside world?

This other version link works
http://proemployees.com/ActivityLockingWithHide-1.6.zip

But the link from modules and plugin page http://moodle.org/mod/data/view.php?d=13&rid=391
to the latest version below times out (I am on a fast uni network)
http://206.167.134.155/bb/authoring1/activityLocking2_0_for_1_6_july1006.zip

I am a little confused as to which is the 'latest' version with most bug fixes - I am assuming it is the link(not working) from the modules and plugin page.

-Simon
In reply to Simon Williams

Re: AL lock is temp on in a localhost 1.6

by Bernard Boucher -
Hi Simon,
               sorry for the link but it works from outside world ( I created it at home ) . At work ( College ) it is vacation and maybe you are "synchronised" with  network maintenance down time thoughtful

For the version confusion, please don't use the links from the forums but those from the table in MoodleDocs  or module and plugins database. These two later are editable and can be corrected if problems exist.

The first link you refer ( http://proemployees.com/ActivityLockingWithHide-1.6.zip
 )  is version V 2.2  of Chardelle and John with tabbed interface.

The last one is  just and adaptation from Stuart old V 2.0 ( October 2005 )  with padlock interface to works with Moodle 1.6 that I try to maintain.


I hope it may help,

Bernard


In reply to Bernard Boucher

Re: AL lock is temp on in a localhost 1.6

by A. H. -
Hi Bernard,
(moodle version 1.6.4)
I am afraid that when i click on activity locks and then save activity locks, it gives me a page saying: No data sent. i click continue and i am kicked out of the course.

I followed the installation instructions for 2.1 and the general installation instructions.

Finally, is this tool, as i understand, like the selective release in webct?
Selective release: allows u to release the tool for certain students or all, at a selected time.

regards,
amer
In reply to A. H.

Re: AL lock is temp on in a localhost 1.6

by Bernard Boucher -

Hi Amer,
from that table, I don't think that activity locking exist for moodle 1.6.4.


Activities locking is only a hack, that mean that it is not upgraded with all other moodles files. For example the file moodlelib.php is modified for activities locking. That link show you how much moodlelib.php was modified since activities locking 2.0 9 months ago. That may explain the problems you experience with a mismatch between moodle and activities locking.

If you strickly conform to the matching versions included in that table, ( from a fresh install only, not an upgrade nor after a removal ) activities locking works fine. If you find errors in that table you can correct them in the table to make it better.

I don't know Webct, but activity locking make selective release based only on grade or on access not on time basis.

I hope it may help,

Bernard