Copy link to clipboard
Copied
Hi,
I have a number of scorm modules, each with a quiz in the second half of the module (e.g. slides 16-30). At the beginning of the module there is a screen that allows the students to jump straight to the quiz, so that they can review and assess their skills later on without going through all the content slides again. The problem is, the first time they access the module, I want to disable this button, so that they cannot jump ahead without viewing the content slides.
Is there a system variable or some way of reading whether the student has viewed all the slides in this module before, and enable or disable this button based on that condition? I'd settle for simply a second visit even without ensuring that they had previously viewed all slides, if I had to.
Lilybiri‌ any help is much appreciated!
Thanks,
Tal
Copy link to clipboard
Copied
When you mean 'access': is this after closing the module and returning? Normally all variables are cleared when closing a course. You'll need a way to transfer the variable to a next visit, which can be done for SWF with a widget created by Michael Lund, and soon with another widget to be launched by InfoSemantics for HTML5 output (Introduction to CpExtra - YouTube). There is a way with JS as well. This answer is not about JS at this moment.
I would prefer personally not only to disable that button on first view, but even to hide it! I will label that button 'Bt_Quiz'.
There are several possibilities. I hope first of all that you do not use a default playbar with progress bar, because that could override everything: the user can scrub the progress bar and get to any slide in the project. First of all: you need to use custom navigation buttons. That is pretty easy: use shape buttons either on the master slide or on the first slide, timed for the rest of the project. That means that the user can only continue to a next slide when he presses your custom Next button. That way he has to view all content slides, but cannot be forced to view all content on a slide. I suppose this is a linear project? If not, it will be a bit more complicated.
Create a user variable: v_visit, with a default value of 0 (Boolean variable), which means that the user has not yet viewed the content slides. For the last content slide, either use another master slide (if you put the Next button on the master slide) or hide the default Next button with the On Enter action (if you timed it for the rest of the project). You'll need an exact copy of that Next button that has to trigger a special advanced action (better shared, because you can use it on all the projects, the variable will be created automatically in the next projects) with two commands:
Assign v_visit with 1
Go to Next Slide
For the slide that allows jumping directly to the quiz, you'll need a conditional advanced (or shared, since you need it in all your modules)
IF v_visit is equal to 0
Disable Bt_Quiz
Hide Bt_Quiz
Continue
ELSE
Show Bt_Quiz
Enable Bt_Quiz
Continue
Maybe Continue is superfluous, depends on setup of that slide
Copy link to clipboard
Copied
Hi Lilybiri, thanks for the answer.
It's just as you asked - I am referring to access upon closing the module and re-opening it. I want the button on the initial screen to be enabled only on the 2nd visit, i.e. the second time the module is opened. Otherwise I think I'll make it disabled and with some kind of a greyed out effect by showing/hiding a semi-alpha image over it.
So, it seems the Infomatics widget will be the way to go. I had a look at the video and it looks impressive. At the moment I'm exporting as both SWF and HTML but I imagine you can't put in both the SWF and HTML5 widgets (or wouldn't want to!) and I have to have HTML5 supported, so the infomatics one seems to be the way to go. I'd be interested to hear the JS approach if you have that handy! I'd prefer that to a plugin actually.
It seems the answer you gave is dealing with unlocking it within the one use, which is not really the problem I'm trying to solve at the moment.
PS. It is linear, and no default playbar or progress bar.
Copy link to clipboard
Copied
I'm not a JS expert, know it is possible to store information with JS on the system and retrieve that information later on. However, you can still use the advanced action that I showed if you only retrieve the variable v_enter with JS. Of course you can program everything with JS as well. If I was not so busy today, could look up the first work flow. Maybe David (TLCMediaDesign) will pop in?
Copy link to clipboard
Copied
Interesting, thanks Lieve, I'll play around with it.
Copy link to clipboard
Copied
SCORM does have a variable you can access, in the cmi.entry (2004) or cmi.core.entry (1.2) field. Their value is ab-initio.
Captivate has functions that return values that designate initial entry.
2004
SCORM2004_GetEntryMode()
1.2
SCORM_GetEntryMode()
both functions return "ENTRY_FIRST_TIME" if initial entry.
You would need to populate a custom variable with the result in a JavaScript window, then execute a conditional action based on the variable.
I haven't tested in one advanced action, the first part would execute JavaScript and the second statement would evaluate the variable the JavaScript is setting, but it may work in sequence. For HTML5 it's easy, swf is a little more difficult.
var checkEntry = SCORM_GetEntryMode();
cp.APIInterface.setVariableValue("yourVariable", checkEntry)
Copy link to clipboard
Copied
Perfect! I can see a lot of nice uses for this beyond what I was trying to do here, which is also solves. Thanks David.
Copy link to clipboard
Copied
I can't seem to access the SCORM_GetEntryMode() function using the line of code that you suggested:
var checkEntry = SCORM_GetEntryMode();
It seems to break the script, I have an alert afterwards reporting the value of checkEntry which doesn't run when I use the function name as is. I don't think it's finding the function? Is there something I need to add?
TIA!
Copy link to clipboard
Copied
Are you running in an LMS when testing?
The code was from a CP8 scormdriver.js, I can't imagine it changed if you are using CP9.
Is your project SWF, HTML5 or both?
Copy link to clipboard
Copied
Just HTML5. I was just using the HTML5 preview in browser... I figured it would treat it as a first attempt. I'll try it in Blackboard.
Copy link to clipboard
Copied
Yes, it needs to be in the LMS to work.
Copy link to clipboard
Copied
Hi, an update to this for anyone reading the thread in the future... I got it working in the LMS but looks like there has been a slight change in the scormdriver.js function for CP9.
For a first visit, SCORM_GetEntryMode() returns '2'. Second visit it returns 3 (I think it probably keeps incrementing but can't be certain as for some reason moodle is not forcing a new attempt and keeps writing it over the first attempt!)
I put this code on the first slide in my project:
var checkEntry = SCORM_GetEntryMode();
window.cpAPIInterface.setVariableValue("QuizAccess",checkEntry);
And in the second slide made a conditional action:
IF QuizAccess does not equal 2:
enable quiz button
Thanks for the help!
Tal.
Copy link to clipboard
Copied
Captivate is doing something different then. The valid values for cmi.core.entry are:
"ab-initio"
"resume"
""
I see now, they are assigning a constant value:
var ENTRY_FIRST_TIME = 2;
var ENTRY_RESUME = 3;
If you pull the value yourself with, SCORM_CallLMSGetValue("cmi.core.entry");
You will see the strings that are actually stored.
Copy link to clipboard
Copied
Gotcha.
So, to clarify, if you have force new attempt, cmi.core.entry should be "ab-initio" even on a 2nd, 3rd etc attempt. "resume" doesn't literally mean resuming the same attempt. Correct?
I ask because while it worked in Moodle, it's not working in Blackboard, and maybe that's because Blackboard is actually forcing a new attempt each time (Moodle wasn't). It also sounds that way from the scorm.com documentation:
Copy link to clipboard
Copied
Blackboard is a different animal as you can overwrite SCORM settings. In Blackboard you can limit the attempts to single, unlimited or a specified number.
Resume means only that it has been accessed before. You can then use the info to do something else.
I use the entry to evaluate whether we need to initialize arrays in the suspend_data or get the values and jump to a point that was saved in the lesson_location.
The only way you could possibly get the entry to return ab-initio again would be to set the cmi.core.exit to "". I'm not sure that would work though. In my experience you cannot "reset" the entry, although I haven't pursued it that deeply. I always set the exit to suspend. You can wipe out all user progress manually if you want to reset an attempt. You would do this on exit.
Note that I do not use Captivates SCORM output, I use my own SCORM package. Captivate has it's own logic built in based on your publish settings.
Copy link to clipboard
Copied
OK so then it is working. Blackboard opens the program in a new window and for some reason it's viewing each access as a first attempt. It's my first time using it and seems to be a blackboard issue so I'll work that out separately.
Thanks so much for all the help, much appreciated.
Cheers,
Tal