-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
4.1.1
The script at admin/tool/uploadcourse/cli/uploadcourse.php always creates new courses in the Topics format instead of respecting the default setting under Site Admin > Courses > Default course settings.
To replicate:
Go to yoursite.com/admin/settings.php?section=coursesettings and change the Format to Weekly (or anything else besides Topics)
Create a simple course upload CSV file, I used:
shortname,fullname,category
|
Weekly Course, Weekly Course, 1 |
Go to Site Admin > Courses > Upload Courses and upload the file in create mode. Note the course defaults are populated into the UI under the "Default Course Values' heading
Create the course and verify it is weekly format.
Delete the course.
Access your site root via SSH and run the script in createnew mode or createorupdate mode with update mode allowing defaults
sudo -u www-data php /var/www/html/moodle40/admin/tool/uploadcourse/cli/uploadcourse.php --mode=createnew --file=/home/ben/courseupload.csv
|
Observe the course is in Topics format