Uploaded image for project: 'Plugins'
  1. Plugins
  2. CONTRIB-1189

Timetable import script

XMLWordPrintable

    • Icon: New Feature New Feature
    • Resolution: Fixed
    • Icon: Minor Minor
    • None
    • 1.9.4
    • Block: Mrbs
    • None
    • Should be universal
    • MOODLE_19_STABLE

      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.

        1. cron.php
          9 kB
        2. mrbsimportdiff.txt
          12 kB
        3. mrbsimportdiff.txt
          11 kB

            mike1989 Mike Worth (Inactive)
            mike1989 Mike Worth (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.