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

Update footer design for graded quiz #7202

Merged
merged 23 commits into from
Oct 5, 2023
Merged

Conversation

Imran92
Copy link
Contributor

@Imran92 Imran92 commented Oct 3, 2023

Resolves #7116

Proposed Changes

  • Update footer design to match the new design
  • Fixed extra lateral spacing issue in footer in Divi, Twenty Twenty Three and some other themes

Testing Instructions

  1. Create a course with some lessons with quizzes
  2. Apply different quiz settings on different quizzes, for example, mark one as pass required, one with auto grade enabled, one with reset enabled, and different combinations of these. The last lesson should have a quiz to check if the next lesson button renders unintentionally when there is no more lesson after that.
  3. Take those quizzes as a student. keep some of the quizzes incomplete, some awaiting grade, some passed, some failed, some just graded
  4. Check that the style holds in different scenarios
  5. Check for mobile view
  6. Check for different themes
  7. Check the lesson view as well to make sure nothing is broken there
  8. Check with the learning mode turned off as well to make sure nothing is broken there.

Passed:
Screenshot 2023-10-03 at 6 38 45 PM

Failed with reset:
Screenshot 2023-10-03 at 6 40 40 PM

Last lesson passed with no reset:
Screenshot 2023-10-03 at 6 41 27 PM

Pre-Merge Checklist

  • PR title and description contain sufficient detail and accurately describe the changes
  • Acceptance criteria is met
  • Decisions are publicly documented
  • Adheres to coding standards (PHP, JavaScript, CSS, HTML)
  • All strings are translatable (without concatenation, handles plurals)
  • Follows our naming conventions (P6rkRX-4oA-p2)
  • Hooks (p6rkRX-1uS-p2) and functions are documented
  • New UIs are responsive and use a mobile-first approach
  • New UIs match the designs
  • Different user privileges (admin, teacher, subscriber) are tested as appropriate
  • Code is tested on the minimum supported PHP and WordPress versions
  • User interface changes have been tested on the latest versions of Chrome, Firefox and Safari
  • "Needs Documentation" label is added if this change requires updates to documentation
  • Known issues are created as new GitHub issues

@Imran92 Imran92 added this to the 4.17.1 milestone Oct 3, 2023
@Imran92 Imran92 requested a review from a team October 3, 2023 12:43
@Imran92 Imran92 self-assigned this Oct 3, 2023
@codecov
Copy link

codecov bot commented Oct 3, 2023

Codecov Report

Merging #7202 (e985799) into trunk (bb06bd9) will increase coverage by 0.03%.
Report is 59 commits behind head on trunk.
The diff coverage is 77.96%.

Impacted file tree graph

@@             Coverage Diff              @@
##              trunk    #7202      +/-   ##
============================================
+ Coverage     50.03%   50.06%   +0.03%     
- Complexity    10704    10720      +16     
============================================
  Files           601      601              
  Lines         45200    45231      +31     
  Branches        402      402              
============================================
+ Hits          22616    22647      +31     
  Misses        22257    22257              
  Partials        327      327              
Files Coverage Δ
includes/class-sensei-dependency-checker.php 0.00% <ø> (ø)
...ludes/blocks/course-theme/class-lesson-actions.php 98.00% <66.66%> (-0.02%) ⬇️
includes/class-sensei-question.php 11.25% <0.00%> (ø)
includes/class-sensei-quiz.php 66.80% <80.00%> (+0.84%) ⬆️

... and 2 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bcd43ea...e985799. Read the comment docs.

Copy link
Collaborator

@donnapep donnapep left a comment

Choose a reason for hiding this comment

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

Left a few comments before I start my testing. 🙂

includes/class-sensei-quiz.php Outdated Show resolved Hide resolved
includes/class-sensei-quiz.php Outdated Show resolved Hide resolved

$lesson_status = \Sensei_Utils::user_lesson_status( $lesson_id, $user_id );

$is_complete = $lesson_status && in_array( $lesson_status->comment_approved, [ 'complete', 'graded', 'passed', 'failed' ], true );
Copy link
Collaborator

Choose a reason for hiding this comment

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

I know some of the quiz statuses may have changed in the HPPS project. @m1r0 @merkushin Is there anything we need to do differently here?

includes/class-sensei-quiz.php Show resolved Hide resolved
tests/unit-tests/test-class-quiz.php Outdated Show resolved Hide resolved
@donnapep
Copy link
Collaborator

donnapep commented Oct 4, 2023

It looks like this acceptance criteria was missed. In particular, there is no Contact Teacher button:

Scenario: Pass Required - No Retakes - Fail
Given a quiz has been added to a lesson
And the quiz has Auto Grade enabled
And the quiz has Allow Retakes DISABLED
And the quiz has Pass Required enabled
And the quiz has Passing Grade set to 100%
When I complete the quiz as a student and FAIL
Then the Continue to Next Lesson button is replaced by a Contact Teacher button
And there is no Continue to Next Lesson button or Restart quiz link

@Imran92
Copy link
Contributor Author

Imran92 commented Oct 4, 2023

It looks like this acceptance criteria was missed. In particular, there is no Contact Teacher button:

Scenario: Pass Required - No Retakes - Fail
Given a quiz has been added to a lesson
And the quiz has Auto Grade enabled
And the quiz has Allow Retakes DISABLED
And the quiz has Pass Required enabled
And the quiz has Passing Grade set to 100%
When I complete the quiz as a student and FAIL
Then the Continue to Next Lesson button is replaced by a Contact Teacher button
And there is no Continue to Next Lesson button or Restart quiz link

O oh, sorry I missed that. I've added it here 3904df9

Screenshot 2023-10-04 at 8 18 16 PM

Thanks!

@Imran92 Imran92 requested a review from donnapep October 5, 2023 05:42
Copy link
Collaborator

@donnapep donnapep left a comment

Choose a reason for hiding this comment

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

🎉

@Imran92 Imran92 merged commit 99547f2 into trunk Oct 5, 2023
23 checks passed
@Imran92 Imran92 deleted the add/footer-design-for-graded-quiz branch October 5, 2023 13:47
@donnapep donnapep mentioned this pull request Oct 10, 2023
14 tasks
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 this pull request may close these issues.

Update footer for graded quiz in Learning Mode
2 participants