I have a system to evaluate student grades. I should be able to define evaluation criteria dynamically in a JSON object. For example a student will pass Java Programming module if:
(courseWorkMarks > 30 && inClassTest > 40) || examMarks > 40 // pass
The conditions vary from module to module, so each module will have a json object that describes the evaluation criteria. I thought of using Jquery QueryBuilder to do this. I can build the formula using its UI and save it as a JSON and I have student's marks list for a module in a JSON object like this:
{courseWorkMarks: 50, inClassTest: 35, examMarks: 45}
How do I check whether this student fulfill the pass criteria using the JSON generated by jQuery QueryBuilder?
I want to display the pass/fail criteria for each condition separately. Example for the above case:
- courseWorkMarks Result - PASS
- inClassTest Result - FAIL
- examMarks Result - PASS
- overall Result - PASS
I can do it with JSON path, but it doesn't have a nice graphical query builder like jQuery QueryBuilder. The main problem I have is I don't understand how to use the JSON output generated by jQuery QueryBuilder to evaluate the data I have. Is it possible to do what I want with jQuery QueryBuilder? Are there any other javascript tools to do this?