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

Test creation Validation #84

Open
JadeMaveric opened this issue Mar 13, 2021 · 5 comments · Fixed by #93
Open

Test creation Validation #84

JadeMaveric opened this issue Mar 13, 2021 · 5 comments · Fixed by #93
Assignees
Labels
feature New feature or request

Comments

@JadeMaveric
Copy link
Contributor

Describe the bug
There are multiple validation failures while creating tests.

  • The test can be give negative marks
  • Duration can be negative (rolls over when processed by backend)
  • Answer provided in MCQ questions doesn't need to be one of the options (see bitfield in Multiple Select and Numerical Answer Type Questions + (Dynamic #choices) #82 for a solution)
  • Number of questions can be negative
  • Total marks and number of questions required in the generated test aren't validated with the number of questions in the question bank

To Reproduce
Steps to reproduce the behavior:

  1. Create a new test

  2. Give it negative marks (-100)

  3. Give it negative duration (0 hours, -20 mins) (-ve hours gives a warning)
    image

  4. Add question, all 4 options need to be selected
    image

  5. Add negative no. of questions and negative marks
    image

  6. Press next after verifying
    image

  7. Check the dashboard (local build on latest master branch)
    image

Expected behavior
Error message should be shown whenever a validation fails. And the next button blocked until the mistakes are corrected.

Desktop (please complete the following information):

  • OS: ArchLinux
  • Browser firefox
  • Version 86.0
@kernal053
Copy link

Hey, can I work on this issue as a participant of GSSOC'21 ?

@Vidisha-kayal Vidisha-kayal added gssoc21 Level3 New features, major bug fixing labels Mar 13, 2021
@Vidisha-kayal
Copy link
Contributor

@kernal053 Yes, you can

@kernal053
Copy link

Thank you, @Vidisha-kayal . Can any admin assign it to me ?

@Vidisha-kayal Vidisha-kayal assigned kernal053 and unassigned kernal053 Mar 13, 2021
@Vidisha-kayal Vidisha-kayal linked a pull request Mar 13, 2021 that will close this issue
@atulya2109
Copy link
Contributor

Hi, the validations are being performed on the client side only and not on the server side. So, if instead of creating the test using the UI I send a post request to the server with marks as negative, the test will be created. Therefore, validations need to be performed server side as well and in case the validations fail, the user should be redirected accordingly

@atulya2109
Copy link
Contributor

atulya2109 commented Mar 29, 2021

@aavishkarmishra , I would like to work on this issue

@aavishkarmishra aavishkarmishra pinned this issue Apr 1, 2021
@aavishkarmishra aavishkarmishra added good first issue Good for newcomers Level0 Minor Documentation Level1 Major Documentation Level2 Bug Fixing, adding small features feature New feature or request and removed gssoc21 Level0 Minor Documentation Level1 Major Documentation Level2 Bug Fixing, adding small features Level3 New features, major bug fixing good first issue Good for newcomers labels Jun 6, 2021
@aavishkarmishra aavishkarmishra unpinned this issue Jun 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants