Skip to content

Commit

Permalink
feat: update initialize endpoint and create assessments/feedback
Browse files Browse the repository at this point in the history
…endpoint in ORA Staff Grader (#2101)

* feat: endpoint /api/ora_staff_grader/initialize upgraded to add more user data
* feat: generate_assessment_data handlers added to fetch assessments given to and from a given user for a given submission
* build: bumps version to 6.1.0
  • Loading branch information
BryanttV authored Feb 20, 2024
1 parent 7ab3312 commit 235ff51
Show file tree
Hide file tree
Showing 15 changed files with 1,061 additions and 123 deletions.
2 changes: 1 addition & 1 deletion openassessment/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
Initialization Information for Open Assessment Module
"""

__version__ = '6.0.34'
__version__ = '6.1.0'
20 changes: 20 additions & 0 deletions openassessment/assessment/score_type_constants.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,25 @@
""" Constant strings used to identify what type of score an Assessment is. Used in the 'score_type' field """

from django.utils.translation import gettext as _

PEER_TYPE = "PE"
SELF_TYPE = "SE"
STAFF_TYPE = "ST"


def score_type_to_string(score_type: str) -> str:
"""
Converts the given score type into its string representation.
Args:
score_type (str): System representation of the score type.
Returns:
(str) Representation of score_type as needed in Staff Grader Template.
"""
SCORE_TYPE_MAP = {
PEER_TYPE: _("Peer"),
SELF_TYPE: _("Self"),
STAFF_TYPE: _("Staff"),
}
return SCORE_TYPE_MAP.get(score_type, _("Unknown"))
128 changes: 71 additions & 57 deletions openassessment/conf/locale/en/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: edx-ora2\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-02-08 13:43+0000\n"
"POT-Creation-Date: 2024-02-16 19:47-0500\n"
"PO-Revision-Date: 2014-06-04 15:41-0400\n"
"Last-Translator: Muhammad Ayub khan <[email protected]>\n"
"Language-Team: openedx-translation <[email protected]>\n"
Expand Down Expand Up @@ -49,99 +49,120 @@ msgstr ""
msgid "Example {example_number} is missing an option for \"{criterion_name}\""
msgstr ""

#: data.py:534
#: assessment/score_type_constants.py:21 xblock/grade_mixin.py:524
msgid "Peer"
msgstr ""

#: assessment/score_type_constants.py:22
msgid "Self"
msgstr ""

#: assessment/score_type_constants.py:23
msgid "Staff"
msgstr ""

#: assessment/score_type_constants.py:25
msgid "Unknown"
msgstr ""

#: data.py:584
#, python-brace-format
msgid "Criterion {number}: {label}"
msgstr ""

#: data.py:536
#: data.py:586
#, python-brace-format
msgid "Points {number}"
msgstr ""

#: data.py:537
#: data.py:587
#, python-brace-format
msgid "Median Score {number}"
msgstr ""

#: data.py:538
#: data.py:588
#, python-brace-format
msgid "Feedback {number}"
msgstr ""

#: data.py:867
#: data.py:917
msgid "Item ID"
msgstr ""

#: data.py:868
#: data.py:918
msgid "Submission ID"
msgstr ""

#: data.py:880
#: data.py:930
msgid "Anonymized Student ID"
msgstr ""

#: data.py:911
#: data.py:961
msgid "Assessment ID"
msgstr ""

#: data.py:912
#: data.py:962
msgid "Assessment Scored Date"
msgstr ""

#: data.py:913
#: data.py:963
msgid "Assessment Scored Time"
msgstr ""

#: data.py:914
#: data.py:964
msgid "Assessment Type"
msgstr ""

#: data.py:915
#: data.py:965
msgid "Anonymous Scorer Id"
msgstr ""

#: data.py:917
#: data.py:967
#: templates/legacy/staff_area/oa_student_info_assessment_detail.html:59
msgid "Overall Feedback"
msgstr ""

#: data.py:918
#: data.py:968
msgid "Assessment Score Earned"
msgstr ""

#: data.py:919
#: data.py:969
msgid "Assessment Scored At"
msgstr ""

#: data.py:920
#: data.py:970
msgid "Date/Time Final Score Given"
msgstr ""

#: data.py:921
#: data.py:971
msgid "Final Score Earned"
msgstr ""

#: data.py:922
#: data.py:972
msgid "Final Score Possible"
msgstr ""

#: data.py:923
#: data.py:973
msgid "Feedback Statements Selected"
msgstr ""

#: data.py:924
#: data.py:974
msgid "Feedback on Assessment"
msgstr ""

#: data.py:926
#: data.py:976
msgid "Response Files"
msgstr ""

#: data.py:1317
#: data.py:1367
msgid "No description provided."
msgstr ""

#: data.py:1625 templates/legacy/edit/oa_edit_criterion.html:54
#: xblock/studio_mixin.py:57
msgid "None"
msgstr ""

#: templates/legacy/edit/oa_edit.html:28
msgid "Save"
msgstr ""
Expand Down Expand Up @@ -343,10 +364,6 @@ msgstr ""
msgid "Feedback for This Criterion"
msgstr ""

#: templates/legacy/edit/oa_edit_criterion.html:54 xblock/studio_mixin.py:57
msgid "None"
msgstr ""

#: templates/legacy/edit/oa_edit_criterion.html:55 xblock/studio_mixin.py:56
msgid "Optional"
msgstr ""
Expand Down Expand Up @@ -1075,8 +1092,8 @@ msgstr ""
msgid ""
"\n"
" This is a team assignment for team-set \"%(teamset_name)s\".\n"
" You are currently not on a team in team-set \"%(teamset_name)s"
"\".\n"
" You are currently not on a team in team-set "
"\"%(teamset_name)s\".\n"
" You must be on a team in team-set \"%(teamset_name)s\" to access "
"this team assignment.\n"
" "
Expand Down Expand Up @@ -1176,8 +1193,8 @@ msgid ""
"\n"
" <span id=\"oa_step_deadline_peer\" class=\"date ora-datetime\" "
"data-datetime=\"%(start_date)s\" data-string=\"available {date} (in "
"%(time_until)s)\" data-timezone=\"%(user_timezone)s\" data-language="
"\"%(user_language)s\"></span>\n"
"%(time_until)s)\" data-timezone=\"%(user_timezone)s\" data-"
"language=\"%(user_language)s\"></span>\n"
" "
msgstr ""

Expand All @@ -1188,8 +1205,8 @@ msgid ""
"\n"
" <span id=\"oa_step_deadline_peer\" class=\"date ora-datetime\" "
"data-datetime=\"%(due_date)s\" data-string=\"due {date} (in "
"%(time_until)s)\" data-timezone=\"%(user_timezone)s\" data-language="
"\"%(user_language)s\"></span>\n"
"%(time_until)s)\" data-timezone=\"%(user_timezone)s\" data-"
"language=\"%(user_language)s\"></span>\n"
" "
msgstr ""

Expand Down Expand Up @@ -1313,10 +1330,10 @@ msgstr ""
#, python-format, python-brace-format
msgid ""
"\n"
" <span id=\"oa_step_deadline_response\" class=\"date ora-datetime"
"\" data-datetime=\"%(start_date)s\" data-string=\"available {date} (in "
"%(time_until)s)\" data-timezone=\"%(user_timezone)s\" data-language="
"\"%(user_language)s\"></span>\n"
" <span id=\"oa_step_deadline_response\" class=\"date ora-"
"datetime\" data-datetime=\"%(start_date)s\" data-string=\"available {date} "
"(in %(time_until)s)\" data-timezone=\"%(user_timezone)s\" data-"
"language=\"%(user_language)s\"></span>\n"
" "
msgstr ""

Expand All @@ -1325,10 +1342,10 @@ msgstr ""
#, python-format, python-brace-format
msgid ""
"\n"
" <span id=\"oa_step_deadline_response\" class=\"date ora-datetime"
"\" data-datetime=\"%(due_date)s\" data-string=\"due {date} (in "
"%(time_until)s)\" data-timezone=\"%(user_timezone)s\" data-language="
"\"%(user_language)s\"></span>\n"
" <span id=\"oa_step_deadline_response\" class=\"date ora-"
"datetime\" data-datetime=\"%(due_date)s\" data-string=\"due {date} (in "
"%(time_until)s)\" data-timezone=\"%(user_timezone)s\" data-"
"language=\"%(user_language)s\"></span>\n"
" "
msgstr ""

Expand Down Expand Up @@ -1553,8 +1570,9 @@ msgstr ""
#: templates/legacy/response/oa_response.html:314
msgid ""
"\n"
" Learn more about team assignments here: (<a target=\"_blank"
"\" href=\"https://support.edx.org/hc/en-us/articles/360000191067-Submit-your-"
" Learn more about team assignments here: (<a "
"target=\"_blank\" href=\"https://support.edx.org/hc/en-us/"
"articles/360000191067-Submit-your-"
"response#h_01FVD8SXM9E5H2DNAG87X25ZHR\">link</a>)\n"
" "
msgstr ""
Expand Down Expand Up @@ -1690,10 +1708,10 @@ msgstr ""
#, python-format, python-brace-format
msgid ""
"\n"
" <span id=\"oa_step_deadline_self\" class=\"date ora-datetime"
"\" data-datetime=\"%(start_date)s\" data-string=\"available {date} (in "
"%(time_until)s)\" data-timezone=\"%(user_timezone)s\" data-language="
"\"%(user_language)s\"></span>\n"
" <span id=\"oa_step_deadline_self\" class=\"date ora-"
"datetime\" data-datetime=\"%(start_date)s\" data-string=\"available {date} "
"(in %(time_until)s)\" data-timezone=\"%(user_timezone)s\" data-"
"language=\"%(user_language)s\"></span>\n"
" "
msgstr ""

Expand All @@ -1702,10 +1720,10 @@ msgstr ""
#, python-format, python-brace-format
msgid ""
"\n"
" <span id=\"oa_step_deadline_self\" class=\"date ora-datetime"
"\" data-datetime=\"%(due_date)s\" data-string=\"due {date} (in "
"%(time_until)s)\" data-timezone=\"%(user_timezone)s\" data-language="
"\"%(user_language)s\"></span>\n"
" <span id=\"oa_step_deadline_self\" class=\"date ora-"
"datetime\" data-datetime=\"%(due_date)s\" data-string=\"due {date} (in "
"%(time_until)s)\" data-timezone=\"%(user_timezone)s\" data-"
"language=\"%(user_language)s\"></span>\n"
" "
msgstr ""

Expand Down Expand Up @@ -2122,8 +2140,8 @@ msgid ""
"\n"
" <span id=\"oa_step_deadline\" class=\"date ora-datetime\" data-"
"datetime=\"%(start_date)s\" data-string=\"available {date} (in "
"%(time_until)s)\" data-timezone=\"%(user_timezone)s\" data-language="
"\"%(user_language)s\"></span>\n"
"%(time_until)s)\" data-timezone=\"%(user_timezone)s\" data-"
"language=\"%(user_language)s\"></span>\n"
" "
msgstr ""

Expand Down Expand Up @@ -2260,10 +2278,6 @@ msgstr ""
msgid "Waiting for peer reviews"
msgstr ""

#: xblock/grade_mixin.py:524
msgid "Peer"
msgstr ""

#: xblock/grade_mixin.py:655
msgid "The grade for this problem is determined by your Staff Grade."
msgstr ""
Expand Down
Loading

0 comments on commit 235ff51

Please sign in to comment.