Moodle CIMS: Installing and Using the Bulk Course Upload Tool


Moodle as a Curriculum and Information Management System

Moodle as a Curriculum and Information Management System

Use Moodle to manage and organize your administrative duties; monitor attendance records, manage student enrolment, record exam results, and much more

  • Transform your Moodle site into a system that will allow you to manage information such as monitoring attendance records, managing the number of students enrolled for a particular course, and inter-department communication
  • Create courses for all subjects in no time with the Bulk Course Creation tool
  • Create accounts for hundreds of users swiftly and enroll them in courses at the same time using a CSV file.
  • Part of Packt's Beginner's Guide series: Readers are walked through each task as they read through the book with the end result being a sample CIMS Moodle site
        Read more about this book      

(For more resources on Moodle, see here.)

Using the Bulk Course Upload tool

Rather than creating course categories and then courses one at a time and assigning teachers to each course after the course is created, we can streamline the process through the use of the Bulk Course Upload tool. This tool allows you to organize all the information required to create your courses in a CSV (Comma Separated Values) file that is then uploaded into the creation tool and used to create all of your courses at once.

Due to its design, the Bulk Course Upload tool only works with MySQL databases. Our MAMP package uses a MySQL database as do the LAMP packages. If your Moodle site is running on a database of a different variety you will not be able to use this tool.

Time for action – installing the Bulk Course Upload tool

Now that we have our teacher's accounts created, we are ready to use the Bulk Course Creation tool to create all of our courses. First we need to install the tool as an add-on admin report into our Moodle site. To install this tool, do the following:

  1. Go to the Modules and plugins area of
  2. Search for Bulk Course Upload tool.
  3. Click on Download latest version to download the tool to your computer.
  4. If this does not download the package to your hard drive and instead takes you to a forum in the Using Moodle course on, download the package that was posted in that forum on Sunday, 11 May 2008.
  5. Expand the package, contained within, and find the uploadcourse.php file.
  6. Place the uploadcourse.php file in your admin directory located inside your main Moodle directory.
  7. When logged in as admin, enter the following address in your browser address bar: http://localhost:8888/moodle19/admin/uploadcourse.php. (If you are not using a MAMP package, the first part of the address will of course be different.)
  8. You will then see the Upload Course tool explanation screen that looks like the following screenshot:

  9. The screen, shown in the previous screenshot, lists the thirty-nine different fields that can be included in a CSV file when creating courses in bulk via this tool. Most of the fields here control settings that are modified in individual courses by clicking on the Settings link found in the Administration block of each course. The following is an explanation of the fields with notes about which ones are especially useful when setting up Moodle as a CIMS:
    • category: You will definitely want to specify categories in order to organize your courses. The best way to organize courses and categories here is such that the organization coincides with the organization of your curriculum as displayed in school documentation and student handbooks. If you already have categories in your Moodle site, make sure that you spell the categories exactly as they appear on your site, including capitalization. A mistake will result in the creation of a new category. This field should start with a forward slash followed by the category name with each subcategory also being followed by a forward slash (for example, /Listening/Advanced).
    • cost: If students must pay to enroll in your courses, via the PayPal plugin, you may enter the cost here. You must have the PayPal plugin activated on your site, which can be done by accessing it via the Site Administration block by clicking on Courses and then Enrolments. Additionally, as this book goes to print, the ability to enter a field in the file used by the Bulk Course tool that allows you to set the enrolment plugin, is not yet available. Therefore, if you enter a cost value for a course, it will not be shown until the enrolment plugin for the course is changed manually by navigating to the course and editing the course through the Settings link found in the course Administration block. Check frequently for updates to the Bulk Course Upload tool as the feature should be added soon.
    • enrolperiod: This controls the amount of time a student is enrolled in a course. The value must be entered in seconds so, for example, if you had a course that ran for one month and students were to be unenrolled after that period, you would set this value to 2,592,000 (60 seconds X 60 minutes per hour X 24 hours per day X 30 = 2,592,000).
    • enrollable: This simply controls whether the course is enrollable or not. Entering a 0 will render the course unenrollable and a 1 will set the course to allow enrollments.
    • enrolstartdate and enrolenddate: If you wish to set an enrollment period, you should enter the dates (start and end dates) in these two fields. The dates can be entered in the month/day/year format (for example, 8/1/10).
    • expirynotify: Enter a 1 here to have e-mails sent to the teacher when a student is going to be unenrolled from a course. Enter a 0 to prevent e-mails from being sent when a student is going to be unenrolled. This setting is only functional when the enrolperiod value is set.
    • expirythreshold: Enter the number of days in advance you want e-mails notifying of student unenrollment sent. The explanation file included calls for a value between 10 and 30 days but this value can actually be set to between 1 and 30 days. This setting is only functional when the enrolperiod value and expirynotify and/or notifystudents (see below) is/are set.
    • format: This field controls the format of the course. As of Moodle 1.9.8+ there are six format options included in the standard package. The options are lams, scorm, social, topics, weeks, and weeks CSS, and any of these values can be entered in this field.
    • fullname: This is the full name of the course you are creating (for example, History 101).
    • groupmode: Set this to 0 for no groups, 1 for separate groups, and 2 for visible groups.
    • groupmodeforce: Set this to 1 to force group mode at the course level and 0 to allow group mode to be set in each individual activity.
    • guest: Use a 0 to prevent guests from accessing this course, a 1 to allow uests in the course, and a 2 to allow only guests who have the key into the course.
    • idnumber: You can enter a course ID number using this field. This number is only used for administrative purposes and is not visible to students. This is a very useful field for institutions that use identification numbers for courses and can provide a link for connecting the courses within Moodle to other systems. If your institution uses any such numbering system it is recommended that you enter the appropriate numbers here.
    • lang: This is the language setting for the course. Leaving this field blank will result in the Do not force language setting, which can be seen from the Settings menu accessed from within each individual course. Doing so will allow users to toggle between languages that have been installed in the site. To specify a language, and thus force the display of the course using this language, enter the language as it is displayed within the Moodle lang directory (for example, English = en_utf8).
    • maxbytes: This field allows you to set the maximum size of individual files that are uploaded to the course. Leaving this blank will result in the course being created with the site wide maximum file upload size setting. Values must be entered in bytes (for example, 1 MB = 1,048,576 bytes). Refer to an online conversion site such as to help you determine the value you want to enter here.
    • metacourse: If the course you are creating is a meta course, enter a 1, otherwise enter a 0 or leave the field blank.
        Read more about this book      

(For more resources on Moodle, see here.)

  1. continued from above....
    • newsitems: Enter the number of news items you want to be displayed in your course in the news box that appears on the right-hand side of the page in each course. This value can range from 0 to 10.
    • notifystudents: This controls whether students are to be notified if they are going to be unenrolled from a course. (See expirynotify and expirythreshold explained earlier) Enter a 0 to prevent students from being notified and a 1 to have notification e-mails sent to students.
    • numsections: The number of weeks or topics that are displayed can be set using this field. The value entered must be between 1 and 52. If this field is left blank, only one section will be created.
    • password: To set a password that controls access to this course, enter a value here. Teachers assigned to this course will have access to the password via the Settings area of the course. Setting the password to a randomly generated number is therefore one way to keep students, who have not been assigned to a course, from accessing the course. This is useful for programs that assign students to courses based upon enrollment data obtained from an external system. If courses are to be accessed via a predetermined password, that value can be entered here or if teachers will set their own passwords that are to be distributed to students in a classroom setting, the teacher can change the value via the course settings, if he or she so desires. It is important to consider all of your options and goals in terms of how courses within your Moodle site will be used in conjunction with the use of this field, and course setting, as it has the capability of helping you to position your Moodle site as a curriculum management system.
    • shortname: This is the course short name setting that is used for display in the breadcrumb path.
    • showgrades: Set this field to 1 to allow students to view the grade book and 0 to prevent them from accessing the grade book.
    • showreports: This setting only pertains to students. Entering a 0 here prevents students from accessing their individual activity reports and a 1 allows them to access these reports.
    • sortorder: This allows you to presort the courses within categories. For example, if you have five courses in the Advanced Listening category, you can enter a value of 1 to 5 in this field for each course. The course with 1 will be displayed at the top of the list, the course with a 2, below the first course, and so on.
    • startdate: Enter the date the courses start here in the month/day/year format (for example, 6/1/10).
    • student and students: These fields allow you to enter the default role title for student and students. For example, if you want students to be displayed as 'Employees', enter that value here.
    • summary: Enter the summary for the course here. Unfortunately, you cannot use commas in your summary in this file as the comma is interpreted as a field separation point and corrupts the course creation process. Future versions of this tool will hopefully allow for the use of commas.
    • teacher and teachers: These fields allow you to enter the default role title for teacher and teachers. For example, if you want teacher to be displayed as 'Manager', enter that value here.
    • teacher1_account: Enter either the full name or the user name of the user to be assigned as the teacher of this course. As was noted in the Teacher account creation section, if you have teachers with similar names (for example, one name overlaps another), the Bulk Course Upload tool will generate an error and stop processing without creating courses. Also, use teacher2_account, teacher3_account, and so on to assign multiple teachers to a course.
    • teacher1_role: Enter the role of the teacher being assigned to the course in this field. For a teacher with full editing permissions, use the role shortname, editingteacher. For a teacher who does not have permissions to edit content inside the course, use the shortname, teacher. These short names are the defaults that can be viewed by clicking on Permissions and then Define roles from the Site Administration block found on the front page of your site.
    • template: This function allows you to specify a template course; a course that already exists on your Moodle site, from which some information will be copied as the new course is created. Some blocks and other basic formatting settings are copied from the template course but activities and other content from the template course are not. Please experiment with this feature to see if it is useful for your application.
    • theme: If your site is set to allow courses to use their own individual themes from the themes installed in the site, you can specify a theme for the course using this field. Note however, that this could cause problems if you are using a theme such as the one that we have selected for this book. In other words, if you use a theme that provides easy access to various components of your site (courses and other information), it may not be a good idea to allow this to be overridden at the course level.
    • timecreated and timemodified: These fields allow you to enter times for both when the course was created and when it was modified. These values can only be referenced by accessing the database directly and are thus not of primary concern for the purposes of setting up our system.
    • topic0, topic1, topic2: The number of these specified should not exceed the number you specified in numsections plus one. The topic0 is the 'plus one' as it is for the unnumbered main heading located in the top section of your course. The numbered topics coincide with the number of sections set in numsections.
    • visible: This field allows you to make the course invisible, and thus only accessible by users with a teaching role or higher, by entering a 0, or visible to all users by entering a 1.
  2. continued...
  3. While the list of all the possible fields and explanation for each field seems long and complicated, formatting a CSV file and experimenting with bulk course creation will enable you to quickly understand how to format your file and if you are creating many courses, will very quickly demonstrate the power and efficiency of the tool.
  4. As I mentioned earlier, we are going to create eighty courses with each of our twenty teachers assigned to teach four courses, one from each of our four levels. I have deleted the categories we created earlier in the Manual creation of course categories section, as I wanted to create the categories on the fly while I was creating the courses. Creating courses inside existing categories is however, equally as easy. Just remember to spell and capitalize the categories in your CSV file exactly as they appear on your site. To follow this tutorial, you should also delete all of the categories that you created earlier.
  5. Once the file has been constructed and saved in CSV format, access the Bulk Course Upload tool by entering http://localhost:8888/moodle19/admin/uploadcourse.php in your browser address bar when logged into your site as admin. Click on Browse to locate your CSV file and then Upload to upload and initiate the course creation process. The following screenshot is of the results page that is displayed after the tool has finished executing the file.

  6. To download a copy of the course creation file being used for this example, visit

What just happened?

That was fast, wasn't it? While the creation of the CSV file may take a little time and thought, once the file is prepared, execution and creation of the courses takes literally a matter of seconds. Our creation of eighty courses here took a whopping 1.57 seconds! Logging in to our site as admin now reveals all of the courses and categories we have just created in our MyCourses block, as shown in the following screenshot:

Further expanding each of the level categories by clicking on the plus sign, will reveal five courses in each level. Each course created has also been assigned a teacher. To demonstrate the ability to assign multiple teachers to courses, we have assigned two teachers to the first course listed in the CSV file.


In this article, we introduced the Bulk Course Upload tool and explained how to get it installed on your system. You walked through an explanation of the fields that can be specified in the CSV file used by the tool and then practiced creating courses and assigning them teachers in order to get a seeing is believing perspective on the usefulness of the tool.

Further resources on this subject:

You've been reading an excerpt of:

Moodle as a Curriculum and Information Management System

Explore Title