pesc-org / json-ld-transcript

Creating a machine readable, semantic PESC transcript
https://www.pesc.org/college-transcript.html
1 stars 0 forks source link

Proposed SCED Code Regular Expression #56

Closed philbarker closed 6 days ago

philbarker commented 2 weeks ago

Via @4pins :

The only thing that caught my eye below was that the element grade span can have characters as well as digits. For example, PK03 for a pre-K to 3rd grade art class or KG01 for a kindergarten through first grade music class (https://ceds.ed.gov/element/001480).

I would also caution that while what you have is precisely what is included in the SCED Code and SCED Identifier per the Forum (https://nces.ed.gov/forum/pub_2023087.asp), I’m sure Susan let you know that SCED was built to be flexible and every state has different implementations. The 5-digit SCED code is fairly standard, but even that is open to state modifications—particularly around the sequence element--and I don’t know of any state using the 12-character identifier precisely as the Forum has laid it out.

philbarker commented 2 weeks ago

Proposal: To address the first point: change the five "digit" code from ^\d{5}$ to ^[\dPKG]{5}$ in the Course Five Digit SCED Code and at the start of the Course SCED Code properties. This allows 5 characters which must be any digit or the letters P,K or G, so allows grade levels PK and KG mentioned in CEDS. This will also allow some codes that are invalid, e.g. with KP, GG and so on, but will catch other errors like "WRONG" and "VALID" :-) so it's better than just allowing any five characters. Note that the current regex also allowed nonsensical grade spans such as "grade 31 to 2" so this isn't any worse than what we have.

To address the second point we could raise a WARNING rather than an ERROR message for those that don't match. It's either that or don't validate it beyond allowing any 12 characters starting with the five character code. I suggest we start with a WARNING and if it proves to be problematic in practice we can loosen the validation rules.