a-plus icon indicating copy to clipboard operation
a-plus copied to clipboard

Deadline extensions interfere with API submissions to unrelated modules

Open jsorva opened this issue 2 years ago • 6 comments

We have (at least) two documented cases where a student has been given a personal deadline extension to a module, but the student has then been unable to submit assignments to a subsequent module. By “documented”, I mean that the students have complained very similarly about the symptoms; we haven’t been able to replicate the issue artificially.

Specifics:

  • Submissions through the web interface work fine. But the A+ API (used via the IntelliJ plugin) does not grant the student access.
  • Here’s one student who was given a DL extension for Week 1 and Week 2, and was then unable to submit Week 3 assignments on schedule via the API: https://plus.cs.aalto.fi/o1/2023/teachers/participants/30359
  • And here’s one student who was given a DL extension for Week 4, and is currently unable to submit Week 5 assignments on schedule via the API: https://plus.cs.aalto.fi/o1/2023/teachers/participants/31290

Now, I’m not certain if this is an A+ bug or if it could have something to do with the IntelliJ plugin that our students use to submit via the API. But the symptoms somewhat suggest an A+ issue... and here’s another interesting detail:

Both of those students’ Points pages (linked above) feature the display bug documented here: https://github.com/apluslms/a-plus/issues/1276. So, those pages don’t actually show that the students have extensions. (They do have extensions, though, as you can verify here, if you’re lucky enough to get this page to load: https://plus.cs.aalto.fi/o1/2023/teachers/deadline-deviations/ ) This seems potentially relevant, but I’m not sure what the connection is, if there is one.

jsorva avatar Oct 09 '23 15:10 jsorva

One thing to check is the cache and outdated/stale cached data just like in #1276.

markkuriekkinen avatar Oct 10 '23 15:10 markkuriekkinen

I encountered this bug yesterday with a student. The student was registered on the course and had a correct token. Other students were able to submit normally. the student also was able to submit exercises through the web interface. This student had an active deadline extension for chapter N and was unable to retrieve the list of submittable exercises for chapter N+1 using the IntelliJ plugin.

Judging by the IJ plugin logs the plugin received a non-success status code from A-plus when requesting a list of submittable exercises through the API. I requested the student to check the situation after the deadline deviation passed (which was 1.5 hours from when I was shown the problem) . The student reported that everything worked correctly after the deviation passed.

oseppala avatar Oct 28 '23 13:10 oseppala

@Mankro @oseppala We have had a few more cases of this bug happening in the last few days. It’s very confusing for students.

Today, Otto and I checked the case that Otto mentioned above, and that student also had the https://github.com/apluslms/a-plus/issues/1276 symptom: no mention of the extensions on their Points page even though the extensions were in place.

Another student that I just chatted with has the same problem — API submissions not working for the current module. However, for this student, https://github.com/apluslms/a-plus/issues/1276 does not apply: their extension to the previous module is visible on their Points page, but they are (according to their report, which I have no reason to doubt) unable to submit via the API.

jsorva avatar Oct 30 '23 22:10 jsorva

I looked into this, but was unable to reproduce the problem in my local development environment. I also looked at the cache code, but couldn't spot any obvious issues there.

We have some large cache changes still pending, so if the problem is indeed related to the cache, it might get "accidentally" fixed in the near future, when those changes go live.

ihalaij1 avatar Nov 09 '23 12:11 ihalaij1

We have some large cache changes still pending, so if the problem is indeed related to the cache, it might get "accidentally" fixed in the near future, when those changes go live.

OK, I hope so! This is continuing to affect some students.

jsorva avatar Nov 09 '23 13:11 jsorva

Perhaps related, the unit tests in master branch just failed due to:

FAIL [0.003s]: test_nested_transaction (lib.cache.tests.TransactionTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.8/unittest/mock.py", line 1325, in patched
    return func(*newargs, **newkeywargs)
  File "/home/runner/work/a-plus/a-plus/lib/cache/tests.py", line 130, in test_nested_transaction
    self.assertEqual(newer._generated_on, newer4._generated_on)
AssertionError: 1700139474.686161 != 1700139474.556264

The latest changes do not contain any changes that should cause this.

ihalaij1 avatar Nov 16 '23 13:11 ihalaij1

@jsorva . The cache was changed after this issue was opened. Have you encountered this issue again over the past year?

mikaelGusse avatar Apr 22 '25 10:04 mikaelGusse

No, I don’t recall seeing this recently. Perhaps the problem has gone away.

jsorva avatar Apr 22 '25 10:04 jsorva

Thanks! I'll close this issue then. If you encounter this again then we can open this issue again.

mikaelGusse avatar Apr 23 '25 09:04 mikaelGusse