Customising the Australian Government’s AI Fundamentals Training Course

To support public-service agencies in the implementation of their own responsible use of AI policies, the Australian Government’s Digital Transformation Agency (DTA) has made publicly available its AI Fundamentals training course in the form of a SCORM package, a commonly used technical standard for putting together content for Learning Management Systems (LMS).

The DTA training course is available for all Australian public servants at the APS Academy website. It covers the following topics in 20-25 minutes

  • An introduction to AI
  • An explanation of Generative AI
  • Foundations of safe and response use of AI

and is designed to equip public officials to be

  • informed on the applications and risks of AI;
  • capable of applying relevant advice on AI;
  • confident about when it is suitable to use Generative AI;
  • empowered to apply one’s own judgement with AI.

For those who wish to customise the content, it is easy to use an e-learning software like Rustici to make changes and then have the e-learning module hosted on an on-premise LMS or on the cloud. Alternatively, one can try to modify DTA’s SCORM package directly. (The DTA code is released under the permissive CC BY 4.0 license, so you can modify and use the code in any way you want, as long as there is a clear acknowledgment of where the code came from.) In the following, I will provide some high-level instructions for those who wish the work with the DTA code directly using purely open-source software.

The first thing you need to customise the code is to have access to hosting software. For that, I can recommend Moodle, a popular open-source and trusted eLearning solution used by educators around the world. You can install the latest releases on your own computer using the installer package for Mac OS X and Windows. Once installed, the instructions are fairly straightforward from then on:

  1. Open the MAMP application and then click the Start button on the top right corner to start the server.
  2. Open the local URL http://localhost:8888/MAMP on your favourite browser and then log in using the default admin account.
  3. Switch on the Edit mode (top right corner).
  4. Use the “Add an activity or resource” button to load the DTA SCORM package.
  5. Once the SCORM package is successfully imported, it will show up in the list of courses and you can then click on it to run through the e-learning course.

Now, the Moodle software is a hosting software so won’t actually be able edit a SCORM package directly. To edit the course content directly, you can find the data in the scormcontent/locales/und.js file in the unzipped DTA SCORM package folder, but the course content is coded as a long base64 string that looks like this:

__resolveJsonp("course:und","eyJjb3Vyc2UiOnsiaWQiOiJp.....CJtZWRpYSI6W119")

You can decode it easily in your favourite programming language. Here’s a code snippet in Python that will do the trick, assuming the DTA package is in the “AI fundamentals training – SCORM 1” folder:

import base64

def decode_base64_file(filename, output_filename):
  with open(filename, 'r') as file:
    base64_str = file.read().strip()
    base64_str = base64_str[28:-2]
    
    try:
      decoded_bytes = base64.b64decode(base64_str)
      decoded_str = decoded_bytes.decode('utf-8')
      # print(decoded_str)
      with open(output_filename, 'w', encoding='utf-8') as outfile:
        outfile.write(decoded_str)
      print(f"Decoded content written to {output_filename}")
    except (base64.binascii.Error, UnicodeDecodeError) as e:
      print(f"Error decoding Base64 or UTF-8: {e}")

decode_base64_file('AI fundamentals training - SCORM 1/scormcontent/locales/und.js', 'und-decoded.js')

Once you have run the above code, you should be able to read the und-decoded.js text file, which contains a large but easily readable JSON object that looks like this:

{"course":{"id":"iHJIPHcu_HcfaWD9ihmQX3o8gMobrUZc","originalId":null,"author":"aid|7574b632-800c-4209-b2e7-5659f2c79363","selectedAuthorId":"none","color":"#288264","navigationMode":"","title":"AI in government: fundamentals training","description":"<p><span style=\"font-size: 2rem\"><span style=\"color: rgb(0, 0, 0); text-decoration: inherit\"><span style=\"background-color: rgb(255, 255, 255)\">This training module will provide you with a foundational knowledge of AI, the principles of safe and responsible use, and how to put these to work in the Australian Public Service.</span></span></span></p>", .... ,"media":[]}

The contents of the course are all there, and you can modify it to make use of the different Javascript rendering routines embedded in the rest of the SCORM package. Once you are happy with your changes, you can re-encode your new contents in the und-decoded.js file in base64 using the following code snippet.

import base64

def write_new_und_file(filename):
  with open(filename, 'r') as file:
    content = file.read()
  stripped_content = content
  
  base64_bytes = base64.b64encode(stripped_content.encode('utf-8'))
  base64_str = base64_bytes.decode('utf-8')
  final_str = "__resolveJsonp(\"course:und\",\"" + base64_str + "\")"
  
  with open('AI fundamentals training - SCORM 1/scormcontent/locales/und.js', 'w', encoding='utf-8') as outfile:
    outfile.write(final_str)
    
  print(f"Base64 encoded string written to und.js")

write_new_und_file('und-decoded.js')

You can now reload the revised SCORM package into Moodle to test your changes. Once you’re happy with all your changes, be sure to also change the imsmanifest.xml file, which contains the metadata for the training course. The final package can now be hosted on your agency’s Learning Management System, or on a cloud platform like Rustici’s SCORM Cloud. (I should declare that I have no association with the Rustici Software company in any way so there are no conflicts of interest; I mentioned Rustici’s SCORM Cloud simply because I have tested the above using its free hosting service.)

Hope the above material is useful to others. Reach out if you need any assistance and have fun!


Leave a comment