Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Index: build/fb/JP502/src/com/regislearning/activities/loe/controller/JP502StateMachine.as
- ===================================================================
- --- build/fb/JP502/src/com/regislearning/activities/loe/controller/JP502StateMachine.as (revision 2193)
- +++ build/fb/JP502/src/com/regislearning/activities/loe/controller/JP502StateMachine.as (working copy)
- @@ -180,7 +180,7 @@
- }
- else
- {
- - if(dataModel.j5SniffTest.attempts >= 3)
- + if(dataModel.j5SniffTest.attempts >= dataModel.j5SniffTest.maxAttempts && dataModel.j5SniffTest.maxAttempts != 0)
- {
- dispatch(new MainViewEvent(MainViewEvent.RESET_CLICKED));
- feedback = "j5SniffTestFailed";
- Index: build/fb/JP502/src/com/regislearning/activities/loe/model/J5SniffTest.as
- ===================================================================
- --- build/fb/JP502/src/com/regislearning/activities/loe/model/J5SniffTest.as (revision 2193)
- +++ build/fb/JP502/src/com/regislearning/activities/loe/model/J5SniffTest.as (working copy)
- @@ -11,6 +11,7 @@
- public var required:Dictionary = null;
- private var _passedLines:int = 0;
- private var _attempts:int = 0;
- + private var _maxAttempts:int = 0;
- public var testing:Boolean = false;
- private var _passed:Boolean = false;
- public var askQuestions:Boolean = false;
- @@ -34,6 +35,14 @@
- {
- return _attempts;
- }
- +
- + public function get maxAttempts():int {
- + return _maxAttempts;
- + }
- +
- + public function set maxAttempts(value:int):void{
- + _maxAttempts = value;
- + }
- public function J5SniffTest()
- {
- @@ -63,7 +72,7 @@
- _passedLines = 0;
- if(testing)
- return _passed = true;
- - if(_attempts < 3)
- + if(_attempts < _maxAttempts || _maxAttempts == 0)
- {
- _attempts++;
- }
- Index: build/fb/JP502/src/com/regislearning/activities/loe/view/mediator/ConfirmationViewMediator.as
- ===================================================================
- --- build/fb/JP502/src/com/regislearning/activities/loe/view/mediator/ConfirmationViewMediator.as (revision 2193)
- +++ build/fb/JP502/src/com/regislearning/activities/loe/view/mediator/ConfirmationViewMediator.as (working copy)
- @@ -89,7 +89,8 @@
- view.text = "<font color='#FFFFFF'>You have identified enough valid decisive points and placed them in the correct order. Select Complete to conclude the activity.</font>";
- }
- }else{
- - if(dataModel.j5SniffTest.attempts >= 3)
- + var maxAttempts:int = dataModel.j5SniffTest.maxAttempts;
- + if(maxAttempts != 0 && dataModel.j5SniffTest.attempts >= maxAttempts)
- {
- view.footer.htmlText = "";
- view.continueButton.enabled = false;
- @@ -107,8 +108,11 @@
- view.continueButton.enabled = false;
- view.continueButton.buttonMode = false;
- view.text = "<font color='#FFFFFF'>The J-5 has reviewed your LOE chart.</font><br><br>" + view.text;
- - var attemptsFeedback:String = (dataModel.feedback["attemptsFeedback"] as String).replace("[$N]", 3 - dataModel.j5SniffTest.attempts);
- - if(dataModel.j5SniffTest.attempts >= 2) attemptsFeedback = attemptsFeedback.replace("opportunities", "opportunity");
- + var attemptsFeedback:String = (dataModel.feedback["attemptsFeedback"] as String).replace("[$N]", "infinite");
- + if(maxAttempts >= 1){
- + attemptsFeedback = (dataModel.feedback["attemptsFeedback"] as String).replace("[$N]", maxAttempts - dataModel.j5SniffTest.attempts);
- + if(dataModel.j5SniffTest.attempts >= Math.abs(maxAttempts - 1)) attemptsFeedback = attemptsFeedback.replace("opportunities", "opportunity");
- + }
- view.text += "<font color='#FFFFFF'>" + attemptsFeedback + "</font>";
- }
- Index: build/website/JP502/xml/j5Test.xml
- ===================================================================
- --- build/website/JP502/xml/j5Test.xml (revision 2193)
- +++ build/website/JP502/xml/j5Test.xml (working copy)
- @@ -1,6 +1,6 @@
- <?xml version="1.0" encoding="utf-8"?>
- -<j5Test testing="false" askQuestions="false">
- +<j5Test testing="false" askQuestions="false" maxAttempts="0">
- <required>
- <loe id="1" dps="1,6,12,18,19" numCorrect="3"/> <!-- 'dps' is a list of comma delimited DPs required to be on the chart for the loe -->
- <loe id="2" dps="2,7,10,13,15" numCorrect="3"/>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement