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

feat: ORA staff grader endpoints upgraded #298

Closed

Conversation

nandodev-net
Copy link

@nandodev-net nandodev-net commented Oct 18, 2023

ORA staff grader endpoints upgrade

For this PR we have the following goals:

  • Create the /api/ora_staff_grader/assessments/feedback endpoint in order to list the assessments grades based on the type (received or given) for a specific submission.
  • Update the /api/ora_staff_grader/initialize endpoint in order to add the fullname and email fields.

Descriptions

/api/ora_staff_grader/assessments/feedback

This endpoint fetches assessment details for a given submission UUID, assessment_fillter [given, received] and ORA_location, including scorer information and scoring details in order to fill the following Staff Grade MFE table:

Descripción alternativa 1

edx-ora2

  • openassessment/staffgrader/staff_grader_mixin.py
  • openassessment/data.py

edx-platform

  • lms/djangoapps/ora_staff_grader/constants.py
  • lms/djangoapps/ora_staff_grader/ora_api.py
  • lms/djangoapps/ora_staff_grader/serializers.py
  • lms/djangoapps/ora_staff_grader/urls.py
  • lms/djangoapps/ora_staff_grader/views.py
Click here! to see `/api/ora_staff_grader/assessments/feedback` output
  {
      "assessments": [
          {
              "id_assessment": "17",
              "scorer_name": "Fernando Gonzalez",
              "scorer_username": "admin",
              "scorer_email": "[email protected]",
              "assesment_date": "17-10-2023",
              "assesment_scores": [
                  {
                      "criterion_name": "Ideas",
                      "score_earned": 5,
                      "score_type": "Good"
                  },
                  {
                      "criterion_name": "Content",
                      "score_earned": 5,
                      "score_type": "Excellent"
                  }
              ],
              "problem_step": "Staff",
              "feedback": "OVERALL WENO"
          },
      ]
  }

 

 

/api/ora_staff_grader/initialize

This is a pre-existing endpoint to which two extra fields are added [fullname, email].

Descripción alternativa 2

Modifications were made in the following directories:

edx-ora2

  • /openassessment/staffgrader/tests/test_list_staff_workflows.py
  • openassessment/staffgrader/serializers/submission_list.py
  • openassessment/staffgrader/staff_grader_mixin.py
  • openassessment/data.py

edx-platform

  • lms/djangoapps/ora_staff_grader/serializers.py
Click here! to see `/api/ora_staff_grader/initialize` output
...
...
    "submissions": {
        "619b8fb2-ebc0-49ed-9b35-4700efb28f66": {
            "submissionUUID": "619b8fb2-ebc0-49ed-9b35-4700efb28f66",
            "username": "admin",
            "email": "[email protected]",
            "fullname": "Fernando Gonzalez",
            "teamName": null,
            "dateSubmitted": "2023-10-13 15:36:13.781179+00:00",
            "dateGraded": "2023-10-17 20:26:07.146547+00:00",
            "gradedBy": "admin",
            "gradeStatus": "graded",
            "lockStatus": "unlocked",
            "score": {
                "pointsEarned": 10,
                "pointsPossible": 10
            }
        }
    },

 

 

This upgrade will consist of two PRs: one for ORA and the other for edx-platform. This is because the main serializer of the service resides in the platform. To test it, you'll need to fetch and set up the version of the platform with the serializer modification.

awais-ansari and others added 30 commits July 11, 2023 12:21
* feat: add non_editable for core notifications

* test: add test case for non_editable in core notification

* refactor: remove breakpoint from test cases
* fix: hide title for mobile users in program dashboard

* fix: fix subscription trial remaining days logic
* chore: Adding pin to avoid test failures.
…nedx#32665)

* feat: update user pref while sending notifications

* feat: added flag and bulk create in task
* Revert "Revert "fix: mathjax resize on sindow resize (openedx#32606)""

This reverts commit 9dac65a.

* fix: mathjax wrap overflow and flickering
* feat: added logic to handle core notifications
This adds the ability to get a list of detailed courses based on their
keys provided in the newly added `keys` query param in the `GET /courses/v1/courses/`
endpoint.
To make edx-platform more consistent with other IDAs and to
help deprecate more of paver, we are adding the ability to
run `make migrate` in a local environment as a replacement
for `paver update_db`.

openedx-unsupported/devstack#1085
This gives us the abuliity to add some nice responsive web components to
our docs. In particular girds and cards.
The guides map pretty closely to the concept docs in diataxis so rename
them as such to align to the standard naming we're moving to.
There is still a lot of improvements that could be made to make the
generated docs better organized.  However, before this change we were
generating the docs but they weren't in the doc tree so you couldn't
actually browse to them.  So we fix that first so that we can start
getting feedback about how to organize them.
Some doc buildig deps were in development.in explicitly while others
weren't.  Update development.in to pull in doc.txt and then remove
direct additions of the doc requirements from development.in
…urses-details-by-key

feat: list courses details by keys
* feat: add new entitlements expiration endpoint
We are still seeing issues running devstack provisioning
of LMS because it's missing pkg-config. We believe this might
be the location we need to add the package to.
Copy link
Member

@Ian2012 Ian2012 left a comment

Choose a reason for hiding this comment

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

Nice work, I just left some comments for some conventions.

Can you leave more context on the cover letter why is this needed?

Comment on lines 191 to 193
except Exception as ex:
log.exception(ex)
return UnknownErrorResponse()
Copy link
Member

Choose a reason for hiding this comment

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

This is a too-broad exception, can you explain in which cases was this triggered?

#init_data["assessments"] = TEST

response_data = FeedbackSerializer(init_data).data
log.info(response_data)
Copy link
Member

Choose a reason for hiding this comment

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

Is this log statement needed?

Comment on lines 177 to 178
# Get list of submissions for this ORA
init_data["assessments"] = get_assessments_grades(request, ora_location, submission_uuid, assessment_type)
Copy link
Member

Choose a reason for hiding this comment

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

I imagine this is the function that triggers the exception, can you cover only this statement in the try-except statement?

lms/djangoapps/ora_staff_grader/urls.py Outdated Show resolved Hide resolved
@nandodev-net nandodev-net changed the title feat: generate assessment data handler created feat: ORA staff grader endpoints upgraded Oct 23, 2023
Comment on lines 172 to 174
criterion_name = serializers.CharField()
score_earned = serializers.IntegerField()
score_type = serializers.CharField()
Copy link
Member

@mariajgrimaldi mariajgrimaldi Oct 23, 2023

Choose a reason for hiding this comment

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

could any of these fields be optional or they're always present?

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.