Example #1
0
                                    exam_number)

scripts = glob.glob("../answer_scripts/processed/"+assess_type+"/"+exam_number+".json")

# Begin Marking
for script in scripts:
    marker_obj = Marker("../"+memo_src)
    try:
        marker_obj.smart_mark(script, "../"+memo_src)
    except Error as e:
        e.print_error()
        #house_keeper.delete_dirs(num_of_questions)
        sys.exit(0)
    obt_mark = round(marker_obj.get_percentage_score(), 1)
    db_controller.save_marks(obt_mark, mark_sheet_id_)
    img_processor.execute_imagestacker(num_questions)

# Finalize annotation
if(obt_mark >= 75.0):
    result_status = "Execellent!"
    class_="success"
    color="green"
    ink_color = (0, 255, 0)
elif(obt_mark >= 50 and obt_mark <= 74.9):
    result_status = "Pass!"
    class_="warning"
    color="blue"
    ink_color = (255, 0, 0)
else:
    result_status = "Fail!"
    class_="danger"