edly-io / h5pxblock

Xblock which provides ability to play H5P content in open edX
MIT License
13 stars 23 forks source link

feat: add status updates for interactions in the student view #26

Closed mariajgrimaldi closed 11 months ago

mariajgrimaldi commented 11 months ago

Description

This PR adds new fields to inform students about their interaction status with the problem. Have they answered? What's their score? Since some H5P components do not explicitly show this.

We decided to use two states: Not attempted: the default Completed: when a student submits a problem, the status is updated to this one.

When the instructor cleans the student status, the state resets to Not attempted. Regarding the score, we're currently showing what the H5P content returns as raw score and max score. When the problem is not scored, then just the submission status is shown.

How to test

  1. Install this branch into your environment
  2. Use H5P in your course as specified in the README file: image
  3. Download some H5P problems, like true/false questions.
  4. Now, configure your content into your course. For this example I used the default values for the grading system.
  5. As a student, go into your course and complete the problem. Now, you'll see a text showing the state of the submission: image Where the max score is the one configured in the Studio Edit view. When the problem is not scored, then nothing is shown.
mariajgrimaldi commented 11 months ago

These changes conflict with https://github.com/edly-io/h5pxblock/pull/27 since we're using similar definitions. Depending on which is merged first, @Ian2012 and I will make the necessary changes to solve the conflicts. Thanks!

BryanttV commented 11 months ago

@mariajgrimaldi, When I try to delete a student's status I get the following error

  File "/openedx/edx-platform/lms/djangoapps/instructor/enrollment.py", line 382, in _fire_score_changed_for_block
    max_score = block.max_score()
TypeError: 'int' object is not callable

Apparently max_score is a method, and is being overwritten.

mariajgrimaldi commented 11 months ago

@BryanttV: thanks! Can you try again?

BryanttV commented 11 months ago

Now it works fine!

ziafazal commented 11 months ago

@mariajgrimaldi could you please rebase it with master?

mariajgrimaldi commented 11 months ago

Hi there folks @ziafazal @BryanttV: I made some changes according to the new commits in the master branch that affected this PR. I also updated the cover letter reflecting those. Could you check again? Thank you!

BryanttV commented 11 months ago

@mariajgrimaldi, By default, the score displayed is always (1.0/x.0), in this case: (1.0/100.0). Shouldn't the score be 0? image

mariajgrimaldi commented 11 months ago

@BryanttV: check again :)

BryanttV commented 11 months ago

@mariajgrimaldi, Perfect, LGTM!