Fix report generator
This commit is contained in:
parent
021147c960
commit
7c816f7322
@ -42,7 +42,9 @@ def add_score(request):
|
||||
to him for score entry. in a specific semester and session
|
||||
"""
|
||||
current_session = Session.objects.filter(is_current_session=True).first()
|
||||
current_semester = Semester.objects.filter(is_current_semester=True, session=current_session).first()
|
||||
current_semester = Semester.objects.filter(
|
||||
is_current_semester=True, session=current_session
|
||||
).first()
|
||||
|
||||
if not current_session or not current_semester:
|
||||
messages.error(request, "No active semester found.")
|
||||
@ -327,7 +329,7 @@ def result_sheet_pdf_view(request, id):
|
||||
|
||||
print("\nsettings.MEDIA_ROOT", settings.MEDIA_ROOT)
|
||||
print("\nsettings.STATICFILES_DIRS[0]", settings.STATICFILES_DIRS[0])
|
||||
logo = settings.STATICFILES_DIRS[0] + "/img/logo.png"
|
||||
logo = settings.STATICFILES_DIRS[0] + "/img/dj-lms.png"
|
||||
im = Image(logo, 1 * inch, 1 * inch)
|
||||
im.__setattr__("_offs_x", -200)
|
||||
im.__setattr__("_offs_y", -45)
|
||||
@ -739,7 +741,7 @@ def course_registration_form(request):
|
||||
|
||||
# FIRST SEMESTER ENDS HERE
|
||||
|
||||
logo = settings.STATICFILES_DIRS[0] + "/img/logo.png"
|
||||
logo = settings.STATICFILES_DIRS[0] + "/img/dj-lms.png"
|
||||
im_logo = Image(logo, 1 * inch, 1 * inch)
|
||||
im_logo.__setattr__("_offs_x", -218)
|
||||
im_logo.__setattr__("_offs_y", 480)
|
||||
|
||||
@ -17,31 +17,13 @@
|
||||
{% endif %}
|
||||
|
||||
<div class="title-1"><i class="fas fa-tasks"></i>Course Allocations</div>
|
||||
<br>
|
||||
<br>
|
||||
|
||||
{% if messages %}
|
||||
{% for message in messages %}
|
||||
{% if message.tags == 'error' %}
|
||||
<div class="alert alert-danger">
|
||||
<i class="fas fa-exclamation-circle"></i>{{ message }}
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="alert alert-success">
|
||||
<i class="fas fa-check-circle"></i>{{ message }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% include 'snippets/messages.html' %}
|
||||
{% include 'snippets/filter_form.html' %}
|
||||
|
||||
<div class="content-center">
|
||||
<form class="search-form" action="" method="GET">
|
||||
{{ filter.form }}
|
||||
<button class="btn btn-light" type="submit">
|
||||
<i class="fas fa-search"></i> Filter
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="table-responsive table-shadow p-0 mt-5">
|
||||
<div class="table-responsive table-shadow p-0 mt-4">
|
||||
<table class="table table-light table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
@ -15,20 +15,7 @@
|
||||
|
||||
<p class="title-1">Course Add & Drop</p>
|
||||
|
||||
{% if messages %}
|
||||
{% for message in messages %}
|
||||
{% if message.tags == 'error' %}
|
||||
<div class="alert alert-danger">
|
||||
<i class="fas fa-exclamation-circle"></i>{{ message }}
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="alert alert-success">
|
||||
<i class="fas fa-check-circle"></i>{{ message }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
{% include 'snippets/messages.html' %}
|
||||
|
||||
{% if current_semester %}
|
||||
{% if is_calender_on == False %}
|
||||
@ -44,12 +31,7 @@
|
||||
|
||||
<form action="{% url 'course_registration' %}" method="POST">{% csrf_token %}
|
||||
<div class="col-md-12 p-0 bg-white">
|
||||
<p class="form-title">
|
||||
<b>Course Add</b>
|
||||
<div class="level-wrapper">
|
||||
<div class="info-text">{{ student.level }}</div>
|
||||
</div>
|
||||
</p>
|
||||
<p class="form-title fw-bold">Course Add</p>
|
||||
<div class="container">
|
||||
<div class="d-flex justify-content-between mb-3">
|
||||
<button title="Save Score" type="submit" class="btn btn-primary"><i class="fa fa-plus"></i> Add
|
||||
@ -184,8 +166,7 @@
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td><b>Total credit(s):</b> {{ total_sec_semester_credit|add:total_first_semester_credit
|
||||
}} </td>
|
||||
<td><b>Total credit(s):</b> {{ total_sec_semester_credit|add:total_first_semester_credit }} </td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
@ -201,10 +182,8 @@
|
||||
|
||||
{% if not no_course_is_registered %}
|
||||
|
||||
<a target="_blank" href="{% url 'course_registration_form' %}">
|
||||
<span title="Print Registration Form" class="btn btn-warning">
|
||||
<i class="fa fa-file-pdf-o" aria-hidden="true"></i><i class="fas fa-print"></i> Print Registration Form
|
||||
</span>
|
||||
<a class="btn btn-warning" href="{% url 'course_registration_form' %}" target="_blank" title="Print Registration Form">
|
||||
<i class="fas fa-print"></i> Print Registerd Courses
|
||||
</a>
|
||||
|
||||
<div class="col-md-12 p-0 bg-white">
|
||||
|
||||
@ -20,13 +20,14 @@
|
||||
</div>
|
||||
<div class="dropdown-menu" style="min-width: 14rem !important;">
|
||||
<div class="d-flex flex-column align-items-center">
|
||||
<div class="avatar border">
|
||||
<div class="avatar avatar-md border">
|
||||
<img src="{{ request.user.picture.url }}">
|
||||
</div>
|
||||
|
||||
<p class="small text-muted text-center">
|
||||
<p class="small text-muted text-center mb-0">
|
||||
Last login: {{ request.user.last_login|date }}</p>
|
||||
</div>
|
||||
<hr>
|
||||
|
||||
{% if request.user.is_lecturer or request.user.is_student %}
|
||||
<a class="dropdown-item" href="{% url 'user_course_list' %}"><i class="fas fa-book me-2"></i>My
|
||||
|
||||
@ -105,8 +105,11 @@
|
||||
<form method="GET" action=".">
|
||||
|
||||
<div class="input-group form-group-no-border mx-auto" style="margin-bottom: 0px; font-size: 32px;">
|
||||
<input type="text" name="q" data-toggle="popover" data-placement="bottom" data-content="Press enter to search" class="form-control cfe-nav mt-0 py-3" placeholder="Search..." value="{{ request.GET.q }}" data-original-title="" title="" autofocus="autofocus" required>
|
||||
<button type="submit" class="btn btn-outline-secondary">
|
||||
<input type="text" name="q" data-toggle="popover" data-placement="bottom"
|
||||
data-content="Press enter to search" class="form-control cfe-nav"
|
||||
placeholder="Search..." value="{{ request.GET.q }}" data-original-title="" title=""
|
||||
autofocus="autofocus" required>
|
||||
<button type="submit" class="btn btn-dark">
|
||||
<i class="fa fa-search" aria-hidden="true"></i>
|
||||
</button>
|
||||
</div>
|
||||
@ -115,15 +118,12 @@
|
||||
|
||||
</div>
|
||||
<div class="col-12 pl-5">
|
||||
<h5>Search by using:</h5>
|
||||
<h5>Search by:</h5>
|
||||
<ul class="pl-3">
|
||||
<li>Program <span class="text-orange">></span> Title or Description</li>
|
||||
<li>Course <span class="text-orange">></span> Title, Code or Description</li>
|
||||
<li>News And Events <span class="text-orange">></span> Title, Description or just by typing "news" or "event"</li>
|
||||
<li>Quiz <span class="text-orange">></span> Title, Description or Category(practice, assignment and exam)</li>
|
||||
<li></li>
|
||||
<li></li>
|
||||
<li></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user