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

Question component - Marking should only be displayed on final question attempt #2796

Closed
cahirodoherty-learningpool opened this issue Jun 15, 2020 · 15 comments
Assignees

Comments

@cahirodoherty-learningpool
Copy link
Contributor

Subject of the enhancement

The Question component could benefit from a 'Display Final Marking Only' type setting

Your environment

  • FW5

Steps to reproduce

Create a course with Matching Question components with multiple question stems; each question having only 2 possible answers and the user has 2 attempts.

Expected behaviour

The component could be set to only display marking on the final attempt

Actual behaviour

After the first attempt, the marking is displayed, making it quite obvious to the user what the correct answers are for each Matching Question

@moloko
Copy link
Contributor

moloko commented Jun 16, 2020

I don't seem to be able to replicate this, am I missing something obvious?
image

Using FW v5.3.0 and Matching v4.0.0 it displays marking only on the final attempt, as expected... is it specific to a more recent FW version perhaps?

@oliverfoster
Copy link
Member

Weird. From the code it definitely adds the classes each time, which it definitely shouldn't.

QuestionView:onSubmitClicked
https://github.com/adaptlearning/adapt_framework/blob/master/src/core/js/views/questionView.js#L189

MatchingView:showMarking
https://github.com/adaptlearning/adapt-contrib-matching/blob/master/js/matchingView.js#L86

@moloko
Copy link
Contributor

moloko commented Jun 17, 2020

Ah OK yes IIRC it was adding the classes - but not displaying ticks/crosses. There must be something in the theme preventing ticks/crosses from being displayed until all attempts used up. We should definitely stop the classes from being added in the first place though.

@oliverfoster
Copy link
Member

oliverfoster commented Jun 17, 2020

I suspect something about the styling / version is a reason for it. I do remember a few clients telling us that their users were using the debugger to figure out from the marking classes what the correct / incorrect options are. This will at least help tackle that one at the same time.

@cahirodoherty-learningpool
Copy link
Contributor Author

Yeh I have just confirmed that with FW5 it is behaving as you say @moloko
Based on the conversation it probably does make sense for the code changes to go in to address any inspection cheating by end users

@cahirodoherty-learningpool cahirodoherty-learningpool changed the title Question component - Adding 'Display Final Marking Only' Question component - Marking should only be displayed on final question attempt Jun 17, 2020
@oliverfoster
Copy link
Member

oliverfoster commented Jun 22, 2020

There was one more on found in this vein.
image

It looks as though it's the template default. That should really only happen if after restoration the _isSubmitted: true. Although it is display: none so I'm not sure it makes much difference.
https://github.com/adaptlearning/adapt_framework/blob/master/src/core/templates/buttons.hbs#L3

@oliverfoster oliverfoster reopened this Jun 22, 2020
@moloko
Copy link
Contributor

moloko commented Jun 24, 2020

This change has created couple of issues for MCQs with more than one attempt:

  1. the can-show-marking class now doesn't get added to the component, ever. which is annoying if you were using that to add additional styling ;-)
  2. the green-circle-with-tick that should be displayed when you answer correctly doesn't get shown if you get it right first time

@moloko
Copy link
Contributor

moloko commented Jun 24, 2020

the second issue I think can be fixed by adding if (this.get('_isCorrect')) return true; here

@oliverfoster
Copy link
Member

That makes sense.

@moloko
Copy link
Contributor

moloko commented Jun 24, 2020

the first issue I thought I could fix by adding this.$el.addClass('can-show-marking'); inside of this if block BUT I can't see that questionview.refresh actually gets called unless the question is in an assessment...

Equally we could change this line back to (this.model.get('_canShowMarking') ? 'can-show-marking' : '') as - IIRC - the purpose of this class wasn't actually to do with showing marking, it was there mainly to indicate what settings in the model had been enabled (see #2606).

@oliverfoster
Copy link
Member

oliverfoster commented Jun 24, 2020

Just firing up a framework to have a go at it.

if (this.get('_isComplete')) return true;

Seems a little more robust if you don't mind?

I'll revert that line in className to this.model.get('_canShowMarking') from this.model.canShowMarking

@moloko
Copy link
Contributor

moloko commented Jun 24, 2020

Just firing up a framework to have a go at it.

if (this.get('_isComplete')) return true;

Seems a little more robust if you don't mind?

Not at all, presumably that would also mean these lines would then be redundant? And should it be _isComplete or would _isInteractionComplete be better?

I'll revert that line in className to this.model.get('_canShowMarking') from this.model.canShowMarking

yep, I think that leaves it consistent with how the can-show-model-answer and can-show-feedback classes are used i.e. they are added at the start to indicate that those settings are enabled.

or we update those so that they are only added when 'model answer should now be shown' and 'feedback now can be shown'... either way it should be consistent but I'm not 100% sure which is the best

@oliverfoster
Copy link
Member

yep, I think that leaves it consistent with how the can-show-model-answer and can-show-feedback classes are used i.e. they are added at the start to indicate that those settings are enabled.

I agree looking at it again. That was my fault I think.

@moloko
Copy link
Contributor

moloko commented Jun 24, 2020

@guywillis @kirsty-hames and any other styling folks, would it be easier from your point of view if these classes were always present - or were only added once marking/model answer/feedback should be shown?

@guywillis
Copy link
Contributor

yep, I think that leaves it consistent with how the can-show-model-answer and can-show-feedback classes are used i.e. they are added at the start to indicate that those settings are enabled.

On the whole yes, that is correct. It exposes configurable options as classes should they be required for styling purposes.

can-show-marking is currently being used to style full width buttons before submission depending on whether question marking is enabled or not.

Example: https://github.com/adaptlearning/adapt_framework/blob/master/src/core/less/core/button.less#L49
Issue: #2627

Potentially, I would say, there should be an additional class applied to differentiate between item marking and question marking. This ticket rightly identifies item marking as being the issue (as you can see which answers you got right / wrong on your first attempt) and so tying item marking display to whether a can-show-item-marking class is present would be preferred.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants