Conditional activities: AL v3 for 1.9.9, recompiled zip file & issues
I tried to recompile Chardelle Busch's AL v 2 with the most recent corrections.
I made a clean install of a Moodle 1.9.9+ (Build: 20100908) on an existing XAMPP localhost in htdocs. I then twiice unpacked the AL_format.zip that Chardelle Bush upload on 18 July 2009 in Conditional Activities Forum thread. I first unpacked it in my new moodle and then in an unrelated folder I called AL_v3_20100912.
In the same thread I updated both the folder and the moodle with
.course/format/locking/locklib.php (2 Aug 2009) and
.course/format/locking/display.php (3 Aug 2009)
Initially it did not install via notification after I unpacked the zip file into my moodle. However, once I copied the 2 php files to my moodle, notification told me activity locking installed.
Attached is the zip file of what I compiled. I added a brief README file to the archive. In a second thread I will ask about having a Lesson score be one of the locks.
Hope this helps.
Re: Conditional activities: AL v3 for 1.9.9, recompiled zip file & issues
It does not appear that the mysql.sql script ran. I had an existing XAMPP localhost. I added a blank moodle19al database as a UTF8_general_ci. I then told my fresh moodle install the name of the database and set "mdl_al" as the table prefix. So I took a deep breath, found the ./db/mysql.sql file and pasted it into phpMyAdmin SQL script area.
It did not seem to like "prefix_" in the script. So I changed the prefix_ in the script to mdl_al_ and it did what it needed. Not bad for someone who is scared to death of code, and even more of MySQL queries like that.
Whew. Now it seems to work. I will take the v3 zip version and run it on a localhost I have at work and check the production server's table names.
So the AL program works. Apparently it adds fields to the course_modules table and creates a new course_module_locks table. It does not appear to alter any existing Moodle php code. It creates new folders in the existing code structure. and puts the code there. Not altering the standard Moodle code is a big deal for me.
I share this possible issue incase somebody goes down the same path as myself.
Again, thanks to all.
Chris
Re: Conditional activities: AL v3 for 1.9.9, recompiled zip file & issues
Also loaded my customized certificate after this. Have a big grin on my face. Major mission accomplished. Now to wait for my admin/webmaster to unpack both certificate, certificate reports and AL into the soon to be production server.
Best to all
Chris
Re: Conditional activities: AL v3 for 1.9.9, recompiled zip file & issues
Thank you for working on it, really.
Re: Conditional activities: AL v3 for 1.9.9, recompiled zip file & issues
You and I can thank every member of this forum and those who assisted Chardelle Busch in testing it. I am really excited myself.
I have revised the Readme file to add some clues as to how to install it.
Let us know if it works for you and on what version of Moodle.
Chris
I can't make it work under postgreSQL. If you can also write the pq sql and the code, it will be really appreciated.
Thanks.
Re: 回應: Re: AL v3 for 1.9.9, recompiled zip file & issues
I do not know anything about postgreSQL, and somebody else will need to help you.
Chris
Re: 回應: Re: AL v3 for 1.9.9, recompiled zip file & issues
It also work with postgresql, but it's a dirty work.
I didn't wrote the code but i've change the db table and columns by hand.
You can check the mysql code and reproduce it on postgresql (via phppgadmin in my case).
You have to create the same table (prefix_course_module_locks) and rewrite the prefix_course_modules with new columns in the middle.
You have to rewrite a new prefix_course_modules beacuse postgresql dosn't support the AFTER 'column' condition like mysql, so:
- you have to create a new table like prefix_course_modules_new
- put in all the columns (prefix_course_modules + the new column of mysql script)
- export the data (only this!) of prefix_course_modules in prefix_course_modules_new
- rename prefix_course_modules to prefix_course_modules_old
- rename prefix_course_modules_new to prefix_course_modules
All is done!
Note:
postgresql have many small differences between mysql so:
- mysql column type TINYINT is translate in SMALLINT in postgresql
- NOT NULL can't be set in postgresql so leave it not set
the rest can be leaved like is set by the default installation