Forum Discussion

AmyCowan's avatar
AmyCowan
Community Member
2 months ago

Boolean variables

I'm struggling with my first course! I have a drag-and-drop interaction where learners are supposed to complete a chart by putting each of the answers (20 buttons with text) in the appropriate cell. When the answers are correct, then the next button is supposed to be activated. The triggers for each button are working- the buttons change state (correct or incorrect) and when correct, the associated variable is adjusted as well. But when complete, it's not triggering the "adjust alltaskscompleted variable to true". I've tried multiple workarounds but am still new to this so I don't really understand what I'm doing wrong. 

I went through every trigger for every object/answer and found a couple of things that could potentially be an issue. To troubleshoot I created a textbox to show the status of the variables when in preview mode, and that's when I found out that it wasn't an issue with any particular button. (See attachments.) 

Is there something I'm doing wrong? Is there some other way to approach this? I feel stuck. 

3 Replies

  • Have you tried building this using the freeform drag and drop question format? It would control this for you. 

    New Slide > FreeForm Question > Drag and Drop

    Alternatively you could remove your Adjust alltaskscompletedvariable to True, and instead add the variable conditions to the Next button trigger. 

    Jump to Slide X when user clicks Next button IF  - Then copy your list of Variables. 

    Your current variable is dependent on the learner dropping Button 1 on local examples.  So this action will only be initiated when the learner drops button 1 on local examples.

    I hope this is helpful!

     

    Carrie Ann

  • How do you validate your interaction? By submitting? If so, you could use this trigger:


    Question.Correct is a built-in variable.

    Otherwise, you would have to create 20 triggers "Adjust alltaskscompletedvariable to True when each correct variable changes if other 19 are also True".  If you are willing to share how exactly your interaction is setup we could figure out shorter solution to unlock the Next button. 

  • As Carrie Ann said, using a Freeform Drag and Drop graded question would allow you to take advantage of the built-in functionality for scoring. You wouldn't need to use any variables to track whether objects have been placed correctly. Here's the User Guide info on Freeforms:

    If you want to use a custom interaction (instead of a graded question), there are a variety of ways to control the Next button. As Nedim said, it'd be easier for someone to troubleshoot and help if you uploaded the .story file. 

    Here are the best practices for uploading a .story file:

    • Only include slides that are related to the problem.
    • Be sure objects, layers, motion paths, and variables have meaningful names.
    • If there is proprietary content, replace or delete it. For example, replace proprietary text with “ipsum lorem” text.