Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Enhancement – Limit Question Marks to Maximum 3 Digits #320

Description

@TadreebLMS

PROBLEM

While creating a question, the "Marks" field currently
allows very large values (e.g., 100000).

This is not practical for assessments and may lead to
incorrect scoring or reporting issues.

The marks value should be restricted to a reasonable limit.


STEPS TO REPRODUCE

  1. Login as Admin
    Open the application: http://test.tadreeblms.com/
    Login using admin credentials:
    Username: [[email protected]]
    Password: 123456
  2. Navigate to:
    Courses Management → Questions
  3. Click "Create Question"
  4. Enter a very large number in the "Marks" field
    (e.g., 100000)
  5. Save the question

ACTUAL RESULT

The system accepts marks with unlimited digits.


EXPECTED RESULT

Marks should be limited to a maximum of 3 digits.

Allowed range example:

1 – 999

Any value greater than 999 should trigger validation error.

Example error message:

"Marks cannot exceed 999."


VALIDATION RULES REQUIRED

Marks field:

✔ Numeric only
✔ Minimum value: 1
✔ Maximum value: 999

Example validation:

marks => required|numeric|min:1|max:999


AREAS TO CHECK

Frontend:
Question creation form

Backend:
QuestionController
StoreQuestionRequest

Database:
questions.marks column


IMPACT

  • Prevents unrealistic scoring
  • Keeps assessments standardized
  • Avoids reporting anomalies

ACCEPTANCE CRITERIA

✔ Marks cannot exceed 3 digits
✔ Validation error shown for values > 999
✔ Backend validation enforced
✔ UI input restriction implemented


SCREENSHOT

Image

END

Metadata

Metadata

Assignees

Labels

BeginnerThis label contains the issues / enhancement for the beginner level developersbugSomething isn't workinggood first issueGood for newcomers

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions