Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: pull data from SCORM #1040

Closed
hbaileylxd opened this issue May 3, 2016 · 18 comments
Closed

Feature request: pull data from SCORM #1040

hbaileylxd opened this issue May 3, 2016 · 18 comments
Assignees

Comments

@hbaileylxd
Copy link

Desperate to have my courses pull usernames, emails. names, whatever it can get, from SCORM, such as Moodle, to both personalise and validate within the course.

Uses could include in course certificates (Moodle's are rubbish!), emailing out (see second feature request), personalising learner experience and more!

@moloko
Copy link
Contributor

moloko commented May 3, 2016

Unfortunately it's generally just the user's name that SCORM makes available (weirdly always in military/private school-style format i.e. "Lastname, Firstname") but I think this is a great idea, it would allow for some nice personalisation of the course content to be able to refer to the user by name.

Ideally this would be done in a way that allowed it to be specified in different formats and from anywhere in the JSON e.g.

body: "Hi there {{student_firstname}} and welcome to this course on data protection"

Big +1 from me for this feature request.

@moloko
Copy link
Contributor

moloko commented Nov 22, 2016

First stage of this is complete in that the spoor extension is now able to pull in what information SCORM makes available about the user - next stage is to make it easy to use that information within Adapt.

I think we need to get this data into the _globals object (with some sensible default for when testing without an LMS) then set up some handlebars helpers to allow that data to be inserted easily into the .json

@hbaileylxd
Copy link
Author

Amazing! You really can just use {{firstname}} in the AT's text boxes to display the info (after that funky code you gave me went in the right place).

Great stuff Matt!

@brian-learningpool
Copy link
Member

@moloko, should we add a _globals.user object, or what had you in mind?

@oliverfoster
Copy link
Member

oliverfoster commented Jan 26, 2017

can we have an adapt api for this? something like:

JavaScript API

Adapt.global("propertyName", "value"); //setter
Adapt.global("propertyName"); //getter

^ this might need to be just an object literal or a reference to our current _globals rather than a setter/getter

Adapt.globals = Adapt.course.get("_globals"); //maybe?

Handlebars Helper

{{global "propertyName"}}

^ not sure if this should be a helper, but i don't see another way to get the globals scope into handlebars without hijacking every template or including a "get-me-globals" helper

{{include_globals}}
{{_globals.user}}
Handlebars.registerHelper("include_globals", function(data) {
  data.root._globals = Adapt.course.get("_globals");
  return "";
}) ;

@moloko
Copy link
Contributor

moloko commented Jan 27, 2017

I think it needs to be something in _globals so that we can set default values for when there's no LMS available

@oliverfoster
Copy link
Member

Sounds fiine to me, as long as we're happy using the current globals object, we just need to expose it in the handlebars and make a quicker reference to it in on the Adapt object.

Handlebars.registerHelper("include_globals", function(data) {
  data.root._globals = Adapt.course.get("_globals");
  return "";
}) ;

and

Adapt.globals = Adapt.course.get("_globals");

?

@moloko moloko self-assigned this Feb 9, 2017
@moloko
Copy link
Contributor

moloko commented Mar 17, 2017

quick update... I am finally on the case with this! It's going to require a LOT of changes (almost every single handlebars will need to change) but expect to see the initial PR to the framework popping up next week...

@hbaileylxd
Copy link
Author

Woot!

@oliverfoster
Copy link
Member

done in #1491
ta @moloko

@moloko
Copy link
Contributor

moloko commented Apr 12, 2017

reopening cause this is only half-done - still need to actually get the data from SCORM into the object in `_globals'

@moloko moloko reopened this Apr 12, 2017
@moloko
Copy link
Contributor

moloko commented May 2, 2017

the .hbs templates in adapt-contrib-boxmenu also need updating

@moloko
Copy link
Contributor

moloko commented May 2, 2017

OK I think that's everything... please review and +1 if you're happy!

@moloko
Copy link
Contributor

moloko commented May 2, 2017

If testing, you will need to manually update adapt-contrib-vanilla to the latest MASTER

@hbaileylxd
Copy link
Author

hbaileylxd commented May 2, 2017

Sweet! I can't test easily but will try and setup a new version I can play with. Thanks mr genius!

EDIT Ah wait - I just need the new version of Spoor don't I - not the framework! D'oh!

@hbaileylxd
Copy link
Author

It's telling me that the 1040 version of the boxmenu is incompatible with framework 2.0.19

@moloko
Copy link
Contributor

moloko commented May 2, 2017

@hmaffin sorry about that, as discussed testing this sort of thing through the authoring tool is pretty tricky - best done with the framework itself really

@moloko
Copy link
Contributor

moloko commented Jun 24, 2017

AFAIK this is now done; although not all the plugins have been updated to allow for this to be used absolutely everywhere - for example, you could include the user's name in the body, instruction or feedback of an MCQ but not in an MCQ option label.

If you think any plugins would particularly benefit from having this added please log a separate ticket

@moloko moloko closed this as completed Jun 24, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants