Explore the community Forums Lectora Lectora Suggestions Action conditions – AND and OR

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #299243 Score: 1
    Profile photo of Roz Schwartz
    Roz Schwartz
    Member
    beginner
    intermediate
    junior moderator
    profile
    entry
    entry
    advanced
    friend finder
    contributor
    wise owl
    13 pts
    @rgs55

    I would like to see compound conditions, so I can set up something like this:

    (Chapter “Is Completed” OR Chapter “Is In Progress”) AND var_MenuType “Equal To” Forced_Order

    I resolved this by setting up two actions, but it would be a nice to have, if I could do it in one. (Or in this particular example, it would be nice to have an “Is Not Completed” scenario. 🙂

    This post has received 1 vote up.
    #299249 Score: 1
    Profile photo of Sergey Snegirev
    Sergey Snegirev
    Member
    contributor
    intermediate
    advanced
    friend finder
    lab member
    junior moderator
    advocate
    LUC16
    LUC16 Attendee
    wise owl
    336 pts
    @ssneg

    it would be nice to have an “Is Not Completed” scenario.

    I think the “Is not started” condition is exactly what you need 😉

    This post has received 1 vote up.
    #299263 Score: 4
    Profile photo of Daryl Fleary
    Daryl Fleary
    Member
    beginner
    intermediate
    advanced
    friend finder
    LUC16
    LUC16 Attendee
    contributor
    wise owl
    verified member
    17 pts
    @dfleary

    All:

    Yes, compound conditions using status is a little more difficult. As Roz suggests, it’s not easy to test “Is Not Completed” (meaning the target has not been started by the student or is still in progress) AND another condition. But I’m happy to say that will all change with the next version of Lectora and Lectora Online! As Sergey suggests, there will be “inverse” conditions for status:

    In addition to the current relationships:
    – Is Not Started
    – Is In Progress
    – Is Completed

    You will also have available:
    – Is Started (meaning the target is either In Progress or Is Completed)
    – Is Not In Progress (aka Is Not Started or Is Completed)
    – Is Not Completed (aka Is Not Started or Is In Progress)

    Daryl

    This post has received 4 votes up.
    #300420 Score: 0
    Profile photo of Laura Gillenwater
    Laura Gillenwater
    Member
    contributor
    advanced
    intermediate
    friend finder
    verified member
    advocate
    wise owl
    profile
    picture perfect
    Group Member
    12 pts
    @tecocat

    I’ve been wanting more sophisticated Boolean logic FOREVER! I want to be able to use conditions like “If x AND (y OR z)” or “If a AND b, but not (c OR D),” etc. Sometimes I can get there by creating a bunch of temporary variables and lots of actions, but sometimes even that won’t do the trick (and, when it does, it’s really cumbersome). I think I’ve been asking for this for about 8 years now…maybe 2016 will be the year my dream comes true?

    #302044 Score: 0
    Profile photo of KsElement
    KsElement
    Member
    beginner
    intermediate
    friend finder
    curious george
    contributor
    wise owl
    @KsElement

    Im needing the OR condition right now. Im not sure how to implement this. Is there any other way?
    If varX contains Y OR Z then true.

     

    Any ideas?

    #302045 Score: 0
    Profile photo of Laura Gillenwater
    Laura Gillenwater
    Member
    contributor
    advanced
    intermediate
    friend finder
    verified member
    advocate
    wise owl
    profile
    picture perfect
    Group Member
    12 pts
    @tecocat

    Oh, if you just need a plain “OR,” that’s easy!  Just pick the “Any” instead of the “All” option! 🙂

    #302064 Score: 0
    Profile photo of KsElement
    KsElement
    Member
    beginner
    intermediate
    friend finder
    curious george
    contributor
    wise owl
    @KsElement

    I wish it was that simple, Laura, but I also have other conditions that also need to be true and unfortunately i need the “All” 🙁

    #302068 Score: 0
    Profile photo of Laura Gillenwater
    Laura Gillenwater
    Member
    contributor
    advanced
    intermediate
    friend finder
    verified member
    advocate
    wise owl
    profile
    picture perfect
    Group Member
    12 pts
    @tecocat

    Okay – well, then, you’ll need two separate actions. (For lack of detail in your reply, I’m going to assume that your situation is that you need A, B, and C to be, say, “correct” and then either D or E to be “correct” as well.)

    Set up an “ANY” action that tests whether  D or E is “correct.” If either of them is correct, then set a custom variable (we’ll call it “DorECorrect”) to equal “1.”

    Then set up an “ALL” action tests whether A  is correct, B is correct, C is correct, and DorECorrect equals 1.

    That should do the trick! 🙂

    #302094 Score: 0
    Profile photo of Darrel Somoza
    Darrel Somoza
    Member
    contributor
    friend finder
    beginner
    intermediate
    junior moderator
    advanced
    wise owl
    curious george
    profile
    199 pts
    @Klaatu

    Until these goodies are added to the action system, here is a crude example of what you can accomplish with a few lines of JavaScript. The idea is to show how this can be used to accomplish all these requests and more. The sky is the limit.

    I’m sure, as Laura shows in the post above, that you can figure out a way to get the same results using the current action system but I think it would take a lot of extra steps (and I’m lazy).

    If you are not familiar with JavaScript (and if you are, I’m sure there is a more elegant way to code this) and you would like me to explain how this works in detail shoot me a message and/or (pun intended) let me know here in the forum and I will put something together.

    Darrel

    Attachments:
    1. Booleans.zip
    #302096 Score: 0
    Profile photo of Darrel Somoza
    Darrel Somoza
    Member
    contributor
    friend finder
    beginner
    intermediate
    junior moderator
    advanced
    wise owl
    curious george
    profile
    199 pts
    @Klaatu

    Sorry, that was the published files. Here is the AWT.

     

    DRS

    Attachments:
    1. BooleansAWT.zip
Viewing 10 posts - 1 through 10 (of 10 total)

You must be logged in to reply to this topic.