Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect number of release tokens #6

Open
VoiceActorMan opened this issue Oct 7, 2014 · 11 comments · May be fixed by #15
Open

Incorrect number of release tokens #6

VoiceActorMan opened this issue Oct 7, 2014 · 11 comments · May be fixed by #15

Comments

@VoiceActorMan
Copy link

I'm currently in CS246. On the main page for submissions, it says I have 3 release tokens for A2Q4b, but there is actually only 1.

@lishid
Copy link
Owner

lishid commented Oct 7, 2014

Could you post a copy (use pastebin or github gist) of the html of your A2Q4b latest submission test result page, and a print-screen of your A2Q4b's submission list page?

Thanks!

@karlding
Copy link

It looks like the issue occurs when there's less than 3 release tokens in total.

The script assumes that some tokens were spent (checking for less than 3 tokens), and then tries to match for when the other tokens will regen. Since there aren't any tokens to regen, that regex returns null, and so an error occurs. Thus the cell is set to 3 in the catch statement.

Checking for null, before accessing properties would be a quick fix, but the script shouldn't assume 3 release tokens.

@lishid
Copy link
Owner

lishid commented Oct 19, 2015

@karlding it's been quite a while, but I remember the reason why we assumed it was 3 when we couldn't match anything is that some classes don't show any token information when you did not use any. Thus we kinda assumed the default (3).

Nobody has sent us HTML copies of their page showing 2 tokens, so if there was some kind of exceptions to the case, we couldn't have figured it out as none of our classes are exception to the rule.

Would you have the HTML of a page with less than 3 tokens, when our dashboard shows 3?

@karlding
Copy link

Yep! Here's a Gist of an example of a page with only 1 default token.

I was testing out some changes on my branch earlier today, which I think should fix the issue. I'll submit a pull request later, if you'd like?

@lishid
Copy link
Owner

lishid commented Oct 19, 2015

Ah I see, so it seems that the regex for finding next token availability failed (because there was no string for it), which is causing the catch to fire.

Have you tested the case where the page does not say anything about release tokens? Some courses does that where if you have all 3 tokens unused, there won't be a string for release tokens. If you write N/A, could that be confusing to some people?

@karlding
Copy link

Do you have an example of a page where this is the case? Well, I guess the same argument could be made about both false positives and false negatives.

Right now, if the due date for an assignment has passed, I believe the page will not contain the release tokens string (since there are no release tokens available), but the script will incorrectly display that there are 3 release tokens available.

@lishid
Copy link
Owner

lishid commented Oct 20, 2015

You can usually submit for testing after assignment due dates. I can still
release-test courses I took almost two years ago! It will also use one of
the tokens, though profs usually take the highest score (or latest
submission) before the due date/time.

I haven't been using Marmoset as the profs in 3rd year courses rarely use
it for testing, but you can probably take a look at an assignment of your
own that should still have 3 tokens left. Last I remember, it does not show
the string "You currently have ..." until you used the first token.

On Tue, Oct 20, 2015 at 1:47 AM, karlding [email protected] wrote:

Do you have an example of a page where this is the case? Well, I guess the
same argument could be made about both false positives and false negatives.

Right now, if the due date for an assignment has passed, I believe the
page will not contain the release tokens string (since there are no release
tokens available), but the script will incorrectly display that there are 3
release tokens available.


Reply to this email directly or view it on GitHub
#6 (comment).

@lishid
Copy link
Owner

lishid commented Oct 20, 2015

Hmm I was wrong! It depends on the course. I can see some of my courses displaying 3 tokens available.

@lishid
Copy link
Owner

lishid commented Oct 20, 2015

Hmm, if can't remember the details then, I only remember that there was a specific case where the string was not found, but the student should still have 3/3 tokens...

@karlding
Copy link

Were you referring to the case when there hasn't been any submissions yet?

@lishid
Copy link
Owner

lishid commented Oct 24, 2015

That also happened, though I think there was some other weird case for the submission page to now show the string.

BrandonXLF added a commit to BrandonXLF/MarmoUI that referenced this issue Feb 10, 2024
@BrandonXLF BrandonXLF linked a pull request Feb 10, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants