Details
-
Type:
New Feature
-
Status:
Resolved
-
Priority:
Minor
-
Resolution: Won't Fix
-
Affects Version/s: 1.9.1
-
Fix Version/s: None
-
Component/s: Add a project here
-
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
Issue Links
| This issue has a non-specific relationship to: | ||||
| CONTRIB-1025 | Upload tutor relationships block |
|
|
|
| CONTRIB-1308 | Block to link metacourses |
|
|
|
| This issue has been marked as being related by: | ||||
| CONTRIB-1189 | Timetable import script |
|
|
|
Oops- I've just realised this was supposed to go in the CONTRIB section but I've mistakenly put it here. Sorry