Aalto-LeTech / aplus-courses

A+ Courses is a plugin for IntelliJ IDEA, used in programming courses at Aalto University
https://plugins.jetbrains.com/plugin/13634-a-courses
MIT License
17 stars 6 forks source link

Status of pending submissions shouldn't be 0 points #410

Closed OlliKiljunen closed 3 years ago

OlliKiljunen commented 4 years ago

Pending submission results currently shows something like 0/10 points -- bad! Should show "In grading" or something.

Possible solution (pseudocode):

String getStatusText() {
...
if (status == unknown) {
  return "In grading"
}
...
}
StanislavFranko commented 4 years ago

Is this issue available? I'd like to work on this

nikke234 commented 4 years ago

Hi! Yes it is. Feel free to ask questions if you need any help or clarification.

StanislavFranko commented 4 years ago

Can you instruct me how to reproduce this issue? I'd like to see what's the current state. Screen would suffice.

OlliKiljunen commented 4 years ago

The plugin is currently in use only in this open-for-all university course / MOOC: https://plus.cs.aalto.fi/o1/2020/ (provided by Aalto University, Finland). Are you taking that course? Because if you're not, the first step would be to enroll to the course (the only practical way to test the plugin currently).

TESTING.md contains instructions on how to test the plugin. You don't have to do all the steps (in particular, you can skip all REPL related stuff without hesitation). Sections 9, 10 and 11 are related to this issue. In 11.2, you see a screenshot of an assignment with 0/5 points. Currently, it shows 0/5 points also while grading is in progress. So, instead, it should show "In grading" until the grading is completed (as long as the status of the submission is "unknown").

OlliKiljunen commented 4 years ago

@StanislavFranko Hi! Are you working on this issue? Any problems with it? Just checking status of this.

StanislavFranko commented 4 years ago

Hello @OlliKiljunen! Yes I am. Thanks for asking. I'm having a bit of trouble finding the desired files but soon, I hope to create a pull request. About the course: Is it a problem if I'm not a student of Aalto University? I'm student at Technical University of Kosice, Slovakia. I saw "log in" button but couldn't find a way to register, therefore I can't test it at the moment.

OlliKiljunen commented 4 years ago

Great to hear of you!

The course is open for all, not only Aalto university students. You need a Google account to login into A+ learning system. Once you have logged in with your Google account, navigate to the course page of Programming 1 course (a.k.a Ohjelmointi 1 or simply O1). On the top of that page, there's Enroll button. To finish the enrolment, you have to fill a short questionnaire form.

(Another option is that you email your Gmail address to me, olli.kiljunen (at) aalto.fi, after you have once logged in to A+ with it, so we can add you manually to the course. That way, you don't have to fill the questionnaire, but honestly, it will not take that long if you do.)

nikke234 commented 4 years ago

Once you have enrolled, launched IntelliJ IDEA with the plugin, created a course project, and set the A+ token per the instructions in TESTING.md, the issue can be reproduced as follows:

  1. From the assignments list make a submission to an assignment.
  2. Afterwards immediately refresh the assignments list and look for the assignment
  3. The assignment will now list one new submission, but it will show 0 points instead of "In grading".

To fix the issue, the getStatusText method in SubmissionResultViewModel should be fixed such that if getModel().getStatus() == SubmissionResult.Status.UNKNOWN, then the method returns "In grading".