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

A script that does 3 main things: Creates tutor/tutee links, Creates metacourse links and imports attendance data

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Resolved
    • Priority: Minor
    • Resolution: Won't Fix
    • Affects Version/s: 1.9.1
    • Fix Version/s: None
    • Labels:
      None
    • Environment:
      Currently only works with MySQL
    • Database:
      MySQL
    • Affected Branches:
      MOODLE_19_STABLE

      Description

      This is a script designed to be run in addition to the built in cron.php (athough there is no reason it cannot be appended to the existing one), once a day should be plenty.

      It takes 3 csv files (currently need to be called /home/moodledata/mikecsv/attendance.txt meta.txt and tutor.txt) which are in the following format without header rows:

      =metacourse links=

      coursecode of course,classcode of class

      =Tutor/student links=

      idnumber of tutor,idnumber of student

      =Attendance=

      coursecode of course,idnumber of student,YYYY MM DD HH MM,mark

      It then:

      Makes the tutor the mentor of each student as listed in tutor.txt
      Links the courses (moodle metacourses) with the classes (moodle courses) and deletes courses for which there is only a single class
      Imports the attendance data, creating attendanceactivities and sessions where required.

      It requires a tutor role and an attendance user (with permission to take attendance) to be created before running the script

      There are a few issues with it that need addressing though- the DB credentials are currently stored in this file rather than being pulled in from config.php, configuration for user details and translating the attendance codes are hardcoded and difficult to find if not familiar with the code, and it directly uses MySQL rather than going through moodle are the 3 main ones I know of

        Attachments

        1. cron.php
          8 kB
        2. cron.php
          12 kB

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: