Spaces:
Sleeping
Sleeping
File size: 16,688 Bytes
a0ae5a7 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 | {% extends 'base.html' %}
{% block title %}Step 3: Your Question Paper - AutoExamGen{% endblock %}
{% block head %}
<style>
body {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
min-height: 100vh;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
.container {
padding-top: 2rem;
}
.card {
border: none;
border-radius: 15px;
box-shadow: 0 10px 30px rgba(0,0,0,0.1);
backdrop-filter: blur(10px);
background: rgba(255, 255, 255, 0.95);
}
.btn-primary {
background: linear-gradient(45deg, #667eea, #764ba2);
border: none;
border-radius: 25px;
padding: 12px 30px;
font-weight: 600;
transition: all 0.3s ease;
}
.btn-primary:hover {
transform: translateY(-2px);
box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}
.btn-success {
border-radius: 25px;
padding: 12px 30px;
font-weight: 600;
}
.btn-secondary {
border-radius: 25px;
padding: 12px 30px;
font-weight: 600;
}
.step-indicator {
display: flex;
justify-content: center;
margin-bottom: 2rem;
}
.step {
width: 40px;
height: 40px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
margin: 0 10px;
font-weight: bold;
color: white;
}
.step.completed {
background: #28a745;
}
.step.active {
background: linear-gradient(45deg, #667eea, #764ba2);
}
.question-paper {
background: white;
border-radius: 15px;
padding: 2rem;
box-shadow: 0 5px 15px rgba(0,0,0,0.1);
margin: 1rem 0;
}
.paper-header {
text-align: center;
border-bottom: 2px solid #333;
padding-bottom: 1rem;
margin-bottom: 2rem;
}
.section-header {
background: linear-gradient(45deg, #667eea, #764ba2);
color: white;
padding: 0.5rem 1rem;
border-radius: 8px;
margin: 1.5rem 0 1rem 0;
font-weight: bold;
}
.question {
margin-bottom: 1.5rem;
padding: 1rem;
border-left: 4px solid #667eea;
background-color: #f8f9ff;
border-radius: 0 8px 8px 0;
}
.question-number {
font-weight: bold;
color: #667eea;
}
.question-marks {
float: right;
background: #667eea;
color: white;
padding: 2px 8px;
border-radius: 12px;
font-size: 0.8rem;
font-weight: bold;
}
.mcq-options {
margin-top: 0.5rem;
padding-left: 1rem;
}
.mcq-option {
margin: 0.3rem 0;
padding: 0.3rem 0;
}
.summary-stats {
background: linear-gradient(45deg, #667eea, #764ba2);
color: white;
border-radius: 15px;
padding: 1.5rem;
margin-bottom: 2rem;
}
.stat-item {
text-align: center;
}
.stat-number {
font-size: 2rem;
font-weight: bold;
display: block;
}
.stat-label {
font-size: 0.9rem;
opacity: 0.9;
}
.preview-mode {
max-height: 600px;
overflow-y: auto;
border: 2px solid #e9ecef;
border-radius: 15px;
}
@media print {
body {
background: white !important;
}
.no-print {
display: none !important;
}
.question-paper {
box-shadow: none;
margin: 0;
padding: 1rem;
}
}
</style>
{% endblock %}
{% block content %}
<div class="container">
<div class="row justify-content-center">
<div class="col-md-12">
<!-- Progress Indicator -->
<div class="step-indicator no-print">
<div class="step completed">1</div>
<div class="step completed">2</div>
<div class="step active">3</div>
</div>
<!-- Header Card -->
<div class="card no-print">
<div class="card-header bg-transparent text-center py-4">
<h2 class="mb-0">
<i class="fas fa-check-circle text-success me-2"></i>
Your Question Paper is Ready!
</h2>
<p class="text-muted mt-2">Review your generated question paper below</p>
</div>
</div>
<!-- Summary Stats -->
<div class="summary-stats no-print">
<div class="row">
<div class="col-md-2 stat-item">
<span class="stat-number">{{ config.short_questions + config.long_questions + config.mcq_questions }}</span>
<span class="stat-label">Total Questions</span>
</div>
<div class="col-md-2 stat-item">
<span class="stat-number">{{ total_marks }}</span>
<span class="stat-label">Total Marks</span>
</div>
<div class="col-md-2 stat-item">
<span class="stat-number">{{ config.short_questions }}</span>
<span class="stat-label">Short Questions</span>
</div>
<div class="col-md-2 stat-item">
<span class="stat-number">{{ config.long_questions }}</span>
<span class="stat-label">Long Questions</span>
</div>
<div class="col-md-2 stat-item">
<span class="stat-number">{{ config.mcq_questions }}</span>
<span class="stat-label">MCQ Questions</span>
</div>
<div class="col-md-2 stat-item">
<span class="stat-number">{{ display_duration }}</span>
<span class="stat-label">Time (min)</span>
</div>
</div>
</div>
<!-- Action Buttons -->
<div class="row mb-4 no-print">
<div class="col-md-3">
<a href="/" class="btn btn-secondary btn-lg w-100">
<i class="fas fa-home me-2"></i>
Start Over
</a>
</div>
<div class="col-md-3">
<button onclick="window.print()" class="btn btn-primary btn-lg w-100">
<i class="fas fa-print me-2"></i>
Print Paper
</button>
</div>
<div class="col-md-3">
<a href="/download" class="btn btn-success btn-lg w-100">
<i class="fas fa-download me-2"></i>
Download HTML
</a>
</div>
<div class="col-md-3">
<button onclick="togglePreview()" class="btn btn-primary btn-lg w-100" id="previewBtn">
<i class="fas fa-eye me-2"></i>
Preview Mode
</button>
</div>
</div>
<!-- Question Paper -->
<div class="question-paper" id="questionPaper">
<div class="paper-header">
<h1>{{ config.exam_name if config.exam_name else 'EXAMINATION QUESTION PAPER' }}</h1>
<h3>Subject: {{ config.subject_name if config.subject_name else '[Subject Name]' }}</h3>
<p><strong>Date:</strong> {{ exam_date }} <strong>Time:</strong> {{ display_duration }} minutes <strong>Total Marks:</strong> {{ total_marks }}</p>
<hr>
<p><strong>Instructions:</strong></p>
<ul style="text-align: left; display: inline-block;">
<li>Answer all questions</li>
<li>Write clearly and legibly</li>
<li>Manage your time effectively</li>
{% if config.mcq_questions > 0 %}
<li>For MCQ questions, choose the best answer</li>
{% endif %}
</ul>
</div>
<!-- Multiple Choice Questions -->
{% if config.mcq_questions > 0 and question_paper.mcq_questions %}
<div class="section-header">
<i class="fas fa-list-ul me-2"></i>
SECTION A: MULTIPLE CHOICE QUESTIONS (1 mark each)
</div>
{% for question in question_paper.mcq_questions %}
<div class="question">
<span class="question-marks">1 mark</span>
<span class="question-number">{{ loop.index }}.</span>
{{ question.question if question.question else question }}
{% if question.options %}
<div class="mcq-options">
{% for option in question.options %}
<div class="mcq-option">
<strong>{{ ['A', 'B', 'C', 'D'][loop.index0] }})</strong> {{ option }}
</div>
{% endfor %}
</div>
{% else %}
<div class="mcq-options">
<div class="mcq-option"><strong>A)</strong> [Option A]</div>
<div class="mcq-option"><strong>B)</strong> [Option B]</div>
<div class="mcq-option"><strong>C)</strong> [Option C]</div>
<div class="mcq-option"><strong>D)</strong> [Option D]</div>
</div>
{% endif %}
</div>
{% endfor %}
{% endif %}
<!-- Short Answer Questions -->
{% if config.short_questions > 0 and question_paper.short_questions %}
<div class="section-header">
<i class="fas fa-edit me-2"></i>
SECTION B: SHORT ANSWER QUESTIONS ({{ config.short_marks }} marks each)
</div>
{% for item in question_paper.short_questions %}
{% if config.short_or and (item.a or item.b) %}
<div class="question">
<span class="question-marks">{{ config.short_marks }} marks</span>
<span class="question-number">{{ loop.index }}.</span>
<div>
{{ (item.a.question if item.a.question else item.a) if item.a else '' }}
</div>
{% if item.b %}
<div class="text-center my-2"><em>OR</em></div>
<div>
{{ (item.b.question if item.b.question else item.b) if item.b else '' }}
</div>
{% endif %}
</div>
{% else %}
<div class="question">
<span class="question-marks">{{ config.short_marks }} marks</span>
<span class="question-number">{{ loop.index }}.</span>
{{ item.question if item.question else item }}
</div>
{% endif %}
{% endfor %}
{% endif %}
<!-- Long Answer Questions -->
{% if config.long_questions > 0 and question_paper.long_questions %}
<div class="section-header">
<i class="fas fa-file-alt me-2"></i>
SECTION C: LONG ANSWER QUESTIONS ({{ config.long_marks }} marks each)
</div>
{% if config.long_attempt %}
<div class="alert alert-info">Attempt any {{ config.long_attempt }} out of {{ config.long_questions }} questions.</div>
{% endif %}
{% for question in question_paper.long_questions %}
<div class="question">
<span class="question-marks">{{ config.long_marks }} marks</span>
<span class="question-number">{{ loop.index }}.</span>
{{ question.question if question.question else question }}
</div>
{% endfor %}
{% endif %}
<!-- Footer -->
<div style="text-align: center; margin-top: 3rem; padding-top: 1rem; border-top: 1px solid #ccc;">
<p><strong>*** END OF QUESTION PAPER ***</strong></p>
<p style="font-size: 0.9rem; color: #666;">
Generated on {{ exam_date }} using AI Question Generator
</p>
</div>
</div>
<!-- Tips Card -->
<div class="card mt-4 no-print">
<div class="card-body">
<h5 class="card-title">
<i class="fas fa-lightbulb text-warning me-2"></i>
Next Steps
</h5>
<div class="row">
<div class="col-md-4">
<h6><i class="fas fa-print text-primary me-2"></i>Print</h6>
<small class="text-muted">Use the Print button to get a clean, formatted printout of your question paper.</small>
</div>
<div class="col-md-4">
<h6><i class="fas fa-download text-success me-2"></i>Download</h6>
<small class="text-muted">Download as HTML file to save or share your question paper digitally.</small>
</div>
<div class="col-md-4">
<h6><i class="fas fa-edit text-info me-2"></i>Customize</h6>
<small class="text-muted">Edit the subject name, instructions, or questions as needed before printing.</small>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
{% endblock %}
{% block scripts %}
<script>
function togglePreview() {
const paper = document.getElementById('questionPaper');
const btn = document.getElementById('previewBtn');
if (paper.classList.contains('preview-mode')) {
paper.classList.remove('preview-mode');
btn.innerHTML = '<i class="fas fa-eye me-2"></i>Preview Mode';
} else {
paper.classList.add('preview-mode');
btn.innerHTML = '<i class="fas fa-expand me-2"></i>Full View';
}
}
// Auto-scroll to paper on load
window.addEventListener('load', function() {
document.getElementById('questionPaper').scrollIntoView({
behavior: 'smooth',
block: 'start'
});
});
</script>
{% endblock %}
|