Skip to content

Commit

Permalink
Merge pull request #1913 from NYPL-Simplified/NOREF-5th-grade-update
Browse files Browse the repository at this point in the history
NOREF Move 5th grade to early grades category
  • Loading branch information
mwbenowitz authored Dec 6, 2023
2 parents ca033a1 + 509e1cb commit 8fb105b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
7 changes: 3 additions & 4 deletions api/clever/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@
"1": "E",
"2": "E",
"3": "E",
"4": "E", # Middle
"5": "M",
"6": "M",
"4": "E",
"5": "E",
"6": "M", # Middle
"7": "M",
"8": "M",
"9": "H", # High
Expand All @@ -72,7 +72,6 @@
"Ungraded": None,
}


def external_type_from_clever_grade(grade):
"""Maps a 'grade' value returned by the Clever API for student users to an external_type"""
return CLEVER_GRADE_TO_EXTERNAL_TYPE_MAP.get(grade, None)
Expand Down
5 changes: 3 additions & 2 deletions tests/clever/test_clever.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,12 @@ def test_external_type_from_clever_grade(self):
THEN: The matching external_type value should be returned, or None if the match fails
"""
for e_grade in [
"InfantToddler", "Preschool", "PreKindergarten", "TransitionalKindergarten", "Kindergarten", "1", "2", "3", "4"
"InfantToddler", "Preschool", "PreKindergarten", "TransitionalKindergarten",
"Kindergarten", "1", "2", "3", "4", "5"
]:
assert external_type_from_clever_grade(e_grade) == "E"

for m_grade in ["5", "6", "7", "8"]:
for m_grade in ["6", "7", "8"]:
assert external_type_from_clever_grade(m_grade) == "M"

for h_grade in ["9", "10", "11", "12", "13", "PostGraduate"]:
Expand Down

0 comments on commit 8fb105b

Please sign in to comment.