At current there is no way to do this in bulk, but I’d happily write a Query Builder Command for you for this. The tricky thing is determining the difference between wanted and unwanted columns. Two rules we could use for this are:
No Go Live date set
No student entries (including blank entries)
However, even with this, you might find a teacher who just created a column, but is yet to use it, and it would get deleted.
We can’t do filters for class short name and course short name, which combine to give a unique pointer to the class, and restrict to the current year.
Does this sound like it would do what you are after?
Just to explain a little further. I have a school site I split into 3 separate sites for preschool, elementary and secondary since they needed separate administrative domains.
So each site had everything from the parent/original site which I have removed; users, courses, classes, timetables etc.
Now I’ve got to the gradebook and don’t see an easy way to remove the ones the school doesn’t need. For example the new preschool site needs to remove all Markbooks (and therefore columns) from elementary and secondary, regardless of whether there are entries or not. Because I can identify elementary and secondary courses/classes by name, I want to use that to remove the Markbooks/columns.
That makes perfect sense, thanks for explaining. I wish to proceed carefully here, as I’d rather not delete data acciddentally. As such I’ve mocked up the query as a SELECT statement, which you can see in the attached, compressed .sql file.
Please can you edit line 12 to have one of your target course short names in between to replace “MA08”, and run it on your server to see that it returns the columns you want to delete.
If it works as intended, I’ll convert it from SELECT to DELETE and add as a gibbonedu.com command.
Hi Tieku, all of these columns seem to have entries in them, the form of the text “Good know”: in order for this to work, there must be no entries. If you remove line 11 from the query I shared, then it should pick up columns with entries, but only if the complete data is not set. Cheers, Ross.
Hi Tieku, I’m glad to hear that it works : ) Please find attached a DELETE version of the same query, with only the course name as the condition. It also removes the individual student entries. You can add this to your own Query Builder, but I think we’ll not add it to the gibbonedu.com library, as it is a potentially very destructive query! I’d definitely back up your database before using it. Happy deleting! Ross.