Copy link to clipboard
Copied
I have been asked to create an assessment project with 3 content modules - 5 modules total; the Introduction must be completed before the 3 assessment modules are available, and all three of those modules must be completed successfully before the Conclusion is unlocked. Users should be able to go through the three comtent modules linearly or non-linearly (in any order) but must complete all 3 before going to the conclusion.
Using variables and advanced action scripts, I have got it working with either approach - they can click Next from the main menu and go through the modules linearly or they can click the modules themselves and complete them in any order.
The problem I'm having in my tests is mixing the methods. If I start out with one method (say, click Next and complete the first module) then click the 3rd module (non-linear) the variables used to control navigation get out of sync. In this scenario, modules 1 and 3 have been completed which linearly would mean going to the Conclusion when Next is clicked but since module 2 has not been completed the Conclusion is still locked. They must complete Module 2 before they will be able to access the Conclusion.
I know how to do this using nested IF statements to check various combinations of the two variables being used but I'm not seeing how to do nested IF statements in the Advanced Action scripts. I know you can have multiple scripts in one AA and think that might work but so far I haven't been able to make it work correctly. It keeps going through all of them and defaulting to the last one which I have set as a failsafe and jumps to an error screen (as opposed to letting the user fall off into a bit bucket).
So I guess a related question is: Are those multiple scripts within an Advanced Action script processed sequentially and as soon as a positive statement is hit, that is executed and flow through the project continues? In this case, it seems to be working through all of them and dropping out the end. On the screen I have the variables listed so I know what they contain and what should be happening but it doesn't seem to be working that way.
Anyway, I'll continue trying different things but thought I would check here to see if anyone has any ideas or suggestions about the "best" way to handle something like this.
Thanks very much.
Michael
Copy link to clipboard
Copied
Multiple clauses in a Conditional Advanced Action are processed linearly. It moves through each one to execute them separately like a daisy chain. It does not drop out as soon as a correct result is reached. This is useful because there are several situations where you want the same Conditional Action to check for a number of things and then respond accordingly.
You cannot do nested IF statements with Conditional Advanced Actions. Please join the voices for this by logging an enhancement request with Adobe.
Copy link to clipboard
Copied
In addition to what Rod said, you can do nested IF statements using JavaScript... you can also use an array to keep track of what's been viewed and what hasn't.
Jim Leichliter
Copy link to clipboard
Copied
Thanks for the information and recommendations. I managed to get the project to work using a combination of variables, Advanced Action scripts, and showing/hiding various buttons. It is probably a bit more complex than it needs to be or should be, but it appears to be working as expected. Users can go through the course using either the module click-boxes, the Next button, or a combination of either.
I’m not much of a JavaScript programmer and I haven’t used arrays since my Assembler and COBOL programming days but it would definitely have made this simpler to do.
Michael
Copy link to clipboard
Copied
I have another situation that I think "begs for" Nested IF processing - especially given the fact that multiple clauses within an Advanced Action are processed linearly.
I have Multiple Choice (single correct answer) and True/False questions in my project. Since I am building the questions using the RadioButton and CheckBoxes widgets, I don't seem to have any way to make sure the question is answered AND check for the correct answer.
If the user selects the correct answer, I am sending them to a "correct" feedback screen. If they select the incorrect answer, I am sending them to an "incorrect" feedback screen.
Those both work correctly.
If I want to make sure they answered the question before clicking the Submit button, I can test the answer variable against whatever value is in v_null (whether NULL or ZZZ which will never be an answer). If MCAnswer == v_null, the user is sent to the "NoAnswer" page and, when clicking the click box there, is returned to the previous slide (supposedly the question they did not answer).
That process by itself also works correctly.
The issue comes in when I put them together.
I have two clauses in one AA script. The first (NullProcessing) checks to make sure the answer variable it is not== v_null. If the value is v_null, I send them to the NoAnswer screen with a click box that returns them to the question.
IF MCAnswer == v_null
THEN Jump to Slide NoAnswer
No ELSE statement.
The second clause (AnswerProcessing) tests to see if the answer they did provide is correct:
IF MCAnswer == A) AND MCAnswer not== v_null (which is set with the value "ZZZ", not null)
THEN Jump to Slide Q1_Correct
ELSE Jump to Slide Q1_Incorrect
When processed, if the question is answered correctly the user is sent to the CORRECT feedback screen as expected. If the question is answered incorrectly the user is sent to the INCORRECT feedback screen as expected. If they don't answer, they are sent to the INCORRECT screen. The NoAnswer slide is never reached.
If I reverse the clauses so AnswerProcessing is first and NullProcessing is second:
User selects the correct answer, is sent to the CORRECT feedback slide as expected and processing continues.
User selects the incorrect answer, is sent to the INCORRECT feedback slide as expected and, again, processing contunues.
User clicks Submit without selecting an answer and is sent to NoAnswer as expected, but when the click_box on that slide is clicked, the user is sent to the INCORRECT feedback screen for the question - not back to the question itself, so apparently the INCORRECT slide is being shown as the last slide visited. (All that is on this slide is a text caption explaining why they are there and a click-box that lays on top of it with "On Success" being "Go to the slide last visited".)
I've tried various combinations of testing the variables in different orders and using "==" vs. "not==" in different combinations, - most of which "should" have worked with the user navigating through the screens correctly - and different values for v_null (from NULL to some random 2 or 3 letters that could not possibly be a correct answer), but none of them work. Sometimes I don't get to the NoAnswer slide, sometimes I do but regardless the processing is not working correctly.
I know I can "hardcode" this processing and put it on the INCORRECT answer screen for each question (I tried that and it worked with hardcoded variables and jumps specific for the question) but there are 27 questions and I would need an AA script for each question or set up enough variables to cover handling processng for each question but that really seems like overkill for this which shouldn't really be all that difficult. Besides, why send them to an INCORRECT feedback screen which tells them why they missed the question then send them back to the question so they can answer it correctly.
So I'm kind of at a loss. I've talked with a few people around here to find out how they would feel if for whatever reason they didn't answer a question and automatically missed it and they said it wouldn't be that big a deal but it just bugs me to have learners fall off into that particular bit bucket. There is a safety net in that they miss the question and can continue on, but it bugs me to have someone miss a question just because they didn't provide an answer. These questions are not rocket science (compliance and ethics kind of stuff) and I would like to be able to capture and process this error on their part but I've run out of options and can't see anything else to try so I thought I would ask for advice here.
Any advice???
Sorry this is so long.... Thanks for your patience.
Michael
Copy link to clipboard
Copied
You are unlikely to get nested IF statements in Advanced Actions anytime soon. You might be able to solve this riddle by stepping outside the Captivate SWF and using JavaScript to process your logic. Others are more expert at that approach than I am.
Another option might be to use the Interactive Master Widget to combine your radio button or checkbox widget interactions on each slide so that you can spit out a single Success or Failure.
Take a look at how it works in this tutorial: http://www.infosemantics.com.au/interactivemaster/help
Free trial versions of the widgets are available here if you want to test the solution: http://www.infosemantics.com.au/adobe-captivate-widgets/download-free-trial-widgets
Copy link to clipboard
Copied
Tried to use the Interactive Master Widget but apparently it is not compatible with the radio button widget I am using (said it could not find an interactive widget to use) so I’m stuck. Unless there is some way I haven’t been able to find that will allow me to go to a slide whose slide number is contained within a user variable, I guess I’m going to have to settle for a user missing the question if they click Submit without answering the question first. That’s not ideal but I suppose it will work. Hopefully they’ll only do it once or twice before figuring out what is going on.
I’ll try to display a caption text field letting them know why they missed it if they didn’t select and answer before submitting.
Thanks again for your help.
Michael
Copy link to clipboard
Copied
Radiobuttons, Checkboxes are static widgets, they cannot report. There are only a few interactive widgets coming with Captivate, you can filter on them in the Widgets panel.
Copy link to clipboard
Copied
I did check and the only interactive widgets that come with Captivate are buttons. I’m surprised that checkboxes and radio buttons aren’t considered “interactive” since that is what users are clicking to answer questions – seems interactive to me but the Captivate definition of “interactive” must be something different. I’ll figure it out later.
For now, it doesn’t appear the Interactive Master widget is going to work for me. I need to check that the question was answered AND whether or not it was answered correctly if an answer was entered. Doesn’t appear, however, I am going to be able to do that.
I also find it difficult to believe that there is no way to jump to a screen number contained in a user-defined variable. Seems like something that would want to be done fairly often but I guess not. It’s a little confusing since you can apparently set variables like cpCmndGotoSlide to some value but then can’t actually jump to it. I must be missing something. I’ll keep digging later when I have some more time.
Thanks, again, for your help.
Michael
Copy link to clipboard
Copied
I did have the same reflection when I started to explore the widgets (blogged about a lot of them). The difference between a static and an interactive widget is that you can attach a score to the interactive widget, which can be reported. Both can allow interaction with the user as you experienced.
To jump to a slide with a number stored in a user variable, how did you proceed? This seems to work for me:
Expression cpCmndGotoSlide = v_slide - 1
And v_slide is populated by another advanced action.
Lilybiri
Copy link to clipboard
Copied
This appears to be working!! ☺
I didn’t realize that “Expression” would execute a Cmnd variable but it makes sense. That was the piece I was missing. Guess I’m not quite an expert yet…
Thanks very much!
Michael
Copy link to clipboard
Copied
You can use Jim Leichliter's Enhanced Radio Button and Enhanced Checkbox Widgets with the Interactive Master. These widgets are tied to user variables which you can set up as Variable Slaves in the Master widget.
http://captivatedev.com/2011/04/30/adobe-captivate-5-widget-radio-buttons-enhanced/
http://captivatedev.com/2011/04/30/adobe-captivate-widget-check-boxes-enhanced/
Copy link to clipboard
Copied
Did you try to store the label or ID of the last slide visited in a user variable instead of using the system variable? Just an idea,
Lilybiri
Copy link to clipboard
Copied
Yes, I thought about that yesterday but could not see how to use that to return to the question slide from the NoAnswer slide. I couldn’t see anyplace that would let me jump to a slide contained in a user variable. “Jump to Slide” lets me pick the slide I want to jump to from a list. Previous slide, next slide, etc. are all hardcoded using system variables.
Copy link to clipboard
Copied
If I set the click_box on the NoAnswer page to jump to slide “X” where “X” is the question slide I just came from everything is working correctly. I really can’t have 27 different NoAnswer pages, however – one for each question slide.
It looks to me like the issue is that the system variables are not counting pages consistently. For some the index starts with 1 (such as cpInfoCurrentSlide) and for others the index starts with 0 (such as cpInfoLastVisitedSlide) which means they are a page off.
As a result:
· When I am on the first question slide (the one I’m using to test the functionality), cpInfoCurrentSlide == 7 but it is slide 8 in the filmstrip.
· When I go to the NoAnswer slide for that question cpInfoLastSlideVisited == 8
· When I jump back to the ”Last Visited Slide” I should go back to the question slide (8 according to the filmstrip numbering) but I end up on a slide that has the value cpInfoCurrentSlide == 9, slide number on the filmstrip == 10.
I can set a variable v_LastSlide to whatever number I need by incrementing or decrementing the value and that should work to get me back to the correct slide but as I mentioned in my last response I don’t see any way to jump to a specific slide number using a variable (presumably I could using JavaScript but I’m not very proficient in JavaScript programming – meaning I’ve never even looked at it).
So, I guess at this point my question is: Using Captivate capabilities, can I jump to a slide number contained in a variable? If not, I guess I’m not going to be able to do what I am looking for – which to me really seems like pretty fundamental functionality….
Thanks.
Michael
Copy link to clipboard
Copied
I just submitted an enhancement request for Nested IF statements. I also mentioned the ability to reset quiz questions BEFORE the user completes the "quiz" so they can be reset at the point where I know the user is going to fail the "quiz" based on progress (I really don't want to force someone to go through an entire course when they didn't pass the first module and cannot possibly pass the course), and a way to easily branch to a specific slide using the value in a user-defined variable.
I'm not sure if the last can actually be done today but it is not "intuitive". If it actually can be done, please let me know and I'll make it happen.
Regardless, thanks to all of you for your responses and recommendations. It's nice to know there is help here when needed - when I bump up against the proverbial brick wall...
Michael
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more