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

fix: fixed bug in which user can submit quiz over the maximum limit allowed #1316

Merged
merged 6 commits into from
Feb 17, 2025

Conversation

FahidLatheef
Copy link
Contributor

@FahidLatheef FahidLatheef commented Feb 16, 2025

This PR includes

  • Validation for quiz submission limit (both in backend and frontend)
  • Fixed some spelling typos
  • Fixed an issue while running yarn dev

Closes #1314

It was causing this error

  ✘ [ERROR] Cannot assign to "isLoggedIn" because it is a constant

    src/router.js:230:2:
      230 │     isLoggedIn = false
          ╵     ~~~~~~~~~~

  The symbol "isLoggedIn" was declared a constant here:

    src/router.js:222:7:
      222 │   const { isLoggedIn } = sessionStore()
          ╵         ^
…til page reload

ListView throws error if initialized without emptyState which was causing the component to not reload when number of submissions was 0.
Copy link

cypress bot commented Feb 16, 2025

lms    Run #1067

Run Properties:  status check passed Passed #1067  •  git commit daa71ffead ℹ️: Merge 974f67aefee327c2a3c29219a3f9d4c5b04554c9 into 1a731b6908d7233e47db92a76c22...
Project lms
Branch Review fix/quiz-maximum-attempts
Run status status check passed Passed #1067
Run duration 00m 29s
Commit git commit daa71ffead ℹ️: Merge 974f67aefee327c2a3c29219a3f9d4c5b04554c9 into 1a731b6908d7233e47db92a76c22...
Committer Fahid Latheef A
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 0
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 1
⚠️ You've recorded test results over your free plan limit.
Upgrade your plan to view test results.
View all changes introduced in this branch ↗︎

@FahidLatheef FahidLatheef marked this pull request as ready for review February 16, 2025 14:06
@FahidLatheef
Copy link
Contributor Author

Fixes #1314

Case1 Fix

maximum_attempts_bypass_method_1_after.mp4

Case2 Fix

maximum_attempts_bypass_method_2_after.mp4

@@ -219,7 +219,7 @@ let router = createRouter({

router.beforeEach(async (to, from, next) => {
const { userResource } = usersStore()
const { isLoggedIn } = sessionStore()
let { isLoggedIn } = sessionStore()
Copy link
Collaborator

Choose a reason for hiding this comment

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

@FahidLatheef why this change?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yarn dev is causing below error

✘ [ERROR] Cannot assign to "isLoggedIn" because it is a constant

src/router.js:230:2:
  230 │     isLoggedIn = false
      ╵     ~~~~~~~~~~

The symbol "isLoggedIn" was declared a constant here:

src/router.js:222:7:
  222 │   const { isLoggedIn } = sessionStore()
      ╵         ^

@pateljannat pateljannat merged commit 6e1acfd into frappe:develop Feb 17, 2025
5 checks passed
@frappe-pr-bot
Copy link
Collaborator

🎉 This PR is included in version 2.23.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: Quiz Maximum Attempts not working correctly
3 participants