Udayraj123 / OMRChecker

Evaluate OMR sheets fast and accurately using a scanner 🖨 or your phone 🤳.
GNU General Public License v3.0
704 stars 295 forks source link

[Feature] Support for weighted answers (multiple correct) #165

Closed Udayraj123 closed 4 months ago

Udayraj123 commented 4 months ago

Is your feature request related to a problem? Please describe. Quoting @Janics from discord:

I have a question, if you allow me...
It is possible to assign a different score:
Answer: [ABCD]
Delta: [1234]

Ex:
{
    'source_type': 'custom', 
    'options': {
        'questions_in_order': ['q1..2'], 
        'answers_in_order': [ 
            [
                ['A', ['1']], 
                ['B', ['2']],
                ['C', ['3']],
                ['D', ['4']]
            ], 
            'B'
        ], 
        'should_explain_scoring': True
    }, 
    'marking_scheme': {
        'DEFAULT': {
            'correct': '1', 
            'incorrect': '0', 
            'unmarked': '0'
        }
    }
}

It would be used to evaluate from 1 to 4 the percentage of success to a question.
This is filled out by a teacher. 

Describe alternatives you've considered The above schema is a bit incorrect, suggesting a better schema to achieve the same below.

Describe the solution you'd like A clear and concise description of what you want to happen.

{
  "source_type": "custom",
  "options": {
    "questions_in_order": [
      "q1..2"
    ],
    "answers_in_order": [
      [["A", "1"], ["B", "2"], ["C", "3"], ["D", "4"]],
      "B"
    ],
    "should_explain_scoring": true
  },
  "marking_scheme": {
    "DEFAULT": {
      "correct": "1",
      "incorrect": "0",
      "unmarked": "0"
    }
  }
}

This is the expected schema for supporting weighted answers

Additional context Use sample4 with the custom evaluation schema and you can see a validation error come up for the missing feature.

Discord thread: https://discord.com/channels/590134763784896514/1183506265402507294