Development:Activity Locking: Difference between revisions

From MoodleDocs
(→‎Table of Versions: change promoodle link)
 
(80 intermediate revisions by 10 users not shown)
Line 1: Line 1:
Activity Locking is an external module which sets up conditions that a student must reach before they can start(unlock) a Moodle activity. These criterion generally include time spent, score or completed.  The conditions can be applied to more than one activity or resource for a each lock. 
=Overview=
=Overview=
This page is an attempt to consolidate and explain the available activity locking (AL) code that is present for Moodle 1.5.x and 1.6.x. This page will hopefully help explain all the available versions and their respective features. Some of the reference here will overlap with the existing MoodleDoc page covering [[Conditional activities]].
This page is an attempt to consolidate and explain the available activity locking (AL) code that is present for Moodle 1.5 to 1.7. This page will hopefully help explain all the available versions and their respective features. Some of the reference here will overlap with the existing MoodleDoc page covering [[Conditional activities]].
 
Please be patient as this page is new and under development.  See page comments for reference material.


=Types of activity locking code=
=Types of activity locking code=
Line 10: Line 11:
Bernard started all this with a hack to lock quiz and resources in [http://moodle.org/mod/forum/discuss.php?d=2948#12825 october 2003]. The certificate based on a quiz score was added in [http://moodle.org/mod/forum/discuss.php?d=9766#59875 september 2004] with version 0.7.  It was a great start!
Bernard started all this with a hack to lock quiz and resources in [http://moodle.org/mod/forum/discuss.php?d=2948#12825 october 2003]. The certificate based on a quiz score was added in [http://moodle.org/mod/forum/discuss.php?d=9766#59875 september 2004] with version 0.7.  It was a great start!


== AL Branch 2.1 for Moodle 1.6 (Stuart Mayor)==
== AL Branch 2.0 for Moodle 1.6 (Stuart Mayor)==
*This has been virtually a complete rewrite and as such there are areas of functionality the were available in older versions of AL that are not in this.     
*This has been virtually a complete rewrite and as such there are areas of functionality the were available in older versions of AL that are not in this.     


* Conditional locking: Lock based on a user's performance in previous activities. You can also choose to unlock and activity if a user scores less than a certain grade.
* Conditional locking: Lock based on a user's performance in previous activities. You can also choose to unlock and activity if a user scores less than a certain grade.
* Show activity completion: The checkbox that appears before each activity to show it have been done.
* Show activity completion: The checkbox that appears before each activity to show it have been done.
* A variation on this  also hides future activities, see AL Branch 2.1 for Moodle 1.6 (John Gschnaidner-Chardelle Busch) below.
* A variation on this  also hides future activities, see AL Branch 2.2 for Moodle 1.6 (John Gschnaidner-Chardelle Busch) below.
* Bernard Boucher reworked Stuart's version and on June 20, 2006 posted [http://206.167.134.155/bb/authoring1/activity_locking_v2_for_16_20060620.zip '''Activity_locking_v2_for_16_20060620.zip'''] on [http://moodle.org/mod/forum/user.php?id=1323&course=5 Activity Locking v3 or v2 for testing only].  The link is outside moodle.org and the link was not working on June 29, 2006.
* Bernard Boucher reworked Stuart's version for Moolde 1.6, initially on June 20, 2006 and updated on July 10, 2006 posted [http://206.167.134.155/bb/authoring1/activityLocking2_0_for_1_6_july1006.zip '''Activity Locking V 2.0 for Moodle 1.6'''] on [http://moodle.org/mod/forum/discuss.php?d=46863#220125 Activity Locking v3 or v2 for testing only].
 
*Downloaded the ..1.6_July10006.zip and installed it on a clean 1.6.3 localhost Windows XP machine.  The language file did not have all the required fields. Spent time editing the lock.php file (not good at it) adding lines.  But it worked. --[[User:chris collman|chris collman]] 16:42, 20 October 2006 (CDT)


===Installation for 2.1 for Moodle 1.6(Stuart Mayor)===
===Installation for 2.1 for Moodle 1.6(Stuart Mayor)===
Line 24: Line 27:
Next, you need to modify one table in the database and add a new one (I use phpmyadmin for this).  
Next, you need to modify one table in the database and add a new one (I use phpmyadmin for this).  


*I downloaded a copy of the above zip ..20051201.  Had to move the lang file from en to en_ut8f .  Worked on my 1.6.3 localhost test course.  --[[User:chris collman|chris collman]] 16:37, 20 October 2006 (CDT)
 
====Details of install====
* The table you need to modify is mdl_course_modules and you need to add the following fields:
* The table you need to modify is mdl_course_modules and you need to add the following fields:
completedbox TINYINT(1) UNSIGNED NOT NULL DEFAULT '0'
completedbox TINYINT(1) UNSIGNED NOT NULL DEFAULT '0'
Line 52: Line 58:
pix/t/closed.gif to moodle/pix/t/closed.gif
pix/t/closed.gif to moodle/pix/t/closed.gif
lang/en/lock.php to moodle/lang/en/lock.php
lang/en/lock.php to moodle/lang/en/lock.php


==AL Branch 2.2 for Moodle 1.6 (John Gschnaidner-Chardelle Busch and others)==
==AL Branch 2.2 for Moodle 1.6 (John Gschnaidner-Chardelle Busch and others)==
John's versionincludes the settings tab--making it possible to set the hide/visible options, as well as the completion (a checkmark in front of a resource/activity) options, says Chardelle.   
John's versionincludes the settings tab--making it possible to set the hide/visible options, as well as the completion (a checkmark in front of a resource/activity) options, says Chardelle.   
* A variation on  Stuart Mayor's 2.1, it hides topics dependent upon conditions set on specific activities/resources  '''ALV2_1_debug.ZIP''' (John). Had bug which Benard tweaked out.
* A variation on  Stuart Mayor's 2.1, it hides topics dependent upon conditions set on specific activities/resources  '''ALV2_1_debug.ZIP''' (John). Had bug which Benard tweaked out.
* A build of Stuarts Mayor's 2.1 it locks and/or hides specific activities depending upon conditions set on specific activities/resources. Was posted by Chardelle in [http://proemployees.com/ActivityLockingWithHide-1.6.zip '''ActivityLockingWithHide-1.6.zip''']. Probably same as above. Had bug which Benard tweaked out.
* A build of Stuarts Mayor's 2.1 it locks and/or hides specific activities depending upon conditions set on specific activities/resources. Had bug which Benard tweaked out.
* A tweak by Bernard Boucher on June 27, 2006 was posted [http://moodle.org/mod/forum/discuss.php?d=35488&parent=222516 moodle/lib/locklib.php file] and called '''locklib.zip''' seems to fix known bug in both the above downloads.
* A tweak by Bernard Boucher on June 27, 2006 was posted [http://moodle.org/mod/forum/discuss.php?d=35488&parent=222516 moodle/lib/locklib.php file] and called '''locklib.zip''' seems to fix known bug in both the above downloads.
==AL Branch 2.4 for Moodle 1.6 (John Gschnaidner)==
Further development of the 2.2 as a hack (no installation function).
:
'''WARNING:'''
:Because of some changes, this version may '''not''' be completely compatible to previous versions!
Status:
:Released, but you still should try it '''before''' implementing it on a production server.
:
In this version:
* Supports module '''and''' section locks
* Parallel locking and completing modules '''and''' sections
* CSS style and checkbox for locking and completing
* Hide when locked
* Language support and help
* Readme for features and installation
* SQL commands for DB update
* Info on how to update the CSS style sheets
FYI: Did a download on a clean complete package install of 1.6.3 localhost Windows XP.  Seemed to work. No editing neeed on lang/lock.php.  After unpacking file (see table below) and droping into moodle folder, went to database and imported the MySQL script found in moodle/course/MySQL.sql .  --[[User:chris collman|chris collman]] 16:32, 20 October 2006 (CDT)


==AL Branch 3.s for Moodle 1.6 (Stuart Mayor)==
==AL Branch 3.s for Moodle 1.6 (Stuart Mayor)==
Similar to the 2.x versions. Major difference is that a question to the student unlocks activities.  Being actively developed and tested.
Similar to the 2.x versions. Major difference is that a question to the student unlocks activities.  Being actively developed and tested.
==AL Branch 3.1 for Moodle 1.7  (Bernard Boucher & Stuart Mayor)==
Bernard has updated AL for 1.7 and it is being tested--[[User:chris collman|chris collman]] 07:18, 12 March 2007 (CDT)
==AL for Moodle 1.9.2+ Build: 20080917 (Cristiano Leoni)==
Tested on the "topics" lesson format.
==AL for Moodle 1.9.3+ Build: 20081015 (Cristiano Leoni)==
Tested on the "topics" lesson format.
==AL for Moodle 1.9.4+ (Cristiano Leoni)==
Tested on the "topics" lesson format.
==AL for Moodle 1.9.5 stable Build: 20090515 (Cristiano Leoni)==
Tested on the "topics" lesson format.


==CA Branch 1.0 for Moodle 1.5.2 (Borja Rubio Reyes)==
==CA Branch 1.0 for Moodle 1.5.2 (Borja Rubio Reyes)==
Details and discussed in the thread "[http://moodle.org/mod/forum/discuss.php?d=36697 NEW research on CONDITIONAL ACTIVITIES in Moodle]"
Details and discussed in the thread "[http://moodle.org/mod/forum/discuss.php?d=36697 NEW research on CONDITIONAL ACTIVITIES in Moodle]"


= Table of Versions, to be completed... =
==Score Lock for Moodle 1.6x (John Gschnaidner)==
As announced, this is a ongoing development for Activity Locking v2.4, with a couple of new features.
For further information please refer to
:"[https://docs.moodle.org/en/Score_Lock moodle Docs: '''Score Lock''']"
Score Lock is scheduled for beta release until middle of September 2006.
 
= Table of Versions =
{| border="3" padding="4"
{| border="3" padding="4"
|+ Activity Locking updated 29 June 2006 10:00 AM EST
|+ Activity Locking updates
! -Version-   
! -Version-   
! Moodle version
! Moodle version
Line 81: Line 130:
! Quiz Question  
! Quiz Question  
! Comments  
! Comments  
! Feature
! Feature
! Feature  
! Feature  
! Bug  
! Bug  
! Bug
|-----
| AL for 1.9.5 stable
| 1.9.5 stable
| Cristiano Leoni
| Tested
| Automatic
| [http://moodle.org/mod/forum/discuss.php?d=92731]
| [http://software.cristianoleoni.com/tiki-index.php?page=Moodle]
| Padlock Icons
| hide section
| Yes
| Yes
| No
|
|
|
|-----
| AL for 1.9.4+
| 1.9.4+
| Cristiano Leoni
| Tested
| Automatic
| [http://moodle.org/mod/forum/discuss.php?d=92731]
| [http://software.cristianoleoni.com/tiki-index.php?page=Moodle]
| Padlock Icons
|
|
|
|
|
|
|
|-----
| AL for 1.9.3+
| 1.9.3+
| Cristiano Leoni
| Tested
| Automatic
| [http://moodle.org/mod/forum/discuss.php?d=92731]
| [http://software.cristianoleoni.com/tiki-index.php?page=Moodle]
| Padlock Icons
|
|
|
|
|
|
|
|-----
|-----
| AL 3.0
| AL 3.0
Line 93: Line 187:
|
|
|[http://moodle.org/mod/forum/discuss.php?d=46863]
|[http://moodle.org/mod/forum/discuss.php?d=46863]
| [http://moodle.org/file.php/5/moddata/forum/678/214752/Activity_Locking_20060317.7z]
|  
|  
|  
|  
|  
|  
|  
|  
| Yes
|  
|  
|  
|  
|
|-----
| AL 2.5 ?
| 1.9
| Chardelle Busch, ProMoodle.com
| Enhanced
| Automatic
| [http://moodle.org/mod/forum/discuss.php?d=92731]
| [http://promoodle.com/courses/course/view.php?id=5]
| Padlock Icons
| Yes
| Yes
| Yes
| No
| see above
|
|
|-----
| AL 2.4
| 1.6
| John Gschnaidner
| released
| manual
|[http://moodle.org/mod/forum/discuss.php?d=50835]
| [http://moodle.org/file.php/5/moddata/forum/678/241994/ALv2.4.7z]
| Tabs
| Yes
| Yes
| Yes
| Yes  
| Yes  
| A/R dep on questions
| looks good
|
| [http://moodle.org/file.php/5/moddata/forum/678/244338/locking.php]
|-----
|-----
| AL 2.3
| AL 2.3
Line 108: Line 235:
|  
|  
| [http://moodle.org/mod/forum/discuss.php?d=35488]
| [http://moodle.org/mod/forum/discuss.php?d=35488]
| [http://moodle.org/file.php/5/moddata/forum/678/164285/activitylocking20051201.zip]
|  
|  
|  
|  
|  
|  
|
| Yes
|  
|  
|  
|  
|  
|  
| Yes
| A/R/T dep on A/Rs
|-----
|-----
| AL 2.2
| AL 2.2
Line 122: Line 250:
| Testing
| Testing
|  
|  
| [http://moodle.org/mod/forum/discuss.php?d=35488#220946]
| [http://moodle.org/mod/forum/discuss.php?d=47906]
|  
|  
| Tabs
| Tabs
Line 130: Line 258:
| Yes
| Yes
| almost
| almost
| A/R dep on A/Rs
| +Hide
|
|
| bug fix
|
|-----
| AL 2.0
| 1.8.2+
| Stuart Mayor, Bernard Boucher
| Updated
| Automatic
| [http://moodle.org/mod/forum/discuss.php?d=77907]
| [http://206.167.134.155/bb/authoring1/Activity_Locking_V2_0_for_182_Sept25_07.zip]
| Padlock Icons
| Yes
| Yes
| Yes
| No
| see above
|
|
|-----
| AL 2.0
| 1.8.2
| Stuart Mayor, Bernard Boucher
| Updated
| Automatic
| [http://moodle.org/mod/forum/discuss.php?d=77907]
| [http://206.167.134.155/bb/authoring1/Activity_Locking_V2_0_for_182_August13_07.zip]
| Padlock Icons
| Yes
| Yes
| Yes
| No
| see above
|
|
|-----
| AL 2.0
| 1.8.1
| Stuart Mayor, Bernard Boucher
| Updated
| Automatic
| [http://moodle.org/mod/forum/discuss.php?d=74477#p332097]
| [http://206.167.134.155/bb/authoring1/Activity_Locking_V2_0_for_181_June22_07.zip]
| Padlock Icons
| Yes
| Yes
| Yes
| No
| see above
|
|
|-----
| AL 2.0
| 1.7.1
| Stuart Mayor, Bernard Boucher
| Updated
| Automatic
| [http://moodle.org/mod/forum/discuss.php?d=65175#p300414]
| [http://206.167.134.155/bb/authoring1/Activity_Locking_V2_0_for_171_Feb1907.zip]
| Padlock Icons
| Yes
| Yes
| Yes
| No
| see above
|
|
|-----
| AL 2.0
| 1.7
| Stuart Mayor, Chris Throup
| Updated
| Automatic
| [http://moodle.org/mod/forum/discuss.php?d=65175#p300414]
| [http://moodle.org/file.php/5/moddata/forum/678/302505/Activity_Locking_for_Moodle_1.7_.zip]
| Padlock Icons
| Yes
| Yes
| Yes
| No
| see above
|
|
|-----
|-----
| AL 2.0
| AL 2.0
Line 148: Line 354:
| No
| No
| see above
| see above
|
|
|-----
|-----
| C A 1.0
| C A 1.0
Line 161: Line 369:
|
|
| Yes
| Yes
|
|
|
|}
|}


=General installation instructions DRAFT=
=General installation instructions DRAFT=
Installing AL on a localhost (desktop) machine was not difficult!  Some months ago I must have downloaded and connected phpAdministration and that came in handy for step 6.  I just did a conversion and it took me less than 30 minutes (actually I think the AL part was done in 3 minutes ) because I wanted to install the latest version of Moodle 1.6 and then zipped my entire Moodle16 file structure before I attempted the AL installation.
==Short instructions==
*1. Perform any backups you think are necessary (I zipped everything in my localhost path).
#Find and download the correct version of AL for your version of Moodle. This is a zip file.
*2. Select the zip file flavor of AL you want and download it (I used Chardelle's zip plus Bernards tweak found in 2.2 above)
#Extract the zipped file's folders and files in you Moodle root directoryThis will put the right files in their proper directory.  
*3. Unzip it to a non Moodle place.  (Like to keep the folder structures option)
#As Administrator, go to the admin block for the Moodle siteThis should start the automatic install process.
*4. Locate the MySQL.sql file so you can find it again.
*5. In Moodle as admin, go to Administration, Configuration and turn on Maintence Mode.
*6. Go to Administration, Database. In the home query window, on the left, click on moodle (mine says Moodle16 and has a bunch of mdl_ listings under it).
*7. Best: Click on the SQL tab. In the location of the text file, browse to the file in #4, then click go.
*7. Alternative: use the MySQL document and make or changes in
*8. Leave Moodle, shut that browser window.
*9.  Now you need to move the files in the folders located in #3 to your Moodle file structure.  (See my tip below). In your non moodle area you have unpack the file to a folder called ActivityLockingWithHide.  It has a folder called Moodle in it, with sub folders under it, for example ActivityLockingWithHide\Moodle\CourseYou should copy ever file from there to your local host file structure in the same spot. (Mine is Moodle16\Moodle\Course ).
*10. Go back into Moodle, log in as Admin, go to Administration. Moodle will adjust itself.
*11 Check in Administration, Configuration, Maintence to make sure it is disabled. 
*12.  You are done, check out a lesson with weeks or topics, go to lesson settings and notice the new tabs.
* TIP?  There is probably a slicker way but after I unzipped the file in #3, I went down a level and zipped the Moodle folderThen I unpacked the files to Moodle16\, told the unzip program to keep the folder structure and overwrite existing files.  
 
 
 
 


==Tips and FAQs==
*Activity Locking (AL) is a non-standard Moodle feature.  Testing on a Moodle that is similar to  your production Moodle is advisible. For example, a localhost installation.
*Since all versions of AL change the Moodle MySQL file structure, it is advisable to do a backup before installing AL. 
*Upgrading either Moodle or AL and things don't work?  A common forum suggestion is to reinstall AL with the proper version that is designed for the Moodle version.
*AL installs but does not seem to lock?  Be sure you are logged in as a student. Logging in as a teacher and then "viewing as as student" or changing roles to a student, will not give consistant results in Activity Locking.
*AL icons initially show in edit mode but then disappear. It has been reported that this occurs when AJAX is enabled in 1.8 - disable AJAX and they should reappear. (.../admin/settings.php?section=experimental)


=See Also=
==See also==
*[[Adding_activity_locks]] will give the reader an idea of what one of the flavors of Activity Locking looks like for a student and teacher setting it up.   
*[[Adding_activity_locks]] will give the reader an idea of what one of the flavors of Activity Locking looks like for a student and teacher setting it up.   


Line 198: Line 400:


There is a very specialized-limited type of activity locking under a lesson (activity) setting called dependency in 1.6.  See: *https://docs.moodle.org/en/Adding/editing_a_lesson#Dependent_on .   
There is a very specialized-limited type of activity locking under a lesson (activity) setting called dependency in 1.6.  See: *https://docs.moodle.org/en/Adding/editing_a_lesson#Dependent_on .   
*[http://www.moodleblog.org/?p=110 How to use the Activity Locking course format] blog post with video





Latest revision as of 14:36, 13 September 2010

Activity Locking is an external module which sets up conditions that a student must reach before they can start(unlock) a Moodle activity. These criterion generally include time spent, score or completed. The conditions can be applied to more than one activity or resource for a each lock.


Overview

This page is an attempt to consolidate and explain the available activity locking (AL) code that is present for Moodle 1.5 to 1.7. This page will hopefully help explain all the available versions and their respective features. Some of the reference here will overlap with the existing MoodleDoc page covering Conditional activities.

Types of activity locking code

For the purpose of this MoodleDoc article: AL is any code that allows the user to make decisions on the next available resource or item the student will be able to use based on student events or quiz performance. There is some activity locking code that is very quick and dirty to simply lock future activities and then there is much more complex code based on the conditional activity though structure which attempts to progress the student through the course in a thought out progression based on activities and performance. Again we hope to clarify some of this here.

AL Branch 0.1 (Bernard Boucher)

Bernard started all this with a hack to lock quiz and resources in october 2003. The certificate based on a quiz score was added in september 2004 with version 0.7. It was a great start!

AL Branch 2.0 for Moodle 1.6 (Stuart Mayor)

  • This has been virtually a complete rewrite and as such there are areas of functionality the were available in older versions of AL that are not in this.
  • Conditional locking: Lock based on a user's performance in previous activities. You can also choose to unlock and activity if a user scores less than a certain grade.
  • Show activity completion: The checkbox that appears before each activity to show it have been done.
  • A variation on this also hides future activities, see AL Branch 2.2 for Moodle 1.6 (John Gschnaidner-Chardelle Busch) below.
  • Bernard Boucher reworked Stuart's version for Moolde 1.6, initially on June 20, 2006 and updated on July 10, 2006 posted Activity Locking V 2.0 for Moodle 1.6 on Activity Locking v3 or v2 for testing only.
  • Downloaded the ..1.6_July10006.zip and installed it on a clean 1.6.3 localhost Windows XP machine. The language file did not have all the required fields. Spent time editing the lock.php file (not good at it) adding lines. But it worked. --Chris collman 16:42, 20 October 2006 (CDT)

Installation for 2.1 for Moodle 1.6(Stuart Mayor)

activitylocking20051201.zip the initial version

  • Firstly, you need the stable build of Moodle 1.6. This version of AL might work on earlier releases but I didn't write it with them in mind and I certainly can't support them.

Next, you need to modify one table in the database and add a new one (I use phpmyadmin for this).

  • I downloaded a copy of the above zip ..20051201. Had to move the lang file from en to en_ut8f . Worked on my 1.6.3 localhost test course. --Chris collman 16:37, 20 October 2006 (CDT)

Details of install

  • The table you need to modify is mdl_course_modules and you need to add the following fields:

completedbox TINYINT(1) UNSIGNED NOT NULL DEFAULT '0' completedscore VARCHAR(255) NOT NULL completedstyle VARCHAR(255) NOT NULL lockedbox TINYINT(1) UNSIGNED NOT NULL DEFAULT '1' lockedstyle VARCHAR(255) NOT NULL DEFAULT 'locked' lockedvisible TINYINT(1) UNSIGNED NOT NULL DEFAULT '1' delay INT(10) UNSIGNED NOT NULL DEFAULT '0'

  • The table you need to create is as follows:

CREATE TABLE `mdl_course_locks` ( `id` int(10) unsigned NOT NULL auto_increment, `courseid` int(10) unsigned NOT NULL default '0', `locktype` varchar(10) NOT NULL default , `targetid` int(10) unsigned NOT NULL default '0', `locks` longtext NOT NULL, PRIMARY KEY (`id`) ) TYPE=MyISAM COMMENT='Contains locks for sections and modules';

  • Lastly, you need to copy the following files from the zip file:

lib/moodlelib.php to moodle/lib/moodlelib.php lib/locklib.php to moodle/lib/locklib.php course/lib.php to moodle/course/lib.php course/lock.php to moodle/course/lock.php course/mod.php to moodle/course/mod.php course/settings.html to moodle/course/settings.html pix/t/open.gif to moodle/pix/t/open.gif pix/t/closed.gif to moodle/pix/t/closed.gif lang/en/lock.php to moodle/lang/en/lock.php


AL Branch 2.2 for Moodle 1.6 (John Gschnaidner-Chardelle Busch and others)

John's versionincludes the settings tab--making it possible to set the hide/visible options, as well as the completion (a checkmark in front of a resource/activity) options, says Chardelle.

  • A variation on Stuart Mayor's 2.1, it hides topics dependent upon conditions set on specific activities/resources ALV2_1_debug.ZIP (John). Had bug which Benard tweaked out.
  • A build of Stuarts Mayor's 2.1 it locks and/or hides specific activities depending upon conditions set on specific activities/resources. Had bug which Benard tweaked out.
  • A tweak by Bernard Boucher on June 27, 2006 was posted moodle/lib/locklib.php file and called locklib.zip seems to fix known bug in both the above downloads.

AL Branch 2.4 for Moodle 1.6 (John Gschnaidner)

Further development of the 2.2 as a hack (no installation function).

WARNING:

Because of some changes, this version may not be completely compatible to previous versions!

Status:

Released, but you still should try it before implementing it on a production server.

In this version:

  • Supports module and section locks
  • Parallel locking and completing modules and sections
  • CSS style and checkbox for locking and completing
  • Hide when locked
  • Language support and help
  • Readme for features and installation
  • SQL commands for DB update
  • Info on how to update the CSS style sheets

FYI: Did a download on a clean complete package install of 1.6.3 localhost Windows XP. Seemed to work. No editing neeed on lang/lock.php. After unpacking file (see table below) and droping into moodle folder, went to database and imported the MySQL script found in moodle/course/MySQL.sql . --Chris collman 16:32, 20 October 2006 (CDT)

AL Branch 3.s for Moodle 1.6 (Stuart Mayor)

Similar to the 2.x versions. Major difference is that a question to the student unlocks activities. Being actively developed and tested.

AL Branch 3.1 for Moodle 1.7 (Bernard Boucher & Stuart Mayor)

Bernard has updated AL for 1.7 and it is being tested--Chris collman 07:18, 12 March 2007 (CDT)

AL for Moodle 1.9.2+ Build: 20080917 (Cristiano Leoni)

Tested on the "topics" lesson format.


AL for Moodle 1.9.3+ Build: 20081015 (Cristiano Leoni)

Tested on the "topics" lesson format.

AL for Moodle 1.9.4+ (Cristiano Leoni)

Tested on the "topics" lesson format.

AL for Moodle 1.9.5 stable Build: 20090515 (Cristiano Leoni)

Tested on the "topics" lesson format.

CA Branch 1.0 for Moodle 1.5.2 (Borja Rubio Reyes)

Details and discussed in the thread "NEW research on CONDITIONAL ACTIVITIES in Moodle"

Score Lock for Moodle 1.6x (John Gschnaidner)

As announced, this is a ongoing development for Activity Locking v2.4, with a couple of new features. For further information please refer to

"moodle Docs: Score Lock"

Score Lock is scheduled for beta release until middle of September 2006.

Table of Versions

Activity Locking updates
-Version- Moodle version Who Status MySql Install Docs Download Teacher Interface Hide Option Completion Box Option Section Lock Quiz Question Comments Feature Bug
AL for 1.9.5 stable 1.9.5 stable Cristiano Leoni Tested Automatic [1] [2] Padlock Icons hide section Yes Yes No
AL for 1.9.4+ 1.9.4+ Cristiano Leoni Tested Automatic [3] [4] Padlock Icons
AL for 1.9.3+ 1.9.3+ Cristiano Leoni Tested Automatic [5] [6] Padlock Icons
AL 3.0 1.5.2 Stuart Mayor not finished [7] [8] Yes
AL 2.5 ? 1.9 Chardelle Busch, ProMoodle.com Enhanced Automatic [9] [10] Padlock Icons Yes Yes Yes No see above
AL 2.4 1.6 John Gschnaidner released manual [11] [12] Tabs Yes Yes Yes Yes looks good [13]
AL 2.3 1.6 Stuart Mayor Testing [14] [15] Yes
AL 2.2 1.6 Gschnaidner, Mayor, Busch Testing [16] Tabs Yes almost
AL 2.0 1.8.2+ Stuart Mayor, Bernard Boucher Updated Automatic [17] [18] Padlock Icons Yes Yes Yes No see above
AL 2.0 1.8.2 Stuart Mayor, Bernard Boucher Updated Automatic [19] [20] Padlock Icons Yes Yes Yes No see above
AL 2.0 1.8.1 Stuart Mayor, Bernard Boucher Updated Automatic [21] [22] Padlock Icons Yes Yes Yes No see above
AL 2.0 1.7.1 Stuart Mayor, Bernard Boucher Updated Automatic [23] [24] Padlock Icons Yes Yes Yes No see above
AL 2.0 1.7 Stuart Mayor, Chris Throup Updated Automatic [25] [26] Padlock Icons Yes Yes Yes No see above
AL 2.0 1.6 Stuart Mayor, Bernard Boucher Updated Automatic [27] [28] Padlock Icons Yes Yes Yes No see above
C A 1.0 1.5.2 Borja Rubio Reyes, David Delgado [29] Yes

General installation instructions DRAFT

Short instructions

  1. Find and download the correct version of AL for your version of Moodle. This is a zip file.
  2. Extract the zipped file's folders and files in you Moodle root directory. This will put the right files in their proper directory.
  3. As Administrator, go to the admin block for the Moodle site. This should start the automatic install process.

Tips and FAQs

  • Activity Locking (AL) is a non-standard Moodle feature. Testing on a Moodle that is similar to your production Moodle is advisible. For example, a localhost installation.
  • Since all versions of AL change the Moodle MySQL file structure, it is advisable to do a backup before installing AL.
  • Upgrading either Moodle or AL and things don't work? A common forum suggestion is to reinstall AL with the proper version that is designed for the Moodle version.
  • AL installs but does not seem to lock? Be sure you are logged in as a student. Logging in as a teacher and then "viewing as as student" or changing roles to a student, will not give consistant results in Activity Locking.
  • AL icons initially show in edit mode but then disappear. It has been reported that this occurs when AJAX is enabled in 1.8 - disable AJAX and they should reappear. (.../admin/settings.php?section=experimental)

See also

  • Adding_activity_locks will give the reader an idea of what one of the flavors of Activity Locking looks like for a student and teacher setting it up.

Please visit the Moodle Forum for more information concerning Activity Locking and Conditional Activities-

There is a very specialized-limited type of activity locking under a lesson (activity) setting called dependency in 1.6. See: *https://docs.moodle.org/en/Adding/editing_a_lesson#Dependent_on .