I am using Moodle 3.0
mysql (5.5.44-0ubuntu0.14.04.1)
I have uploaded courses with from .CSV files. I have the course variables as "fullname, shortname, idnumber". I successfully uploaded a few of the files with no problem but soon I start having error messages that prevent the courses from being loaded but just one row from the file of many rows.
I will appreciate any help to solve this problem.
Thank you.
could someone help ?
The Error message:
Upload courses results
error/debug/codingerror
Coding errors (or coding_exceptions) are problems that are probably caused by incorrect code. For example a plugin that does not communicate correctly with Moodle core.
These errors are normally not caused by incorrect user input or temporary problems like the connection to the database server being down.
As with all error messages, it's a good idea to search moodle.org
and the tracker to see if anyone else has reported the problem.
One thing... be careful what you create the files with. I always use LibreOffice (save in native format, *then* save in CSV for every export). In particular, I have found Microsoft Excel to be particularly good at creating broken files.
How delicately put Howard Excel has been known to do funny things when logically it should know better.
When I have some time, I will be checking this feature in more detail as described in MoodleDocs, then do some editing on the simpler stuff.
Chris
Hi,
I think more information would be helpful. Can you attach an example of your csv file showing the first two lines: your field names and data for one course.
I notice you said one of the fields was idnumber did you mean this? MoodleDocs says you must have one of these three fields: category, category_idnumber, category_path.
I created a course category called Testing and gave it an id of 1001. Here is a bulk course upload csv file I uploaded.
shortname,fullname,category_idnumber,summary,format,enrolment_1,enrolment_1_role
TestLesson,Test Lesson,1001,For basic lesson testing,topics,manual,student
Did have a few issues. 1) I put "topic" as the format. The preview screen had a red x and told me I had an invalid course format. I changed that to "topics" and the next issue appeared. 2) I initially used the "category" field and put "Miscellaneous" in my record. This did not work. When I edited the category Miscellaneous, I noticed it did not have an id number. Further it said it was not needed except for external programs (I conclude that a bulk course upload uses an external program called a csv file and is necessary). I decided to create a new category and put in an id. You can see in my example I used the category_idnumber field.
The preview of my successful upload showed several columns that were blank: ID, ID_number and Status. My guess is that these are mySQL fields in the course table and will be assigned once I clicked on the next button to process the file.
Hope some of this helps.
Chris
Thank you for your response.
I am not too sure if the order matters I have used "fullname, shortname, idnumber" The idnumber here is the course ID, but I don't seem to see it in your list here. I have been using this format all along till now. However I did not use any of these "category, category_idnumber, category_path". But I tried including the "category_idnumber" to see, but it does not make any difference to the error.
I have included a copy of the course file I am trying to upload here.
Hello,
Thank you. I have resolved the problem, like you suggested, I included the "category_idnumber" in the field. Initially it did not work but when I tried few times after the first try it worked and subsequent upload was done without anymore error.
Before I tried uploading with the "category_idnumber" after the first try, I purged all cache by going (site Administration>Development>Purge all chache) and I think that helps.
My new file upload after adding the "category_idnumber" looks like the attachment..
I have a similar issue.
I would like to bulk upload courses using a .csv file and add the enrolment method "course meta link" and to define which meta course is linked to which newly uploaded course. Like this:
fullname,shortname,category,enrolment_1,enrolment_1_link_course
Spanish-3,Spanish,1,meta,meta-link-course
Does anyone know if it is only possible to use the enrolment methods "self" and "manual" with the csv course upload?