Lectora: Auto resume lesson.
November 18, 2019 12:00 AM
I know a dialog box pops up that gives you the option to resume or start over on your lesson... 'Ok' and 'Cancel'
undefined
jsDlgMsgBox.prototype.onBtn = function(e,btnId) //Runs the functions for each button.
This is the 'Trivantis-dialog.js' file. And it basically builds a dialog box, and then assigns function calls to if the user presses Okay or Cancel (On mouseclick) then it passes either a 1 or a 0 to something.
We can't quite figure out how to make it skip creating the dialog box and still successfully pass a 0 automatically (I think zero means continue where left off.... If I remember correctly)
We REALLY need help on this because the 'Resume Lesson' Popup is extremely buggy.
Discussion (12)
Thank you, Joe. I really appreciate it. I will be testing this out here shortly.
undefined
once on page load. Will check out your solution as well depending on how this pans out.
Joe, that link you posted is my own post. Unfortunately the solution provided in there is not going to work at all.
It is my understanding that for each page in a lesson, you need to add in an extra object / step / action (whichever it was) to go to each possible page you have.
Looking through Lectora's code I can see the variables its passing that lets it just continue... I can't seem to 'hack' it to get it to work though.
undefined
But yeah the solution in there is not good enough because we are building templates, and we might have 30 pages, or 10, or 14, and we non-coders will be using the template to build them. So for them to get the correct actions ironed out doesn't seem satisfactory-- although I appreciate the suggestion.
undefined
Which version of Lectora do you use?
Which scorm version do you publish to?
Which LMS is it?
Do you publish with Seamless Play?
The prompt is the way Scorm means the bookmarking to be done (every authoring tool I know does it very similar to Lectoras solution). I don't believe you can skip creating that dialog box, unless you uncheck "Prompt the user to ...". Well, as long as you don't want to edit the published files ...
I still don't understand why the users cannot be allowed to choose or why a user would try to break it on purpose. I never had or heard of any problems with the dialog box.
But as Lectora publishes HTML and allows to run custom javascript, it should be possible to build your own bookmarking sytem, save the bookmark to the dedicated LMS field and use it to direct the user to that value without questions.
Here is a similar post with a sample title. As Tim says, the scripting will depend on those factors he mentions.
https://community.trivantis.com/forums/topic/lectora-auto-navigate-to-last-viewed-page/
We have written an enhancement issue to allow for easier customization of bookmarking, hoping we can get to that soon.
Which version of Lectora do you use?
Which scorm version do you publish to?
Which LMS is it?
Do you publish with Seamless Play?
The prompt is the way Scorm means the bookmarking to be done (every authoring tool I know does it very similar to Lectoras solution). I don’t believe you can skip creating that dialog box, unless you uncheck “Prompt the user to …”. Well, as long as you don’t want to edit the published files …
I still don’t understand why the users cannot be allowed to choose or why a user would try to break it on purpose. I never had or heard of any problems with the dialog box.
But as Lectora publishes HTML and allows to run custom javascript, it should be possible to build your own bookmarking sytem, save the bookmark to the dedicated LMS field and use it to direct the user to that value without questions.
undefined
- I'm on lectora version 18.1.13
- Scorm v1.2
- Not sure what LMS it is, but it communicates to our own personal API, etc.
- We do publish for seamless play, but it isn't mandatory
undefined
It's not that we are worried about people TRYING to break it, but during testing we have seen multiple users mess it up (without even trying) and its just horrible.... We already know we would rather just have them auto continue so we are trying to work on that functionality without a whole bunch of super strict lectora actions that need to be carefully mapped for every possible page we have.
I hear you, and well, like I said, we are working on making this configurable.
For now you can use this HTML Extension to do the auto resume. The library object, attached, is for v18 versions and I'm not really proud of it but wanted to give you a possible solution. You will need to test it. Insert the Library object when the Title (top node) is selected in the Title Explorer. This will add the HTML Extension.
You will still need to publish with the "Prompt the user to navigate to the last viewed page." feature. The HTML Extension will disable the prompting but it needs the feature enabled to work properly.
FYI you can also style the dialog if you want to do that, but hopefully this will get you going and you will not need to.
Thanks for detailing out your use case and the issues you have with this feature.
I updated the Library Object so it should work now.
(it's more up to date than the one I sent to you in your template and will work without the loading page if you want to do it that way)
Again, we are working on allowing authors to customize the resume course experience without scripting.
Joe, your script is working out good so far. The only error I get is when it tries to auto resume me to the very first page in my lesson.
undefined
I get the error:
trivantis-opautils.js:207 Uncaught TypeError: Cannot read property 'arObjs' of null
at Function.jsOpaUtils.stopMedia (trivantis-opautils.js:207)
at trivantis-opautils.js:218
at trivCallBack (trivantis-opautils.js:20)
undefined
Would possibly an if statement work, one that checks if it is going to the first page of my lesson or not? And if so then just ignore it or something.
I see you already have an IF statement for a001index.html.... I will try out a couple things of my own, if you have something you know will make it better than let me know, otherwise I will probably just try to extend off of this.
Hi,
To get your page names back to of something like: page05812.html
During publish in your html options make sure the checkbox for Convert page names to short ID-based names.
Hello, Joe. I sent you some emails but i am writing this post sending of those.
undefined
I have not been able to test this properly, as when I publish, all my files are now being saved as a001_lesson_page_outline_template.html INSTEAD of something like: page05812.html
undefined
Not sure how to change it back to the generic, but yeah.
we are working on allowing authors to customize the resume course experience without scripting.
It would be great if we had a new reserved variable "Current_Page_Filename" (either "a001_chapter_1_page_1.html" or "page1234.html"). It would also be very helpful if the automatic bookmarking was done through actions instead of happening somewhere in the background:
On: Show
Action: Modify variable
Target: AICC_Lesson_Location
Value: VAR(Current_Page_Filename)
Then it would be very easy to disinherit bookmarking for certain pages, set it to "Empty" or change the bookmark value to a different target page.
It would definitely provide an easy solution for this question, without custom script or searching for the correct filename:
https://community.trivantis.com/forums/topic/last-page-viewed-exception-for-assessment/
... it would also be helpful when trying to navigate through custom javascript.
undefined
Discussions have been disabled for this post