Picture of Lars Halkjær
Setting the rebuildCourse flag
by Lars Halkjær - Wednesday, 6 September 2017, 12:24 AM
 

I have made an extension to allow the user to select the SCORM version and enter various SCORM IDs for the manifest in the Authoring Tool.

This requires that I insert a Grunt task at the end of the server-build task to process the correct scorm files and insert values into the manifest file - I have done that and it works.

The problem is, that if someone changes the settings, the server-build task is not re-run on the next preview/export.

This seems to be due to the rebuildCourse flag not being set, and the only solution seems to be to switch to a new menu or them and back again.
This triggers a call to app.emit('rebuildCourse', tenantId, courseId); which seems to set the rebuild flag/file.

But can I in any way set this flag in the AT when the user changes the settings (I don't really have any of my code running in that context so it would probably have to be some setting in the extension schema file).

And if the server-build task is not run at all, there is not much to do there.

Is there an option for this that I haven't found yet?

Picture of Henrik Aabom
Re: Setting the rebuildCourse flag
by Henrik Aabom - Wednesday, 6 September 2017, 7:37 AM
 

It's the same issue when you add a new component or extension, for instance when uploading a new version of an extension. Before you can see the effect in the preview, you must re-pick a theme/menu, as you describe Lars.

It would be very helpful if the AT would rebuild the entire course, on clicking the preview button, if a new plugin is added.