It has undergone some major changes. So many, in fact, you might even call this "version 2" or even give it a new name like "Activity Locking and Tracking"
As always, this is a pre-release test version. I haven't even tested it rigorously myself.
The biggest change is in the way those tick boxes that appear before or after activities are managed. You now set them on a per-activity basis instead of per-course. OK, it will take a little longer to set up your course, but it is far more flexible. The best way to see is install it and have a play.
Be aware, though, that you will lose your current "activity tracking" setting (the one that you set on the course settings page - None, Before each activity, After each activity). This now has to be set for each activity (assuming you don't want the default).
Unfortunately, I can't upload this to CVS. Firewall problems. I'd appreciate it if someone could do that for me.
Re: Conditional activities: Latest Activity Locking Release
I'm not familiar with .rar format -- I just checked their website. Sounds good, but does anything besides the proprietary rar archiver read a .rar file?
You might want to give it a different name just so that the download under activity_locking remains the old version for now.
Can you set defaults for the course and then override them on a per-activity basis?
Thanks,
Jim.
Re: Conditional activities: Latest Activity Locking Release
At this stage, no, you can't set defaults for the course. It will be the next thing to be added.
At the moment, the default is:
Visible when hidden
Do NOT show tracking checkboxes
Do show prerequisites checkboxes
Hidden style is "hidden"
Completed style is blank.
Re: Conditional activities: Latest Activity Locking Release
Great to see the progres, I get though an error message on the frontpage where:
Fatal error: Call to undefined function: islocked() in C:\minixampp\htdocs\moodle\course\lib.php on line 988
I solved this by adding this line on line 987 in the file in the error message:
require_once($CFG->libdir.'/locklib.php');
Now the error message is gone.
BR
Jens
Re: Conditional activities: Latest Activity Locking Release
Re: Conditional activities: Latest Activity Locking Release
In your new release I see a fine unlock symbol, but when I click it, I don't get anything unlocked.
What do I miss?
Kind Regards
Jens
Re: Conditional activities: Latest Activity Locking Release
Can you check in your lock.php file that you have a line, around line 63, that says
if ($_GET['action'] == "unlock") {
Re: Conditional activities: Latest Activity Locking Release
if ($_GET['action'] == "unlock") {
Re: Conditional activities: Latest Activity Locking Release
Re: Conditional activities: Latest Activity Locking Release
Re: Conditional activities: Latest Activity Locking Release
If I am doing something wrong I'd appreciate it if anyone has the time to point me in the right direction.
thanks,
jonny
Re: Conditional activities: Latest Activity Locking Release
Same here . All locked activities are completly hidden?
php 4.4 , mysql 4.0 , windows 2000 , Moodle 1.5+
Re: Conditional activities: Latest Activity Locking Release
Re: Conditional activities: Latest Activity Locking Release
Any help as ever is appreciated,
thanks, jonny
Re: Conditional activities: Latest Activity Locking Release
Re: Conditional activities: Latest Activity Locking Release
Hi Stuart!
Even after using your patch, I get the same Fatalerror:
<>Fatal error
/>
From line 1825 -> 1832 in moodle\course\lib.php I remove the error by inserting the red line:
>: Call to undefined function: islocked() in C:\minixampp\htdocs\moodle\course\lib.php on line 1826It is an error that you get, if you have a subject in the middle of the frontpage. }
require_once($CFG->libdir.'/locklib.php');
if (islocked($mod)) {
$unlock = '<a title="'.$str->unlock.'" href="'.$path.'/lock.php?id='.$mod->id.
'&sesskey='.$sesskey.$section.'&action=unlock"><img'.
' src="'.$CFG->pixpath.'/t/unlock.gif" hspace="2" height="11" width="11" border="0" '.
' alt="'.$str->unlock.'" /></a>';
}
But the unlock feature is still not active.
Stuart, will you please insert the patch line in red?
- Jens
Re: Conditional activities: Latest Activity Locking Release
Is there any chance you can have a look in your database and check you have extra fields added in the course_modules table. There should be visiblewhenlocked, checkboxforcomplete, checkboxesforprereqs, stylewhencomplete, stylewhenlocked.
Or something like that.
Re: Conditional activities: Latest Activity Locking Release
visiblewhenlocked, checkboxforcomplete, checkboxesforprereqs, stylewhencomplete, stylewhenlocked
I checked the SQL file in the Rar download you provided but it does not include statements to create the fields you refer to. It only mentions the field 'delay' VARCHAR(10)
Should the SQL file have more statements in it? could you provide the SQL so I can run it manually?
Thanks for your help, jonny
Re: Conditional activities: Latest Activity Locking Release
The fields you need to add are...
ALTER TABLE `prefix_course_modules` ADD `visiblewhenlocked` TINYINT( 1 ) UNSIGNED NOT NULL default '1' AFTER `visible`;
ALTER TABLE `prefix_course_modules` ADD `stylewhenlocked` VARCHAR( 200 ) NULL default 'locked' AFTER `visible`;
ALTER TABLE `prefix_course_modules` ADD `checkboxforcomplete` TINYINT( 1 ) UNSIGNED NOT NULL default '0' AFTER `visible`;
ALTER TABLE `prefix_course_modules` ADD `stylewhencomplete` VARCHAR( 200 ) NULL default '' AFTER `visible`;
ALTER TABLE `prefix_course_modules` ADD `checkboxesforprereqs` TINYINT( 1 ) UNSIGNED NOT NULL default '1' AFTER `visible`;
Re: Conditional activities: Latest Activity Locking Release
Re: Conditional activities: Latest Activity Locking Release
I have these fields:
checkboxesforprereqs stylewhencomplete checkboxforcomplete stylewhenlocked visiblewhenlocked
But does not make the features like unlock working.
BR
Jens
Re: Conditional activities: Latest Activity Locking Release
I have tested this latest release of activitiy locks and have encounterd the the aforementioned problems and one that I have not seen in any forum:
When I installed activity locking, it did not create the new fields in the table course_modules. I tried installing an older version of activity locking followed by this latest release and then I found the new fields in SQL.
But more importantly, there seems to be a problem when the activity locking module and the certificate module are both installed. When I log in as admin and I go to :
quiz1The quiz is available until: Tuesday, 11 October 2005, 01:00 AM |
If now I click on View 2 quiz attempts (1 Students), I get a page not found error because this link redirects the page to http://aus121stemp/moodle2/mod/quiz/attempts.php?id=2
If I use moodle without activity locking, then it woud redirect me to http://aus121stemp/moodle2/mod/quiz/review.php?id=2
The second problem is the time taken:
|
First name / Surname | Started on | Time taken | Grade/10 | ||
---|---|---|---|---|---|
Patrick Jeitler | 3 October 2005, 11:49 AM | now | 10 | ||
3 October 2005, 11:50 AM | now | 0 |
Select all / Deselect all 0) submitFormById('attemptsform'); }" name="action"> With selected Delete |
Display options:
Attempts shown per page: | |
Show students with no attempts | |
Show mark details | |
Re: Conditional activities: Latest Activity Locking Release
I've just tried to recreate your problem on my system. When I went to the page you described above and clicked on the
........mod/quiz/report.php?mode=overview&id=27
I wonder if we are using different versions of the quiz module. In any case, it would seem that the problem is part of the quiz module, as opposed to activity locking.
Re: Conditional activities: Latest Activity Locking Release
I still can't upload it to CVS...
Re: Conditional activities: Latest Activity Locking Release
The first issue was that certian resources were set to 'locked and hidden' and I could not change any of the settings for locking. The locking screen would come up, but the setting wouldn't save. It aslo would not unlock by clicking the little open lock icon. I fixed them (there were only a few) by deleting and recreating the resource, then it worked.
The current issue is that when a resource is "locked and hidden" it never will unhide. If I set it so the locked item is visable when locked, it works fine. It is locked until a condition is met, then it is unlocked. If I ever say it should be hidden when locked, it dissapears and doesn't come back.
Any ideas?
Re: Conditional activities: Latest Activity Locking Release
Re: Conditional activities: Latest Activity Locking Release
Eveything looks good until I try the "Visible when locked" option as "No". From there on, the item will never display, even if the locking conditions are met. If I change "Visible when locked" to "Yes" it works fine.
Before I give up tonight I am going to dig into the PHP and see if I can figure out where the choice is made to display a locked item or not.
Thanks again for some great work! I'm sure we will get this worked out soon.
Re: Conditional activities: Latest Activity Locking Release
Re: Conditional activities: Latest Activity Locking Release
Stuart,
I am having trouble figuring out how to lock a resource so that the student must score a particular grade on a quiz before moving on.
I have the latest moodle and Conditional Locking Code. When I lock an activity it only gives me an option to lock on the quiz based on access but I thought you could set a grade
Re: Conditional activities: Latest Activity Locking Release
Re: Conditional activities: Latest Activity Locking Release
Hi Stuart,
I have just tried the same as David, and it locks and unlocks if I press the open lock ikon, but it does not unlock for the user that enter the conditional activity, that should unlock the locked activity.
I remember that is has worked for someone, maybe a more simple version than the one from 4 Oct.
Anyone has a working version, that they could share here?
BR
Jens
Re: Conditional activities: Latest Activity Locking Release
I've finally been able to test your latest code. Here are my observations.
1. As above, I also found that when the activity is hidden it never becomes visible, thus locked and hidden doesn't work.
2. Having both the activity complete and prerequesite complete is cool, however, what if you want to show the activity completion after the activity rather than in front--that is no longer an option? This became obvious now that we can do this on a per activity basis--the problem is that those that do not show tracking (completion) are not in line with the other activities because of the icon. Maybe have a spacer gif in front of the activities?
3. I feel rather dense, what are these?:
Style to use when the activity is complete: | |
Style to use when the activity is locked: |
Re: Conditional activities: Latest Activity Locking Release
1. I've probably made some silly mistake in the code.
2. It was never an option to show activity completion after an activity. The two options were
- Show activity completion before each activity
- Show prerequisites after a locked activity
I take your point about them going out of line if you choose to show the box on some but not on others. Like you say, I think the best option is to print a spacer image.
3. These give more flexibility over how locked/complete activities are displayed. Up until now, a locked activity used the "dimmed" css class. This option now allows you to use a different css class for locked or completed activities. This allows you to display locked items differently to other screen elements using the "dimmed" css class.
The attached file should fix points 1 & 2.
I'm considering doing a full re-write of activity locking. The code is starting to get a bit ugly. I suppose it's all down to time.
Hi Stuart,
Well, you can count on me in respect of testing your new following releases.
And I am sure you can count on the others too.
We are very happy that you take your time to this project.
Kind Regards
Jens
Re: Conditional activities: Latest Activity Locking Release
The locked and hidden now works and the spacer is in place!!!
It never occured to me that the styles were actually css styles .
Love it--great work
Re: Conditional activities: Latest Activity Locking Release
I installed the above rar file on a Moodle 1.5.2+, version 2005060223 running on a LAMP server. PHP debugging is set to high. I just want to share the result. Are those notices in the attached screenshot normal?
And is it possible to ask for patches instead of fully patched files for files that are to be overwritten? It seems that there are differences in this versions file like moodlelib.php from the one you hacked.
I'm new to this feature but I think it would be great to use.
Roel
Re: Conditional activities: Latest Activity Locking Release
Hi Roel:
I'm getting the exact same 2 errors you are: undefined variables activitycomplete and unlock in the ../course/lib.php file. I don't understand enough about PHP and the Moodle architecture yet to figure it out.
For example, during my activity_locking installation, I got a new ../moodle/course/lib.php file, but I did not get new lib.php files for the mod subdirectories (e.g., ../moodle/mod/assignment/lib.php). These lib.php files in the mod subdirectories don't refer to activitylocking or unlock variables. Is this right? I don't know.
Anyway, if I find a solution I'll let you know; you do the same. Thanks.
Re: Conditional activities: Latest Activity Locking Release
Just fyi, files in the mod folders link in to activity locking using a modified "require_login" function.
Re: Conditional activities: Latest Activity Locking Release
The next release I'm working on will be much neater, with hopefully no notices. So far, features have been added mainly with quick-and-dirty methods, resulting in those nasty errors.
They will, of course, disappear if you turn debugging off.
If you could recommend how I create/modify/install patch files within a windows installation I would be more then happy to create some. As you say, it would be a much neater way of distribution.
Re: Conditional activities: Latest Activity Locking Release
Thanks Stuart. I didn't realize I could safely ignore these 2 error messages. (undefined variables activitycomplete and unlock). Once I do that, I see that AL does in fact work on my install. I've turned debug off and moved on.
As for your comment If you could recommend how I create/modify/install patch files within a windows installation, I don't think I have a windows installation. My moodle host runs linux. My PC runs Windows XP. I had to unzip the AL files (from the .rar) on my PC b/c I don't know how to unpack a .rar file using linux commands.
Anyway, the only suggestion I can make about the AL install process is to include a README in the .rar that talks about the common errors, like the two I've made (so far):
- It is OK to ignore the 2 undefined variable messages.
- Create the new activity_locking directory only below your existing blocks directory, not above it as well, even though the results of the AL .rar unpack process (creates the directory hierarchy activity_locking\blocks\activity_locking) might suggest this to you.
Great work and thanks a lot.
Re: Conditional activities: Latest Activity Locking Release
To unpack a rar file in your linux box, see to it that you have the unrar package installed. Then type the following on a console.
unrar x filename.rar
Heres a link to additional info on unrar. But if your using KDE or GNOME desktop to work with your linux box I don't know if there is a GUI interface to rar/unrar.
The following links may help regarding creating patch files on windows:
diff/patch port to native Win32
Unfortunately I have not tested this port to Windows, but I have used something similar to it. I open a DOS box and go to where the port is installed then type linux commands like those below. I just don't know whether they also changed the sytax for directories, in the ports of Linux utilities I have used I was able to use forward slashes to refer to directories instead of backslashes in DOS.
How to create and use a patch in Linux
Roel
Re: Conditional activities: Latest Activity Locking Release
Finally had the time to remove debug and test it as a student. Its works . Can't wait to try it in actual teaching.
Thanks for the contrib Stuart.
Roel
Is this the latest version? (activity_locking_2005101901.rar)
I tried to download and install this but it's only a 94k file, and while cPanel says it can unpack it, nothing seems to happen... Am I missing something?
Is there a zip file?? And are there any installation instructions?
Thanks for any help,
Dan
Re: Conditional activities: Latest Activity Locking Release
I haven't unpacked anything with cPanel for a long time, but if I remember correctly, I think it prefers .tar files (zip files will work, but cPanel does funny things to permissions while unpacking a zip). So, if you want to unpack things directly to the cPanel file manager, you might have to re-package the file as a tar. I use a program called 7Zip that I got from Sourceforge.
As for installation--you simply add the files and folders to their corresponding folders in your Moodle install. Most of the files are new, a few contain changes to existing Moodle files. After everything has been added, you need to click on the Admin link from your site homepage to install the new data tables.
Re: Conditional activities: Latest Activity Locking Release
I'm just now getting the chance to actually do the install, and as I go to "Admin" for the first time after unpacking the files in the \blocks directory, I get the following warning:
Warning: file(/home/.../public_html/blocks/activity_locking/block_activity_locking.php): failed to open stream: No such file or directory in /home/.../public_html/lib/blocklib.php on line 21
It is slightly more efficient than a zip file, which would be slightly larger than 100kb and hence I wouldn't be able to upload it to this forum.
I do try and keep it updated on CVS but I've has firewall issues here recently and not been able to connect.
Re: Conditional activities: Latest Activity Locking Release
Hi Stuart,
I'm wondering if your rewrite timetable is soon enough for me to forego another attempt to install the last version and wait for your next release? I've tried to reinstall the block after a deletion due to not having things function correctly. What now happens on visiting the /admin page is a page full of
Error
Error
Error
Error
Error
Error
Error
Error
followd by database tables were not created successfully, then the Continue button.
I'm fairly new at customizing Moodle, but I have gotten the certificate module to work.
Any assistance is welcome.
Thanks,
Bill Weinheimer
Re: Conditional activities: Latest Activity Locking Release
What is happening is that Moodle is trying to create a number of fields and tables that already exist. It should still work.
The next release won't be for a while - I've got 'real' work to do at the moment .
Re: Conditional activities: Latest Activity Locking Release
On the previous version of activity locking I had a problem with exemptions. For example, a student is exempt in the gradebook from completing activity a, and activity a is a prerequisite for activity b. The activity locking for activity b was still requiring the student to compelte activity a.
Has this been amended in the new version so exemptions are taken into account when looking to see if prerequisites are completed?
Nikki Macfarlane
Re: Conditional activities: Latest Activity Locking Release
At the moment, no, I haven't been able to include that functionality. To be honest, I'm not sure how to implement this. 'Exemptions' would require locking requirements to be stored for each user as far as I can see.
If activity locking was integrated with gradebook, the you would lose the ability to lock non-gradebook activities I think.
I'm running 1.5.2 and have loaded the latest version of activity locking and I'm trying to set a condition for a certifcate to be displayed after receiving a passing grade. When I set the activity lock, I get the following message error
The form did not come from this page! (referer = http://localhost/moodle/course/lock.php)
Any ideas would be appreciated. Thanks!
Ben
Re: Conditional activities: Latest Activity Locking Release
Hi
I installed last version of activity_locking on moodle 1.5.2. I'm using dfwiki instead of moodle standard wiki and set the locking for dfwiki but when students want to go to a dfwiki locked activity before complete the prerequisites got the following error:
Fatal error: Cannot redeclare page_create_object() (previously declared in /var/www/html/moodle/mod/dfwiki/blocks/pagelib.php:21) in /var/www/html/moodle/lib/pagelib.php on line 58
Re: Conditional activities: Latest Activity Locking Release
I've got a really basic question about the install but I've rebuilt from scratch twice now (Moodle 1.5.2 and AL) and get the same error so I have to ask.
I can't unzip on my server so I unzip on my PC and FTP up to my site. The directories you get after unzipping are:
activity_locking\blocks\activity_locking
then activity_locking\ xx (where xx = course,lang, lib, and pix )
My dum question is: do I create the activity_locking directory on my server underneath the existing moodle server blocks directory, or do I create a new activity_locking\blocks\activity_locking path on my moodle server? (I've done the former,not the latter, but I'm beginning to wonder)
Under BLOCKS I show Locks version 200509092800 so I must be part way there. Admin messages all green on the table installs too.
My constant errors, though, whenever I have Locks installed are:
Notice: Undefined variable: activitycomplete in /homepages/15/d137666822/htdocs/test1/moodle/course/lib.php on line 1056
and
Notice: Undefined variable: activitycomplete in /homepages/15/d137666822/htdocs/test1/moodle/course/lib.php on line 1056
I do have the padlock icon when editing is turned on and clicking it does bring up the Activity Locks settings page.
Thanks for any help
Re: Conditional activities: Latest Activity Locking Release
You have probably figured this out, but you simply place the files in their appropriate folders--e.g., the locklib.php file goes into your existing Moodle lib file, the activity_locking block folder goes under your Moodle blocks folder... (this block by the way is not a block that you add to your course, it is there to create the database fields).
Re: Conditional activities: Latest Activity Locking Release
I just installed this and everything comes up like it is supposed to, problem though, when set to lock and pre-requisites required, you can click on anything even if the pre-requisite isn't met. It doesn't lock anything even though it says it's locked.
Any help would be greatly appreciated.
Re: Conditional activities: Latest Activity Locking Release
can you precise "this" because there are some versions of activities locking and many versions of Moodle. That table in Moodle docs may help you to choose the appropriate version. Please don't test "this" on a production server.
I hope it may help,
Bernard
Re: Conditional activities: Latest Activity Locking Release
Re: Conditional activities: Latest Activity Locking Release
you seem to have picked up two matching versions.
I am assuming that :
you did'nt do an upgrade ( installation works only on a fresh new install ) and
that the installation was fine, ( you accessed the admin page and the tables were created without errors ) .
If you try to access the activities as a teacher then you should always have access to it. The restriction should only appear if you try to access it as a student who has not yet meet the prerequises.
If you did all above and if you don't have success then is it possible that you give me some access to your test server to make some checks ( table creation, php and mysql versions, ... ) because that combinaison of Moodle and activities locking works here.
I hope it may help,
Bernard
Re: Conditional activities: Latest Activity Locking Release
I want to install activityLocking2_0_for_1_6_july1006 but the link is off and I can't download the file. Anyone can tell me how can I download the file?
Thanks.
Re: Conditional activities: Latest Activity Locking Release
first welcome to Moodle.
I just retry the link from the modules and plugins and it works now. Maybe you try it during som network maintenance time at my organisation.
Let me know if you have others problems.
I hope it may help,
Bernard
Re: Conditional activities: Latest Activity Locking Release
I have just tried the link but it still not works. I have disable my firewall but nothing. Please, could you send me the zip file to my email (teresapomposo@hotmail.com)?
Sorry for my English but I'm Spanish and my English is very bad. I read well but write very bad :S
sorry for the link but it works here!
The file is already sent to your email.
I have less problem reading people writing english as their second language because the compose their sentence like me After a double translation spanish-english-french the communication seem to keep on
Bye,
Bernard
Re: Conditional activities: Latest Activity Locking Release
I have the file and next Monday I will install it. I will post here telling you the results.
Re: Conditional activities: Latest Activity Locking Release
Thanks for the module!!!
Re: Conditional activities: Latest Activity Locking Release
I have a problem. When I create a new section in a course (I'm working with topic format) it is created without "id" or sometimes with id=0, so it doesn't work well in any of both cases. For example,one of the consecuencies of the problem mentioned before, is that I can´t move a resource from another section to this one. The problem has appeared after I have installed the 'activity locking' module.
Can anyone help me?
Thanks.
Re: Conditional activities: Latest Activity Locking Release
can you precise the version of Moodle you are using and the activity locking version too and maybe a screenshot of what you are experiencing?
Here I use topic mode in a course with 20 topics and no problem.
I hope it may help,
Bernard
Re: Conditional activities: Latest Activity Locking Release
I'm using Moodle 1.6.1. (2006050510) and "activity locking 2.0 for 16july2006".
I have created a new section in a course (section4) and have taken three screenshot:
- In the first one (captura1.jpg), in the bottom of the page you can see the id of the new section (id=42126).
- In the second screenshot (captura2.jpg) you can see the error that appeared when I tried to edit section4. When I press the button 'continuar', I have to login, again, in moodle and then get in into the course.
- In the last screenshot (captura3.jpg) you can see that after the error mentioned before the id of the section4 is different (id=0). I don´t now why moodle has modified the id of that section but in the database it appeares with the id=0 so something must be going wrong.
If I create a new section without delete the mentioned section4 it´s created without id.
I hope you have understood what I've written.
Thanks.
Re: Conditional activities: Latest Activity Locking Release
thanks for the info. The section id 42126 is pretty big ( with 20 sections by course you must have 2100 courses in your site ).
If you don't have 2000+ course can you check the table mdl_course_sections in phpmysqladmin for it integrity.
For example in the 2 images attached, I just add a section ( #19 ) to a course and it get the id 237. In the table mdl_course_sections a record is added with the id 237, the course 3 and the section 19.
That is why I suspect that your table is corrupted.
Let me know if it is correct!
I hope it may help, good luck,
Bernard
Re: Conditional activities: Latest Activity Locking Release
I only have 254 sections but moodle assigned that "id" to the new section and I don´t know why. That it´s exactly the problem, when I create a new section its "id" is wrong. I don´t know how to solve this problem. Do you think is relate with the activity locking module?
Thanks.
Re: Conditional activities: Latest Activity Locking Release
as stated in my previous post,
"If you don't have 2000+ course can you check the table mdl_course_sections in phpmysqladmin for it integrity. "
First I hope you are not trying that on a production server. If so please make a copy of all your moodle parts:
mysql, moodeldata and moodel code.
And try what follow on your copy before:
For the "responsability" I don't think that activity locking is the culprit. In a copy operation or a restore or any other operation a table or many tables can be corrupted.
Let me know the details if you try it.
I hope it may help,
Bernard
Re: Conditional activities: Latest Activity Locking Release
I checked the table mdl_course_sections and it's ok. But I noticed that the field "id" of that table it's wrong because it's not auto-incremented. So then, I just tried to modify this field and... alleluia,it worked!
Thanks you for your help. I never imagined that it would be here, in the database, the problem, I thought the problem came from the 'Activity Locking' module.
Teresa.
Re: Conditional activities: Latest Activity Locking Release
Hi Teresa,
I am happy that it works for you too.
Take care with theses hacks!
Bye,
Bernard
Re: Conditional activities: Latest Activity Locking Release
Hello.
I have installed the activityLocking2_0_for_1_6_july1006 on my moodle 1.6 test application.
It works fine, locking/unlocking and showing no errors.
But whenever I try to add new activities/resources to the course the application gives me an error: "Could not add a new course module". (It comes at "./course/mod.php")
And I can not even get rid of this error AFTER I uninstall the Activity Locking. I have to drop the DB and instell moodle again to get it to work...
Why does the Activity Locking create this problem for me? Looks like noone is experiencing this problem... I've searched for the solution for 2 days. Tried different versions of AL on different versions of moodle. Nothing worked fine so far.
Please help.
Re: Conditional activities: Latest Activity Locking Release
I have no idea of your problem. Maybe you used "stange" characters in the name of your activity. It happened here also when I used french characters '' ' " in activities name.
Activity locking as a hack is not easily uninstallable as you notice.
I hope it may help,
Bernard
Re: Conditional activities: Latest Activity Locking Release
Hello again.
Thanx for your reply.
No, that's not the case, I have not used any special characters. I only used english and even tried useing only 1 word for the activity name, so that no spaces are there, but it still wouldn't work. What could be the problem?
I am running Moodle 1.6.1+, Apache 2, PHP 5.1, MySQL 5.0 on Windows XP.
I'll try downloading the full Apache/PHP/Moodle pack from moodle website... may be I use some... bad versions of one of those. I'll post what happens.
Re: Conditional activities: Latest Activity Locking Release
After downloading the full package, it magically worked...
The problem was my MySQL server. Sounds impossible...
I was running MySQL 5.0 downloaded from MySQL website, and this one is also 5.0. The version's difference is in 5.0.x.x
Didn't believe it first, but after a few reinstalls it proves to be so.
Re: Conditional activities: Latest Activity Locking Release
happy that it works for U2
Bye,
Bernard
Re: Conditional activities: Latest Activity Locking Release
I also got exactly the same error that Hamid described above after intalling the same version of activity locker. It appears that there is a slight omission in the mysql.sql file provided with the module which is causing this bug.
There is no default value set on the delay field on line 17 of mysql.sql:
ALTER TABLE `prefix_course_modules` ADD `delay` VARCHAR( 10 ) NOT NULL AFTER `added`;
When you add a new activity to a course, Moodle will generate an INSERT statement for MySQL that will look something like this:
INSERT INTO mdl_course_modules ( COURSE, MODULE, INSTANCE, SECTION, ADDED, VISIBLE, GROUPMODE ) VALUES ( 3, 18, 10, 5, 1157548985, 1, 0 )
At a database level, this query will fail with the following error:
MySQL ERROR:
Field 'delay' doesn't have a default value
QUERY:
INSERT INTO mdl_course_modules ( COURSE, MODULE, INSTANCE, SECTION, ADDED, VISIBLE, GROUPMODE ) VALUES ( 3, 18, 10, 5, 1157548985, 1, 0 )
This will then result in the "Could not add a new course module" error being displayed on the frontend to the user of Moodle.
So to fix this error all you need to do is add a default value to the delay field of the <your DB prefix>course_modules table, I used a default value of zero and it seems to be working fine now. You can achieve this using a MySQL frontend like phpMySQLAdmin.
Hope this helps,
John.
Re: Conditional activities: Latest Activity Locking Release
Re: Conditional activities: Latest Activity Locking Release
Thanks,
Eric
Re: Conditional activities: Latest Activity Locking Release
See screenshoot.
Thanks,
Eric
Re: Conditional activities: Latest Activity Locking Release
Sorry, Eric, but your screenshot is missing, so i have tu guess.
In moodle 1.6 the proper language directory would be /lang/en_utf8.
In the zip the directory for the language file 'lock.php' is /lang/en. That could be one problem. (In this case you will see the language tags instead of the message.)
If you want to use a language different from English you will have a problem with this version: part of the display (in the block for example) is in the code without using the language file. I am not to sure, but I think only the versions, that I worked on, have full language support (for English and German that is).
For more information please refere to the moodle Docs: Activity Locking. There you will also find information about other versions of Activity Locking.
Regards
John
Re: Conditional activities: Latest Activity Locking Release
Thanks for the reply. I found that when I moved the lock.php lang file from en to the en_utf8 directory, that fixed the problem.
Regards,
Eric
Re: Conditional activities: Latest Activity Locking Release
I have successfully got the activity locking script working in Moodle 1.5.3, 1.6, 1.6.1, and 1.6.3. Kudos to you! This script is making it possible for us to use Moodle. I have began taking a gander at Moodle 1.7 Beta. With the implementation of the AJAX drag and drop code for moving items around, I assume that the file for the main course page has changed. I know that Activity Locking 2.0 overwrites some of these files. My question is, will it still work given the new code? If not, are there a lot of changes in the course homepage file? Could these changes be moved over manually?
Thanks,
Eric Eberhardt
Re: Conditional activities: Latest Activity Locking Release
I uploaded the latest version in this thread into a clean copy of 1.6.3 on my windows XP localhost. Only change I think I needed to make was to copy the lock.php file in lang/en/ to to lang/en_utf8/.
Thanks Eric for the post which was the reason for my attempt of this version of AL. Here is a repackaged version which worked for me. No guarantees for anyone else
Re: Conditional activities: Latest Activity Locking Release
Have you tried the Activity Locking 2.0 in the 1.7 Beta yet? I'm eagar to know if it will work.
Thanks,
Eric
Re: Conditional activities: Latest Activity Locking Release
I would be interested to learn if anyone has this running on Moodle 1.7. I would like to use this in conjuction with certificate 3.2
Thanky ou all for the help.
Re: Conditional activities: Latest Activity Locking Release
Re: Conditional activities: Latest Activity Locking Release
None can!
Hello everybody.
Moodle 1.7 has massive changes in the code. There are new pieces of code and others have changed a lot.
It will be a lot of work to create a fitting version, and it won't happen anytime soon. It might even be possible, that the whole thing will need a complete new approach.
The 1.6 branch of moodle has been tagged as a kind of dead end; but I didn't thought, that changes would be that deep.
I only took a short glimpse at 1.7, but that was enough. Now I am even starting to consider, to give up Score Lock.
Either somebody has to work very hard, or we need to combine forces to put something like Activity Locking back into moodle.
Regards
John
I don't suppose there is any movement on a new version of Activity Locking for 1.7 is there?
This is a great Module and would love to see it prosper in future versions.
Frosty
Thank you Bernard, the link worked this morning 13 Mar 07 1100 UTA and onto my local host it goes for testing.
Best Chris
Re: Conditional activities: Latest Activity Locking Release
Hi,
We installed this on a courses project but it made the site almost freeze up. Is there any fixes for this at all or any other module that stops students progressing to the next questions until a certain time has elapsed?
thanks