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

New: Added branching by attempt and correctness #50

Merged
merged 14 commits into from
Nov 21, 2023
Merged

Conversation

oliverfoster
Copy link
Member

@oliverfoster oliverfoster commented Oct 3, 2023

fixes #49

New

  • _hasAttemptBands and _attemptBands, similar to assessmentResults._bands, such that branching can occur according to both the block attempt number ranges and block correctness states
  • _useQuestionAttempts to allow historic completions of a question to determine the attempt branching. Loops can be made across the same question and branch according to the attempt.

See example.json

@oliverfoster oliverfoster self-assigned this Oct 3, 2023
@oliverfoster oliverfoster added the enhancement New feature or request label Oct 3, 2023
@swashbuck
Copy link
Contributor

@oliverfoster In the README.md, will you remove the version number and add <br> line breaks after the other lines (ex. Author / maintainer)?

Co-authored-by: Cahir O'Doherty <[email protected]>
@zubairslamdien zubairslamdien self-requested a review October 25, 2023 13:57
Copy link
Contributor

@zubairslamdien zubairslamdien left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested and no issues for me.

@swashbuck
Copy link
Contributor

@oliverfoster Can you confirm that this correctly describes how branching works? If so, I can add it to the README.md.

All blocks that are part of a branching sequence need to have a _branching object, even if it's empty. For instance, a block can simply use "_branching": {} if it should conditionally be shown but does not create any branches of its own.

I'm finding that not including a _branching object will cause a block to always appear, even when it's specified in another block as a branch (e.g. _partlyCorrect) and even when it belongs to an article that uses branching. I think this note would clarify how it's supposed to work.

@swashbuck
Copy link
Contributor

swashbuck commented Oct 26, 2023

@oliverfoster Is there a need to include _partlyCorrect and _incorrect in the _attemptBands items? The branched block that appears after the question will only appear once the question is complete. That is, either the person answers correctly on any attempt or they exhaust all of their attempts.

For example, if a question's number of attempts are set to 10, a branched block would never be shown for an incorrect answer on the 3rd attempt since the question isn't complete yet. It would always have to show the "incorrect" block after the 10th attempt. Therefore, there's no reason to specify what happens when the user answers incorrectly on the 3rd or 5th or 7th attempt.

Also, I'm running into some issues in general (could be my JSON configuration). I will DM you a zip of my testing course.

@oliverfoster
Copy link
Member Author

Tested and no issues for me.

Where and how did you test this?

@oliverfoster
Copy link
Member Author

@oliverfoster Can you confirm that this correctly describes how branching works? If so, I can add it to the README.md.

All blocks that are part of a branching sequence need to have a _branching object, even if it's empty. For instance, a block can simply use "_branching": {} if it should conditionally be shown but does not create any branches of its own.

I'm finding that not including a _branching object will cause a block to always appear, even when it's specified in another block as a branch (e.g. _partlyCorrect) and even when it belongs to an article that uses branching. I think this note would clarify how it's supposed to work.

Correct, thanks.

@oliverfoster
Copy link
Member Author

oliverfoster commented Oct 26, 2023

@oliverfoster Is there a need to include _partlyCorrect and _incorrect in the _attemptBands items? The branched block that appears after the question will only appear once the question is complete. That is, either the person answers correctly on any attempt or they exhaust all of their attempts.

For example, if a question's number of attempts are set to 10, a branched block would never be shown for an incorrect answer on the 3rd attempt since the question isn't complete yet. It would always have to show the "incorrect" block after the 10th attempt. Therefore, there's no reason to specify what happens when the user answers incorrectly on the 3rd or 5th or 7th attempt.

Also, I'm running into some issues in general (could be my JSON configuration). I will DM you a zip of my testing course.

The block may have two questions, their correctness combines to make block correctness. So it's a little less straightforward than it seems.

It must be article+block branching, not block+component, as we can have unlimited blocks in each article, whereas there are limited components per block, in the AAT.

Blocks must therefore combine their components' attempts and correctnesses.

If the block only had one question then your use-case stands - partlyCorrect and incorrect would not be needed until the final attempt, all previous attempts would only complete on correct responses.

So while it would be unusual to need to specify partlyCorrect and incorrect, those are valid use-cases nonetheless, when we consider the two components per block conundrum.

It should be fixed now, but you will need adaptlearning/adapt-contrib-trickle#204 for your use-case, with branching in the last article on a page and trickle enabled in it.

branching attempts

@zubairslamdien
Copy link
Contributor

zubairslamdien commented Oct 30, 2023

Tested and no issues for me.

Where and how did you test this?

Locally. I just set branching for an MCQ with two correct answers with trickle and added 2 attempts as a band, but I'll test more.

Copy link
Contributor

@swashbuck swashbuck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@chris-steele
Copy link

Would it be correct to state that this new feature gives us attempt-based-branching rather than attempt-based-feedback? The latter being different question feedback depending on which attempt at the question you are on.

@oliverfoster
Copy link
Member Author

_useQuestionAttempts - Controls whether this block will branch according previous completed attempts at this question

branching question attempts

@StuartNicholls
Copy link

The only thing that through me off a little was having to set

"_shouldStoreAttempts": true

I see you have put a check in for this though. Just missed at first as it fails 'silently'.

Couldn't find any issues however

@oliverfoster
Copy link
Member Author

Fails silently by posting an error to the console:

logging.error('Branching: Spoor is misconfigured. Branching requires _spoor._tracking._shouldStoreAttempts = true');

@StuartNicholls
Copy link

Fails silently by posting an error to the console:

logging.error('Branching: Spoor is misconfigured. Branching requires _spoor._tracking._shouldStoreAttempts = true');

Yep, all good, I did see that

@oliverfoster oliverfoster merged commit 99172c6 into master Nov 21, 2023
@oliverfoster oliverfoster deleted the issue/49 branch November 21, 2023 10:35
Copy link

🎉 This PR is included in version 1.2.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow branching on attempt number and correctness
6 participants