Conditional activities: Activity Locking course format update

Conditional activities: Activity Locking course format update

by Chardelle Busch -
Number of replies: 15
Picture of Core developers

I recently upgraded some of the code and cleaned up the section locking code.

I also fixed the version number in the block.

This latest code (the activity locking block) should work with postgres--I have not way to test it, but an puzzled why some say it doesn't install for them.

Average of ratings: Useful (4)
In reply to Chardelle Busch

Re: Conditional activities: Activity Locking course format update

by Bernard Boucher -

Hi Chardelle,

it works fine with fresh install of 1.9.10+ smile

Thanks.

Best Wishes for the New Year,

 

Bernard


In reply to Chardelle Busch

Re: Conditional activities: Activity Locking course format update

by Gautam Saha -

Hi Chardelle,

Thanks for the hard and terrific work on this.

I read your readme file on this.

I have an instructor that wants to use activity locking in her course, but her current course format is "weekly forma:"

Any advice on how activity locking can be used in a course that uses weekly to format?

In reply to Gautam Saha

Re: Conditional activities: Activity Locking course format update

by Roel Cantada -

Have you tried using time delay setting in activity locking?

In reply to Chardelle Busch

Re: Conditional activities: Activity Locking course format update

by Roel Cantada -

Hi Chardelle,

Thank you so much for the AL course format. It works on Moodle version 1.9.10+ (Build: 20110112).

I'm currently trying to use this with Sloodle Object Assignments to create a simple quest system for OpenSimulator.

Btw. I been thinking of a minor cosmetic change on the icons. The "activity completed" and "prerequisite completed" appear to use the same green check icon. I find that confusing. Would it be better to change the "activity completed" to use a different icon like a star.gif? Attached is an example, but the star is too weak as I'm not very good at 11x11 pixel art.

Attachment star.gif
In reply to Roel Cantada

Re: Conditional activities: Activity Locking course format update

by Angela Carswell -

 

Hi Roel,

I'm new to Moodle and would like to install the Activity Lock module. I have Moodle 1.9.10 (2010206). Can you provide the verison of activity lock you used and instructions on how to install and configure?

In reply to Angela Carswell

Re: Conditional activities: Activity Locking course format update

by Roel Cantada -

Hi Angela,

I used the Activity Locking course format above 1.9.9.1 and followed the included instruction for a fresh install. I have tested/installed it after a moodle installation and also before the moodle installation i.e. the tables were installed along with all new tables. For any one using this I suggests testing it first on a test server with a new moodle installation and turning on debug - php error reporting to trace problems.

 

I quote the instructions provided by Chardelle below:

1. Put the blocks/activity_locking folder under your moodle/blocks folder.

2. Put the course/format/locking folder under your moodle/course/format folder.

3. To set activities to visible and provide warnings about prerequisites I altered moodlelib.php file:

3.1 backup your moodle/lib/moodlelib.php e.g. copy it and rename new file moodlelib.php.orig

3.2 open your moodle/lib/moodlelib.php file with a text editor (gedit, notepad; warning: in my experience sometimes when you edit a file in windows and your server is in unix or vice versa the file is messed up because of line endings and other hidden characters).


under the function_require_login find the following code:
/// If the site is currently under maintenance, then print a message

if (!has_capability('moodle/site:config', $sysctx)) {if (file_exists($CFG->dataroot.'/'.SITEID.'/maintenance.html')) {print_maintenance_message();exit;}}

3.3 paste in the following code below the above code:
//Check to see if Activity Locking criteria have been metrequire_once($CFG->dirroot.'/course/format/locking/locklib.php');global $cm;check_locks($cm);

I'm running things on an Ubuntu Lucid Lynx amd 64 server so I usually change the owner of the AL files by issuing the commands:

chown -R www-data.www-data *

If the AL course format is installed after an moodle install, hit notifications to update the database tables.

Hope this helps,

Roel

In reply to Chardelle Busch

Re: Conditional activities: Activity Locking course format update

by Yogesh Nahar -

Hi Chardelle,

I was hoping you could help me troubleshoot an issue with the AL course format. I installed the block and course format as per the instructions in the readme file but am still unable to see the acitivity locking buttons.

I am running Moodle 1.9.8+ (build: 20100504). Is it a version issue? Any help is appreciated. Thank you.

Yogi

In reply to Chardelle Busch

Re: Conditional activities: Activity Locking course format update

by Joachim Vogelgesang -

Tks for AL, Chardelle,

works very well in my local test environment 1.9.9 - only loading of admin´s course pages is very slow, loading of student´s course pages is normal.

Regards,

Joachim

In reply to Chardelle Busch

Re: Conditional activities: Activity Locking course format update

by Leslie Sandoval -

Hi Chardelle (or whoever can answer this),

I'm using the latest version of the course format from this discussion thread with Moodle build 1.9.7.  The problem is, when we set multiple conditions on an activity the lock won't remove even if the conditions have been met.

I've checked everything I can think of - has anybody else had this problem, or would anybody else be willing to take a look/suggest a solution?

In reply to Chardelle Busch

Re: Conditional activities: Activity Locking course format update

by Silvia Vantusso -

Hi Chardelle,

I need to use Activity Locking in 2 different environment with 2 different versions: 1.9.5  and 1.9.12.

Is your last version working with all 1.9.x?

Thanks a lot for your work!

Silvia

In reply to Chardelle Busch

Re: Conditional activities: Activity Locking course format update

by Jared Stein -

Does the 1.9.9 update work with 1.9.8.x? I see folks asking about 1.9.1 but not .8. If not, can you point me to the correct version?

Also, just curious if the Activity Locking wiki page is up-to-date. I started there, but was not clear on how it fit into the ongoing conversations here in the forum.

In reply to Chardelle Busch

Re: Conditional activities: Activity Locking course format update

by Jeff Vogler -

Hello all. First of all, I want to say that we were able to get Activity Locking 1.9.9.1 working on Moodle version 1.9.13 with no difficulty. Thank you for an awsome module.

My question relates to the database relationships underlying the application. I am trying to design a SQL query with which to import users that have passed any quiz into another database. I know that I can look at mdl_quiz_grades and see the score that they got on the test. I also know that the the requirements for passing the module can be found in mdl_course_module_locks. What I cannot yet figure out is how to relate the requirement in mdl_course_module_locks to the quiz that the requirement is for. I assume that I would be using the mdl_course_module_locks.lockid column, but I cannot figure out which table(s) I would use to link the lock with the quiz grade. Can anyone provide me with the pearl of wisdom that will make all clear?

Thanks in advance!

In reply to Jeff Vogler

Re: Conditional activities: Activity Locking course format update

by Wen Hao Chuang -

Is this version (1.9.9.1) the latest version of the Activity Locking that would work for Moodle 1.9.x? Also have anyone tried it with Moodle 1.9.16? I assume it should work with 1.9.16 then, right? Thanks!