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

WD-2173 fix exam statuses #13988

Merged
merged 3 commits into from
Jun 26, 2024
Merged

Conversation

usamabinnadeem-10
Copy link
Contributor

@usamabinnadeem-10 usamabinnadeem-10 commented Jun 25, 2024

Done

  • Surface true exam statuses in credentials/your-exams

QA

  • Check out this feature branch
  • Run the site using the command ./run serve or dotrun
  • View the site locally in your web browser at: http://0.0.0.0:8001/
    • Be sure to test on mobile, tablet and desktop screen sizes
  • Buy an exam and schedule it
    • It should show Scheduled status with Reschedule button
  • When you are at most 30 minutes from exam but haven't started yet
    • It should show Ready to be taken with Take Exam button
  • When you start exam and during exam it should show In Progress with Continue exam button
  • When you have submitted the exam it should show one of the following (according to exam state) with no button
    • Grading
    • Graded
    • Finalised
    • Completed
    • Processed
  • When you haven't taken the exam within its effective window it should show Expired with no button
  • If during the exam you open credentials/your-exams
    • It should show that exam as In Progress with Continue exam button visible

Issue / Card

Fixes 12173

Help

QA steps - Commit guidelines

@webteam-app
Copy link

Copy link

codecov bot commented Jun 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 74.12%. Comparing base (8064843) to head (b8e798a).
Report is 13 commits behind head on main.

Current head b8e798a differs from pull request most recent head da1ed3a

Please upload reports for the commit da1ed3a to get more accurate results.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #13988   +/-   ##
=======================================
  Coverage   74.12%   74.12%           
=======================================
  Files         107      107           
  Lines        2864     2864           
  Branches      957      957           
=======================================
  Hits         2123     2123           
  Misses        715      715           
  Partials       26       26           

]
# if assessment is provisioned
if assessment_id:
is_in_window = (now > starts_at and now < end) or (
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could maybe be a unit tested function.

@linux-in-flux
Copy link
Collaborator

I don't think I can check this branch out with my permissions level to actually test this, but all of the messages and timings sound good. So long as we have verified that it will not show "In Progress" before the exam is actually in progress, all of the messages seem intuitive to me.

Copy link
Collaborator

@linux-in-flux linux-in-flux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was confused on

provisioned_but_not_taken = is_in_window and state in [
                        RESERVATION_STATES["notified"],
                        RESERVATION_STATES["provisioned"],
                    ]

                    if (
                        state == RESERVATION_STATES["in_progress"]
                        or provisioned_but_not_taken
                    ):
                        actions.extend(
                            [
                                {
                                    "text": "Continue exam"
                                    if state
                                    == RESERVATION_STATES["in_progress"]
                                    else "Take exam",
                                    "href": "/credentials/exam?"
                                    f"id={assessment_id}",
                                    "button_class": "p-button--positive",
                                }
                            ]
                        ) 

But I think I see what's happening now.

@usamabinnadeem-10 usamabinnadeem-10 merged commit ec5f984 into main Jun 26, 2024
26 checks passed
@usamabinnadeem-10 usamabinnadeem-10 deleted the WD-2173-your-exams-status-fixes branch June 26, 2024 09:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants