Upload Courses csv, restore from backup not working

Re: Upload Courses csv, restore from backup not working

by Juli MacArthur -
Number of replies: 6

Hi,

We were on 3.10. We've just upgraded to 3.11 after this incident.

We found a fix, which is VERY strange. The main idea of using the templacecourse field is that it uses it as the exaple to build from.

The fix was:

  1. Create a template course.
  2. Back it up.
  3. Restore it into the template course - deleting all content and replacing it with the backup content.
  4. Uploaded the .csv with the templatecourse directed to that same course.
It worked fine. 🤦‍♀️

It WOULD NOT created new courses and restore them from something that hadn't been backed up and restored into the intended template. It would not restore from a backup file, regardless of how it was made.

Very strange behavious if you ask me!

Thanks for your helps,

Juli

Average of ratings: Useful (1)
In reply to Juli MacArthur

Re: Upload Courses csv, restore from backup not working

by Sharon Strauss -
Picture of Testers
Hi Julie,

Thanks. I had the same issue you did. It's strange. I have used this process successfully for years. Then, for no apparent reason, it stopped working. The first time I ran a template course was fine. However, subsequent uses of that template had the same issue you described.

As you suggested, I backed up one of the templates and then restored it into the very same course. Then, I ran a test and viola—it worked. No rhyme or reason. I am equally baffled.

FWIW, this is on Moodle 4.1.2.
In reply to Sharon Strauss

Re: Upload Courses csv, restore from backup not working

by Sharon Strauss -
Picture of Testers
Update. My first response came after running my Fall courses. I continued to do period updates through September, with no problems. However, I just ran our spring courses—with the same templates I used before—and the problem returned.

Two odd things I noticed this time:
  • During the template backup/restore, sometimes I got a message that I needed to set the roles.
    illustration of role update issue
  • Then I deleted courses and tried the upload again. Most courses uploaded fine. However, I have different templates for different departments. A few continued to give the error. When doing the backup/restore on those templates, ALL of the them had the role error illustrated above.
We do have two different student roles in our course. However, we have been doing roughly the same thing for YEARS, and this is the first year we have had this issue. We do create a new Moodle server every year--in case that might be relevant.

Did you get the issue again, Juli? Or did your backuup/restore  lead to a permanent fix?
In reply to Sharon Strauss

Re: Upload Courses csv, restore from backup not working

by Juli MacArthur -
I had the same issue when I tweaked the template I had restored - any edits make it 'unviable' and so I had to backup and restore again for any upload to work.

I wonder if the role issue is related to edited role name or custom roles. We have a custom role which is 'Academic' (Teacher - enrolment and settings access removed) and this tends to bring this role error up when we restore and the role had no users logged against it.

We're Hosted so we don't have a new server each year, so I'm not sure it's that. We're on 4.1 now, so I'll have to wait til next year to see if this works. We're moving to API course creation, which will create courses based on the template, so it'll be interesting to see how many errors we get when this is switched on (the horror!)
In reply to Juli MacArthur

Re: Upload Courses csv, restore from backup not working

by Sharon Strauss -
Picture of Testers
Thanks. We did edit the templates since the fall. What does 'unviable' mean in this context? Did you see that in a message or something?

I'd like to create a bug report, but I'm not sure exactly when this error happens or how to replicate it. Do you know? I have used about the same role configuration for ten years, but this is the first year I have had the problem.
In reply to Sharon Strauss

Re: Upload Courses csv, restore from backup not working

by Juli MacArthur -
Unviable meant that any course which we wanted to use as a template had to be restored into itself for it to work. You couldn't edit it and expect it to work. You had to edit, backup and then restore into the course. Didn't see any other message other than the original one I screenshot before.

Did you upgrade recently? I've found a few strange buggy thing since we moved to 4.1?
In reply to Juli MacArthur

Re: Upload Courses csv, restore from backup not working

by Sharon Strauss -
Picture of Testers
Hi Juli,

Thanks! Somehow I am just now seeing your reply. 😬

We are on Moodle 4.1. We've been creating a new instance each year, so I don't know if the issue is the version or something else. But it could be the version. And yes, it could also be linked to template file edits.

In general, I've found 4.1 pretty stable. What other issues are you seeing?