Bulk Course Upload tool question

Re: Bulk Course Upload tool question

by Jeff Church -
Number of replies: 61
Hi Jason,
Don't know if this will help but I will attach the script we are using to bulk create courses. Just put the file in the root/admin folder and when you are logged in as admin just go to the file location root/admin/uploadcourse.php

I will attach a sample CSV file as well. The teacher account must be created before assigning it to a course. Use the teacher user name in the CSV.

I have not tested this for more than 500 courses at a time. The script may timeout if you do to many courses at once. I have only used this on 1.8.3. We are integrated with our student management system so we only use this script to create test and development courses.

Hope this helps.

I forgot this will only let you attach 1 file so I zipped both files up to attach. Also included the bulk delete courses file you may find it helpful.
In reply to Jeff Church

Re: Bulk Course Upload tool question

by Jason Hollowell -
Picture of Particularly helpful Moodlers
Jeff,

Thanks a million! smile I will give this a try today and see if it will take care of the task for me. Actually, I hadn't been using the teacher user name in the script that I'm trying to get to work (why didn't I think of that?) so I may give that a shoot as well.

I'm going to be creating just a little over 200 courses so I should be ok.

Thanks again, I really appreciate it.

Jason
In reply to Jason Hollowell

Re: Bulk Course Upload tool question

by Steve Taylor -

After a little trial and error, I realized that the teacher1_account field fails if you don't also include a teacher1_role field.

In reply to Jeff Church

Re: Bulk Course Upload tool question

by Jason Hollowell -
Picture of Particularly helpful Moodlers
Jeff,

I just tried this (couldn't wait to get to work smile and everything works except for one small (I hope) issue.

The teachers do get enrolled which is a huge jump forward for me (thanks!) but they are enrolled as non-editing teachers. Can't figure out why?

Is this a function of the script or do I have something set wrong on my site? The default role for teachers in courses is teacher so I don't think that's the problem...

Any ideas?

Thanks again smile

Jason
In reply to Jason Hollowell

Re: Bulk Course Upload tool question

by Jason Hollowell -
Picture of Particularly helpful Moodlers
Jeff,

Sorry, I guess I should have experimented a little more before posting that last message. I figured out what I was doing wrong.

I was using "teacher" to assign the role which is the 'short name' for Non-editing teacher. When I changed the role assignment in my csv file to "editingteacher" everything worked.

Thanks so much for providing this updated version of the Bulk Course Upload tool. I will post a message in the discussion forum for the tool and attach this update. There were several questions/problems over there that will probably be resolved with this newer version.

Jason
In reply to Jason Hollowell

Re: Bulk Course Upload tool question

by Jeff Church -
Just got to work and saw your post glad it is working for you. Sorry I should have put the role name stuff in the email. I did the same thing one time so I know it is an easy mistake.
In reply to Jeff Church

Re: Bulk Course Upload tool question

by Séverin Terrier -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators
Sure, it would have been better to have "teacher" (for "full" teacher), and "noneditingteacher" wink
In reply to Séverin Terrier

Re: Bulk Course Upload tool question

by Larry Elchuck -
I encourage this change to "teacher" (for "full" teacher), and "noneditingteacher" as well.

larry
In reply to Larry Elchuck

Re: Bulk Course Upload tool question

by Jeff Church -
Thats easy to fix change the short name of your roles. wink
In reply to Jeff Church

Re: Bulk Course Upload tool question

by Graham Paull -

Hi Jeff,

 

I cant get the teachers to enrol, here is what my CSV looks like, should this work ?

fullname category editingteacher summary shortname idnumber
Accounting-AileenFoster-1 Breifne Temp aileenfoster Accounting-AileenFoster-1 Accounting-AileenFoster-1 1@amail.ie
Agricultural Science-Kerri AnnThornton-2 Breifne Temp kerriannthornton Agricultural Science-Kerri AnnThornton-2 Agricultural Science-Kerri AnnThornton-2 2@amail.ie
Agricultural Science-Kerri AnnThornton-3 Breifne Temp kerriannthornton Agricultural Science-Kerri AnnThornton-3 Agricultural Science-Kerri AnnThornton-3 3@amail.ie
Agriculture/Horticulture-EibhlinNester-5 Breifne Temp eibhlinnester Agriculture/Horticulture-EibhlinNester-5 Agriculture/Horticulture-EibhlinNester-5 4@amail.ie

Thanks

In reply to Graham Paull

Re: Bulk Course Upload tool question

by Bob Puffer -

where are the commas? CSV = Comma Separated Values

In reply to Bob Puffer

Re: Bulk Course Upload tool question

by Graham Paull -

Hi Bob,

This is just opened in excel.

Everything works, the course uploads to the right area etc, its just the teachers arnt enroled ? here is the raw CSV.

fullname,editingteacher,category,summary,shortname,idnumber
Accounting-AileenFoster-1,aileenfoster,Breifne Temp,Accounting-AileenFoster-1,Accounting-AileenFoster-1,Acc-AF-7-LC2@amail.ie
Agricultural Science-Kerri AnnThornton-2,kerriannthornton,Breifne Temp,Agricultural Science-Kerri AnnThornton-2,Agricultural Science-Kerri AnnThornton-2,Agr-KT-55-LC2@amail.ie
Agricultural Science-Kerri AnnThornton-3,kerriannthornton,Breifne Temp,Agricultural Science-Kerri AnnThornton-3,Agricultural Science-Kerri AnnThornton-3,Agr-KT-601-LC1@amail.ie
Agriculture/Horticulture-EibhlinNester-5,eibhlinnester,Breifne Temp,Agriculture/Horticulture-EibhlinNester-5,Agriculture/Horticulture-EibhlinNester-5,Agr-EN-697-101@amail.ie

The editingteacher is the colum header, I have then added an editingteacher's username into the colum for each course, is this right ?

Any help on this would be seriously helpful.

In reply to Graham Paull

Re: Bulk Course Upload tool question

by Guillermo Madero -

Hi Graham,

I don't think there is an "editingteacher" field; shouldn't it be "teacher_role"?

In reply to Jeff Church

Re: Bulk Course Upload tool question

by Jon Bolton -
Picture of Particularly helpful Moodlers Picture of Testers
This is really helpful Jeff. I've added it to the Modules and Plugins Database at http://moodle.org/mod/data/view.php?d=13&rid=1536
In reply to Jon Bolton

Re: Bulk Course Upload tool question

by Marc Grober -
Note Robert Russo's comment about also having a tool. Is this the same code base? A different effort altogether? Should there be one M&P page for the whole enchilada or separate pages? The reason I am pushing is that I see some wonderful stuff get buried in layers and layers of forum discussion..... I understand from the discussion that the download utility is now also working in 1.9??

Also, should the discussion link point to a new parent item in the forums so that no one gets confused as to issues/usage that predates the version in M&P?

Has Jeff agreed to maintain this? Jeff?

Thanks Jon. BTW I only see a bit of the page that the utility produces; if as I expect it was your best effort to put the most important piece there well done.
In reply to Marc Grober

Re: Bulk Course Upload tool question

by Jeff Church -
My preference is if Robert's code works let us drop back to one tool (his). A student programmer wrote this for us. She is still working for us but you know how that goes. We are moving to 1.9 this summer so we will be updating the code at that point and I will post the new code. However, we are running with Banner integration using Eric's wonderful Banner/Luminis Message Broker mod so the need for course creation is very low. Our WebCT license runs out on Nov 29th so all of our faculty have to be on Moodle at that point. I see just a few more months of needing to build development courses in bulk then we will not really need this tool. I guess what I am saying is I would rather have someone that has a long term need for this tool maintain it.
In reply to Marc Grober

Re: Bulk Course Upload tool question

by noemi flores -

I didn't see the the download section either. I work for a large school district and we do not allow users to create their own accounts or passwords. We have several hundred courses that need to be created as well as user accounts. We do not know how other organizations handle this. We thought a bulk upload tool would be the way most people handle course/user creation.

We use 1.9 and any suggestions will be helpful.

In reply to noemi flores

Re: Bulk Course Upload tool question

by Marc Grober -
I believe the discussion I saw on Jeff's tool suggests that the teacher accounts have to already exist. You can use the bulk user upload feature already in Moodle to upload your teachers. Once your teachers are uploaded you can use the bulk course upload (see the note from Jon in this thread about where he stashed it under Modules and plugins or the zip file that Jeff posted earlier. Info on doing bulk user uploads can be fund in the docs. Do not identify the course you are associating the teachers with in the user upload. That will be handled in the course upload.
In reply to Marc Grober

Re: Bulk Course Upload tool question

by Michael Street -
"Note Robert Russo's comment about also having a tool.
<snip>"

I have looked around, but haven't been able to find either his comment, or his code. Is there a different version of this too floating around somewhere?

BTW, thanks very much for posting this tool. This is fantastic and will save us a bunch of time.

In reply to Michael Street

Re: Bulk Course Upload and Deletion Summary

by Marc Grober -
A bit of a recap..... If I got anything wrong, please advise. And perhaps someone would like to add something to the Moodle Docs regarding the current state of affairs in these regards??

As I understand it, there is a hack for bulk course upload that appeared here: http://moodle.org/mod/data/view.php?d=13&rid=395 that was written by Rory Allford. There was some discussion that it was a bit out of date and that Rory had his hands full and was not at present updating it.

In the midst of that discussion Jeff Church mentioned that he had some bright young programmers roll their own hack. Jeff posted an upload utility and a deletion utility named zip.gif delete_course_for_1.7-1.8---v1.zip here: http://moodle.org/mod/forum/discuss.php?d=91850&parent=405748 . The upload utility (but not the deletion utility) with example (though if the example hasn't been edited to address the editingteacher issue that is a bit of a caveat) is now available in M&P here: http://moodle.org/mod/data/view.php?d=13&rid=1536

Robert Russo, in the midst of this discussion mentioned that his folks have been working on a bulk deletion tool (my error in believing based on the context that he was developing, as did Jeff's people, an upload and deletion utility. Robert's posting appears here:
http://moodle.org/mod/forum/discuss.php?d=82932&parent=426906
In reply to Marc Grober

Re: Bulk Course Upload and Deletion Summary

by Jeff Church -
Marc thanks for the summary I think you got everything right on. Our programmers created a bulk course creation and a bulk course deletion tool. I will post the zip files for these with this post.

The bulk upload tool has a 1.7 and 1.8 version. To use it you have to create the teacher accounts before creating to 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 bulk course delete tool uses a txt file with the course short names. One course per line.

I hope to post 1.9 versions of these soon and I hope they have helped.

On a related note our programmers have produced several add ons for Appalachian State University and we (the Instructional Technology Consultants at ASU that manage the student programers. Greg Simmons, Mary Beth McKee, and me) would like to share them. What is the best place and method to do this? These were posted by me just because someone had a problem that I happen to see.
In reply to Jeff Church

Re: Bulk Course Upload and Deletion Summary

by A. T. Wyatt -
Hi, Jeff!

I think you should start by contacting Anthony Borrow to get these in contrib. And then put links into the modules and plugins database. There is a place in each entry to reference discussion, download location, versioning, etc.

These are tools that many people really need, so it would be great to have them available and easy to find!

atw
In reply to A. T. Wyatt

Re: Bulk Course Upload and Deletion Summary

by Anthony Borrow -
Picture of Core developers Picture of Plugin developers Picture of Testers
ATW - Thanks for the good suggestion. I would be happy to work with Jeff on getting his code into CONTRIB. Just let me know how I can be of help. Peace - Anthony
In reply to Jeff Church

Re: Bulk Course Upload and Deletion Summary

by Bruce Webster -
I'd like to have the 1.9.x version! Where can I find it?
In reply to Bruce Webster

Re: Bulk Course Upload and Deletion Summary

by Marc Grober -
Bruce,

What you can search the forums on the terms "bulk course upload 1.9" which will return this http://moodle.org/mod/forum/discuss.php?d=91850&parent=427786 which has a link to here http://moodle.org/mod/data/view.php?d=13&rid=1536 which states: "This has been tested and is working on both 1.8+ and 1.9+." Voila ;=}

As far as the deletion tool, Jeff or Robert, are you ready/willing to put this in the M&P library yet?
In reply to Marc Grober

Re: Bulk Course Upload and Deletion Summary

by Jeff Church -
Here is the delete course that works in 1.7 and 1.8. It takes a txt file with course short name. Be careful I have found with large list > 500 course that it times out the script run time. So if it hangs try upping your script run time or doing the delete in smaller batches.
I have not tested this or the course upload in 1.9 yet. It is on my list to do as we are moving to in in a month.

Good luck
In reply to Jeff Church

Re: Bulk Course Upload and Deletion Summary

by Marc Grober -
Jeff,

Please refresh my recollection; what did you do to get the upload script added to M&P and will you do the same for this or did someone just take care of that for you?

I did a quick test of the upload script on 1.9 and it appeared to work save that one must use editingteacher as the role, but I assumed that someone else did some testing too as the module and plugin page indicates that it works with 1.9. I wonder whether we need a QA process for M&P ;=}

Still have not seen the delete course script mentioned by Robert Russo.

Thanks

Marc
In reply to Marc Grober

Re: Bulk Course Upload and Deletion Summary

by Robert Russo -
Here is our backup and delete application.

It now includes a delete only function that is populated by uploaded files.

We are adding mtrace to delete functionality as well as delete from query functionality as well. Support for mtrace is added to the delete tool, adding to backup and delete now.

Only site admins can use the block. I would love this to get into contrib Anthony.
In reply to Jeff Church

Re: Bulk Course Upload and Deletion Summary

by Michael Street -
Any luck with testing this delete script in 1.9? Mine just shows me a blank page, with my course headers, but no content. No box asking me to upload the text file. sad

The bulk upload worked well though. Very fast. We were able to do 11K courses in short time.
In reply to Michael Street

Re: Bulk Course Upload and Deletion Summary

by noemi flores -

We have not been able to get it to work either. I do have another question on the bulk uploads? We have subsites on our primary site, we have been able to bulk upload successfully on the subsites and the primary site. However, the enroll feature is only working on 1 of the sites. Is there some configuration setting that needs to be set within Moodle. We have not been able to figure it out.

In reply to Jeff Church

Re: Bulk Course Upload and Deletion Summary

by Alan Zaitchik -
Jeff,
Do you have a version of course upload (or course delete) that could work as an independent script, say with the filename passed in? We need to run this in an automated, unattended way, whether from a cron job or through some other way without any UI.
Alan
In reply to Alan Zaitchik

Re: Bulk Course Upload and Deletion Summary

by Jonathan Laurin -

Hi,

Do you have a solution for this?  I need to run the script in an automated way too.

thank you

In reply to Marc Grober

Re: Bulk Course Upload and Deletion Summary

by Bruce Webster -
Thanks for that - I had searched and found. Jeff clearly lists his script as 1.8 only but this appears to be because he hasn't tested it in 1.9 rather than it not working - somebody who had tried it listed it as working. It's still no good for me yet as we use Postgres - maybe when I have some time I'll convert it.
In reply to Jeff Church

Re: Bulk Course Upload and Deletion Summary

by Sean Abachi -

Dear Jeff:

Your code works fine with English characters, but does not work if the names of categories and courses are non-English, such as farsi. Is there a way to make it work with all characters?

Thanks,

Sean 

In reply to Sean Abachi

Re: Bulk Course Upload and Deletion Summary

by Laura Laura -

Hello Sean, I am having the same problem as well. I need to use special characters (á, ó, ñ....)

Have you find out the solution?

Thanks!

 

Laura

In reply to Laura Laura

Re: Bulk Course Upload and Deletion Summary

by Pedro Lopes -

Hello Laura,

I am having the same problem.

Have you find out the solution?

Thanks!

 

Pedro

In reply to Jeff Church

Re: Bulk Course Upload and Deletion Summary

by John Jackson -

Is there a version of the upload tools available for version 1.9 plz ?

regards,

John J

In reply to Jon Bolton

Re: Bulk Course Upload tool question

by Marc Grober -
Jon,

Can you add the delete utility to M&P as well.

Also wanted to ask about testing for 1.9. Has anyone really tested this extensively? I used it a couple of times with 1.9 and made some comments, but I wouldn't consider my usage anything like QA for it ;=}


In reply to Jon Bolton

Re: Bulk Course Upload tool question

by Andrew Coile -

Could we please have the "Discussion" and the "Download" go to two different places?

If I click a "Download" link, I (not unreasonably, in my opinion), expect to start downloading something.  I don't expect to have to wade through THIRTY screenfuls of information to try to figure out which thing cited is actually the download link.

I still haven't figured out where the "uploadcourse.php" script is supposed to be posted for Version 1.9.  At this point, I'll probably just write my own.

...Andrew

In reply to Jeff Church

Re: Bulk Course Upload tool question

by Kristy Rhea -
I have used this in 1.9 and it works great...if the account is created first, as you said....I have one question. We have LDAP authentication set up for all of our users, and thier account does not get created until they have logged into Moodle once. How do I do a bulk course upload if the accounts are not their yet. I tried to do a bulk user upload and tell it to use LDAP auth for password, however, this is not working. Any help would be great. Thanks!
In reply to Kristy Rhea

Re: Bulk Course Upload tool question

by A. T. Wyatt -
I don't remember having a problem with this. First I used upload users and put in a password of password (because it is irrelevant) and auth type of ldap. Those are two fields. That creates the user even though they haven't logged in.

Here are my notes and some example files (the example uploadusers file uses imap, but that can just be changed to ldap).

atw

In reply to Kristy Rhea

Re: Bulk Course Upload tool question

by Marc Grober -
Can you post a zip of what your csv file looks like (don't forget to x out personal info) and what error messages you saw when you uploaded the users?
In reply to Marc Grober

Re: Bulk Course Upload tool question

by Kristy Rhea -
I was able to figure this out this morning by putting xx in the password field when uploading users. It allows me to upload users and still use their LDAP password. (And they cannot log in with using xx as their password)

My CSV now looks like:
username; password; firstname; lastname
jdoe; xx; John; Doe

For some reason in using 1.9 I had to change the separator to ";" instead of using "," However, when I upload courses I have have to use ","
username;password;firstname;lastname

In reply to Jeff Church

Re: Bulk Course Upload tool question

by noemi flores -
Sorry if I missed this, but where do you put the course delete utility? Or how do you install it? My moodle site is hosted so I have to be very specific when I put in requests. Thanks
In reply to noemi flores

Re: Bulk Course Upload tool question

by Jeff Church -
Hi Noemi,
Sorry I'm new to posting code and didn't put very good (lol any) instructions in.

The file deletecourses.php goes in root/admin/

To access the file use root/admin/deletecourses.php There is not a GUI to access it yet. So you have to navigate directly to the file in the browser.
In reply to Jeff Church

Re: Bulk Course Upload tool question

by Jeroen Kleijn -

Hi Jeff,

I installed both the upload and de deletion tool

upload works fine (had to create the category first). Is it possible to add more than 1 teacher and to add several groups with password?
A text in the upper section would be nice too (I don't mean the long course name, but more or less the same inf. printed with specific characters on top of the topics section).

Deletion tool gives only a blank screen in moodle

regards
Jeroen Kleijn
The Netherlands

In reply to Jeff Church

Re: Bulk Course Upload tool question

by Graham Smith -

Jeff,

I have been attempting to use the various uploadcourse.php utilities and your appears to be the most complete.

However, there is one issue that is causing problems.

I want to create a course using this utility that has more than one editingteacher account (as there are courses where there are more than one teacher teaching the course).

The utility works brilliantly but if extra columns are added for further teachers in addition to the colums teacher1_account & teacher1_role :-

e.g.

teacher1_account teacher1_role teacher2_account teacher2_role
teacher1 editingteacher teacher2 editingteacher


Then the utility does not add the additional teachers.

Am i mis-understanding the description of the fields in the csv file and is there a way to add more than one teaching account when the course is created?

The field descriptions from the uploadcourse.php file are shown below.

teacher[1,2,...]_account

teacher[1,2,...]_role

In reply to Graham Smith

Re: Bulk Course Upload tool question

by Michael Webb -

Sorry to dig this up again, but did anyone solve this?

I'm having the same issue as Graham, ie can't get the bulk upload to work with more than one teacher - it just says couldn't add teachers.

In reply to Michael Webb

Re: Bulk Course Upload tool question - Multiple Teachers

by Geoffrey Rowland -
Picture of Plugin developers
Yes, we also have the issue that on bulk course-creation we can only add one teacher to a course. It is not a complete 'show stopper' (as as long as there is one editing teacher they can easily enrol their colleagues!) and the script is incredibly useful without this ability. However, it would be neat to get it working.

I quick scan of the PHP code indicates it is designed to handle multiple teachers. Indeed, a CSV file including something like the following works OK in adding one teacher per course:

teacher1_account,teacher1_role,teacher2_account,teacher2_role
Fred Blogs,editingteacher,,
,,,Freda Smith,editingteacher

So, the code is capable of correctly parsing the teacher1_account,teacher1_role, teacher2_account & teacher2_role fields, just falls-over for some reason when there is actually more than one teacher.

So, it is *almost* working. Any ideas?

We are using uploadcourse.php (from the upload_course_for_1.8---v1.2 folder) on Moodle 1.9.5, PHP 5.2.10, MySQL 5.1.35 on CentOS5 Linux.
In reply to Geoffrey Rowland

Re: Bulk Course Upload tool question - Multiple Teachers - FIXED

by Geoffrey Rowland -
Picture of Plugin developers
Using Meld (on Linux, WinMerge does a similar job on Windows), to compare some of the many versions of the bulk course upload script, helped pinpoint and fix the bug blocking the addition of multiple teachers to a course. Just a matter of a semicolon in the wrong place.

Starting around line 525 replace:

$row = mysql_fetch_row($mysqlresource5);
$dteachers.='('.$row[0].','.$context->id.','.$dteacherdata['_account'].','.$course['timecreated'].',0,\'manual\');'; //penultimate ; causes the problem
}
}
if ($dteachers!='') {
if (!($mysqlresource4=mysql_query('INSERT INTO `'.$CFG->prefix.'role_assignments` (`roleid`,`contextid`,`userid`,`timemodified`,`modifierid`,`enrol`) VALUES '.$dteachers)))
return -4;
}

With
$row = mysql_fetch_row($mysqlresource5);
$dteachers.='('.$row[0].','.$context->id.','.$dteacherdata['_account'].','.$course['timecreated'].',0,\'manual\')';
}
}
if ($dteachers!='') {
$dteachers.=';';
if (!($mysqlresource4=mysql_query('INSERT INTO `'.$CFG->prefix.'role_assignments` (`roleid`,`contextid`,`userid`,`timemodified`,`modifierid`,`enrol`) VALUES '.$dteachers)))
return -4;
}
In reply to Jeff Church

Re: Bulk Course Upload tool question

by alison fordham -
I have managed to bulk upload courses to my moodle 1.9. If I create a template course style with specific blocks how can I ensure all courses I bulk upload replicate that template?
In reply to alison fordham

Re: Bulk Course Upload tool question

by Sean Dagony-Clark -
I'm curious about this as well. I've figured out that the template field wants the shortname of another course. However, providing a correct shortname in this field seems to do nothing -- as far as I can tell, the new course is set up without any characteristics of the named "template" course.

This is a great feature, as it would allow us to auto-populate new courses with instructional information to the teacher, for example. Has anyone gotten it to work?
In reply to Jeff Church

Re: Bulk Course Upload tool question

by Johnny Zephyr -
Hi

The upload script is working well for me. Is the script meant to update rows too? does it have the ability to update exiting rows? i have made changes to courses but to no avail.

with regards to the deletecourses.php - i can't get this to work at all. the file loads fine but i don't actually get a box to upload a file.

I'm running my moodle on xampp. moodle ver 1.9.8

Any help would be fab.

thanks



In reply to Johnny Zephyr

Re: Bulk Course Upload tool question

by Jason Hollowell -
Picture of Particularly helpful Moodlers
Johnny,

I think the deletecourses.php feature broke somewhere along the way as Moodle progressed. I can't get it to work either and have been meaning to try and figure out what is wrong with it but haven't had the time to sit down and give it a shot. I'll try and do that soon. I'm trying to get the Bulk Course Upload tool back on the Modules and Plugins page and will hopefully have it packaged with the delete tool when that happens.

Jason

P.S. In the meantime, if you have a need for bulk delete, you can use the bulk delete part of Backadel found a little way up in this forum (here). Some of the features of the block don't work under 1.9.8+ but I'm pretty sure the bulk delete feature is functional. There are three components of this package in the Tracker (CONTRIB-605) that may be newer, I'm not sure.

**EDIT** I just checked the deletecourses.php file found at CONTRIB-605 and it does work with 1.9.8+ smile
In reply to Jason Hollowell

Re: Bulk Course Upload tool question

by Johnny Zephyr -
Hi Jason

Thanks for the input. Do you know if it also updates existing course details?

Thanks.
In reply to Johnny Zephyr

Re: Bulk Course Upload tool question

by Jason Hollowell -
Picture of Particularly helpful Moodlers
Johnny,

As far as I can tell, it does not update existing courses. When you try to do this you get an error

"1 course(s) were skipped (duplicate ShortName)"

I can see in the code where the check for a duplicate shortname exists and the error that is thrown if it finds a duplicate. Adding this type of capability would be difficult as I think you would have to determine what you wanted to update and what you wanted to keep. If you don't check for the duplicate shortname, I think the original course would be completely overwritten or actually there might be an error generated from the database....as you'd be trying to insert a row that has some identical data. Don't quote me on that though...I'm typing as I think. smile

At any rate, as it stands right now, the Bulk Course upload tool will not update courses.

Jason