overhangio / openedx-scorm-xblock

SCORM XBlock for Open edX
GNU Affero General Public License v3.0
37 stars 46 forks source link

Does not implement ScorableXBlockMixin #51

Closed bryanlandia closed 7 months ago

bryanlandia commented 9 months ago

@regisb I'm running into some issues where the lesson_score is 1.0, success_status is passed, completion_status is completed, weight is 1 but grade on the XBlock remains 0. I've confirmed the weight is set to 1 and the problem/subsection is set to graded. Similar is occuring with other packages/XBlock instances from a specific SCORM package provider, but they have proven to me that other LMSes store grades for the same packages correctly.

I've noticed that ScorableXBlockMixin isn't included in the ScormXBlock class. Is there a reason for that?

I'm not seeing any grade reflected in Progress or on the StudentModule with this, and suspecting an issue with the lack of ScorableXBlockMixin:

XBlock instance scorm_data:

{'cmi.interactions.NaN.learner_response': 'NEED MORE INFORMATION', 'cmi.interactions.NaN.latency': 'PT0H0M55S', 'cmi.completion_status': 'completed', 'cmi.success_status': 'passed', 'cmi.score.max': '100', 'cmi.interactions.NaN.id': 'urn:nvglobal:insider_05bucketlist_7', 'cmi.exit': 'suspend', 'cmi.interactions.NaN.result': 'correct', 'cmi.session_time': 'PT0H2M50S', 'cmi.interactions.NaN.description': 'You can ask an organization insider about a possible change in their leadership.', 'cmi.score.scaled': '1', 'cmi.location': 'english,high,module_intro,scene_concl,concl_03cert', 'cmi.interactions.NaN.type': 'other', 'cmi.score.min': '0', 'cmi.score.raw': '100', 'cmi.suspend_data': 'bookmark%3Ec%2C5%2Cscene_media%3Bc%2C3%2Cscene_quiz%3Bc%2C8%2Cscene_click%3Bc%2C2%2Cscene_drag%3Bi%2C1%2Cscene_concl%3B%26completion_date%3E1697503643877%26elt_total_time%3E0000%3A05%3A00.00%26geolocation%3EAL%26score%3E100%26rubricStatus%3Ennnnnn%26os%3EMac%20OS%20XX%26browser%3EFirefox118%26complianceTypeID%3E%26complianceTypeName%3E'}

StudentModule:



{'modified': datetime.datetime(2023, 10, 17, 0, 47, 24, 584265, tzinfo=<UTC>), 'student_id': 2114, 'created': datetime.datetime(2023, 10, 17, 0, 31, 10, 902013, tzinfo=<UTC>), '_state': <django.db.models.base.ModelState object at 0x7fe84e925940>, 'done': 'na', 'max_grade': 1.0, 'module_type': 'scorm', 'module_state_key': BlockUsageLocator(CourseLocator('snowflake', 'LORA-BOX', 'A', None, None), 'scorm', '70b9b694af0540a99d7204b28806fb5f'), 'id': 44057541, 'state': '{"scorm_data": {"cmi.interactions.NaN.learner_response": "NEED MORE INFORMATION", "cmi.score.scaled": "1", "cmi.interactions.NaN.latency": "PT0H0M55S", "cmi.completion_status": "completed", "cmi.success_status": "passed", "cmi.score.max": "100", "cmi.interactions.NaN.id": "urn:nvglobal:insider_05bucketlist_7", "cmi.suspend_data": "bookmark%3Ec%2C5%2Cscene_media%3Bc%2C3%2Cscene_quiz%3Bc%2C8%2Cscene_click%3Bc%2C2%2Cscene_drag%3Bi%2C1%2Cscene_concl%3B%26completion_date%3E1697503643877%26elt_total_time%3E0000%3A05%3A00.00%26geolocation%3EAL%26score%3E100%26rubricStatus%3Ennnnnn%26os%3EMac%20OS%20XX%26browser%3EFirefox118%26complianceTypeID%3E%26complianceTypeName%3E", "cmi.session_time": "PT0H2M50S", "cmi.interactions.NaN.description": "You can ask an organization insider about a possible change in their leadership.", "cmi.exit": "suspend", "cmi.location": "english,high,module_intro,scene_concl,concl_03cert", "cmi.interactions.NaN.type": "other", "cmi.score.min": "0", "cmi.score.raw": "100", "cmi.interactions.NaN.result": "correct"}, "success_status": "passed", "lesson_score": 1.0, "lesson_status": "completed"}', 'grade': 0.0, 'course_id': CourseLocator('REDACTED', 'LORA-BOX', 'A', None, None)}```

It does look like the final set_value should have triggered a `runtime.publish` grade event, and I'm trying to track down what's going on.  I noticed that the XBlock doesn't have the xblock.scorable.ScorableXBlockMixin, so doesn't get a `rescore` method, or a `get_score` method, though ScormXBlock does have its own `set_score` 
bryanlandia commented 9 months ago

You'll notice some cmi.interactions.NaN.X which raised my suspicion at first due to the NaN, but I can't see why it's causing any issue with a grade being set and doesn't seem to cause any issue with overall package performance, and the package provider insists there are many implementers of the same packages in other LMSes with no grading issues.

regisb commented 9 months ago

Hi Bryan! Can you share with me the scorm package? You can send it by email, if necessary.

bryanlandia commented 7 months ago

Sorry for the very late followup on this! I've been mostly away from work for a while. I realized that the issue is not the lack of implementation of ScorableXBlockMixin but there are two issues which I will file separately. I'll close