Neurolingua commited on
Commit
f28a184
1 Parent(s): d15a225

Update templates/teacher_result.html

Browse files
Files changed (1) hide show
  1. templates/teacher_result.html +89 -89
templates/teacher_result.html CHANGED
@@ -1,90 +1,90 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="UTF-8">
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
- <title>Exam Evaluation Result</title>
7
- <style>
8
- body {
9
- font-family: Arial, sans-serif;
10
- line-height: 1.6;
11
- color: #333;
12
- max-width: 800px;
13
- margin: 0 auto;
14
- padding: 20px;
15
- background-color: #f4f4f4;
16
- }
17
- h1 {
18
- color: #2c3e50;
19
- text-align: center;
20
- }
21
- .result-container {
22
- background-color: #fff;
23
- padding: 20px;
24
- border-radius: 8px;
25
- box-shadow: 0 0 10px rgba(0,0,0,0.1);
26
- margin-bottom: 20px;
27
- }
28
- pre {
29
- white-space: pre-wrap;
30
- word-wrap: break-word;
31
- background-color: #f8f8f8;
32
- border: 1px solid #ddd;
33
- padding: 15px;
34
- border-radius: 4px;
35
- overflow-x: auto;
36
- }
37
- .back-link, .grade-button {
38
- display: inline-block;
39
- background-color: #3498db;
40
- color: #fff;
41
- padding: 10px 15px;
42
- text-decoration: none;
43
- border-radius: 4px;
44
- transition: background-color 0.3s;
45
- border: none;
46
- cursor: pointer;
47
- font-size: 16px;
48
- }
49
- .back-link:hover, .grade-button:hover {
50
- background-color: #2980b9;
51
- }
52
- #grade-result {
53
- margin-top: 20px;
54
- font-weight: bold;
55
- }
56
- </style>
57
- </head>
58
- <body>
59
- <h1>Exam Evaluation Result</h1>
60
- <div class="result-container">
61
- <pre>{{ result }}</pre>
62
- </div>
63
- <button onclick="assignGrade()" class="grade-button">Assign Grade</button>
64
- <div id="grade-result"></div>
65
- <a href="{{ url_for('eval') }}" class="back-link">Upload another set of files</a>
66
-
67
- <script>
68
- function assignGrade() {
69
- fetch('/assign_grade', {
70
- method: 'POST',
71
- headers: {
72
- 'Content-Type': 'application/json',
73
- },
74
- body: JSON.stringify({ result: document.querySelector('pre').textContent }),
75
- })
76
- .then(response => response.json())
77
- .then(data => {
78
- document.getElementById('grade-result').innerHTML = `
79
- Total Score: ${data.total_score}/${data.max_possible_score}<br>
80
- Percentage: ${data.percentage.toFixed(2)}%<br>
81
- Grade: ${data.grade}
82
- `;
83
- })
84
- .catch((error) => {
85
- console.error('Error:', error);
86
- });
87
- }
88
- </script>
89
- </body>
90
  </html>
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>Exam Evaluation Result</title>
7
+ <style>
8
+ body {
9
+ font-family: Arial, sans-serif;
10
+ line-height: 1.6;
11
+ color: #333;
12
+ max-width: 800px;
13
+ margin: 0 auto;
14
+ padding: 20px;
15
+ background-color: #f4f4f4;
16
+ }
17
+ h1 {
18
+ color: #2c3e50;
19
+ text-align: center;
20
+ }
21
+ .result-container {
22
+ background-color: #fff;
23
+ padding: 20px;
24
+ border-radius: 8px;
25
+ box-shadow: 0 0 10px rgba(0,0,0,0.1);
26
+ margin-bottom: 20px;
27
+ }
28
+ pre {
29
+ white-space: pre-wrap;
30
+ word-wrap: break-word;
31
+ background-color: #f8f8f8;
32
+ border: 1px solid #ddd;
33
+ padding: 15px;
34
+ border-radius: 4px;
35
+ overflow-x: auto;
36
+ }
37
+ .back-link, .grade-button {
38
+ display: inline-block;
39
+ background-color: #3498db;
40
+ color: #fff;
41
+ padding: 10px 15px;
42
+ text-decoration: none;
43
+ border-radius: 4px;
44
+ transition: background-color 0.3s;
45
+ border: none;
46
+ cursor: pointer;
47
+ font-size: 16px;
48
+ }
49
+ .back-link:hover, .grade-button:hover {
50
+ background-color: #2980b9;
51
+ }
52
+ #grade-result {
53
+ margin-top: 20px;
54
+ font-weight: bold;
55
+ }
56
+ </style>
57
+ </head>
58
+ <body>
59
+ <h1>Exam Evaluation Result</h1>
60
+ <div class="result-container">
61
+ <pre>{{ result }}</pre>
62
+ </div>
63
+ <button onclick="assignGrade()" class="grade-button">Assign Grade</button>
64
+ <div id="grade-result"></div>
65
+ <a href="{{ url_for('eval') }}" class="back-link">Upload another set of files</a>
66
+
67
+ <script>
68
+ function assignGrade() {
69
+ fetch('/assign_grade', {
70
+ method: 'POST',
71
+ headers: {
72
+ 'Content-Type': 'application/json',
73
+ },
74
+ body: JSON.stringify({ result: document.querySelector('pre').textContent }),
75
+ })
76
+ .then(response => response.json())
77
+ .then(data => {
78
+ document.getElementById('grade-result').innerHTML = `
79
+ Total Score: ${data.max_possible_score}/${data.total_score}<br>
80
+ Percentage: ${data.percentage.toFixed(2)}%<br>
81
+ Grade: ${data.grade}
82
+ `;
83
+ })
84
+ .catch((error) => {
85
+ console.error('Error:', error);
86
+ });
87
+ }
88
+ </script>
89
+ </body>
90
  </html>