Note: You are currently viewing documentation for Moodle 2.4. Up-to-date documentation for the latest stable version of Moodle may be available here: Bulk course upload.

Bulk course upload: Difference between revisions

From MoodleDocs
m (Just a few typos from 'cvs' to 'csv'.)
(added update note)
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Update}}
See:
*https://moodle.org/mod/forum/discuss.php?d=173705&parent=854771
*http://tracker.moodle.org/browse/MDL-13114
*Another inititive: https://moodle.org/mod/forum/discuss.php?d=213454
*https://moodle.org/mod/forum/discuss.php?d=173705
*https://moodle.org/mod/forum/discuss.php?d=214540
The tracker item: https://tracker.moodle.org/browse/MDL-13114
----
Bulk course upload is a contributed code that creates a course with a teacher and basic course settings from a CSV file. There is also a bulk course deletion tool. These work in 1.8 and 1.9.
Bulk course upload is a contributed code that creates a course with a teacher and basic course settings from a CSV file. There is also a bulk course deletion tool. These work in 1.8 and 1.9.


Line 22: Line 35:
*[http://awyatt.edublogs.org/2008/01/22/moodle-portfolio-using-upload-users-and-upload-course-to-set-up/ A description by A.T. Wyatt] that was used in part to start this page
*[http://awyatt.edublogs.org/2008/01/22/moodle-portfolio-using-upload-users-and-upload-course-to-set-up/ A description by A.T. Wyatt] that was used in part to start this page
*[http://moodle.org/mod/forum/discuss.php?d=91850 A forum discussion] about Bulk course upload
*[http://moodle.org/mod/forum/discuss.php?d=91850 A forum discussion] about Bulk course upload
== Alternatives ==
*[https://github.com/piersharding/moodle-tool_uploadcourse course uploader] is an admin tool plugin for 2.2 and above for bulk course create/update/delete and can use templating from Moodle backups, or a nominated course.


[[Category:Contributed code]]
[[Category:Contributed code]]

Latest revision as of 12:25, 21 April 2013

This page requires updating. Please do so and remove this template when finished.


See:

The tracker item: https://tracker.moodle.org/browse/MDL-13114


Bulk course upload is a contributed code that creates a course with a teacher and basic course settings from a CSV file. There is also a bulk course deletion tool. These work in 1.8 and 1.9.

Tips & Tricks

To use this code successfully, the site administrator must create the teacher accounts before creating the courses. The role for the teacher in the csv is the role short name. So for teacher use 'editingteacher' and Non-editing teachers use 'teacher' and so on. The course category must also exist before uploading the file.

The bulk course delete tool uses a txt file with the course short names. One course per line.

Moodle has a unique constraint combining a course's category and its sortorder, in other words two courses in the same category shouldn't have the same sortorder. When inserting courses manually Moodle does the trick of calculating sortorder, but using uploadcourses.php you need to provide a valid value for sortorder, each row should have a different sortorder value in the same category.

Sample data

First line in csv file

fullname,shortname,category,sortorder,idnumber,summary,format,showgrades,newsitems,teacher,teachers,student,students,startdate,numsections,maxbytes,visible,groupmode,timecreated,timemodified,password,enrolperiod,groupmodeforce,metacourse,lang,theme,cost,showreports,guest,enrollable,enrolstartdate,enrolenddate,notifystudents,expirynotify,expirythreshold,teacher1_role,teacher1_account

Example 1st record in csv file

Greatest Course,GC101,Education Portfolios,1,,University Portfolio,topics,0,0,Owner,Owners,Visitor,Visitors,1/14/2008,10,15728640,0,0,1/12/2008,1/12/2008,portfolio,0,0,0,,,,0,2,1,1/14/2008,5/10/2008,0,0,10,editingteacher,lastname1.firstname@email.edu

Example 2st record in csv file

Worst Course,WC101,Education Portfolios,1,,University Sample Courses,topics,0,0,Owner,Owners,Visitor,Visitors,1/14/2008,10,15728640,0,0,1/12/2008,1/12/2008,portfolio,0,0,0,,,,0,2,1,1/14/2008,5/10/2008,0,0,10,editingteacher,lastname2.firstname@email.edu

See also


Alternatives

  • course uploader is an admin tool plugin for 2.2 and above for bulk course create/update/delete and can use templating from Moodle backups, or a nominated course.