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

Fg/featExploration ORA student reset assessment #7

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nandodev-net
Copy link

@nandodev-net nandodev-net commented Sep 20, 2023

Description

This PR is created in order to include a new feature that allows student to retry assessment for a configurable time period.

Changes

CMS

In this section, I will describe the workflow I went through to add a configuration variable in the ORA edit for the CMS.

  • Added the setting fields openassessment_retry_hours and openassessment_retry_minutes to the template:
    • openassessmentblock/edit/oa_edit_basic_settings_list.html

  • Set the following JS files in order to pass those context variables to backend:

    • openassessment/xblock/static/js/src/studio/oa_edit_settings.js
    • openassessment/xblock/static/js/src/studio/oa_edit.js
    • openassessment/xblock/static/js/src/oa_server.js
  • Set the following *.py backend scripts in order to store the context variables:

    • openassessment/xblock/utils/schema.py
    • openassessment/xblock/utils/xml.py
    • openassessment/xblock/apis/ora_config_api.py
    • openassessment/xblock/openassessmentblock.py
    • openassessment/xblock/studio_mixin.py

LMS

  • Added the optional 'retry' button rendering to the following templates:

    • openassessmentblock/peer/oa_peer_waiting.html
    • openassessmentblock/self/oa_self_assessment.html
    • openassessmentblock/staff/oa_staff_grade.html
    • openassessmentblock/student_training/student_training.html
  • Create the function retry_assessment_enable, witch is capable of determinate if the 'retry' button has to be showed to the student:

    • openassessment/xblock/utils/retry_assessment.py

  • Imported the retry_assessment_enable function and user_id as a context variable to our templates on the following legacy views in order to send them to their templates:
    • openassessment/xblock/ui_mixins/legacy/staff_assessments/views.py::staff_context()
    • openassessment/xblock/ui_mixins/legacy/self_assessments/views.py::self_context()
    • openassessment/xblock/ui_mixins/legacy/peer_assessments/views.py::peer_context()
    • openassessment/xblock/ui_mixins/legacy/student_training/views.py::training_context()

  • Connect the 'retry' button with the platform function reset_student_attempts()

  • .JS
    • openassessment/xblock/static/js/src/lms/oa_peer.js
    • openassessment/xblock/static/js/src/lms/oa_staff.js
    • openassessment/xblock/static/js/src/lms/oa_training.js
    • openassessment/xblock/static/js/src/lms/oa_self.js
    • openassessment/xblock/static/js/src/oa_server.js
  • .PY
    • openassessment/xblock/openassessmentblock.py

Testing

In order to test this feature, you have to go to the CMS site, create an ORA unit and click on edit.
Then go to settings, and set the Assessment Retry Max Time minutes and hours.

with the time set, you can go to the ORA assessment and verify the 'retry' button render.

After that, you can reset the assessment like this:

Test Cases

Assessment Retry Max Time

  • Assessment Retry Max Time mi =0 hours=0 does not render button.
  • Assessment Retry Max Time + submission_time > current_time does render button.
  • Assessment Retry Max Time + submission_time < current_time does not render button.

ORA Steps

  • Self Only: solve the question and reset in the Self step.
  • Peer Only: solve the question and reset in Peer waiting screen.
  • Staff Only: solve the question and reset in Staff waiting screen.
  • Self to Staff: solve the question and reset in Self step, repeat with Staff waiting screen.
  • Self to Peer: solve the question and reset in Training step, repeat with Self and Peer waiting screen.

@nandodev-net nandodev-net changed the title Fg/feat ora retry assessment (inProgress) Fg/featExploration ORA student reset assessment (inProgress) Sep 22, 2023
@nandodev-net nandodev-net marked this pull request as ready for review September 27, 2023 01:37
@nandodev-net nandodev-net requested review from BryanttV, mariajgrimaldi, a team, Ian2012 and johnvente and removed request for a team September 27, 2023 01:37
@nandodev-net nandodev-net changed the title Fg/featExploration ORA student reset assessment (inProgress) Fg/featExploration ORA student reset assessment Sep 27, 2023
@mariajgrimaldi mariajgrimaldi marked this pull request as draft September 27, 2023 11:27
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

Successfully merging this pull request may close these issues.

1 participant