Issue Details (XML | Word | Printable)

Key: CONTRIB-1189
Type: New Feature New Feature
Status: Resolved Resolved
Resolution: Fixed
Priority: Minor Minor
Assignee: Mike Worth
Reporter: Mike Worth
Votes: 0
Watchers: 1
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

Timetable import script

Created: 21/Apr/09 04:29 PM   Updated: 19/Jun/09 06:19 PM
Return to search
Component/s: Block: Mrbs
Affects Version/s: 1.9.4
Fix Version/s: None

File Attachments: 1. File cron.php (9 kB)
2. Text File mrbsimportdiff.txt (12 kB)
3. Text File mrbsimportdiff.txt (11 kB)

Environment: Should be universal
Issue Links:
Relates

Participants: Anthony Borrow and Mike Worth
Security Level: None
Resolved date: 01/Jun/09
Affected Branches: MOODLE_19_STABLE


 Description  « Hide
A script that, on cron, checks a configurable location for a csv file detailing room bookings and updates mrbs.

Currently has the period times for my college hardcoded, these need removing but I'm not entirely sure the best way to do this (maybe the conversion would be best done with a complicated query when they are got out of the MIS?)

This cron.php file is to go in blocks/mrbs.

Then by adding :
    " $this->cron=300;"
 to the blocks init() and the function:
     " function cron(){
            global $CFG;
            include($CFG->dirroot.'/blocks/mrbs/cron.php');
        }"
to the mrbs_block class it is run by moodle's cronjob.

I've also added:
    "$settings->add(new admin_setting_configtext('cronfile', get_string('cronfile', 'block_mrbs'),get_string('cronfiledesc', 'block_mrbs'), NULL, PARAM_TEXT));
    $settings->settings->cronfile->plugin='block/mrbs';"
to the bottom of mrbs/settings.php so that the location of the csv file can be specified.


 All   Comments   Change History   Version Control      Sort Order: Ascending order - Click to sort in descending order
Mike Worth made changes - 21/Apr/09 04:50 PM
Field Original Value New Value
Link This issue blocks CONTRIB-924 [ CONTRIB-924 ]
Mike Worth made changes - 21/Apr/09 04:51 PM
Link This issue blocks CONTRIB-924 [ CONTRIB-924 ]
Mike Worth made changes - 21/Apr/09 04:51 PM
Link This issue has a non-specific relationship to CONTRIB-924 [ CONTRIB-924 ]
Mike Worth made changes - 21/Apr/09 05:34 PM
Description A script that, on cron, checks a configurable location for a csv file detailing room bookings and updates mrbs.

Currently has the period times for my college hardcoded, these need removing but I'm not entirely sure the best way to do this (maybe the conversion would be best done with a complicated query when they are got out of the MIS?)

This cron.php file is to go in blocks/mrbs.

Then by adding :
    " $this->cron=300;" to the blocks init() and the function " function cron(){
            global $CFG;
            include($CFG->dirroot.'/blocks/mrbs/cron.php');
        }"
to the mrbs_block class it is run by moodle's cronjob.

I've also added:
    "$settings->add(new admin_setting_configtext('cronfile', get_string('cronfile', 'block_mrbs'),get_string('cronfiledesc', 'block_mrbs'), NULL, PARAM_TEXT));
    $settings->settings->cronfile->plugin='block/mrbs';"
to the bottom of mrbs/settings.php so that the location of the csv file can be specified.
A script that, on cron, checks a configurable location for a csv file detailing room bookings and updates mrbs.

Currently has the period times for my college hardcoded, these need removing but I'm not entirely sure the best way to do this (maybe the conversion would be best done with a complicated query when they are got out of the MIS?)

This cron.php file is to go in blocks/mrbs.

Then by adding :
    " $this->cron=300;"
 to the blocks init() and the function:
     " function cron(){
            global $CFG;
            include($CFG->dirroot.'/blocks/mrbs/cron.php');
        }"
to the mrbs_block class it is run by moodle's cronjob.

I've also added:
    "$settings->add(new admin_setting_configtext('cronfile', get_string('cronfile', 'block_mrbs'),get_string('cronfiledesc', 'block_mrbs'), NULL, PARAM_TEXT));
    $settings->settings->cronfile->plugin='block/mrbs';"
to the bottom of mrbs/settings.php so that the location of the csv file can be specified.
Mike Worth made changes - 21/Apr/09 05:49 PM
Attachment mrbsimportdiff.txt [ 16982 ]
Mike Worth made changes - 21/Apr/09 06:06 PM
Attachment mrbsimportdiff.txt [ 16983 ]
Anthony Borrow made changes - 23/Apr/09 01:57 AM
Assignee Anthony Borrow [ aborrow ] Mike Worth [ mike1989 ]
Mike Worth made changes - 01/Jun/09 07:30 PM
Link This issue has a non-specific relationship to CONTRIB-1191 [ CONTRIB-1191 ]
Mike Worth made changes - 01/Jun/09 11:05 PM
Status Open [ 1 ] Resolved [ 5 ]
Resolution Fixed [ 1 ]
Mark Johnson made changes - 19/Jun/09 06:19 PM
Link This issue has been marked as being related by CONTRIB-1359 [ CONTRIB-1359 ]