Update app.py
Browse files
app.py
CHANGED
@@ -26,6 +26,7 @@ def allowed_file(filename):
|
|
26 |
return '.' in filename and filename.rsplit('.', 1)[1].lower() in ALLOWED_EXTENSIONS
|
27 |
|
28 |
eval_str=''
|
|
|
29 |
@app.route('/')
|
30 |
def index():
|
31 |
return render_template('index.html')
|
@@ -215,7 +216,7 @@ def calculate_score_and_grades():
|
|
215 |
|
216 |
# Calculate total score and maximum possible score
|
217 |
total_score = sum(int(mark[0]) for mark in marks)
|
218 |
-
max_possible_score =
|
219 |
|
220 |
# Prevent division by zero
|
221 |
if max_possible_score == 0:
|
@@ -481,6 +482,7 @@ def generate_paper():
|
|
481 |
@app.route('/eval', methods=['GET', 'POST'])
|
482 |
def eval():
|
483 |
global eval_str
|
|
|
484 |
if request.method == 'POST':
|
485 |
input_type = request.form['input_type']
|
486 |
question_text = ""
|
|
|
26 |
return '.' in filename and filename.rsplit('.', 1)[1].lower() in ALLOWED_EXTENSIONS
|
27 |
|
28 |
eval_str=''
|
29 |
+
max_marks=10
|
30 |
@app.route('/')
|
31 |
def index():
|
32 |
return render_template('index.html')
|
|
|
216 |
|
217 |
# Calculate total score and maximum possible score
|
218 |
total_score = sum(int(mark[0]) for mark in marks)
|
219 |
+
max_possible_score = max_marks
|
220 |
|
221 |
# Prevent division by zero
|
222 |
if max_possible_score == 0:
|
|
|
482 |
@app.route('/eval', methods=['GET', 'POST'])
|
483 |
def eval():
|
484 |
global eval_str
|
485 |
+
global max_marks
|
486 |
if request.method == 'POST':
|
487 |
input_type = request.form['input_type']
|
488 |
question_text = ""
|