Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Builtin conditional block always blocks content #32834

Closed
kdmccormick opened this issue Jul 25, 2023 · 2 comments
Closed

Builtin conditional block always blocks content #32834

kdmccormick opened this issue Jul 25, 2023 · 2 comments
Assignees

Comments

@kdmccormick
Copy link
Member

Expected behavior

When using a conditional block, LMS should show the "content blocked" message until the condition is met, after which it should show its contents.

Actual behavior

LMS shows content blocked message, even after condition is met.

Steps to reproduce

I found this in both master (using tutor local) and Palm (using current-release.openedx.org).

  • In advanced settings, add "conditional" to the advanced module list. Save.

  • Add a new unit, and add a Problem->MultipleChoice component. Publish. Copy the block key from the URL.

  • Add a new unit, and add a Advanced->Conditional component. Edit it:

    • Conditional attribute: correct
    • Conditional value: true
    • Source components: add the block key you copied
  • Click View -> and add a couple subcomponents to the Conditional. An Announcement or two would suffice.

  • Publish the Conditional.

  • Click "View Live Version"

  • You should see this, as expected:

    image

  • Click the "Problem" link, and complete the problem correctly, ensuring you get a green check mark on the Problem unit:

    image

  • Now go back to the Conditional LMS view. You would expect to see its subcomponents now, but instead it is unchanged:

    image

@ormsbee ormsbee self-assigned this Jul 25, 2023
@Agrendalath
Copy link
Member

Agrendalath commented Aug 1, 2023

@kdmccormick,

Copy the block key from the URL.

This is the key of the Vertical/Unit. The Conditional XBlock checks the attributes of the Problem XBlock, so you should provide the Problem ID (e.g., block-v1:edX+DemoX+Demo_Course+type@problem+block@3964b665c07f4ca2b4dd3ba635012a96), not the Vertical ID (e.g., block-v1:edX+DemoX+Demo_Course+type@vertical+block@c42e0c77e2c54d98b25ca2f7bb14e19b). The Vertical does not have these attributes:

# problem was submitted (it can be wrong)
# if student will press reset button after that,
# state will be reverted
'submitted': 'is_submitted', # capa_problem attr
# if student attempted problem
'attempted': 'is_attempted', # capa_problem attr
# if problem is full points
'correct': 'is_correct',

I verified that it works correctly for the Problem Block key on Nutmeg and master branches.
I also verified that it does not work with the Vertical key on Nutmeg and master branches.

cc: @ormsbee

@kdmccormick
Copy link
Member Author

Got it. Thanks @Agrendalath .

@kdmccormick kdmccormick closed this as not planned Won't fix, can't repro, duplicate, stale Dec 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants