Picture of Rob Mausser
Adapt "build version log"
by Rob Mausser - Friday, 18 September 2020, 8:41 PM
 

Is there a way to see what "build number" an adapt course is? In the build.

Say, in the console or page source or a log, see how many times a course has been 'grunt build' and what number the current build is on?

Picture of Matt Leathes
Re: Adapt "build version log"
by Matt Leathes - Tuesday, 22 September 2020, 2:19 PM
 

I don't believe so...

Not sure what your use-case is, but I have, for a couple of clients, amended the onDataReady function in theme.js so that it add a version number into the DOM. The version number is defined in config.json and has to be updated manually, but this generally works very well for my purposes as I only want to update the version number when I actually send the course to the client.

The amended code looks like this:

function onDataReady() {
  var $html = $('html');
  $html.addClass(Adapt.course.get('_courseStyle'));
  var courseVersion = Adapt.config.get('_version');
  if (!courseVersion) return;
  $html.attr('data-course-version', courseVersion);
}