mitodl / micromasters

Portal for learners and course teams to access MITx Micromasters® programs
https://mm.mit.edu
BSD 3-Clause "New" or "Revised" License
28 stars 16 forks source link

User who paid after "2nd date" wasn't give an exam authorization #5219

Closed pdpinch closed 1 year ago

pdpinch commented 1 year ago

Steps to Reproduce

  1. User paid for 14.100x on 2020-08-19, before the "first date." This made them eligble for 2 exam attempts.
  2. They made one attempt on 2021-09-17
  3. They had one attempt remaining on the "second date" of 1/13/2022
  4. They used up that attempt on 2022-01-31
  5. They made another payment on 2022-07-06

Expected Behavior

Actual Behavior

pdpinch commented 1 year ago

I don't think we're going to bother fixing this in MM, but I want to note the details so we can address them after migrating this data to mitxonline.

I'm going to manually grant this user an exam authorization, since it's clear that they paid for one.

See https://odl.zendesk.com/agent/tickets/131234

annagav commented 1 year ago

@pdpinch It looks like they used the second exam attempt after the "second date", which after this date their second attempt has expired (according to the code). So by the algorithm they were not supposed to have that second attempt anymore. Did the user get authorized for the exam manually? That would probably explain this scenario

pdpinch commented 1 year ago

@annagav that's right. I manually created an authorization on our about 8/18 for this user. (I can't retroactively give you access the ticket, but it's in there. I do wish I had left more details about how I did it though).

annagav commented 1 year ago

@pdpinch so for these users that had their authorizations done manually, would have to be handeled separetlly.

pdpinch commented 1 year ago

I only made that manual change to the data because the logic was behaving as I expected.

Can you confirm: 1) my expected behavior is correct? 2) if my expected behavior is correct, does the code follow that?

annagav commented 1 year ago

Yes, I think the expected behavior is reasonable, if we take into account that authorizations can created manually, when the user was supposed to get that attempt. But the algorithm does not take that into account. The algorithm thinks that the last attempt corresponds to the last payment, which were both made after the 2nd date, and there are no more attempts left.