Issue Details (XML | Word | Printable)

Key: CONTRIB-623
Type: Improvement Improvement
Status: Resolved Resolved
Resolution: Fixed
Priority: Minor Minor
Assignee: Anthony Borrow
Reporter: Stephen Bourget
Votes: 0
Watchers: 0
Operations

Add/Edit UI Mockup to this issue
If you were logged in you would be able to see more operations.
Non-core contributed modules

Update MRBS to install using install.xml in place of the mysql.sql files

Created: 31/Jul/08 04:03 AM   Updated: 31/Jul/08 10:08 AM
Return to search
Component/s: Block: Mrbs
Affects Version/s: 1.9.1
Fix Version/s: 2.0

File Attachments: 1. XML File install.xml (6 kB)

Environment: All

Database: MySQL
Participants: Anthony Borrow and Stephen Bourget
Security Level: None
QA Assignee: Stephen Bourget
Resolved date: 31/Jul/08
Affected Branches: MOODLE_19_STABLE
Fixed Branches: MOODLE_20_STABLE


 Description  « Hide
In Moodle 2.0 the mysql.sql installer system has been completely removed. As a result the MRBS block fails to create the required tables. We should look at converting MRBS to use an install.xml file to create the required tables.

 All   Comments   Change History   Version Control      Sort Order: Ascending order - Click to sort in descending order
Anthony Borrow added a comment - 31/Jul/08 04:42 AM
Yep - I was thinking of that too. I'll try to get on top of that this week too. Peace - Anthony

Anthony Borrow added a comment - 31/Jul/08 05:58 AM
Stephen - Here is a first attempt at creating the install.xml. We will need to change the references to the table names so that they include the Moodle prefix since the install.xml adds that by default. Peace - Anthony

Anthony Borrow added a comment - 31/Jul/08 06:09 AM
Ok, so after we create the install.xml we will need to change /blocks/mrbs/web/config.inc.php and change the prefix line to:

$db_tbl_prefix = $CFG->prefix.'mrbs_';

I suspect that at some point it may be better to actually get rid of all the sql stuff in MRBS and begin using Moodle's calls but that will not be any time soon. What made me think of this is that I am using the mysqli driver and had to copy the /blocks/mrbs/web/mysql.php and create a mysqli.php file.

Peace - Anthony


Anthony Borrow added a comment - 31/Jul/08 06:20 AM
Stephen created /blocks/mrbs/db/install.xml file, added mysqli.php file, and modified config.inc.php file to use tables created by install.xml file. I have committed these changes to HEAD would you be able to test and make sure everything still works. Thanks - Anthony

Anthony Borrow added a comment - 31/Jul/08 06:30 AM
The fields named timestamp were the ones that caused me the most grief as they had a default value which I have replaced with 0. I think ultimately these should be INT(10) fields like everything else in Moodle; however, I was not inclined to look into at the moment. If you get a chance to look into it to see how this impacts the actual usage. I'm not sure if those fields are really even used as its been so long since I've looked at the code. Peace - Anthony

Anthony Borrow added a comment - 31/Jul/08 10:08 AM
Stephen - OK, I switched the type of the timestamp field in the entry and repeat tables to be an int(10) and modified some of the MRBS code to make use of that. I did some preliminary testing but more testing would not be a bad idea. In any case, test what is in HEAD and let me know if you discover any problems. Peace - Anthony