Status Update
Comments
bl...@google.com <bl...@google.com> #2
ka...@gmail.com <ka...@gmail.com> #3
Fatal Exception: java.lang.VerifyError: Verifier rejected class okhttp3.internal.huc.OkHttpURLConnection: p1.f okhttp3.internal.huc.OkHttpURLConnection.d() failed to verify: p1.f okhttp3.internal.huc.OkHttpURLConnection.d(): [0x95] cannot access instance field q1.b0 p1.l0.n.e.b from object of type Unresolved Reference: p1.l0.n.f (declaration of 'okhttp3.internal.huc.OkHttpURLConnection' appears in /data/app/com......==/base.apk!classes3.dex)
at okhttp3.internal.huc.OkHttpsURLConnection.<init>(OkHttpsURLConnection.java:34)
at okhttp3.OkUrlFactory.open(OkUrlFactory.java:75)
at okhttp3.OkUrlFactory.open(OkUrlFactory.java:65)
at com.google.android.gms.internal.mlkit_entity_extraction.zzut.zza(zzut.java:1)
at com.google.android.gms.internal.mlkit_entity_extraction.zzus.zzf(zzus.java:3)
at com.google.android.gms.internal.mlkit_entity_extraction.zzus.zze(zzus.java:713)
at com.google.android.gms.internal.mlkit_entity_extraction.zzuo.run(zzuo.java:1)
at com.google.android.gms.internal.mlkit_entity_extraction.zzbad.run(zzbad.java:1)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
at java.lang.Thread.run(Thread.java:764)
ma...@google.com <ma...@google.com> #4
implementation('com.squareup.okhttp3:okhttp-urlconnection') {
version {
strictly '3.12.1'
}
}
qu...@getalma.com <qu...@getalma.com> #5
implementation("com.google.mlkit:entity-extraction:${deps.entityextraction}") {
exclude group: 'com.google.guava', module: 'listenablefuture'
exclude group: 'com.squareup.okhttp3', module: 'okhttp-urlconnection' // 3.12.1 is causing a crash as it references a now-removed class
}
implementation "com.squareup.okhttp3:okhttp-urlconnection:$deps.okhttp"
which leads to
% ./gradlew :app:dependencies | grep okhttp-urlconnection
+--- com.squareup.okhttp3:okhttp-urlconnection:4.9.1
ma...@google.com <ma...@google.com> #6
Created internal
vm...@hemetusd.org <vm...@hemetusd.org> #7
Entity Extraction released a new beta2 SDK which doesn't depend on okhttp-urlconnection anymore.
fi...@gymkk.cz <fi...@gymkk.cz> #8
However, I am not sure if there is some other situation when {} gets added to the `submissionHistory` as well and thus breaking this workaround. I did not encounter any other situation when this happens.
UPDATE: As noticed by 34...@gmail.com, marking solution as complete by the teacher also adds empty object which breaks this solution unfortunately.
34...@gmail.com <34...@gmail.com> #9
34...@gmail.com <34...@gmail.com> #10
ap...@ne-academy.net <ap...@ne-academy.net> #11
To revive it, I had ChatGPT look at this important issue, and effectively stumped it. Specifically, I gave it quite a bit of output from the log consisting of paired assignment/submission objects in JSON. I manually marked the EXCUSED entries and asked it to compare these to the unmarked ones to find patterns helpful for detecting excused assignments programmatically. I thought ChatGPT's (rather bleak) assessment was pretty spot on, so I'll share:
Short Answer: Unfortunately, Google Classroom’s API does not expose “Excused” in its returned data, even though Classroom’s front-end UI does let a teacher mark certain student assignments “Excused.” There is no separate field
excused
in the JSON you receive.Because of that, there’s no sure-fire pattern in the API data alone (e.g. grade = 0 or missing) that tells you “this was marked as Excused in Classroom.” The only way to see that directly is from the teacher’s perspective in the web UI, or by manually adding your own flag in any software you build around the Classroom API.
Why We Can’t Detect “Excused” from the Classroom API
- Google’s Docs Omit Excused The official Classroom API docs don’t mention any field to store or return an “Excused” status. The states we can see are things like
CREATED
,TURNED_IN
, orRETURNED
, plus numeric grades ordraftGrade
, but “Excused” never appears as a separate field.- No Hints in the JSON If you look over the raw JSON for each submission, you’ll notice no consistent or even hidden property that flips from false to true for “excused.” Some submissions have no grades, others do. Some are turned in, others aren’t—none of it correlates reliably to “excused.”
- Google’s UI vs. Under-the-Hood The Classroom GUI is effectively toggling an internal “excused” marker that Google does not share in the public API. This is similar to how some SIS features in Classroom do not appear in the standard data feed.
Bottom Line
Right now, the official Classroom API simply does not expose the “Excused” status. Your only options are to keep tagging “excused” in your own records—or file a feature request with Google to add it to the Classroom API. But there is no built-in field or pattern in the raw submission JSON that reveals whether a teacher checked the “Excused” box in the Classroom web interface.`
My bottom line: Seems like a pretty simple solution to add a boolean attribute to the submission object called Excused
.
Description
Before opening a new issue, please search for other related issues , click the ★ to subscribe to updates, and click
+1
to vote.Description
The Submission History field is a logical place to look for this information, but it does not have an EXCUSED type. Upon excusing a submission, the corresponding
gradeChangeType
isDRAFT_GRADE_POINTS_EARNED_CHANGE
, which is also impossible to distinguish from real draft grade changes.Impact
Any programs that use this API to get a snapshot of a students' grades will be unable to determine if a submission is excused or if it's a grade of 0.