apluslms / a-plus

A+ frontend portal - A+ LMS documentation:
https://apluslms.github.io/
Other
65 stars 72 forks source link

Deadline extensions interfere with API submissions to unrelated modules #1282

Open jsorva opened 10 months ago

jsorva commented 10 months ago

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:

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.

markkuriekkinen commented 10 months ago

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

oseppala commented 10 months ago

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.

jsorva commented 10 months ago

@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.

ihalaij1 commented 9 months ago

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.

jsorva commented 9 months ago

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.

ihalaij1 commented 9 months ago

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.