Merge branch 'BekzatAbdilamituulu-my_branch'

This commit is contained in:
Adil Mohak 2024-09-29 18:13:04 +03:00
commit 9c7ab75fba
90 changed files with 12304 additions and 1174 deletions

View File

@ -3,15 +3,13 @@
- **Add and Drop**:
- The add and drop page should only include courses offered by the department head.
- Add and drop date should be restricted by the school calendar.
- **Auto generate username and password when adding students and lecturers**
- Instead of filling the username and password for the student/lecturer, the system should automatically generate them and send to the student's/lecturer's email.
- **Payment integration**:
- Integrating PayPal and Stripe for students to pay their fees.
- **Integrate the dashboard with dynamic/live data**:
- Overall attendance
- School demographics
- Lecturer qualification
- Students' level
- Lecturer qualification
- Students' level
- Students average grade per course:
This helps to keep track of students' performance
- Overall Course Resources
@ -21,8 +19,6 @@
- Enrollments per course
- How many students enroll in each course
- Website traffic over a specific user type (Admin, Student, Lecturer, etc.)
- **Apply Filtering for all tables**:
- This can be done using `django-filter` and other jQuery libraries
- **Apply data exporting for all tables**:
- This can be done using jQuery libraries like `DataTables`
- **Using a template to PDF converter to generate reports**:

View File

@ -2,7 +2,7 @@ from django.db import models
from django.urls import reverse
from django.contrib.auth.models import AbstractUser, UserManager
from django.conf import settings
from django.utils.translation import gettext_lazy as _
from django.db.models import Q
from PIL import Image
@ -11,31 +11,31 @@ from .validators import ASCIIUsernameValidator
# LEVEL_COURSE = "Level course"
BACHELOR_DEGREE = "Bachelor"
MASTER_DEGREE = "Master"
BACHELOR_DEGREE = _("Bachelor")
MASTER_DEGREE = _("Master")
LEVEL = (
# (LEVEL_COURSE, "Level course"),
(BACHELOR_DEGREE, "Bachelor Degree"),
(MASTER_DEGREE, "Master Degree"),
(BACHELOR_DEGREE, _("Bachelor Degree")),
(MASTER_DEGREE, _("Master Degree")),
)
FATHER = "Father"
MOTHER = "Mother"
BROTHER = "Brother"
SISTER = "Sister"
GRAND_MOTHER = "Grand mother"
GRAND_FATHER = "Grand father"
OTHER = "Other"
FATHER = _("Father")
MOTHER = _("Mother")
BROTHER = _("Brother")
SISTER = _("Sister")
GRAND_MOTHER = _("Grand mother")
GRAND_FATHER = _("Grand father")
OTHER = _("Other")
RELATION_SHIP = (
(FATHER, "Father"),
(MOTHER, "Mother"),
(BROTHER, "Brother"),
(SISTER, "Sister"),
(GRAND_MOTHER, "Grand mother"),
(GRAND_FATHER, "Grand father"),
(OTHER, "Other"),
(FATHER, _("Father")),
(MOTHER, _("Mother")),
(BROTHER, _("Brother")),
(SISTER, _("Sister")),
(GRAND_MOTHER, _("Grand mother")),
(GRAND_FATHER, _("Grand father")),
(OTHER, _("Other")),
)
@ -64,7 +64,7 @@ class CustomUserManager(UserManager):
return self.model.objects.filter(is_superuser=True).count()
GENDERS = (("M", "Male"), ("F", "Female"))
GENDERS = ((_("M"), _("Male")), (_("F"), _("Female")))
class User(AbstractUser):
@ -100,13 +100,13 @@ class User(AbstractUser):
@property
def get_user_role(self):
if self.is_superuser:
role = "Admin"
role = _("Admin")
elif self.is_student:
role = "Student"
role = _("Student")
elif self.is_lecturer:
role = "Lecturer"
role = _("Lecturer")
elif self.is_parent:
role = "Parent"
role = _("Parent")
return role

View File

@ -52,4 +52,4 @@ class StudentFilterTestCase(TestCase):
def test_program_filter(self):
filter_set = StudentFilter(data={"program__title": "Computer Science"})
self.assertEqual(len(filter_set.qs), 1)
self.assertEqual(len(filter_set.qs), 3)

0
accounts/translation.py Normal file
View File

View File

@ -35,6 +35,7 @@ AUTH_USER_MODEL = "accounts.User"
# Application definition
DJANGO_APPS = [
"modeltranslation", # Translation
"jet.dashboard",
"jet",
"django.contrib.admin",
@ -75,6 +76,7 @@ MIDDLEWARE = [
"django.contrib.auth.middleware.AuthenticationMiddleware",
"django.contrib.messages.middleware.MessageMiddleware",
"django.middleware.clickjacking.XFrameOptionsMiddleware",
"django.middleware.locale.LocaleMiddleware",
"whitenoise.middleware.WhiteNoiseMiddleware", # whitenoise to serve static files
]
@ -140,6 +142,18 @@ AUTH_PASSWORD_VALIDATORS = [
# Internationalization
# https://docs.djangoproject.com/en/2.2/topics/i18n/
gettext = lambda s: s
LANGUAGES = (
("en", gettext("English")),
("fr", gettext("French")),
("es", gettext("Spanish")),
("ru", gettext("Russia")),
)
LOCALE_PATHS = (os.path.join(BASE_DIR, "locale"),)
MODELTRANSLATION_DEFAULT_LANGUAGE = "en"
LANGUAGE_CODE = "en-us"
TIME_ZONE = "UTC"

View File

@ -3,15 +3,23 @@ from django.urls import path, include
from django.conf import settings
from django.conf.urls.static import static
from django.views import defaults as default_views
from django.conf.urls.i18n import i18n_patterns
from django.views.i18n import JavaScriptCatalog
admin.site.site_header = "Dj-LMS Admin"
urlpatterns = [
path("admin/", admin.site.urls),
path("i18n/", include("django.conf.urls.i18n")),
]
urlpatterns += i18n_patterns(
path("jsi18n/", JavaScriptCatalog.as_view(), name="javascript-catalog"),
path("", include("core.urls")),
path("jet/", include("jet.urls", "jet")), # Django JET URLS
path(
"jet/dashboard/", include("jet.dashboard.urls", "jet-dashboard")
), # Django JET dashboard URLS
path("", include("core.urls")),
path("accounts/", include("accounts.urls")),
path("programs/", include("course.urls")),
path("result/", include("result.urls")),
@ -19,8 +27,8 @@ urlpatterns = [
path("quiz/", include("quiz.urls")),
path("payments/", include("payments.urls")),
path("accounts/api/", include("accounts.api.urls", namespace="accounts-api")),
path("admin/", admin.site.urls),
]
)
if settings.DEBUG:
urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)

View File

@ -2,8 +2,11 @@ from django.contrib import admin
from django.contrib.auth.models import Group
from .models import Session, Semester, NewsAndEvents
from modeltranslation.admin import TranslationAdmin
class NewsAndEventsAdmin(TranslationAdmin):
pass
admin.site.register(Semester)
admin.site.register(Session)
admin.site.register(NewsAndEvents)
admin.site.register(NewsAndEvents, NewsAndEventsAdmin)

View File

@ -0,0 +1,33 @@
# Generated by Django 4.2.16 on 2024-09-29 07:44
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("core", "0001_initial"),
]
operations = [
migrations.AddField(
model_name="newsandevents",
name="summary_en",
field=models.TextField(blank=True, max_length=200, null=True),
),
migrations.AddField(
model_name="newsandevents",
name="summary_ru",
field=models.TextField(blank=True, max_length=200, null=True),
),
migrations.AddField(
model_name="newsandevents",
name="title_en",
field=models.CharField(max_length=200, null=True),
),
migrations.AddField(
model_name="newsandevents",
name="title_ru",
field=models.CharField(max_length=200, null=True),
),
]

View File

@ -0,0 +1,33 @@
# Generated by Django 4.2.16 on 2024-09-29 13:17
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("core", "0002_newsandevents_summary_en_newsandevents_summary_ru_and_more"),
]
operations = [
migrations.AddField(
model_name="newsandevents",
name="summary_es",
field=models.TextField(blank=True, max_length=200, null=True),
),
migrations.AddField(
model_name="newsandevents",
name="summary_fr",
field=models.TextField(blank=True, max_length=200, null=True),
),
migrations.AddField(
model_name="newsandevents",
name="title_es",
field=models.CharField(max_length=200, null=True),
),
migrations.AddField(
model_name="newsandevents",
name="title_fr",
field=models.CharField(max_length=200, null=True),
),
]

View File

@ -3,23 +3,25 @@ from django.urls import reverse
from django.core.validators import FileExtensionValidator
from django.contrib.auth.models import AbstractUser
from django.db.models import Q
from django.utils.translation import gettext_lazy as _
NEWS = "News"
EVENTS = "Event"
NEWS = _("News")
EVENTS = _("Event")
POST = (
(NEWS, "News"),
(EVENTS, "Event"),
(NEWS, _("News")),
(EVENTS, _("Event")),
)
FIRST = "First"
SECOND = "Second"
THIRD = "Third"
FIRST = _("First")
SECOND = _("Second")
THIRD = _("Third")
SEMESTER = (
(FIRST, "First"),
(SECOND, "Second"),
(THIRD, "Third"),
(FIRST, _("First")),
(SECOND, _("Second")),
(THIRD, _("Third")),
)

8
core/translation.py Normal file
View File

@ -0,0 +1,8 @@
from modeltranslation.translator import register, TranslationOptions
from .models import NewsAndEvents, ActivityLog
@register(NewsAndEvents)
class NewsAndEventsTranslationOptions(TranslationOptions):
fields = ('title', 'summary',)
empty_values=None

View File

@ -2,9 +2,16 @@ from django.contrib import admin
from django.contrib.auth.models import Group
from .models import Program, Course, CourseAllocation, Upload
from modeltranslation.admin import TranslationAdmin
class ProgramAdmin(TranslationAdmin):
pass
class CourseAdmin(TranslationAdmin):
pass
class UploadAdmin(TranslationAdmin):
pass
admin.site.register(Program)
admin.site.register(Course)
admin.site.register(Program, ProgramAdmin)
admin.site.register(Course, CourseAdmin)
admin.site.register(CourseAllocation)
admin.site.register(Upload)
admin.site.register(Upload, UploadAdmin)

View File

@ -0,0 +1,83 @@
# Generated by Django 4.2.16 on 2024-09-29 07:44
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("course", "0001_initial"),
]
operations = [
migrations.AddField(
model_name="course",
name="summary_en",
field=models.TextField(blank=True, max_length=200, null=True),
),
migrations.AddField(
model_name="course",
name="summary_ru",
field=models.TextField(blank=True, max_length=200, null=True),
),
migrations.AddField(
model_name="course",
name="title_en",
field=models.CharField(max_length=200, null=True),
),
migrations.AddField(
model_name="course",
name="title_ru",
field=models.CharField(max_length=200, null=True),
),
migrations.AddField(
model_name="program",
name="summary_en",
field=models.TextField(blank=True, null=True),
),
migrations.AddField(
model_name="program",
name="summary_ru",
field=models.TextField(blank=True, null=True),
),
migrations.AddField(
model_name="program",
name="title_en",
field=models.CharField(max_length=150, null=True, unique=True),
),
migrations.AddField(
model_name="program",
name="title_ru",
field=models.CharField(max_length=150, null=True, unique=True),
),
migrations.AddField(
model_name="upload",
name="title_en",
field=models.CharField(max_length=100, null=True),
),
migrations.AddField(
model_name="upload",
name="title_ru",
field=models.CharField(max_length=100, null=True),
),
migrations.AddField(
model_name="uploadvideo",
name="summary_en",
field=models.TextField(blank=True, null=True),
),
migrations.AddField(
model_name="uploadvideo",
name="summary_ru",
field=models.TextField(blank=True, null=True),
),
migrations.AddField(
model_name="uploadvideo",
name="title_en",
field=models.CharField(max_length=100, null=True),
),
migrations.AddField(
model_name="uploadvideo",
name="title_ru",
field=models.CharField(max_length=100, null=True),
),
]

View File

@ -0,0 +1,83 @@
# Generated by Django 4.2.16 on 2024-09-29 13:17
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("course", "0002_course_summary_en_course_summary_ru_course_title_en_and_more"),
]
operations = [
migrations.AddField(
model_name="course",
name="summary_es",
field=models.TextField(blank=True, max_length=200, null=True),
),
migrations.AddField(
model_name="course",
name="summary_fr",
field=models.TextField(blank=True, max_length=200, null=True),
),
migrations.AddField(
model_name="course",
name="title_es",
field=models.CharField(max_length=200, null=True),
),
migrations.AddField(
model_name="course",
name="title_fr",
field=models.CharField(max_length=200, null=True),
),
migrations.AddField(
model_name="program",
name="summary_es",
field=models.TextField(blank=True, null=True),
),
migrations.AddField(
model_name="program",
name="summary_fr",
field=models.TextField(blank=True, null=True),
),
migrations.AddField(
model_name="program",
name="title_es",
field=models.CharField(max_length=150, null=True, unique=True),
),
migrations.AddField(
model_name="program",
name="title_fr",
field=models.CharField(max_length=150, null=True, unique=True),
),
migrations.AddField(
model_name="upload",
name="title_es",
field=models.CharField(max_length=100, null=True),
),
migrations.AddField(
model_name="upload",
name="title_fr",
field=models.CharField(max_length=100, null=True),
),
migrations.AddField(
model_name="uploadvideo",
name="summary_es",
field=models.TextField(blank=True, null=True),
),
migrations.AddField(
model_name="uploadvideo",
name="summary_fr",
field=models.TextField(blank=True, null=True),
),
migrations.AddField(
model_name="uploadvideo",
name="title_es",
field=models.CharField(max_length=100, null=True),
),
migrations.AddField(
model_name="uploadvideo",
name="title_fr",
field=models.CharField(max_length=100, null=True),
),
]

View File

@ -5,6 +5,7 @@ from django.core.validators import FileExtensionValidator
from django.db.models.signals import pre_save, post_save, post_delete
from django.db.models import Q
from django.dispatch import receiver
from django.utils.translation import gettext_lazy as _
# project import
from .utils import *
@ -20,23 +21,23 @@ YEARS = (
)
# LEVEL_COURSE = "Level course"
BACHELOR_DEGREE = "Bachelor"
MASTER_DEGREE = "Master"
BACHELOR_DEGREE = _("Bachelor")
MASTER_DEGREE = _("Master")
LEVEL = (
# (LEVEL_COURSE, "Level course"),
(BACHELOR_DEGREE, "Bachelor Degree"),
(MASTER_DEGREE, "Master Degree"),
(BACHELOR_DEGREE, _("Bachelor Degree")),
(MASTER_DEGREE, _("Master Degree")),
)
FIRST = "First"
SECOND = "Second"
THIRD = "Third"
FIRST = _("First")
SECOND = _("Second")
THIRD = _("Third")
SEMESTER = (
(FIRST, "First"),
(SECOND, "Second"),
(THIRD, "Third"),
(FIRST, _("First")),
(SECOND, _("Second")),
(THIRD, _("Third")),
)
@ -67,12 +68,12 @@ class Program(models.Model):
@receiver(post_save, sender=Program)
def log_save(sender, instance, created, **kwargs):
verb = "created" if created else "updated"
ActivityLog.objects.create(message=f"The program '{instance}' has been {verb}.")
ActivityLog.objects.create(message=_(f"The program '{instance}' has been {verb}."))
@receiver(post_delete, sender=Program)
def log_delete(sender, instance, **kwargs):
ActivityLog.objects.create(message=f"The program '{instance}' has been deleted.")
ActivityLog.objects.create(message=_(f"The program '{instance}' has been deleted."))
class CourseManager(models.Manager):
@ -134,21 +135,21 @@ pre_save.connect(course_pre_save_receiver, sender=Course)
@receiver(post_save, sender=Course)
def log_save(sender, instance, created, **kwargs):
verb = "created" if created else "updated"
ActivityLog.objects.create(message=f"The course '{instance}' has been {verb}.")
ActivityLog.objects.create(message=_(f"The course '{instance}' has been {verb}."))
@receiver(post_delete, sender=Course)
def log_delete(sender, instance, **kwargs):
ActivityLog.objects.create(message=f"The course '{instance}' has been deleted.")
ActivityLog.objects.create(message=_(f"The course '{instance}' has been deleted."))
class CourseAllocation(models.Model):
lecturer = models.ForeignKey(
settings.AUTH_USER_MODEL,
on_delete=models.CASCADE,
related_name="allocated_lecturer",
related_name=_("allocated_lecturer"),
)
courses = models.ManyToManyField(Course, related_name="allocated_course")
courses = models.ManyToManyField(Course, related_name=_("allocated_course"))
session = models.ForeignKey(
"core.Session", on_delete=models.CASCADE, blank=True, null=True
)
@ -213,18 +214,24 @@ class Upload(models.Model):
def log_save(sender, instance, created, **kwargs):
if created:
ActivityLog.objects.create(
message=f"The file '{instance.title}' has been uploaded to the course '{instance.course}'."
message=_(
f"The file '{instance.title}' has been uploaded to the course '{instance.course}'."
)
)
else:
ActivityLog.objects.create(
message=f"The file '{instance.title}' of the course '{instance.course}' has been updated."
message=_(
f"The file '{instance.title}' of the course '{instance.course}' has been updated."
)
)
@receiver(post_delete, sender=Upload)
def log_delete(sender, instance, **kwargs):
ActivityLog.objects.create(
message=f"The file '{instance.title}' of the course '{instance.course}' has been deleted."
message=_(
f"The file '{instance.title}' of the course '{instance.course}' has been deleted."
)
)
@ -234,7 +241,7 @@ class UploadVideo(models.Model):
course = models.ForeignKey(Course, on_delete=models.CASCADE)
video = models.FileField(
upload_to="course_videos/",
help_text="Valid video formats: mp4, mkv, wmv, 3gp, f4v, avi, mp3",
help_text=_("Valid video formats: mp4, mkv, wmv, 3gp, f4v, avi, mp3"),
validators=[
FileExtensionValidator(["mp4", "mkv", "wmv", "3gp", "f4v", "avi", "mp3"])
],
@ -267,23 +274,29 @@ pre_save.connect(video_pre_save_receiver, sender=UploadVideo)
def log_save(sender, instance, created, **kwargs):
if created:
ActivityLog.objects.create(
message=f"The video '{instance.title}' has been uploaded to the course {instance.course}."
message=_(
f"The video '{instance.title}' has been uploaded to the course {instance.course}."
)
)
else:
ActivityLog.objects.create(
message=f"The video '{instance.title}' of the course '{instance.course}' has been updated."
message=_(
f"The video '{instance.title}' of the course '{instance.course}' has been updated."
)
)
@receiver(post_delete, sender=UploadVideo)
def log_delete(sender, instance, **kwargs):
ActivityLog.objects.create(
message=f"The video '{instance.title}' of the course '{instance.course}' has been deleted."
message=_(
f"The video '{instance.title}' of the course '{instance.course}' has been deleted."
)
)
class CourseOffer(models.Model):
"""NOTE: Only department head can offer semester courses"""
_("""NOTE: Only department head can offer semester courses""")
dep_head = models.ForeignKey("accounts.DepartmentHead", on_delete=models.CASCADE)

22
course/translation.py Normal file
View File

@ -0,0 +1,22 @@
from modeltranslation.translator import register, TranslationOptions
from .models import Program, Course, Upload, UploadVideo
@register(Program)
class ProgramTranslationOptions(TranslationOptions):
fields = ('title', 'summary',)
empty_values=None
@register(Course)
class CourseTranslationOptions(TranslationOptions):
fields = ('title', 'summary',)
empty_values=None
@register(Upload)
class UploadTranslationOptions(TranslationOptions):
fields = ('title',)
empty_values=None
@register(UploadVideo)
class UploadVideoTranslationOptions(TranslationOptions):
fields = ('title', 'summary',)
empty_values=None

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -2,6 +2,8 @@ from django import forms
from django.contrib import admin
from django.contrib.admin.widgets import FilteredSelectMultiple
from django.utils.translation import gettext_lazy as _
from modeltranslation.admin import TranslationAdmin
from modeltranslation.forms import TranslationModelForm
from .models import (
Quiz,
@ -18,7 +20,7 @@ class ChoiceInline(admin.TabularInline):
model = Choice
class QuizAdminForm(forms.ModelForm):
class QuizAdminForm(TranslationModelForm):
class Meta:
model = Quiz
exclude = []
@ -45,9 +47,9 @@ class QuizAdminForm(forms.ModelForm):
return quiz
class QuizAdmin(admin.ModelAdmin):
class QuizAdmin(TranslationAdmin):
form = QuizAdminForm
fields = ('title', 'description',)
list_display = ("title",)
# list_filter = ('category',)
search_fields = (
@ -56,10 +58,10 @@ class QuizAdmin(admin.ModelAdmin):
)
class MCQuestionAdmin(admin.ModelAdmin):
class MCQuestionAdmin(TranslationAdmin):
list_display = ("content",)
# list_filter = ('category',)
fields = ("content", "figure", "quiz", "explanation", "choice_order")
fieldsets = [(u'figure' 'quiz' 'choice_order', {'fields': ("content","explanation")})]
search_fields = ("content", "explanation")
filter_horizontal = ("quiz",)

View File

@ -0,0 +1,105 @@
# Generated by Django 4.2.16 on 2024-09-29 07:44
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("quiz", "0001_initial"),
]
operations = [
migrations.AddField(
model_name="choice",
name="choice_en",
field=models.CharField(
help_text="Enter the choice text that you want displayed",
max_length=1000,
null=True,
verbose_name="Content",
),
),
migrations.AddField(
model_name="choice",
name="choice_ru",
field=models.CharField(
help_text="Enter the choice text that you want displayed",
max_length=1000,
null=True,
verbose_name="Content",
),
),
migrations.AddField(
model_name="question",
name="content_en",
field=models.CharField(
help_text="Enter the question text that you want displayed",
max_length=1000,
null=True,
verbose_name="Question",
),
),
migrations.AddField(
model_name="question",
name="content_ru",
field=models.CharField(
help_text="Enter the question text that you want displayed",
max_length=1000,
null=True,
verbose_name="Question",
),
),
migrations.AddField(
model_name="question",
name="explanation_en",
field=models.TextField(
blank=True,
help_text="Explanation to be shown after the question has been answered.",
max_length=2000,
null=True,
verbose_name="Explanation",
),
),
migrations.AddField(
model_name="question",
name="explanation_ru",
field=models.TextField(
blank=True,
help_text="Explanation to be shown after the question has been answered.",
max_length=2000,
null=True,
verbose_name="Explanation",
),
),
migrations.AddField(
model_name="quiz",
name="description_en",
field=models.TextField(
blank=True,
help_text="A detailed description of the quiz",
null=True,
verbose_name="Description",
),
),
migrations.AddField(
model_name="quiz",
name="description_ru",
field=models.TextField(
blank=True,
help_text="A detailed description of the quiz",
null=True,
verbose_name="Description",
),
),
migrations.AddField(
model_name="quiz",
name="title_en",
field=models.CharField(max_length=60, null=True, verbose_name="Title"),
),
migrations.AddField(
model_name="quiz",
name="title_ru",
field=models.CharField(max_length=60, null=True, verbose_name="Title"),
),
]

View File

@ -0,0 +1,105 @@
# Generated by Django 4.2.16 on 2024-09-29 13:17
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("quiz", "0002_choice_choice_en_choice_choice_ru_and_more"),
]
operations = [
migrations.AddField(
model_name="choice",
name="choice_es",
field=models.CharField(
help_text="Enter the choice text that you want displayed",
max_length=1000,
null=True,
verbose_name="Content",
),
),
migrations.AddField(
model_name="choice",
name="choice_fr",
field=models.CharField(
help_text="Enter the choice text that you want displayed",
max_length=1000,
null=True,
verbose_name="Content",
),
),
migrations.AddField(
model_name="question",
name="content_es",
field=models.CharField(
help_text="Enter the question text that you want displayed",
max_length=1000,
null=True,
verbose_name="Question",
),
),
migrations.AddField(
model_name="question",
name="content_fr",
field=models.CharField(
help_text="Enter the question text that you want displayed",
max_length=1000,
null=True,
verbose_name="Question",
),
),
migrations.AddField(
model_name="question",
name="explanation_es",
field=models.TextField(
blank=True,
help_text="Explanation to be shown after the question has been answered.",
max_length=2000,
null=True,
verbose_name="Explanation",
),
),
migrations.AddField(
model_name="question",
name="explanation_fr",
field=models.TextField(
blank=True,
help_text="Explanation to be shown after the question has been answered.",
max_length=2000,
null=True,
verbose_name="Explanation",
),
),
migrations.AddField(
model_name="quiz",
name="description_es",
field=models.TextField(
blank=True,
help_text="A detailed description of the quiz",
null=True,
verbose_name="Description",
),
),
migrations.AddField(
model_name="quiz",
name="description_fr",
field=models.TextField(
blank=True,
help_text="A detailed description of the quiz",
null=True,
verbose_name="Description",
),
),
migrations.AddField(
model_name="quiz",
name="title_es",
field=models.CharField(max_length=60, null=True, verbose_name="Title"),
),
migrations.AddField(
model_name="quiz",
name="title_fr",
field=models.CharField(max_length=60, null=True, verbose_name="Title"),
),
]

View File

@ -245,7 +245,7 @@ class SittingManager(models.Manager):
if len(question_set) == 0:
raise ImproperlyConfigured(
"Question set of the quiz is empty. Please configure questions properly"
_("Question set of the quiz is empty. Please configure questions properly")
)
# if quiz.max_questions and quiz.max_questions < len(question_set):
@ -401,9 +401,9 @@ class Sitting(models.Model):
@property
def result_message(self):
if self.check_if_passed:
return f"You have passed this quiz, congratulation"
return _(f"You have passed this quiz, congratulation")
else:
return f"You failed this quiz, give it one chance again."
return _(f"You failed this quiz, give it one chance again.")
def add_user_answer(self, question, guess):
current = json.loads(self.user_answers)

21
quiz/translation.py Normal file
View File

@ -0,0 +1,21 @@
from modeltranslation.translator import register, TranslationOptions
from .models import Quiz, Question, Choice, MCQuestion
@register(Quiz)
class QuizTranslationOptions(TranslationOptions):
fields = ('title', 'description',)
empty_values=None
@register(Question)
class QuestionTranslationOptions(TranslationOptions):
fields = ('content', 'explanation',)
empty_values=None
@register(Choice)
class ChoiceTranslationOptions(TranslationOptions):
fields = ('choice',)
empty_values=None
@register(MCQuestion)
class MCQuestionTranslationOptions(TranslationOptions):
pass

View File

@ -9,6 +9,7 @@ django-model-utils==4.3.1 # https://github.com/jazzband/django-model-utils
django-crispy-forms==1.14.0 # https://github.com/django-crispy-forms/django-crispy-forms
crispy-bootstrap5==0.7 # https://github.com/django-crispy-forms/crispy-bootstrap5
django-filter==23.5 # https://github.com/carltongibson/django-filter
django-modeltranslation==0.18.11 # https://github.com/Buren/django-modeltranslation
# Django REST Framework
djangorestframework==3.14.0 # https://github.com/encode/django-rest-framework

View File

@ -1,9 +1,9 @@
{% extends 'error_handler_base.html' %}
{% load i18n %}
{% block content %}
<div class="text-center mt-5">
<h1>Bad request</h1>
<p>Please make sure the form is correctly filled.</p>
<a href="/" class="link">&LeftArrow; Return to the app</a>
<h1>{% trans 'Bad request' %}</h1>
<p>{% trans 'Please make sure the form is correctly filled.' %}</p>
<a href="/" class="link">&LeftArrow; {% trans 'Return to the app' %}</a>
</div>
{% endblock %}

View File

@ -1,9 +1,9 @@
{% extends 'error_handler_base.html' %}
{% load i18n %}
{% block content %}
<div class="text-center mt-5">
<h1>403, forbidden</h1>
<p>You need the proper permission to make that request.</p>
<a href="/" class="link">&LeftArrow; Return to the app</a>
<h1>403, {% trans 'forbidden' %}</h1>
<p>{% trans 'You need the proper permission to make that request.' %}</p>
<a href="/" class="link">&LeftArrow; {% trans 'Return to the app' %}</a>
</div>
{% endblock %}

View File

@ -1,9 +1,9 @@
{% extends 'error_handler_base.html' %}
{% load i18n %}
{% block content %}
<div class="text-center mt-5">
<h1>404</h1>
<p>Looks like the page you're looking for is does not exist.</p>
<a href="/" class="link">&LeftArrow; Return to the app</a>
<p>{% trans 'Looks like the page you're looking for is does not exist.' %}</p>
<a href="/" class="link">&LeftArrow; {% trans 'Return to the app' %}</a>
</div>
{% endblock %}

View File

@ -1,9 +1,9 @@
{% extends 'error_handler_base.html' %}
{% load i18n %}
{% block content %}
<div class="text-center mt-5">
<h1>Server error</h1>
<p>Please try again later.</p>
<a href="/" class="link">&LeftArrow; Return to the app</a>
<h1>{% trans 'Server error' %}</h1>
<p>{% trans 'Please try again later.' %}</p>
<a href="/" class="link">&LeftArrow; {% trans 'Return to the app' %}</a>
</div>
{% endblock %}

View File

@ -1,5 +1,6 @@
{% extends 'base.html' %}
{% block title %}{{ title }} | Learning management system{% endblock title %}
{% load i18n %}
{% block title %}{{ title }} | {% trans 'Learning management system' %}{% endblock title %}
{% load crispy_forms_tags %}
{% load static %}
@ -7,13 +8,13 @@
<nav style="--bs-breadcrumb-divider: '>';" aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="/">Home</a></li>
<li class="breadcrumb-item"><a href="{% url 'lecturer_list' %}">Lecturers</a></li>
<li class="breadcrumb-item active" aria-current="page">Add</li>
<li class="breadcrumb-item"><a href="/">{% trans 'Home' %}</a></li>
<li class="breadcrumb-item"><a href="{% url 'lecturer_list' %}">{% trans 'Lecturers' %}</a></li>
<li class="breadcrumb-item active" aria-current="page">{% trans 'Add' %}</li>
</ol>
</nav>
<h4 class="fw-bold mb-3"><i class="fas fa-chalkboard-teacher me-2"></i>Lecturer Add Form</h4>
<h4 class="fw-bold mb-3"><i class="fas fa-chalkboard-teacher me-2"></i>{% trans 'Lecturer Add Form' %}</h4>
{% include 'snippets/messages.html' %}
@ -22,7 +23,7 @@
<div class="col-md-6">
<div class="card">
<p class="form-title">Personal Info</p>
<p class="form-title">{% trans 'Personal Info' %}</p>
<div class="p-2">
{{ form.first_name|as_crispy_field }}
{{ form.last_name|as_crispy_field }}
@ -33,7 +34,7 @@
</div>
</div>
</div>
<input class="btn btn-primary" type="submit" value="Save">
<input class="btn btn-primary" type="submit" value="{% trans 'Save' %}">
</form>
{% endblock content %}

View File

@ -1,19 +1,21 @@
{% extends 'base.html' %}
{% block title %}{{ title }} | Learning management system{% endblock title %}
{% load i18n %}
{% block title %}{{ title }} | {% trans 'Learning management system' %}{% endblock title %}
{% load crispy_forms_tags %}
{% load static %}
{% block content %}
<nav style="--bs-breadcrumb-divider: '>';" aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="/">Home</a></li>
<li class="breadcrumb-item"><a href="{% url 'student_list' %}">Students</a></li>
<li class="breadcrumb-item active" aria-current="page">Add</li>
<li class="breadcrumb-item"><a href="/">{% trans 'Home' %}</a></li>
<li class="breadcrumb-item"><a href="{% url 'student_list' %}">{% trans 'Students' %}</a></li>
<li class="breadcrumb-item active" aria-current="page">{% trans 'Add' %}</li>
</ol>
</nav>
<h4 class="mb-3 fw-bold"><i class="fas fa-user-graduate me-2"></i>Student Add Form</h4>
<h4 class="mb-3 fw-bold"><i class="fas fa-user-graduate me-2"></i>{% trans 'Student Add Form' %}</h4>
{% include 'snippets/messages.html' %}
@ -22,7 +24,7 @@
<div class="col-md-6">
<div class="card">
<p class="form-title">Personal Info</p>
<p class="form-title">{% trans 'Personal Info' %}</p>
<div class="card-body">
{{ form.first_name|as_crispy_field }}
{{ form.last_name|as_crispy_field }}
@ -35,7 +37,7 @@
</div>
<div class="col-md-6 mr-auto">
<div class="card">
<p class="form-title">Others</p>
<p class="form-title">{% trans 'Others' %}</p>
<div class="card-body">
{{ form.program|as_crispy_field }}
{{ form.level|as_crispy_field }}
@ -44,7 +46,7 @@
</div>
</div>
<input class="btn btn-primary" type="submit" value="Save">
<input class="btn btn-primary" type="submit" value="{% trans 'Save' %}">
</form>
{% endblock content %}

View File

@ -1,5 +1,6 @@
{% extends 'base.html' %}
{% block title %}{{ title }} | Learning management system{% endblock title %}
{% load i18n %}
{% block title %}{{ title }} | {% trans 'Learning management system' %}{% endblock title %}
{% load crispy_forms_tags %}
{% load static %}
@ -7,13 +8,13 @@
<nav style="--bs-breadcrumb-divider: '>';" aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="/">Home</a></li>
<li class="breadcrumb-item"><a href="{% url 'lecturer_list' %}">Lecturers</a></li>
<li class="breadcrumb-item active" aria-current="page">Update</li>
<li class="breadcrumb-item"><a href="/">{% trans 'Home' %}</a></li>
<li class="breadcrumb-item"><a href="{% url 'lecturer_list' %}">{% trans 'Lecturers' %}</a></li>
<li class="breadcrumb-item active" aria-current="page">{% trans 'Update' %}</li>
</ol>
</nav>
<div class="title-1"><i class="fas fa-cogs"></i>Lecturer Update Form</div>
<div class="title-1"><i class="fas fa-cogs"></i>{% trans 'Lecturer Update Form' %}</div>
<br>
<br>
@ -23,7 +24,7 @@
<div class="row mb-3">
<div class="col-md-6">
<div class="card">
<p class="form-title">Email &amp; Personal Info</p>
<p class="form-title">{% trans 'Email' %} &amp; {% trans 'Personal Info' %}</p>
<div class="card-body">
{{ form.email|as_crispy_field }}
{{ form.first_name|as_crispy_field }}
@ -35,13 +36,13 @@
</div>
<div class="col-md-6">
<div class="card">
<p class="form-title">Others</p>
<p class="form-title">{% trans 'Others' %}</p>
<div class="card-body">
{{ form.picture|as_crispy_field }}
</div>
</div>
</div>
</div>
<input class="btn btn-primary" type="submit" value="Save">
<input class="btn btn-primary" type="submit" value="{% trans 'Save' %}">
</form>
{% endblock content %}

View File

@ -1,5 +1,6 @@
{% extends 'base.html' %}
{% block title %}{{ title }} | Learning management system{% endblock title %}
{% load i18n %}
{% block title %}{{ title }} | {% trans 'Learning management system' %}{% endblock title %}
{% load crispy_forms_tags %}
{% load static %}
@ -7,13 +8,13 @@
<nav style="--bs-breadcrumb-divider: '>';" aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="/">Home</a></li>
<li class="breadcrumb-item"><a href="{% url 'student_list' %}">Students</a></li>
<li class="breadcrumb-item active" aria-current="page">Update</li>
<li class="breadcrumb-item"><a href="/">{% trans 'Home' %}</a></li>
<li class="breadcrumb-item"><a href="{% url 'student_list' %}">{% trans 'Students' %}</a></li>
<li class="breadcrumb-item active" aria-current="page">{% trans 'Update' %}</li>
</ol>
</nav>
<h4 class="fw-bold mb-3"><i class="fas fa-cog me-2"></i>Student Update Form</h4>
<h4 class="fw-bold mb-3"><i class="fas fa-cog me-2"></i>{% trans 'Student Update Form' %}</h4>
{% include 'snippets/messages.html' %}
@ -21,7 +22,7 @@
<div class="row mb-3">
<div class="col-md-6">
<div class="card">
<p class="form-title">Email &amp; Personal Info</p>
<p class="form-title">{% trans 'Email' %} &amp; {% trans 'Personal Info' %}</p>
<div class="card-body">
{{ form.email|as_crispy_field }}
@ -35,13 +36,13 @@
</div>
<div class="col-md-6">
<div class="card">
<p class="form-title">Others</p>
<p class="form-title">{% trans 'Others' %}</p>
<div class="card-body">
{{ form.picture|as_crispy_field }}
</div>
</div>
</div>
</div>
<input class="btn btn-primary" type="submit" value="Save">
<input class="btn btn-primary" type="submit" value="{% trans 'Save' %}">
</form>
{% endblock content %}

View File

@ -1,23 +1,24 @@
{% extends 'base.html' %}
{% block title %}{{ title }} | Learning management system{% endblock title %}
{% load i18n %}
{% block title %}{{ title }} | {% trans 'Learning management system' %}{% endblock title %}
{% block content %}
<nav style="--bs-breadcrumb-divider: '>';" aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="/">Home</a></li>
<li class="breadcrumb-item active" aria-current="page">Lecturers</li>
<li class="breadcrumb-item"><a href="/">{% trans 'Home' %}</a></li>
<li class="breadcrumb-item active" aria-current="page">{% trans 'Lecturers' %}</li>
</ol>
</nav>
{% if request.user.is_superuser %}
<div class="manage-wrap">
<a class="btn btn-primary" href="{% url 'add_lecturer' %}"><i class="fas fa-plus"></i>Add Lecturer</a>
<a class="btn btn-primary" target="_blank" href="{% url 'lecturer_list_pdf' %}"><i class="fas fa-download"></i> Download pdf</a><!--new-->
<a class="btn btn-primary" href="{% url 'add_lecturer' %}"><i class="fas fa-plus"></i>{% trans 'Add Lecturer' %}</a>
<a class="btn btn-primary" target="_blank" href="{% url 'lecturer_list_pdf' %}"><i class="fas fa-download"></i> {% trans 'Download pdf' %}</a><!--new-->
</div>
{% endif %}
<p class="title-1"><i class="fas fa-chalkboard-teacher"></i>Lecturers</p>
<p class="title-1"><i class="fas fa-chalkboard-teacher"></i>{% trans 'Lecturers' %}</p>
{% include 'snippets/messages.html' %}
{% include 'snippets/filter_form.html' %}
@ -27,14 +28,14 @@
<thead>
<tr>
<th>#</th>
<th> ID No. </th>
<th> Full Name </th>
<th> Email </th>
<th> Mob No. </th>
<th> Address/city </th>
<th> Last login </th>
<th> {% trans 'ID No.' %}' </th>
<th> {% trans 'Full Name' %} </th>
<th> {% trans 'Email' %} </th>
<th> {% trans 'Mob No.' %} </th>
<th> {% trans 'Address/city' %} </th>
<th> {% trans 'Last login' %} </th>
{% if request.user.is_superuser %}
<th> Action </th>
<th> {% trans 'Action' %} </th>
{% endif %}
</tr>
</thead>
@ -55,9 +56,9 @@
<i class="fa fa-ellipsis-vertical"></i>
</button>
<ul class="dropdown-menu position-fixed">
<li><a class="dropdown-item" href="{% url 'staff_edit' pk=lecturer.pk %}"><i class="fas fa-edit"></i> Update</a></li>
<li><a class="dropdown-item" target="_blank" href="{% url 'profile_single' lecturer.id %}?download_pdf=1"><i class="fas fa-download"></i> Download PDF</a></li>
<li><a class="dropdown-item text-danger" href="{% url 'lecturer_delete' pk=lecturer.pk %}"><i class="fas fa-trash-alt"></i> Delete</a></li>
<li><a class="dropdown-item" href="{% url 'staff_edit' pk=lecturer.pk %}"><i class="fas fa-edit"></i>{% trans 'Update' %}</a></li>
<li><a class="dropdown-item" target="_blank" href="{% url 'profile_single' lecturer.id %}?download_pdf=1"><i class="fas fa-download"></i>{% trans 'Download PDF' %}</a></li>
<li><a class="dropdown-item text-danger" href="{% url 'lecturer_delete' pk=lecturer.pk %}"><i class="fas fa-trash-alt"></i> {% trans 'Delete' %}</a></li>
</ul>
</div>
</td>
@ -67,11 +68,11 @@
<tr>
<td colspan="8">
<span class="text-danger">
No Lecturer(s).
{% trans 'No Lecturer(s).' %}
{% if request.user.is_superuser %}
<a href="{% url 'add_lecturer' %}">
<i class="primary" style="font-size: 22px;">
Add Lecturer Now.
{% trans 'Add Lecturer Now.' %}
</i>
{% endif %}
</a>

View File

@ -1,5 +1,6 @@
{% extends 'base.html' %}
{% block title %}{{ title }} | Learning management system{% endblock title %}
{% load i18n %}
{% block title %}{{ title }} | {% trans 'Learning management system' %}{% endblock title %}
{% load crispy_forms_tags %}
{% load static %}
@ -7,7 +8,7 @@
<form method="POST">{% csrf_token %}
{{ form.as_p }}
<input type="submit" name="" value="Save">
<input type="submit" name="" value="{% trans 'Save' %}">
</form>
{% endblock %}

View File

@ -1,8 +1,9 @@
{% extends 'base.html' %}
{% block title %} {{ title }} | Learning management system{% endblock title %}
{% load i18n %}
{% block title %} {{ title }} | {% trans 'Learning management system' %}{% endblock title %}
{% load static %}
{% load i18n %}
{% block content %}
@ -10,7 +11,7 @@
<nav style="--bs-breadcrumb-divider: '>';" aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="/">Home</a></li>
<li class="breadcrumb-item"><a href="/">{% trans 'Home' %}</a></li>
<li class="breadcrumb-item active" aria-current="page">{{ user.get_full_name }}</li>
</ol>
</nav>
@ -25,17 +26,17 @@
<img src="{{ user.picture.url }}" class="w-100">
<ul class="px-2 list-unstyled">
<li>{{ user.get_full_name|title }}</li>
<li><strong>Last login: </strong>{{ user.last_login|date }}</li>
<li><strong>Role: </strong>
<li><strong>{% trans 'Last login:' %} </strong>{{ user.last_login|date }}</li>
<li><strong>{% trans 'Role:' %} </strong>
{{ user.get_user_role }}
</li>
</ul>
</div>
<hr>
<a class="mb-2" href="{% url 'edit_profile' %}"><i class="fas fa-user-edit unstyled"></i>
<span class="mobile-hide">Edit Profile</span></a>
<span class="mobile-hide">{% trans 'Edit Profile' %}</span></a>
<a href="{% url 'change_password' %}"><i class="fas fa-lock unstyled"></i><span class="mobile-hide">
Change password</span></a>
{% trans 'Change password' %}</span></a>
</div>
</div>
@ -58,7 +59,7 @@
{% endif %} -->
{% if user.is_lecturer %}
<p class="fw-bold"><i class="fas fa-book-open"></i> My Courses</p>
<p class="fw-bold"><i class="fas fa-book-open"></i>{% trans 'My Courses' %}</p>
{% if courses %}
<ul>
{% for course in courses %}
@ -66,42 +67,42 @@
{% endfor %}
</ul>
{% else %}
<div class="text-danger">No courses assigned!</div>
<div class="text-danger">{% trans 'No courses assigned!' %}</div>
{% endif %}
<hr>
{% endif %}
<p class="fw-bold"><i class="fas fa-user"></i> Personal Info</p>
<p class="fw-bold"><i class="fas fa-user"></i>{% trans 'Personal Info' %}</p>
<div class="dashboard-description">
<p><strong>First Name:</strong> {{ user.first_name|title }}</p>
<p><strong>Last Name:</strong> {{ user.last_name|title }}</p>
<p><strong>ID No.:</strong> {{ user.username }}</p>
<p><strong>{% trans 'First Name:' %}</strong> {{ user.first_name|title }}</p>
<p><strong>{% trans 'Last Name:' %}</strong> {{ user.last_name|title }}</p>
<p><strong>{% trans 'ID No.:' %}</strong> {{ user.username }}</p>
</div>
{% if user.is_student %}
<hr>
<p class="fw-bold"><i class="fas fa-graduation-cap"></i> Applicant Info</p>
<p class="fw-bold"><i class="fas fa-graduation-cap"></i>{% trans 'Applicant Info' %}</p>
<div class="dashboard-description">
<p><strong>School: </strong>Hawas Preparatory School</p>
<p><strong>Level: </strong>{{ level.level }}</p>
<p><strong>{% trans 'School:' %} </strong>{% trans 'Hawas Preparatory School' %}</p>
<p><strong>{% trans 'Level:' %} </strong>{{ level.level }}</p>
</div>
{% endif %}
<hr>
<p class="fw-bold"><i class="fas fa-phone-square-alt"></i> Contact Info</p>
<p class="fw-bold"><i class="fas fa-phone-square-alt"></i>{% trans 'Contact Info' %}</p>
<div class="dashboard-description">
<p><strong>Email:</strong> {{ user.email }}</p>
<p><strong>Tel No.:</strong> {{ user.phone }}</p>
<p><strong>Address/city:</strong> {{ user.address }}</p>
<p><strong>{% trans 'Email:' %}</strong> {{ user.email }}</p>
<p><strong>{% trans 'Tel No.:' %}</strong> {{ user.phone }}</p>
<p><strong>{% trans 'Address/city:' %}</strong> {{ user.address }}</p>
</div>
<hr>
<p class="fw-bold"><i class="fa fa-calendar-day"></i> Important Dates</p>
<p class="fw-bold"><i class="fa fa-calendar-day"></i>{% trans 'Important Dates' %}</p>
<div class="dashboard-description">
<p><strong>Last login:</strong> {{ user.last_login }}</p>
<p><strong>{% trans 'Last login:' %}</strong> {{ user.last_login }}</p>
{% if current_semester and current_session %}
<p><strong>Academic Year:</strong> {{ current_semester }} Semester {{ current_session }}</p>
<p><strong>{% trans 'Academic Year:' %}</strong> {{ current_semester }} {% trans 'Semester' %} {{ current_session }}</p>
{% endif %}
<p><strong>Registered Date:</strong> {{ user.date_joined|date }}</p>
<p><strong>{% trans 'Registered Date:' %}</strong> {{ user.date_joined|date }}</p>
</div>
</div>
</div>

View File

@ -1,8 +1,9 @@
{% extends 'base.html' %}
{% block title %} {{ title }} | Learning management system{% endblock title %}
{% load i18n %}
{% block title %} {{ title }} | {% trans 'Learning management system' %}{% endblock title %}
{% load static %}
{% load i18n %}
{% block content %}
@ -10,7 +11,7 @@
<nav style="--bs-breadcrumb-divider: '>';" aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="/">Home</a></li>
<li class="breadcrumb-item"><a href="/">{% trans 'Home' %}</a></li>
<li class="breadcrumb-item active" aria-current="page">{{ user.get_full_name }}</li>
</ol>
</nav>
@ -25,8 +26,8 @@
<img src="{{ user.picture.url }}" class="w-100">
<ul class="px-2 list-unstyled">
<li>{{ user.get_full_name|title }}</li>
<li><strong>Last login: </strong>{{ user.last_login|date }}</li>
<li><strong>Role: </strong>
<li><strong>{% trans 'Last login' %}: </strong>{{ user.last_login|date }}</li>
<li><strong>{% trans 'Role' %}: </strong>
{{ user.get_user_role }}
</li>
</ul>
@ -36,15 +37,15 @@
<div class="d-flex flex-column">
{% if user.is_student %}
<a href="{% url 'student_edit' pk=user.id %}">
<i class="fas fa-user-edit unstyled"></i><span class="mobile-hide">Edit Profile</span>
<i class="fas fa-user-edit unstyled"></i><span class="mobile-hide">{% trans 'Edit Profile' %}</span>
</a>
<a href="{% url 'student_program_edit' user.id %}">
<i class="fas fa-pen-to-square unstyled"></i><span class="mobile-hide">Change Program</span>
<i class="fas fa-pen-to-square unstyled"></i><span class="mobile-hide">{% trans 'Change Program' %}</span>
</a>
{% endif %}
{% if user.is_lecturer %}
<a href="{% url 'staff_edit' pk=user.id %}">
<i class="fas fa-user-edit unstyled"></i><span class="mobile-hide">Edit Profile</span>
<i class="fas fa-user-edit unstyled"></i><span class="mobile-hide">{% trans 'Edit Profile' %}</span>
</a>
{% endif %}
</div>
@ -71,7 +72,7 @@
{% endif %} -->
{% if user.is_lecturer %}
<p class="fw-bold"><i class="fas fa-book-open"></i> My Courses</p>
<p class="fw-bold"><i class="fas fa-book-open"></i> {% trans 'My Courses' %}</p>
{% if courses %}
<ul>
{% for course in courses %}
@ -79,43 +80,43 @@
{% endfor %}
</ul>
{% else %}
<div class="text-danger">No courses assigned!</div>
<div class="text-danger">{% trans 'No courses assigned!' %}</div>
{% endif %}
<hr>
{% endif %}
<p class="fw-bold"><i class="fas fa-user"></i> Personal Info</p>
<p class="fw-bold"><i class="fas fa-user"></i> {% trans 'Personal Info' %}</p>
<div class="dashboard-description">
<p><strong>First Name:</strong> {{ user.first_name|title }}</p>
<p><strong>Last Name:</strong> {{ user.last_name|title }}</p>
<p><strong>ID No.:</strong> {{ user.username }}</p>
<p><strong>{% trans 'First Name' %}:</strong> {{ user.first_name|title }}</p>
<p><strong>{% trans 'Last Name' %}:</strong> {{ user.last_name|title }}</p>
<p><strong>{% trans 'ID No.' %}:</strong> {{ user.username }}</p>
</div>
{% if user.is_student %}
<hr>
<p class="fw-bold"><i class="fas fa-graduation-cap"></i> Applicant Info</p>
<p class="fw-bold"><i class="fas fa-graduation-cap"></i> {% trans 'Applicant Info' %}</p>
<div class="dashboard-description">
<p><strong>School: </strong>Hawas Preparatory School</p>
<p><strong>Level: </strong>{{ level.level }}</p>
<p><strong>Program: </strong>{{ student.program }}</p>
<p><strong>{% trans 'School' %}: </strong>Unity College</p>
<p><strong>{% trans 'Level' %}: </strong>{{ level.level }}</p>
<p><strong>{% trans 'Program' %}: </strong>{{ student.program }}</p>
</div>
{% endif %}
<hr>
<p class="fw-bold"><i class="fas fa-phone-square-alt"></i> Contact Info</p>
<p class="fw-bold"><i class="fas fa-phone-square-alt"></i>{% trans 'Contact Info' %}</p>
<div class="dashboard-description">
<p><strong>Email:</strong> {{ user.email }}</p>
<p><strong>Tel No.:</strong> {{ user.phone }}</p>
<p><strong>Address/city:</strong> {{ user.address }}</p>
<p><strong>{% trans 'Email' %}:</strong> {{ user.email }}</p>
<p><strong>{% trans 'Tel No.' %}:</strong> {{ user.phone }}</p>
<p><strong>{% trans 'Address/city' %}:</strong> {{ user.address }}</p>
</div>
<hr>
<p class="fw-bold"><i class="fa fa-calendar-day"></i> Important Dates</p>
<p class="fw-bold"><i class="fa fa-calendar-day"></i>{% trans 'Important Dates' %}</p>
<div class="dashboard-description">
<p><strong>Last login:</strong> {{ user.last_login }}</p>
<p><strong>{% trans 'Last login' %}:</strong> {{ user.last_login }}</p>
{% if current_semester and current_session %}
<p><strong>Academic Year:</strong> {{ current_semester }} Semester {{ current_session }}</p>
<p><strong>{% trans 'Academic Year' %}:</strong> {{ current_semester }} {% trans 'Semester' %} {{ current_session }}</p>
{% endif %}
<p><strong>Registered Date:</strong> {{ user.date_joined|date }}</p>
<p><strong>{% trans 'Registered Date' %}:</strong> {{ user.date_joined|date }}</p>
</div>
</div>
</div>

View File

@ -1,13 +1,14 @@
{% extends 'base.html' %}
{% block title %}{{ title }} | Learning management system{% endblock title %}
{% load i18n %}
{% block title %}{{ title }} | {% trans 'Learning management system' %}{% endblock title %}
{% block content %}
<nav style="--bs-breadcrumb-divider: '>';" aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="/">Home</a></li>
<li class="breadcrumb-item active" aria-current="page">Students</li>
<li class="breadcrumb-item"><a href="/">{% trans 'Home' %}</a></li>
<li class="breadcrumb-item active" aria-current="page">{% trans 'Students' %}</li>
</ol>
</nav>
@ -15,12 +16,12 @@
{% if request.user.is_superuser %}
<div class="manage-wrap">
<a class="btn btn-sm btn-primary" href="{% url 'add_student' %}"><i class="fas fa-plus"></i> Add Student</a>
<a class="btn btn-sm btn-primary" target="_blank" href="{% url 'student_list_pdf' %}"><i class="fas fa-download"></i> Download pdf</a> <!--new-->
<a class="btn btn-sm btn-primary" href="{% url 'add_student' %}"><i class="fas fa-plus"></i>{% trans 'Add Student' %}</a>
<a class="btn btn-sm btn-primary" target="_blank" href="{% url 'student_list_pdf' %}"><i class="fas fa-download"></i>{% trans 'Download pdf' %}</a> <!--new-->
</div>
{% endif %}
<div class="title-1"><i class="fas fa-user-graduate"></i>Students</div>
<div class="title-1"><i class="fas fa-user-graduate"></i>{% trans 'Students' %}</div>
<br>
<br>
@ -32,12 +33,12 @@
<thead>
<tr>
<th>#</th>
<th> ID No. </th>
<th> Full Name </th>
<th> Email </th>
<th> Program </th>
<th>{% trans 'ID No.' %} </th>
<th> {% trans 'Full Name' %} </th>
<th> {% trans 'Email' %} </th>
<th> {% trans 'Program' %} </th>
{% if request.user.is_superuser %}
<th> Action </th>
<th> {% trans 'Action' %} </th>
{% endif %}
</tr>
</thead>
@ -57,9 +58,9 @@
<i class="fa fa-ellipsis-vertical"></i>
</button>
<ul class="dropdown-menu position-fixed">
<li><a class="dropdown-item" href="{% url 'student_edit' student.student.pk %}"><i class="fas fa-edit"></i> Update</a></li>
<li><a class="dropdown-item" target="_blank" href="{% url 'profile_single' student.student.id %}?download_pdf=1"><i class="fas fa-download"></i> Download PDF</a></li>
<li><a class="dropdown-item text-danger" href="{% url 'student_delete' student.pk %}"><i class="fas fa-trash-alt"></i> Delete</a></li>
<li><a class="dropdown-item" href="{% url 'student_edit' student.student.pk %}"><i class="fas fa-edit"></i>{% trans 'Update' %}</a></li>
<li><a class="dropdown-item" target="_blank" href="{% url 'profile_single' student.student.id %}?download_pdf=1"><i class="fas fa-download"></i>{% trans 'Download PDF' %}</a></li>
<li><a class="dropdown-item text-danger" href="{% url 'student_delete' student.pk %}"><i class="fas fa-trash-alt"></i>{% trans 'Delete' %}</a></li>
</ul>
</div>
</td>
@ -69,11 +70,11 @@
<tr>
<td colspan="6">
<span class="text-danger">
No Student.
{% trans 'No Student.' %}
{% if request.user.is_superuser %}
<a href="{% url 'add_student' %}">
<i class="primary" style="font-size: 22px;">
Add Student Now.
{% trans 'Add Student Now.' %}
</i>
{% endif %}
</a>

View File

@ -1,4 +1,5 @@
{% load static %}
{% load i18n %}
<style>
.top-side {
@ -33,103 +34,130 @@
{% url 'course_registration' as cr %} {% url 'edit_profile' as ep %} {% url 'change_password' as cp %}
{% url 'quiz_progress' as qpr %} {% url 'quiz_marking' as qce %} {% url 'user_course_list' as ucl %}
{% url 'admin_panel' as admin_p %}
<ul>
{% if request.user.is_superuser %}
<li class="{% if request.path == dash %}active{% endif %}">
<a href="{% url 'dashboard' %}"><i class="fas fa-tachometer-alt"></i>Dashboard</a>
<a href="{% url 'dashboard' %}"><i class="fas fa-tachometer-alt"></i>{% trans 'Dashboard' %}</a>
</li>
{% endif %}
<li class="{% if request.path == hom %}active{% endif %}">
<a href="{% url 'home' %}"><i class="fas fa-home"></i>Home</a>
<a href="{% url 'home' %}"><i class="fas fa-home"></i>{% trans 'Home' %}</a>
</li>
<li class="{% if request.path == prof %}active{% endif %}">
<a href="{% url 'profile' %}"><i class="fas fa-user"></i>Profile</a>
<a href="{% url 'profile' %}"><i class="fas fa-user"></i>{% trans 'Profile' %}</a>
</li>
{% if request.user.is_superuser %}
<li class="{% if request.path == admin_p %}active{% endif %}">
<a href="{% url 'admin_panel' %}"><i class="fas fa-user-tie"></i>Admin Panel</a>
<a href="{% url 'admin_panel' %}"><i class="fas fa-user-tie"></i>{% trans 'Admin Panel' %}</a>
</li>
<li class="{% if request.path == lec %}active{% endif %}">
<a href="{% url 'lecturer_list' %}"><i class="fas fa-chalkboard-teacher"></i>Lecturers</a>
<a href="{% url 'lecturer_list' %}"><i class="fas fa-chalkboard-teacher"></i>{% trans 'Lecturers' %}</a>
</li>
<li class="{% if request.path == stu %}active{% endif %}">
<a href="{% url 'student_list' %}"><i class="fas fa-user-graduate"></i>Students</a>
<a href="{% url 'student_list' %}"><i class="fas fa-user-graduate"></i>{% trans 'Students' %}</a>
</li>
{% endif %}
{% if request.user.is_lecturer or request.user.is_student %}
<li class="{% if request.path == ucl %}active{% endif %}">
<a href="{% url 'user_course_list' %}"><i class="fas fa-book"></i>My Courses</a>
<a href="{% url 'user_course_list' %}"><i class="fas fa-book"></i>{% trans 'My Courses' %}</a>
</li>
{% endif %}
<li class="{% if request.path == pro %}active{% endif %}">
<a href="{% url 'programs' %}"><i class="fas fa-book-open"></i>Programs & Courses</a>
<a href="{% url 'programs' %}"><i class="fas fa-book-open"></i>{% trans 'Programs & Courses' %}</a>
</li>
{% if request.user.is_superuser or request.user.is_lecturer %}
<li class="{% if request.path == qce %}active{% endif %}">
<a href="{% url 'quiz_marking' %}"><i class="fas fa-check-double"></i>Complete Exams</a>
<a href="{% url 'quiz_marking' %}"><i class="fas fa-check-double"></i>{% trans 'Complete Exams' %}</a>
</li>
{% endif %}
{% if request.user.is_superuser %}
<li class="{% if request.path == qpr %}active{% endif %}">
<a href="{% url 'quiz_progress' %}"><i class="fas fa-record-vinyl"></i>Quiz Progress Rec</a>
<a href="{% url 'quiz_progress' %}"><i class="fas fa-record-vinyl"></i>{% trans 'Quiz Progress Rec' %}</a>
</li>
<li class="{% if request.path == cav %}active{% endif %}">
<a href="{% url 'course_allocation_view' %}"><i class="fas fa-tasks"></i>Course Allocation</a>
<a href="{% url 'course_allocation_view' %}"><i class="fas fa-tasks"></i>{% trans 'Course Allocation' %}</a>
</li>
<li class="{% if request.path == sess %}active{% endif %}">
<a href="{% url 'session_list' %}"><i class="fas fa-calendar-week"></i>Manage Session</a>
<a href="{% url 'session_list' %}"><i class="fas fa-calendar-week"></i>{% trans 'Manage Session' %}</a>
</li>
<li class="{% if request.path == sem %}active{% endif %}">
<a href="{% url 'semester_list' %}"><i class="fas fa-calendar-alt"></i>Manage Semester</a>
<a href="{% url 'semester_list' %}"><i class="fas fa-calendar-alt"></i>{% trans 'Manage Semester' %}</a>
</li>
{% endif %}
{% if request.user.is_lecturer %}
<li class="{% if request.path == ascore %}active{% endif %}">
<a href="{% url 'add_score' %}"><i class="fas fa-table"></i>Manage Score</a>
<a href="{% url 'add_score' %}"><i class="fas fa-table"></i>{% trans 'Manage Score' %}</a>
</li>
{% endif %}
{% if request.user.is_student %}
<li class="{% if request.path == qpr %}active{% endif %}">
<a href="{% url 'quiz_progress' %}"><i class="fas fa-record-vinyl"></i>Quiz Progress Rec</a>
<a href="{% url 'quiz_progress' %}"><i class="fas fa-record-vinyl"></i>{% trans 'Quiz Progress Rec' %}</a>
</li>
<li class="{% if request.path == vr %}active{% endif %}">
<a href="{% url 'grade_results' %}"><i class="fa fa-spell-check"></i>Grade Results</a>
<a href="{% url 'grade_results' %}"><i class="fa fa-spell-check"></i>{% trans 'Grade Results' %}</a>
</li>
<li class="{% if request.path == ar %}active{% endif %}">
<a href="{% url 'ass_results' %}"><i class="fa fa-list-ol"></i> Assesment Results</a>
<a href="{% url 'ass_results' %}"><i class="fa fa-list-ol"></i> {% trans 'Assesment Results' %}</a>
</li>
<li class="{% if request.path == cr %}active{% endif %}">
<a href="{% url 'course_registration' %}"><i class="fas fa-plus"></i>Add &amp; Drop Course</a>
<a href="{% url 'course_registration' %}"><i class="fas fa-plus"></i>{% trans 'Add' %} &amp;{% trans 'Drop Course' %}</a>
</li>
{% endif %}
<br />
<p class="ml-3">&RightArrow; Others</p>
<li class="{% if request.path == ep %}active{% endif %}">
<a href="{% url 'edit_profile' %}"><i class="fas fa-cogs"></i>Account Setting</a>
<a href="{% url 'edit_profile' %}"><i class="fas fa-cogs"></i>{% trans 'Account Setting' %}</a>
</li>
<li class="{% if request.path == cp %}active{% endif %}">
<a href="{% url 'change_password' %}"><i class="fas fa-key"></i>Change Password</a>
<a href="{% url 'change_password' %}"><i class="fas fa-key"></i>{% trans 'Change Password' %}</a>
</li>
</ul>
</div>
<footer class="card-footer mt-5 pt-3 pb-5 px-2">
<div class="col-12">
<form action="{% url 'set_language' %}" method="post" id="lang-form">{% csrf_token %}
<input name="next" type="hidden" value="{{ redirect_to }}">
<select class="small" name="language" id="lang-select">
{% get_current_language as LANGUAGE_CODE %}
{% get_available_languages as LANGUAGES %}
{% get_language_info_list for LANGUAGES as languages %}
{% for language in languages %}
<option value="{{ language.code }}"{% if language.code == LANGUAGE_CODE %} selected{% endif %}>
{{ language.name_local }} ({{ language.code }})
</option>
{% endfor %}
</select>
</form>
<p class="small m-0">
Read our <a href="#"> Privacy </a> and <a href="#"> Terms of use. </a>
{% trans 'Read our' %} <a href="#"> {% trans 'Privacy' %} </a> {% trans 'and' %} <a href="#"> {% trans 'Terms of use.' %}' </a>
<br />Django LMS &copy; <script>document.write(new Date().getFullYear());</script>
<br />
</p>
<a href="https://github.com/adilmohak/django-lms" class="btn btn-sm btn-dark mx-auto" target="_blank">
⭐️ Star This Project
{% trans '⭐️ Star This Project' %}
</a>
</div>
</footer>
</div>
{% block js %}
<script>
document.getElementById("lang-select").addEventListener("change", function() {
console.log("Changed!")
document.getElementById("lang-form").submit(); // Submit the form programmatically
});
</script>
{% endblock js %}

View File

@ -1,4 +1,5 @@
{% load static %}
{% load i18n %}
<!DOCTYPE html>
<html lang="en">
@ -40,7 +41,7 @@
</div>
{% endblock %}
<script src="{% url 'javascript-catalog' %}"></script>
<script type="text/javascript" src="{% static 'vendor/jquery-3.7.1/jquery-3.7.1.min.js' %}"></script>
<script type="text/javascript" src="{% static 'vendor/bootstrap-5.3.2/js/bootstrap.bundle.min.js' %}"></script>

View File

@ -1,5 +1,6 @@
{% extends 'base.html' %}
{% block title %} Dashboard | Learning management system {% endblock title %}
{% load i18n %}
{% block title %} {% trans 'Dashboard' %} | {% trans 'Learning management system' %} {% endblock title %}
{% load static %}
{% block header %}
@ -9,13 +10,13 @@
<nav style="--bs-breadcrumb-divider: '>';" aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="/">Home</a></li>
<li class="breadcrumb-item active" aria-current="page">Dashboard</li>
<li class="breadcrumb-item"><a href="/">{% trans 'Home' %}</a></li>
<li class="breadcrumb-item active" aria-current="page">{% trans 'Dashboard' %}</li>
</ol>
</nav>
{% if messages %}
{% for message in messages %}
{% for message in messages %}Program
{% if message.tags == 'error' %}
<div class="alert alert-danger">
<i class="fas fa-exclamation-circle"></i>{{ message }}
@ -29,18 +30,18 @@
{% endif %}
<div class="d-flex justify-content-between align-items-center mb-4">
<h1 class="title-1">Dashboard</h1>
<h1 class="title-1">{% trans 'Dashboard' %}</h1>
<div class="dropdown">
<button type="button" class="btn btn-light dropdown-toggle" data-bs-toggle="dropdown"
aria-expanded="false">
<i class="fas fa-cog"></i>
</button>
<div class="dropdown-menu">
<h6 class="dropdown-header">Dashboard settings</h6>
<button class="dropdown-item active" type="button">Display grid</button>
<button class="dropdown-item" type="button">Display table</button>
<h6 class="dropdown-header">{% trans 'Dashboard settings' %}</h6>
<button class="dropdown-item active" type="button">{% trans 'Display grid' %}</button>
<button class="dropdown-item" type="button">{% trans 'Display table' %}</button>
<hr>
<button class="dropdown-item" type="button">Manage dashboard</button>
<button class="dropdown-item" type="button">{% trans 'Manage dashboard' %}</button>
</div>
</div>
</div>
@ -50,7 +51,7 @@
<div class="card-count p-3">
<h3><i class="fas fa-users bg-light-aqua"></i></h3>
<div class="text-right">
Students
{% trans 'Students' %}
<h2>{{ student_count }}</h2>
</div>
</div>
@ -59,7 +60,7 @@
<div class="card-count p-3">
<h3><i class="fas fa-users bg-light-orange"></i></h3>
<div class="text-right">
Lecturers
{% trans 'Lecturers' %}
<h2>{{ lecturer_count }}</h2>
</div>
</div>
@ -68,7 +69,7 @@
<div class="card-count p-3">
<h3><i class="fas fa-users bg-light-red"></i></h3>
<div class="text-right">
Administrators
{% trans 'Administrators' %}
<h2>{{ superuser_count }}</h2>
</div>
</div>
@ -77,7 +78,7 @@
<div class="card-count p-3">
<h3><i class="fas fa-users bg-light-purple"></i></h3>
<div class="text-right">
Lab Assistance
{% trans 'Lab Assistance' %}
<h2>500</h2>
</div>
</div>
@ -86,7 +87,7 @@
<div class="card-count p-3">
<h3><i class="fas fa-users bg-light-red"></i></h3>
<div class="text-right">
Librarians
{% trans 'Librarians' %}
<h2>300</h2>
</div>
</div>
@ -95,7 +96,7 @@
<div class="card-count p-3">
<h3><i class="fas fa-users bg-light-purple"></i></h3>
<div class="text-right">
Supervisors
{% trans 'Supervisors' %}
<h2>660</h2>
</div>
</div>
@ -104,7 +105,7 @@
<div class="card-count p-3">
<h3><i class="fas fa-users bg-light-orange"></i></h3>
<div class="text-right pl-2">
Office Assistance
{% trans 'Office Assistance' %}
<h2>1,700</h2>
</div>
</div>
@ -113,7 +114,7 @@
<div class="card-count p-3">
<h3><i class="fas fa-users bg-light-aqua"></i></h3>
<div class="text-right">
Others
{% trans 'Others' %}
<h2>1,250</h2>
</div>
</div>
@ -141,12 +142,12 @@
</div>
<div class="col-md-6 p-2">
<div class="card w-100 h-100 p-3">
<h5>Latest activities</h5>
<h5>{% trans 'Latest activities' %}</h5>
<ul class="ps-2 small">
{% for log in logs %}
<li>{{ log.message }} <span class="text-muted">- {{ log.created_at }}</span></li>
{% empty %}
<li>No recent activity</li>
<li>{% trans 'No recent activity' %}</li>
{% endfor %}
</ul>
</div>
@ -154,7 +155,7 @@
</div>
<br>
<div class="bg-white p-3">
<h5 class="border-bottom pb-2">School Demographics</h5>
<h5 class="border-bottom pb-2">{% trans 'School Demographics' %}</h5>
<div class="row">
<div class="col-md-4">
<i class="fas fa-expand-alt"></i>
@ -175,276 +176,9 @@
{% block js %}
<script src="{% url 'javascript-catalog' %}"></script>
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
<script>
const malesCount = {{ males_count }}
const femalesCount = {{ females_count }}
$(document).ready(function () {
// Setup
const labels = [
'January',
'February',
'March',
'April',
'May',
'June',
];
const data = {
labels: labels,
datasets: [{
label: 'Students',
backgroundColor: 'rgba(86, 224, 224, 0.5)',
borderColor: 'rgb(86, 224, 224)',
hoverBorderWidth: 3,
data: [0, 10, 5, 2, 20, 30, 45]
}, {
label: 'Teachers',
backgroundColor: 'rgba(253, 174, 28, 0.5)',
borderColor: 'rgb(253, 174, 28)',
hoverBorderWidth: 3,
data: [20, 0, 15, 4, 6, 4, 60],
}, {
label: 'Admins',
backgroundColor: 'rgba(203, 31, 255, 0.5)',
borderColor: 'rgb(203, 31, 255)',
hoverBorderWidth: 3,
data: [85, 30, 34, 20, 20, 55, 45],
}, {
label: 'Stuffs',
backgroundColor: 'rgba(255, 19, 157, 0.5)',
borderColor: 'rgb(255, 19, 157)',
hoverBorderWidth: 3,
data: [45, 75, 70, 80, 20, 30, 90],
}]
};
var traffic = document.getElementById('traffic');
var chart = new Chart(traffic, {
type: 'line',
data: data,
options: {
plugins: {
title: {
display: true,
text: 'Website Traffic',
padding: 15
}
}
}
});
// Setup
const labelsEnrollment = [
'2016',
'2017',
'2018',
'2019',
'2020',
'2021',
];
const dataEnrollment = {
labels: labelsEnrollment,
datasets: [{
label: 'Comp.S',
backgroundColor: 'rgba(86, 224, 224, 0.5)',
borderColor: 'rgb(86, 224, 224)',
hoverBorderWidth: 3,
data: [0, 10, 5, 2, 20, 30, 45]
}, {
label: 'Architecture',
backgroundColor: 'rgba(253, 174, 28, 0.5)',
borderColor: 'rgb(253, 174, 28)',
hoverBorderWidth: 3,
data: [20, 0, 15, 4, 6, 4, 60],
}, {
label: 'Civil Eng',
backgroundColor: 'rgba(203, 31, 255, 0.5)',
borderColor: 'rgb(203, 31, 255)',
hoverBorderWidth: 3,
data: [85, 30, 34, 20, 20, 55, 45],
}, {
label: 'Accounting',
backgroundColor: 'rgba(255, 19, 157, 0.5)',
borderColor: 'rgb(255, 19, 157)',
hoverBorderWidth: 3,
data: [45, 75, 70, 80, 20, 30, 90],
}, {
label: 'Business M.',
backgroundColor: 'rgba(0, 0, 0, 0.5)',
borderColor: 'rgb(0, 0, 0)',
hoverBorderWidth: 3,
data: [15, 75, 45, 90, 60, 30, 90],
}]
};
var enrollement = document.getElementById('enrollement');
var chart = new Chart(enrollement, {
type: 'bar',
data: dataEnrollment,
options: {
plugins: {
title: {
display: true,
text: 'Enrollment per course',
padding: 20
}
}
}
});
// Average grade setup
const labelsGrade = [
'2017',
'2018',
'2019',
'2020',
'2022',
];
const dataGrade = {
labels: labelsGrade,
datasets: [{
label: "Comp sci.",
backgroundColor: 'rgba(86, 224, 224, 0.5)',
borderColor: 'rgb(86, 224, 224)',
hoverBorderWidth: 3,
data: [0, 10, 5, 2, 20, 30, 45]
}, {
label: "Civil eng.",
backgroundColor: 'rgba(253, 174, 28, 0.5)',
borderColor: 'rgb(253, 174, 28)',
hoverBorderWidth: 3,
data: [20, 0, 15, 4, 6, 4, 60],
}, {
label: "Architect.",
backgroundColor: 'rgba(203, 31, 255, 0.5)',
borderColor: 'rgb(203, 31, 255)',
hoverBorderWidth: 3,
data: [85, 30, 34, 20, 20, 55, 45],
}, {
label: "Economics",
backgroundColor: 'rgba(255, 19, 157, 0.5)',
borderColor: 'rgb(255, 19, 157)',
hoverBorderWidth: 3,
data: [45, 75, 70, 80, 20, 30, 90],
}]
};
var students_grade = document.getElementById('students_grade');
var chart = new Chart(students_grade, {
type: 'bar',
data: dataGrade,
options: {
plugins: {
title: {
display: true,
text: 'Students average grade (performance)',
padding: 20
}
}
}
});
const dataGender = {
labels: [
'Man',
'Women'
],
datasets: [{
label: "Students Gender Dataset",
data: [malesCount, femalesCount],
backgroundColor: [
'rgb(255, 99, 132)',
'rgb(54, 162, 235)'
],
hoverOffset: 4
}]
};
var gender = document.getElementById('gender');
var chart = new Chart(gender, {
type: 'pie',
data: dataGender,
options: {
plugins: {
title: {
display: true,
text: 'Students Gender',
padding: 20
}
}
}
});
const dataQualification = {
labels: [
'PHD',
'Masters',
'BSc degree'
],
datasets: [{
label: "Lecturer Qualifications Dataset",
data: [24, 30, 26],
backgroundColor: [
'rgb(255, 99, 132)',
'rgb(255, 193, 7)',
'rgb(54, 162, 235)'
],
hoverOffset: 4
}]
};
var ethnicity = document.getElementById('ethnicity');
var chart = new Chart(ethnicity, {
type: 'pie',
data: dataQualification,
options: {
plugins: {
title: {
display: true,
text: 'Lecturer qualifications',
padding: 20
}
}
}
});
const dataLevels = {
labels: [
'PHD',
'Masters',
'BSc degree'
],
datasets: [{
label: "Students level",
data: [14, 30, 56],
backgroundColor: [
'rgb(255, 99, 132)',
'rgb(255, 193, 7)',
'rgb(54, 162, 235)'
],
hoverOffset: 4
}]
};
var language = document.getElementById('language');
var chart = new Chart(language, {
type: 'pie',
data: dataLevels,
options: {
plugins: {
title: {
display: true,
text: 'Student levels',
padding: 20
}
}
}
});
})
</script>
<script src="{% static 'js/dashboard.js' %}"></script>
<script>
$('.fa-expand-alt').click(function () {
if ($(this).parent('.chart-wrap').parent('.col-md-6').hasClass('expand')) {
@ -456,5 +190,272 @@
}
})
</script>
<script>
const malesCount = {{ males_count }}
const femalesCount = {{ females_count }}
$(document).ready(function () {
// Setup
const labels = [
gettext('January'),
gettext('February'),
gettext('March'),
gettext('April'),
gettext('May'),
gettext('June'),
];
const data = {
labels: labels,
datasets: [{
label: gettext('Students'),
backgroundColor: 'rgba(86, 224, 224, 0.5)',
borderColor: 'rgb(86, 224, 224)',
hoverBorderWidth: 3,
data: [0, 10, 5, 2, 20, 30, 45]
}, {
label: gettext('Teachers'),
backgroundColor: 'rgba(253, 174, 28, 0.5)',
borderColor: 'rgb(253, 174, 28)',
hoverBorderWidth: 3,
data: [20, 0, 15, 4, 6, 4, 60],
}, {
label: gettext('Admins'),
backgroundColor: 'rgba(203, 31, 255, 0.5)',
borderColor: 'rgb(203, 31, 255)',
hoverBorderWidth: 3,
data: [85, 30, 34, 20, 20, 55, 45],
}, {
label: gettext('Stuffs'),
backgroundColor: 'rgba(255, 19, 157, 0.5)',
borderColor: 'rgb(255, 19, 157)',
hoverBorderWidth: 3,
data: [45, 75, 70, 80, 20, 30, 90],
}]
};
var traffic = document.getElementById('traffic');
var chart = new Chart(traffic, {
type: 'line',
data: data,
options: {
plugins: {
title: {
display: true,
text: gettext('Website Traffic'),
padding: 15
}
}
}
});
// Setup
const labelsEnrollment = [
'2016',
'2017',
'2018',
'2019',
'2020',
'2021',
];
const dataEnrollment = {
labels: labelsEnrollment,
datasets: [{
label: gettext('Comp.S'),
backgroundColor: 'rgba(86, 224, 224, 0.5)',
borderColor: 'rgb(86, 224, 224)',
hoverBorderWidth: 3,
data: [0, 10, 5, 2, 20, 30, 45]
}, {
label: gettext('Architecture'),
backgroundColor: 'rgba(253, 174, 28, 0.5)',
borderColor: 'rgb(253, 174, 28)',
hoverBorderWidth: 3,
data: [20, 0, 15, 4, 6, 4, 60],
}, {
label: gettext('Civil Eng'),
backgroundColor: 'rgba(203, 31, 255, 0.5)',
borderColor: 'rgb(203, 31, 255)',
hoverBorderWidth: 3,
data: [85, 30, 34, 20, 20, 55, 45],
}, {
label: gettext('Accounting'),
backgroundColor: 'rgba(255, 19, 157, 0.5)',
borderColor: 'rgb(255, 19, 157)',
hoverBorderWidth: 3,
data: [45, 75, 70, 80, 20, 30, 90],
}, {
label: gettext('Business M.'),
backgroundColor: 'rgba(0, 0, 0, 0.5)',
borderColor: 'rgb(0, 0, 0)',
hoverBorderWidth: 3,
data: [15, 75, 45, 90, 60, 30, 90],
}]
};
var enrollement = document.getElementById('enrollement');
var chart = new Chart(enrollement, {
type: 'bar',
data: dataEnrollment,
options: {
plugins: {
title: {
display: true,
text: gettext('Enrollment per course'),
padding: 20
}
}
}
});
// Average grade setup
const labelsGrade = [
'2017',
'2018',
'2019',
'2020',
'2022',
];
const dataGrade = {
labels: labelsGrade,
datasets: [{
label: gettext("Comp sci."),
backgroundColor: 'rgba(86, 224, 224, 0.5)',
borderColor: 'rgb(86, 224, 224)',
hoverBorderWidth: 3,
data: [0, 10, 5, 2, 20, 30, 45]
}, {
label: gettext("Civil eng."),
backgroundColor: 'rgba(253, 174, 28, 0.5)',
borderColor: 'rgb(253, 174, 28)',
hoverBorderWidth: 3,
data: [20, 0, 15, 4, 6, 4, 60],
}, {
label: gettext("Architect."),
backgroundColor: 'rgba(203, 31, 255, 0.5)',
borderColor: 'rgb(203, 31, 255)',
hoverBorderWidth: 3,
data: [85, 30, 34, 20, 20, 55, 45],
}, {
label: gettext("Economics"),
backgroundColor: 'rgba(255, 19, 157, 0.5)',
borderColor: 'rgb(255, 19, 157)',
hoverBorderWidth: 3,
data: [45, 75, 70, 80, 20, 30, 90],
}]
};
var students_grade = document.getElementById('students_grade');
var chart = new Chart(students_grade, {
type: 'bar',
data: dataGrade,
options: {
plugins: {
title: {
display: true,
text: gettext('Students average grade (performance)'),
padding: 20
}
}
}
});
const dataGender = {
labels: [
gettext('Man'),
gettext('Women')
],
datasets: [{
label: gettext("Students Gender Dataset"),
data: [malesCount, femalesCount],
backgroundColor: [
'rgb(255, 99, 132)',
'rgb(54, 162, 235)'
],
hoverOffset: 4
}]
};
var gender = document.getElementById('gender');
var chart = new Chart(gender, {
type: 'pie',
data: dataGender,
options: {
plugins: {
title: {
display: true,
text: gettext('Students Gender'),
padding: 20
}
}
}
});
const dataQualification = {
labels: [
gettext('PHD'),
gettext('Masters'),
gettext('BSc degree')
],
datasets: [{
label: gettext("Lecturer Qualifications Dataset"),
data: [24, 30, 26],
backgroundColor: [
'rgb(255, 99, 132)',
'rgb(255, 193, 7)',
'rgb(54, 162, 235)'
],
hoverOffset: 4
}]
};
var ethnicity = document.getElementById('ethnicity');
var chart = new Chart(ethnicity, {
type: 'pie',
data: dataQualification,
options: {
plugins: {
title: {
display: true,
text: gettext('Lecturer qualifications'),
padding: 20
}
}
}
});
const dataLevels = {
labels: [
gettext('PHD'),
gettext('Masters'),
gettext('BSc degree')
],
datasets: [{
label: gettext("Students level"),
data: [14, 30, 56],
backgroundColor: [
'rgb(255, 99, 132)',
'rgb(255, 193, 7)',
'rgb(54, 162, 235)'
],
hoverOffset: 4
}]
};
var language = document.getElementById('language');
var chart = new Chart(language, {
type: 'pie',
data: dataLevels,
options: {
plugins: {
title: {
display: true,
text: gettext('Student levels'),
padding: 20
}
}
}
});
})
</script>
{% endblock %}

View File

@ -1,5 +1,6 @@
{% extends 'base.html' %}
{% block title %}{{ title }} | Learning management system{% endblock title %}
{% load i18n %}
{% block title %}{{ title }} | {% trans 'Learning management system' %}{% endblock title %}
{% load static %}
{% block content %}
@ -30,28 +31,28 @@
<nav style="--bs-breadcrumb-divider: '>';" aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item active" aria-current="page">Home</li>
<li class="breadcrumb-item active" aria-current="page">{% trans 'Home' %}</li>
</ol>
</nav>
{% if request.user.is_superuser %}
<div class="manage-wrap">
<a class="btn btn-primary" href="{% url 'add_item' %}"><i class="fas fa-plus"></i> Add New Post</a>
<a class="btn btn-primary" href="{% url 'add_item' %}"><i class="fas fa-plus"></i>{% trans 'Add New Post' %}</a>
</div>
{% endif %}
{% include 'snippets/messages.html' %}
<div>
<div class="title-1">News &amp; Events</div>
<div class="title-1">{% trans 'News' %} &amp; {% trans 'Events' %}</div>
</div>
<div class="col-md-2 ms-auto d-flex">
<div class="me-3">
<span class="color-indicator bg-primary"></span> News
<span class="color-indicator bg-primary"></span> {% trans 'News' %}
</div>
<div>
<span class="color-indicator bg-purple"></span> Events
<span class="color-indicator bg-purple"></span> {% trans 'Events' %}
</div>
</div>
@ -61,7 +62,7 @@
{% for item in items %}
<div class="col-md-4 mb-4">
<div class="bg-white border">
<div class="card-header-ne {% if item.posted_as == 'News' %}news{% else %}events{% endif %} p-2">
<div class="card-header-ne {% if item.posted_as == 'News' %}{% trans 'news' %}{% else %}{% trans 'events' %}{% endif %} p-2">
<span class="p-0">
{{ item.title|title }}
</span>
@ -72,9 +73,9 @@
</button>
<div class="dropdown-menu">
<a class="dropdown-item" href="{% url 'edit_post' pk=item.id %}"><i
class="fas fa-pencil-alt"></i> Edit</a>
class="fas fa-pencil-alt"></i>{% trans 'Edit' %}</a>
<a class="dropdown-item" href="{% url 'delete_post' pk=item.id %}"><i
class="fas fa-trash-alt"></i> Delete</a>
class="fas fa-trash-alt"></i>{% trans 'Delete' %}</a>
</div>
</div>
{% endif %}
@ -84,7 +85,7 @@
<div class="bg-light p-1 small text-secondary text-end pe-3">
<i class="fa fa-calendar small unstyled"></i>
{{ item.updated_date|timesince }} ago
{{ item.updated_date|timesince }} {% trans 'ago' %}
</div>
</div>
@ -94,7 +95,7 @@
{% else %}
<h4 class="text-center mt-5 py-5 text-muted">
<i class="fa-regular fa-folder-open me-2"></i> School news and events will appear here.
<i class="fa-regular fa-folder-open me-2"></i>{% trans 'School news and events will appear here.' %}
</h4>
{% endif %}

View File

@ -1,5 +1,6 @@
{% extends 'base.html' %}
{% block title %}{{ title }} | Learning management system{% endblock title %}
{% load i18n %}
{% block title %}{{ title }} | {% trans 'Learning management system' %}{% endblock title %}
{% load crispy_forms_tags %}
{% load static %}
@ -7,8 +8,8 @@
<nav style="--bs-breadcrumb-divider: '>';" aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="/">Home</a></li>
<li class="breadcrumb-item active" aria-current="page">Post form</li>
<li class="breadcrumb-item"><a href="/">{% trans 'Home' %}</a></li>
<li class="breadcrumb-item active" aria-current="page">{% trans 'Post form' %}</li>
</ol>
</nav>
@ -17,12 +18,12 @@
<div class="row">
<div class="col-md-6 mx-auto">
<div class="card">
<p class="form-title">Post Form</p>
<p class="form-title">{% trans 'Post Form' %}</p>
<div class="card-body">
<form action="" method="POST">{% csrf_token %}
{{ form|crispy }}
<input class="btn btn-primary" type="submit" value="Save">
<a class="btn" href="{% url 'home' %}" style="float: right;">Cancel</a>
<input class="btn btn-primary" type="submit" value="{% trans 'Save' %}">
<a class="btn" href="{% url 'home' %}" style="float: right;">{% trans 'Cancel' %}</a>
</form>
</div>
</div>

View File

@ -1,22 +1,23 @@
{% extends 'base.html' %}
{% block title %}{{ title }} | Learning management system{% endblock title %}
{% load i18n %}
{% block title %}{{ title }} | {% trans 'Learning management system' %} {% endblock title %}
{% block content %}
<nav style="--bs-breadcrumb-divider: '>';" aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="/">Home</a></li>
<li class="breadcrumb-item active" aria-current="page">Semester list</li>
<li class="breadcrumb-item"><a href="/">{% trans 'Home' %}</a></li>
<li class="breadcrumb-item active" aria-current="page">{% trans 'Semester list' %}</li>
</ol>
</nav>
{% if request.user.is_superuser %}
<div class="manage-wrap">
<a class="btn btn-primary" href="{% url 'add_semester' %}"><i class="fas fa-plus"></i>Add New Semester</a>
<a class="btn btn-primary" href="{% url 'add_semester' %}"><i class="fas fa-plus"></i>{% trans 'Add New Semester' %}</a>
</div>
{% endif %}
<div class="title-1"><i class="fas fa-calendar-alt"></i>Semester List</div>
<div class="title-1"><i class="fas fa-calendar-alt"></i>{% trans 'Semester List' %}</div>
{% if messages %}
{% for message in messages %}
@ -37,12 +38,12 @@
<thead>
<tr>
<th>#</th>
<th> Semester </th>
<th> Is Current semester </th>
<th> Session </th>
<th> Next Semester Begins </th>
<th> {% trans 'Semester' %} </th>
<th> {% trans 'Is Current semester' %} </th>
<th> {% trans 'Session' %} </th>
<th> {% trans 'Next Semester Begins' %} </th>
{% if request.user.is_superuser %}
<th> Actions </th>
<th> {% trans 'Actions' %} </th>
{% endif %}
</tr>
</thead>
@ -65,9 +66,9 @@
{% if request.user.is_superuser %}
<td>
<div class="update-delete">
<a href="{% url 'edit_semester' pk=semester.pk %}" class="update" title="Edit"><i
<a href="{% url 'edit_semester' pk=semester.pk %}" class="update" title="{% trans 'Edit' %}"><i
class="fas fa-pencil-alt"></i></a>
<a href="{% url 'delete_semester' pk=semester.pk %}" class="delete" title="Delete"><i
<a href="{% url 'delete_semester' pk=semester.pk %}" class="delete" title="{% trans 'Delete' %}"><i
class="fas fa-trash-alt"></i></a>
</div>
</td>
@ -79,11 +80,11 @@
<td></td>
<td>
<span class="text-danger">
No Semester.
{% trans 'No Semester.' %}
{% if request.user.is_superuser %}
<a href="{% url 'add_semester' %}">
<i class="primary" style="font-size: 22px;">
Add Semester Now.
{% trans 'Add Semester Now.' %}
</i>
{% endif %}
</a>

View File

@ -1,5 +1,6 @@
{% extends 'base.html' %}
{% block title %}{{ title }} | Learning management system{% endblock title %}
{% load i18n %}
{% block title %}{{ title }} | {% trans 'Learning management system' %}{% endblock title %}
{% load crispy_forms_tags %}
{% load static %}
@ -7,9 +8,9 @@
<nav style="--bs-breadcrumb-divider: '>';" aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="/">Home</a></li>
<li class="breadcrumb-item"><a href="{% url 'semester_list' %}">Semester List</a></li>
<li class="breadcrumb-item active" aria-current="page">Semester Form</li>
<li class="breadcrumb-item"><a href="/">{% trans 'Home' %}</a></li>
<li class="breadcrumb-item"><a href="{% url 'semester_list' %}">{% trans 'Semester List' %}</a></li>
<li class="breadcrumb-item active" aria-current="page">{% trans 'Semester Form' %}</li>
</ol>
</nav>
@ -30,11 +31,11 @@
<div class="row">
<div class="col-md-6 mx-auto">
<div class="card pb-3">
<p class="form-title">Semester Add & update Form</p>
<p class="form-title">{% trans 'Semester Add & update Form' %}</p>
<div class="container"><br>
<form action="" method="POST">{% csrf_token %}
{{ form|crispy }}
<input class="btn btn-primary" type="submit" value="Save">
<input class="btn btn-primary" type="submit" value="{% trans 'Save' %}">
</form>
</div>
</div>

View File

@ -1,22 +1,23 @@
{% extends 'base.html' %}
{% block title %}{{ title }} | Learning management system{% endblock title %}
{% load i18n %}
{% block title %}{{ title }} | {% trans 'Learning management system' %}{% endblock title %}
{% block content %}
<nav style="--bs-breadcrumb-divider: '>';" aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="/">Home</a></li>
<li class="breadcrumb-item active" aria-current="page">Session List</li>
<li class="breadcrumb-item"><a href="/">{% trans 'Home' %}</a></li>
<li class="breadcrumb-item active" aria-current="page">{% trans 'Session List' %}</li>
</ol>
</nav>
{% if request.user.is_superuser %}
<div class="manage-wrap">
<a class="btn btn-primary" href="{% url 'add_session' %}"><i class="fas fa-plus"></i>Add New Session</a>
<a class="btn btn-primary" href="{% url 'add_session' %}"><i class="fas fa-plus"></i>{% trans 'Add New Session' %}</a>
</div>
{% endif %}
<div class="title-1"><i class="fas fa-calendar-week"></i>Session List</div>
<div class="title-1"><i class="fas fa-calendar-week"></i>{% trans 'Session List' %}</div>
{% if messages %}
{% for message in messages %}
@ -37,11 +38,11 @@
<thead>
<tr>
<th>#</th>
<th> Session </th>
<th> Is Current Session </th>
<th> Next Session Begins </th>
<th> {% trans 'Session' %} </th>
<th> {% trans 'Is Current Session' %} </th>
<th> {% trans 'Next Session Begins' %} </th>
{% if request.user.is_superuser %}
<th> Actions </th>
<th> {% trans 'Actions' %} </th>
{% endif %}
</tr>
</thead>
@ -61,8 +62,8 @@
{% if request.user.is_superuser %}
<td> <div class="update-delete">
<a href="{% url 'edit_session' pk=session.pk %}" class="update" title="Edit"><i class="fas fa-pencil-alt"></i></a>
<a href="{% url 'delete_session' pk=session.pk %}" class="delete" title="Delete"><i class="fas fa-trash-alt"></i></a>
<a href="{% url 'edit_session' pk=session.pk %}" class="update" title="{% trans 'Edit' %}"><i class="fas fa-pencil-alt"></i></a>
<a href="{% url 'delete_session' pk=session.pk %}" class="delete" title="{% trans 'Delete' %}"><i class="fas fa-trash-alt"></i></a>
</div>
</td>
{% endif %}
@ -73,11 +74,11 @@
<td></td>
<td>
<span class="text-danger">
No Session.
{% trans 'No Session.' %}
{% if request.user.is_superuser %}
<a href="{% url 'add_session' %}">
<i class="primary" style="font-size: 22px;">
Add Session Now.
{% trans 'Add Session Now.' %}
</i>
{% endif %}
</a>

View File

@ -1,5 +1,6 @@
{% extends 'base.html' %}
{% block title %}{{ title }} | Learning management system{% endblock title %}
{% load i18n %}
{% block title %}{{ title }} | {% trans 'Learning management system' %}{% endblock title %}
{% load crispy_forms_tags %}
{% load static %}
@ -7,9 +8,9 @@
<nav style="--bs-breadcrumb-divider: '>';" aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="/">Home</a></li>
<li class="breadcrumb-item"><a href="{% url 'session_list' %}">Session List</a></li>
<li class="breadcrumb-item active" aria-current="page">Session Form</li>
<li class="breadcrumb-item"><a href="/">{% trans 'Home' %}</a></li>
<li class="breadcrumb-item"><a href="{% url 'session_list' %}">{% trans 'Session List' %}</a></li>
<li class="breadcrumb-item active" aria-current="page">{% trans 'Session Form' %}</li>
</ol>
</nav>
@ -30,11 +31,11 @@
<div class="row">
<div class="col-md-6 mx-auto">
<div class="card pb-3">
<p class="form-title">Session Add & update Form</p>
<p class="form-title">{% trans 'Session Add & update Form' %}</p>
<div class="container"><br>
<form action="" method="POST">{% csrf_token %}
{{ form|crispy }}
<input class="btn btn-primary" type="submit" value="Save">
<input class="btn btn-primary" type="submit" value="{% trans 'Save' %}">
</form>
</div>
</div>

View File

@ -1,5 +1,6 @@
{% extends 'base.html' %}
{% block title %}{{ title }} | Learning management system{% endblock title %}
{% load i18n %}
{% block title %}{{ title }} | {% trans 'Learning management system' %}{% endblock title %}
{% load crispy_forms_tags %}
{% load static %}
@ -7,13 +8,13 @@
<nav style="--bs-breadcrumb-divider: '>';" aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="/">Home</a></li>
<li class="breadcrumb-item"><a href="{% url 'programs' %}">Programs</a></li>
<li class="breadcrumb-item active" aria-current="page">Course Form</li>
<li class="breadcrumb-item"><a href="/">{% trans 'Home' %}</a></li>
<li class="breadcrumb-item"><a href="{% url 'programs' %}">{% trans 'Programs' %}</a></li>
<li class="breadcrumb-item active" aria-current="page">{% trans 'Course Form' %}</li>
</ol>
</nav>
<div class="title-1">Course Form</div>
<div class="title-1">{% trans 'Course Form' %}</div>
<br>
<br>
@ -23,7 +24,7 @@
<div class="row">
<div class="col-md-6">
<div class="card">
<p class="form-title">Course Detail</p>
<p class="form-title">{% trans 'Course Detail' %}</p>
<div class="p-3">
{{ form.title|as_crispy_field }}
{{ form.code|as_crispy_field }}
@ -33,7 +34,7 @@
</div>
<div class="col-md-6">
<div class="card">
<p class="form-title">Other Info</p>
<p class="form-title">{% trans 'Other Info' %}</p>
<div class="p-3">
{{ form.program|as_crispy_field }}
{{ form.credit|as_crispy_field }}
@ -45,7 +46,7 @@
</div>
</div>
</div>
<input class="btn btn-primary mt-3" type="submit" value="Save">
<input class="btn btn-primary mt-3" type="submit" value="{% trans 'Save' %}">
</form>
{% endblock content %}

View File

@ -1,5 +1,6 @@
{% load i18n %}
{% extends 'base.html' %}
{% block title %}{{ title }} | Learning management system{% endblock title %}
{% block title %}{{ title }} | {% trans 'Learning management system' %}{% endblock title %}
{% load crispy_forms_tags %}
{% load static %}
@ -7,9 +8,9 @@
<nav style="--bs-breadcrumb-divider: '>';" aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="/">Home</a></li>
<li class="breadcrumb-item"><a href="{% url 'course_allocation_view' %}">Course Allocations</a></li>
<li class="breadcrumb-item active" aria-current="page">Allocation Form</li>
<li class="breadcrumb-item"><a href="/">{% trans 'Home' %}</a></li>
<li class="breadcrumb-item"><a href="{% url 'course_allocation_view' %}">{% trans 'Course Allocations' %}</a></li>
<li class="breadcrumb-item active" aria-current="page">{% trans 'Allocation Form' %}</li>
</ol>
</nav>
@ -30,7 +31,7 @@
<div class="row">
<div class="col-md-6 mx-auto">
<div class="card">
<p class="form-title">Course Allocation Form</p>
<p class="form-title">{% trans 'Course Allocation Form' %}</p>
<div class="p-3">
<form action="" method="POST">{% csrf_token %}
<!-- {{ form|crispy }} -->
@ -45,7 +46,7 @@
{% for course in form.courses.all %}{{ course }}{% endfor %}
<input class="btn btn-outline-primary" type="submit" value="Save">
<input class="btn btn-outline-primary" type="submit" value="{% trans 'Save' %}">
</form>
</div>
</div>

View File

@ -1,22 +1,23 @@
{% extends 'base.html' %}
{% block title %}{{ title }} | Learning management system{% endblock title %}
{% load i18n %}
{% block title %}{{ title }} | {% trans 'Learning management system' %}{% endblock title %}
{% block content %}
<nav style="--bs-breadcrumb-divider: '>';" aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="/">Home</a></li>
<li class="breadcrumb-item active" aria-current="page">Allocation list</li>
<li class="breadcrumb-item"><a href="/">{% trans 'Home' %}</a></li>
<li class="breadcrumb-item active" aria-current="page">{% trans 'Allocation list' %}</li>
</ol>
</nav>
{% if request.user.is_superuser %}
<div class="manage-wrap">
<a class="btn btn-primary" href="{% url 'course_allocation' %}"><i class="fas fa-plus"></i>Allocate Now</a>
<a class="btn btn-primary" href="{% url 'course_allocation' %}"><i class="fas fa-plus"></i>{% trans 'Allocate Now' %}</a>
</div>
{% endif %}
<div class="title-1"><i class="fas fa-tasks"></i>Course Allocations</div>
<div class="title-1"><i class="fas fa-tasks"></i>{% trans 'Course Allocations' %}</div>
<br>
<br>
@ -28,10 +29,10 @@
<thead>
<tr>
<th>#</th>
<th>Lecturer</th>
<th>Courses</th>
<th>{% trans 'Lecturer' %}</th>
<th>C{% trans 'Courses' %}</th>
{% if request.user.is_superuser %}
<th>Action</th>
<th>{% trans 'Action' %}</th>
{% endif %}
</tr>
</thead>
@ -46,10 +47,10 @@
</td>
{% if request.user.is_superuser %}
<td><div class="update-delete">
<a href="{% url 'edit_allocated_course' pk=course.pk %}" class="update" title="Edit or Update">
<a href="{% url 'edit_allocated_course' pk=course.pk %}" class="update" title="{% trans 'Edit or Update' %}">
<i class="fas fa-edit"></i>
</a>
<a href="{% url 'course_deallocate' pk=course.pk %}" class="delete" title="Deallocate">
<a href="{% url 'course_deallocate' pk=course.pk %}" class="delete" title="{% trans 'Deallocate' %}">
<i class="fas fa-trash-alt"></i>
</a>
</div>
@ -61,11 +62,11 @@
<td></td>
<td></td>
<td>
<span class="text-danger">No Course Allocated.
<span class="text-danger">{% trans 'No Course Allocated.' %}
{% if request.user.is_superuser %}
<a href="{% url 'course_allocation' %}">
<i class="primary" style="font-size: 22px;">
Allocate now
{% trans 'Allocate now' %}
</i>
{% endif %}
</a>

View File

@ -1,5 +1,6 @@
{% extends 'base.html' %}
{% block title %}{{ title }} | Learning management system{% endblock title %}
{% load i18n %}
{% block title %}{{ title }} | {% trans 'Learning management system' %}{% endblock title %}
{% load static %}
{% load crispy_forms_tags %}
@ -8,12 +9,12 @@
<nav style="--bs-breadcrumb-divider: '>';" aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="/">Home</a></li>
<li class="breadcrumb-item active" aria-current="page">Course Registration</li>
<li class="breadcrumb-item"><a href="/">{% trans 'Home' %}</a></li>
<li class="breadcrumb-item active" aria-current="page">{% trans 'Course Registration' %}</li>
</ol>
</nav>
<p class="title-1">Course Add &amp; Drop</p>
<p class="title-1">{% trans 'Course Add' %} &amp; {% trans 'Drop' %}</p>
{% include 'snippets/messages.html' %}
@ -21,8 +22,8 @@
{% if is_calender_on == False %}
<div class="alert bg-danger">
<h1 class="text-light text-center">Calender is off</h1>
<h5 class="text-light text-center">Check the university calender</h5>
<h1 class="text-light text-center">{% trans 'Calender is off' %}</h1>
<h5 class="text-light text-center">{% trans 'Check the university calender' %}</h5>
</div>
{% else %}
@ -31,26 +32,26 @@
<form action="{% url 'course_registration' %}" method="POST">{% csrf_token %}
<div class="col-md-12 p-0 bg-white">
<p class="form-title fw-bold">Course Add</p>
<p class="form-title fw-bold">{% trans '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
Selected</button>
<button title="{% trans 'Save Score' %}" type="submit" class="btn btn-primary"><i class="fa fa-plus"></i> {% trans 'Add
Selected' %}</button>
</div>
<div class="table-responsive p-0 px-2 mt-2">
<div class="table-title"><u>First Semester:</u></div>
<div class="table-title"><u>{% trans 'First Semester:' %}</u></div>
<div class="table-shadow">
<table class="table">
<thead>
<tr>
<th>Mark</th>
<th>Course Code</th>
<th>Course Title</th>
<th>Cr.Hr(s)</th>
<th>Year</th>
<th>Classification</th>
<th>Elective Group</th>
<th>{% trans 'Mark' %}</th>
<th>{% trans 'Course Code' %}</th>
<th>{% trans 'Course Title' %}</th>
<th>{% trans 'Cr.Hr(s)' %}</th>
<th>{% trans 'Year' %}</th>
<th>{% trans 'Classification' %}</th>
<th>{% trans 'Elective Group' %}</th>
</tr>
</thead>
<tbody>
@ -65,9 +66,9 @@
<td>{{ course.credit }}</td>
<td>{{ course.year }}</td>
{% if course.is_elective %}
<td>Elective</td>
<td>{% trans 'Elective' %}</td>
{% else %}
<td>Core</td>
<td>{% trans 'Core' %}</td>
{% endif %}
<th>-</th>
</tr>
@ -79,7 +80,7 @@
<td></td>
<td>
<span class="text-danger">
No Course.
{% trans 'No Course.' %}
</span>
</td>
<td></td>
@ -93,7 +94,7 @@
<td></td>
<td></td>
<td></td>
<td><b>First semester Credit(s):</b> {{ total_first_semester_credit }} </td>
<td><b>{% trans 'First semester Credit(s):' %}</b> {{ total_first_semester_credit }} </td>
<td></td>
</tr>
</tbody>
@ -102,18 +103,18 @@
</div>
<div class="table-responsive p-0 px-2 mt-2">
<div class="table-title"><u>Second Semester:</u></div>
<div class="table-title"><u>{% trans 'Second Semester:' %}</u></div>
<div class="table-shadow">
<table class="table">
<thead>
<tr>
<th>Mark</th>
<th>Course Code</th>
<th>Course Title</th>
<th>Cr.Hr(s)</th>
<th>Year</th>
<th>Classification</th>
<th>Elective Group</th>
<th>{% trans 'Mark' %}</th>
<th>{% trans 'Course Code' %}</th>
<th>{% trans 'Course Title' %}</th>
<th>{% trans 'Cr.Hr(s)' %}</th>
<th>{% trans 'Year' %}</th>
<th>{% trans 'Classification' %}</th>
<th>{% trans 'Elective Group' %}</th>
</tr>
</thead>
<tbody>
@ -128,9 +129,9 @@
<td>{{ course.credit }}</td>
<td>{{ course.year }}</td>
{% if course.is_elective %}
<td>Elective</td>
<td>{% trans 'Elective' %}</td>
{% else %}
<td>Core</td>
<td>{% trans 'Core' %}</td>
{% endif %}
<th>-</th>
</tr>
@ -142,7 +143,7 @@
<td></td>
<td>
<span class="text-danger">
No Course.
{% trans 'No Course.' %}
</span>
</td>
<td></td>
@ -156,17 +157,17 @@
<td></td>
<td></td>
<td></td>
<td><b>Second semester credit(s):</b> {{ total_sec_semester_credit }} </td>
<td><b>{% trans 'Second semester credit(s):' %}</b> {{ total_sec_semester_credit }} </td>
<td></td>
</tr>
<tr>
<th scope="row"></th>
<td><b>Registerd course credit(s): <a id="units">{{ total_registered_credit }}</a></b>
<td><b>{% trans 'Registerd course credit(s):' %}' <a id="units">{{ total_registered_credit }}</a></b>
</td>
<td></td>
<td></td>
<td></td>
<td><b>Total credit(s):</b> {{ total_sec_semester_credit|add:total_first_semester_credit }} </td>
<td><b>{% trans 'Total credit(s):' %}</b> {{ total_sec_semester_credit|add:total_first_semester_credit }} </td>
<td></td>
</tr>
</tbody>
@ -182,12 +183,12 @@
{% if not no_course_is_registered %}
<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 class="btn btn-warning" href="{% url 'course_registration_form' %}" target="_blank" title="{% trans 'Print Registration Form' %}">
<i class="fas fa-print"></i> {% trans 'Print Registerd Courses' %}
</a>
<div class="col-md-12 p-0 bg-white">
<p class="form-title"><b>Course Drop</b>
<p class="form-title"><b>{% trans 'Course Drop' %}</b>
<div class="level-wrapper">
<div class="info-text">{{ student.level }}</div>
</div>
@ -196,8 +197,8 @@
<form action="{% url 'course_drop' %}" method="POST">
{% csrf_token %}
<div class="d-flex justify-content-between mb-4">
<button title="Save Score" type="submit" class="btn btn-primary">
<i class="fa fa-times"></i> Drop Selected
<button title="{% trans 'Save Score' %}" type="submit" class="btn btn-primary">
<i class="fa fa-times"></i> {% trans 'Drop Selected' %}
</button>
</div>
@ -212,13 +213,13 @@
<table class="table">
<thead>
<tr>
<th>Mark</th>
<th>Course Code</th>
<th>Course Title</th>
<th>Cr.Hr(s)</th>
<th>Year</th>
<th>Classification</th>
<th>Elective Group</th>
<th>{% trans 'Mark' %}</th>
<th>{% trans 'Course Code' %}</th>
<th>{% trans 'Course Title' %}</th>
<th>{% trans 'Cr.Hr(s)' %}</th>
<th>{% trans 'Year' %}</th>
<th>{% trans 'Classification' %}</th>
<th>{% trans 'Elective Group' %}</th>
</tr>
</thead>
<tbody>
@ -232,9 +233,9 @@
<td>{{ course.credit }}</td>
<td>{{ course.year }}</td>
{% if course.is_elective %}
<td>Elective</td>
<td>{% trans 'Elective' %}</td>
{% else %}
<td>Core</td>
<td>{% trans 'Core' %}</td>
{% endif %}
<th>-</th>
</tr>
@ -245,7 +246,7 @@
<td></td>
<td>
<span class="text-danger">
No Course.
{% trans 'No Course.' %}
</span>
</td>
<td></td>
@ -259,7 +260,7 @@
<td></td>
<td></td>
<td></td>
<td><b>Total credit(s):</b> {{ total_registered_credit }} </td>
<td><b>{% trans 'Total credit(s):' %}</b> {{ total_registered_credit }} </td>
<td></td>
</tr>
</tbody>

View File

@ -1,13 +1,14 @@
{% extends 'base.html' %}
{% block title %}{{ title }} | Learning management system{% endblock title %}
{% load i18n %}
{% block title %}{{ title }} | {% trans 'Learning management system' %}{% endblock title %}
{% load static %}
{% block content %}
<nav style="--bs-breadcrumb-divider: '>';" aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="/">Home</a></li>
<li class="breadcrumb-item"><a href="{% url 'programs' %}">Programs</a></li>
<li class="breadcrumb-item"><a href="/">{% trans 'Home' %}</a></li>
<li class="breadcrumb-item"><a href="{% url 'programs' %}">{% trans 'Programs' %}</a></li>
<li class="breadcrumb-item"><a href="{% url 'program_detail' course.program.id %}">{{ course.program }}</a></li>
<li class="breadcrumb-item active" aria-current="page">{{ course }}</li>
</ol>
@ -18,21 +19,21 @@
<div class="">
{% if request.user.is_superuser %}
<a class="btn btn-sm btn-light" href="{% url 'edit_course' course.slug %}">
<i class="fas fa-pencil-alt"></i> Edit course
<i class="fas fa-pencil-alt"></i> {% trans 'Edit course' %}
</a>
{% endif %}
{% if request.user.is_superuser or request.user.is_lecturer %}
<a class="btn btn-sm btn-primary" href="{% url 'upload_file_view' course.slug %}"><i class="fas fa-plus"></i>
Upload new file
{% trans 'Upload new file' %}
</a>
<a class="btn btn-sm btn-primary" href="{% url 'upload_video' course.slug %}"><i class="fas fa-plus"></i>
Upload new video
{% trans 'Upload new video' %}
</a>
{% endif %}
</div>
<div class="ms-auto">
<a class="btn btn-sm btn-warning" href="{% url 'quiz_index' course.slug %}"><i class="fas fa-list"></i>
Take a Quiz
{% trans 'Take a Quiz' %}
</a>
</div>
</div>
@ -47,17 +48,17 @@
<div class="row mb-5">
<div class="col-md-12 p-0">
<p class="form-title m-0">Video Tutorials</p>
<p class="form-title m-0">{% trans 'Video Tutorials' %}</p>
<div class="table-responsive">
<table class="table table-shadow table-light table-striped m-0">
<thead>
<tr>
<th>#</th>
<th>Video Title</th>
<th>Uploaded Date</th>
<th>Get Started</th>
<th>{% trans 'Video Title' %}</th>
<th>{% trans 'Uploaded Date' %}</th>
<th>{% trans 'Get Started' %}</th>
{% if request.user.is_superuser or request.user.is_lecturer %}
<th>Actions</th>
<th>{% trans 'Actions' %}</th>
{% endif %}
</tr>
</thead>
@ -75,7 +76,7 @@
<div>
<a class="download-btn" href="{{ video.get_absolute_url }}"
title="Download to your device">
<i class="fas fa-play me-1"></i>Play now</a>
<i class="fas fa-play me-1"></i>{% trans 'Play now' %}</a>
</div>
</th>
@ -83,11 +84,11 @@
<td>
<div class="update-delete">
<a href="{% url 'upload_video_edit' slug=course.slug video_slug=video.slug %}"
class="update" title="Edit">
class="update" title="{% trans 'Edit' %}">
<i class="fas fa-pencil-alt"></i>
</a>
<a href="{% url 'upload_video_delete' slug=course.slug video_slug=video.slug %}"
class="delete" title="Delete">
class="delete" title="{% trans 'Delete' %}">
<i class="fas fa-trash-alt"></i>
</a>
</div>
@ -100,11 +101,11 @@
<td></td>
<td>
<span class="text-danger">
No video Uploaded.
{% trans 'No video Uploaded.' %}
{% if request.user.is_superuser or request.user.is_lecturer %}
<a href="{% url 'upload_video' course.slug %}">
<i class="primary" style="font-size: 22px;">
Upload now.
{% trans 'Upload now.' %}
</i>
{% endif %}
</a>
@ -123,18 +124,18 @@
<div class="row">
<div class="col-md-12 p-0">
<p class="form-title m-0">Documentations</p>
<p class="form-title m-0">{% trans 'Documentations' %}</p>
<div class="table-responsive">
<table class="table table-shadow table-light table-striped m-0">
<thead>
<tr>
<th>#</th>
<th>File name</th>
<th>Uploaded Date</th>
<th>Updated Date</th>
<th>Downloads</th>
<th>{% trans 'File name' %}</th>
<th>{% trans 'Uploaded Date' %}</th>
<th>{% trans 'Updated Date' %}</th>
<th>{% trans 'Downloads' %}</th>
{% if request.user.is_superuser or request.user.is_lecturer %}
<th>Actions</th>
<th>{% trans 'Actions' %}</th>
{% endif %}
</tr>
</thead>
@ -152,7 +153,7 @@
<th>
<div>
<a class="download-btn" href="{{ file.file.url }}" title="Download to your device">
<i class="fas fa-download me-1"></i>Download</a>
<i class="fas fa-download me-1"></i>{% trans 'Download' %}</a>
</div>
</th>
@ -160,11 +161,11 @@
<td>
<div class="update-delete">
<a href="{% url 'upload_file_edit' slug=course.slug file_id=file.pk %}"
class="update" title="Edit">
class="update" title="{% trans 'Edit' %}">
<i class="fas fa-pencil-alt"></i>
</a>
<a href="{% url 'upload_file_delete' slug=course.slug file_id=file.pk %}"
class="delete" title="Delete">
class="delete" title="{% trans 'Delete' %}">
<i class="fas fa-trash-alt"></i>
</a>
</div>
@ -177,11 +178,11 @@
<td></td>
<td>
<span class="text-danger">
No File Uploaded.
{% trans 'No File Uploaded.' %}
{% if request.user.is_superuser or request.user.is_lecturer %}
<a href="{% url 'upload_file_view' course.slug %}">
<i class="primary" style="font-size: 22px;">
Upload now.
{% trans 'Upload now.' %}
</i>
{% endif %}
</a>
@ -201,7 +202,7 @@
</div>
<div class="site-section mb-5 mt-4">
<div class="title-1">Lecturer(s)</div>
<div class="title-1">{% trans 'Lecturer(s)' %}</div>
<br>
<br>
<div class="container-fluid">
@ -228,7 +229,7 @@
</div>
</div>
{% empty %}
<h6 class="text-muted mt-3">No lecturer assigned for this course</h6>
<h6 class="text-muted mt-3">{% trans 'No lecturer assigned for this course' %}</h6>
{% endfor %}
</div>

View File

@ -1,5 +1,6 @@
{% extends 'base.html' %}
{% block title %}{{ title }} | Learning management system{% endblock title %}
{% load i18n %}
{% block title %}{{ title }} | {% trans 'Learning management system' %}{% endblock title %}
{% load crispy_forms_tags %}
{% load static %}
@ -7,9 +8,9 @@
<nav style="--bs-breadcrumb-divider: '>';" aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="/">Home</a></li>
<li class="breadcrumb-item"><a href="{% url 'programs' %}">Programs</a></li>
<li class="breadcrumb-item active" aria-current="page">Program Form</li>
<li class="breadcrumb-item"><a href="/">{% trans 'Home' %}</a></li>
<li class="breadcrumb-item"><a href="{% url 'programs' %}">{% trans 'Programs' %}</a></li>
<li class="breadcrumb-item active" aria-current="page">{% trans 'Program Form' %}</li>
</ol>
</nav>
@ -18,11 +19,12 @@
<div class="row">
<div class="col-md-6 mx-auto">
<div class="card">
<p class="form-title">Program Add Form</p>
<p class="form-title">{% trans 'Program Add Form' %}</p>
<div class="p-3"><br>
<form action="" method="POST">{% csrf_token %}
{{ form|crispy }}
<input class="btn btn-primary" type="submit" value="Save">
{{ form.title|as_crispy_field }}
{{ form.summary|as_crispy_field }}
<input class="btn btn-primary" type="submit" value="{% trans 'Save' %}">
</form>
</div>
</div>

View File

@ -1,22 +1,23 @@
{% extends 'base.html' %}
{% block title %}{{ title }} | Learning management system{% endblock title %}
{% load i18n %}
{% block title %}{{ title }} | {% trans 'Learning management system' %}{% endblock title %}
{% block content %}
<nav style="--bs-breadcrumb-divider: '>';" aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="/">Home</a></li>
<li class="breadcrumb-item active" aria-current="page">Programs</li>
<li class="breadcrumb-item"><a href="/">{% trans 'Home' %}</a></li>
<li class="breadcrumb-item active" aria-current="page">{% trans 'Programs' %}</li>
</ol>
</nav>
{% if request.user.is_superuser %}
<div class="manage-wrap">
<a class="btn btn-primary" href="{% url 'add_program' %}"><i class="fas fa-plus"></i>Add Program</a>
<a class="btn btn-primary" href="{% url 'add_program' %}"><i class="fas fa-plus"></i>{% trans 'Add Program' %}</a>
</div>
{% endif %}
<div class="title-1"><i class="fas fa-book-open"></i>Program List</div>
<div class="title-1"><i class="fas fa-book-open"></i>{% trans 'Program List' %}</div>
<br><br>
{% include 'snippets/messages.html' %}
@ -28,10 +29,10 @@
<thead>
<tr>
<th>#</th>
<th>Program Name</th>
<th>Summary</th>
<th>{% trans 'Program Name' %}</th>
<th>{% trans 'Summary' %}</th>
{% if request.user.is_superuser %}
<th>Action</th>
<th>{% trans 'Action' %}</th>
{% endif %}
</tr>
</thead>
@ -52,8 +53,8 @@
<i class="fa fa-ellipsis-vertical"></i>
</button>
<ul class="dropdown-menu position-fixed">
<li><a class="dropdown-item" href="{% url 'edit_program' pk=program.pk %}"><i class="fas fa-edit"></i> Update</a></li>
<li><a class="dropdown-item text-danger" href="{% url 'program_delete' pk=program.pk %}"><i class="fas fa-trash-alt"></i> Delete</a></li>
<li><a class="dropdown-item" href="{% url 'edit_program' pk=program.pk %}"><i class="fas fa-edit"></i>{% trans 'Update' %}</a></li>
<li><a class="dropdown-item text-danger" href="{% url 'program_delete' pk=program.pk %}"><i class="fas fa-trash-alt"></i>{% trans 'Delete' %}</a></li>
</ul>
</div>
</td>
@ -65,11 +66,11 @@
<td></td>
<td>
<span class="text-danger">
No program.
{% trans 'No program.' %}
{% if request.user.is_superuser %}
<a href="{% url 'add_program' %}">
<i class="primary" style="font-size: 22px;">
Add program now.
{% trans 'Add program now.' %}
</i>
{% endif %}
</a>

View File

@ -1,21 +1,21 @@
{% extends 'base.html' %}
{% block title %} {{ title }} | Learning management system{% endblock title %}
{% load i18n %}
{% block title %} {{ title }} | {% trans 'Learning management system' %}{% endblock title %}
{% load static %}
{% block content %}
<nav style="--bs-breadcrumb-divider: '>';" aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="/">Home</a></li>
<li class="breadcrumb-item"><a href="{% url 'programs' %}">Programs</a></li>
<li class="breadcrumb-item"><a href="/">{% trans 'Home' %}</a></li>
<li class="breadcrumb-item"><a href="{% url 'programs' %}">{% trans 'Programs' %}</a></li>
<li class="breadcrumb-item active" aria-current="page">{{ program.title }}</li>
</ol>
</nav>
{% if request.user.is_superuser %}
<div class="manage-wrap">
<a class="btn btn-sm btn-primary" href="{% url 'course_add' pk=program.pk %}"><i class="fas fa-plus"></i>Add
Course</a>
<a class="btn btn-sm btn-primary" href="{% url 'course_add' pk=program.pk %}"><i class="fas fa-plus"></i>{% trans 'Add Course' %}</a>
</div>
{% endif %}
@ -36,15 +36,15 @@
<thead>
<tr>
<th>#</th>
<th> Course Name </th>
<th> Course Code </th>
<th> Cr.Hr </th>
<th> Level </th>
<th> Year </th>
<th> Semester </th>
<th> Current Semester </th>
<th> {% trans 'Course Name' %} </th>
<th> {% trans 'Course Code' %} </th>
<th> {% trans 'Cr.Hr' %} </th>
<th> {% trans 'Level' %} </th>
<th> {% trans 'Year' %} </th>
<th> {% trans 'Semester' %} </th>
<th> {% trans 'Current Semester' %} </th>
{% if request.user.is_superuser %}
<th>Action</th>
<th>{% trans 'Action' %}</th>
{% endif %}
</tr>
</thead>
@ -75,10 +75,10 @@
</button>
<div class="dropdown-menu position-fixed">
<a class="dropdown-item" href="{% url 'edit_course' slug=course.slug %}">
<i class="fas fa-pencil-alt"></i> Edit
<i class="fas fa-pencil-alt"></i> {% trans 'Edit' %}
</a>
<a class="dropdown-item" href="{% url 'delete_course' slug=course.slug %}">
<i class="fas fa-trash-alt"></i> Delete
<i class="fas fa-trash-alt"></i> {% trans 'Delete' %}
</a>
</div>
</div>
@ -89,11 +89,11 @@
<tr>
<td colspan="9">
<span class="text-danger">
No course for this progrm.
{% trans 'No course for this progrm.' %}
{% if request.user.is_superuser %}
<a href="{% url 'course_add' pk=program.pk %}">
<i class="primary" style="font-size: 22px;">
Add one now.
{% trans 'Add one now.' %}
</i>
{% endif %}
</a>

View File

@ -1,13 +1,14 @@
{% extends 'base.html' %}
{% block title %} My Courses | Learning management system{% endblock title %}
{% load i18n %}
{% block title %} {% trans 'My Courses' %} | {% trans 'Learning management system' %}{% endblock title %}
{% load static %}
{% block content %}
<nav style="--bs-breadcrumb-divider: '>';" aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="/">Home</a></li>
<li class="breadcrumb-item active" aria-current="page">My Courses</li>
<li class="breadcrumb-item"><a href="/">{% trans 'Home' %}</a></li>
<li class="breadcrumb-item active" aria-current="page">{% trans 'My Courses' %}</li>
</ol>
</nav>
@ -19,7 +20,7 @@
{% endif %}
{% if request.user.is_lecturer %}
<div class="title-1">My Courses</div>
<div class="title-1">{% trans 'My Courses' %}</div>
{% endif %}
{% if messages %}
@ -38,19 +39,19 @@
{% if request.user.is_student %}
<div class="table-responsive p-3 mt-3">
<h6 class="fw-bold text-primary"><u>Taken Courses:</u></h6>
<h6 class="fw-bold text-primary"><u>{% trans 'Taken Courses:' %}</u></h6>
<div class="table-shadow">
<table class="table table-light">
<thead>
<tr>
<th>#</th>
<th> Course Name </th>
<th> Course Code </th>
<th> Cr.Hr </th>
<th> Year </th>
<th> Semester </th>
<th> Current Semester </th>
<th> Taken </th>
<th> {% trans 'Course Name' %} </th>
<th> {% trans 'Course Code' %} </th>
<th> {% trans 'Cr.Hr' %} </th>
<th> {% trans 'Year' %} </th>
<th> {% trans 'Semester' %} </th>
<th> {% trans 'Current Semester' %} </th>
<th> {% trans 'Taken' %} </th>
</tr>
</thead>
<tbody>
@ -71,7 +72,7 @@
{% endif %}
</th>
<td class="success">
<i class="fas fa-check-circle"></i> Taken
<i class="fas fa-check-circle"></i> {% trans 'Taken' %}
</td>
</tr>
{% endfor %}
@ -82,18 +83,18 @@
{% endif %}
<div class="table-responsive p-3">
<h6 class="fw-bold text-primary"><u>All Courses:</u></h6>
<h6 class="fw-bold text-primary"><u>{% trans 'All Courses:' %}</u></h6>
<div class="table-shadow">
<table class="table table-light">
<thead>
<tr>
<th>#</th>
<th> Course Name </th>
<th> Course Code </th>
<th> Cr.Hr </th>
<th> Year </th>
<th> Semester </th>
<th> Current Semester </th>
<th> {% trans 'Course Name' %} </th>
<th> {% trans 'Course Code' %} </th>
<th> {% trans 'Cr.Hr' %} </th>
<th> {% trans 'Year' %} </th>
<th> {% trans 'Semester' %} </th>
<th> {% trans 'Current Semester' %} </th>
</tr>
</thead>
<tbody>

View File

@ -1,4 +1,5 @@
<h1>Invoices</h1>
{% load i18n %}
<h1>{% trans 'Invoices' %}</h1>
<h3>{{ invoice.user }}</h3>
<h3>{{ invoice.amount }}</h3>

View File

@ -1,8 +1,8 @@
<h1>Invoices</h1>
<h1>{% trans 'Invoices' %}</h1>
<form method="POST">{% csrf_token %}
<input type="number" name="amount" required="true">
<button type="submit">Pay now</button>
<button type="submit">{% trans 'Pay now' %}</button>
</form>
{% for invoice in invoices %}

View File

@ -1,3 +1,4 @@
{% load i18n%}
<div id="top-navbar" class="py-1">
<div class="container">
<div class="nav-wrapper">
@ -8,7 +9,7 @@
<form class="form-header" action="{% url 'query' %}" method="GET">
<input id="primary-search" class="form-control rounded-end-0" type="text" name="q" value="{{ request.GET.q }}"
placeholder="Search All... #course, #program, #Quiz, #News, #Events" required />
placeholder="{% trans 'Search All... #course, #program, #Quiz, #News, #Events' %}" required />
<button class="btn btn-dark rounded-start-0" type="submit">
<i class="fas fa-search"></i>
</button>
@ -25,31 +26,28 @@
</div>
<p class="small text-muted text-center mb-0">
Last login: {{ request.user.last_login|date }}</p>
{% trans '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
Courses</a>
<a class="dropdown-item" href="{% url 'user_course_list' %}"><i class="fas fa-book me-2"></i>{% trans 'My Courses' %}</a>
{% endif %}
{% if request.user.is_superuser %}
<a class="dropdown-item" href="{% url 'admin_panel' %}"><i class="fas fa-user-tie me-2"></i>Admin
Panel</a>
<a class="dropdown-item" href="{% url 'admin_panel' %}"><i class="fas fa-user-tie me-2"></i>{% trans 'Admin Panel' %}</a>
{% endif %}
<a class="dropdown-item" href="{% url 'profile' %}"><i class="fas fa-user me-2"></i>Profile</a>
<a class="dropdown-item" href="{% url 'edit_profile' %}"><i class="fas fa-cog me-2"></i>Setting</a>
<a class="dropdown-item" href="{% url 'profile' %}"><i class="fas fa-user me-2"></i>{% trans 'Profile' %}</a>
<a class="dropdown-item" href="{% url 'edit_profile' %}"><i class="fas fa-cog me-2"></i>{% trans 'Setting' %}</a>
<hr>
<div style="display: flex; justify-content: center; align-items: center;">
<a class="btn btn-secondary" href="{% url 'logout' %}">
<i class="fas fa-sign-out-alt"></i> Signout
<i class="fas fa-sign-out-alt"></i> {% trans 'Signout' %}
</a>
</div>
</div>
</div>
</div>
</div>
</div>

View File

@ -1,4 +1,5 @@
{% extends 'base.html' %}
{% load i18n %}
{% block title %}PayPal{% endblock title %}
{% load static %}
@ -20,8 +21,8 @@
</style>
<div class="container">
<center>
<h3><i class="fa fa-check-circle-o text-success" aria-hidden="true"></i> Payment Succeed, You has been make payment successfuly.</h3>
<div class="counter-wrapper">Redirect to your dashboard in <span class="bg-counter" id="counter">8</span></div>
<h3><i class="fa fa-check-circle-o text-success" aria-hidden="true"></i>{% trans 'Payment Succeed, You has been make payment successfuly.' %}</h3>
<div class="counter-wrapper">{% trans 'Redirect to your dashboard in' %} <span class="bg-counter" id="counter">8</span></div>
</center>
</div>

View File

@ -1,9 +1,10 @@
{% extends 'base.html' %}
{% block title %}Coinbase{% endblock title %}
{% i18n %}
{% block title %}{% trans 'Coinbase' %}{% endblock title %}
{% load static %}
{% block content %}
<div class="container">
<center><h1>Coinbase</h1></center>
<center><h1>{% trans 'Coinbase' %}</h1></center>
</div>
{% endblock content %}

View File

@ -1,4 +1,5 @@
{% block content %}
{% load i18n %}
<style>
.table {
width: 100%;
@ -31,18 +32,18 @@
</style>
<p class="title-1">Lecturers</p>
<p class="title-1">{% trans 'Lecturers' %}</p>
<div>
<table class="table">
<thead>
<tr>
<th>#</th>
<th>ID No.</th>
<th>Full Name</th>
<th>Email</th>
<th>Mob No.</th>
<th>Address/City</th>
<th>{% trans 'ID No.' %}</th>
<th>{% trans 'Full Name' %}</th>
<th>{% trans 'Email' %}</th>
<th>{% trans 'Mob No.' %}</th>
<th>{% trans 'Address/City' %}</th>
</tr>
</thead>
<tbody>
@ -59,7 +60,7 @@
<tr>
<td>
<span class="text-danger">
No Lecturer(s).
{% trans 'No Lecturer(s).' %}
</span>
</td>
</tr>

View File

@ -1,4 +1,5 @@
{% block content %}
{% load i18n %}
<style>
.user-picture {
@ -37,8 +38,8 @@ table .info{
</td>
<td class="info">
<p>{{ user.get_full_name|title }}</p>
<p><strong>Last login:</strong> {{ user.last_login|date }}</p>
<p><strong>Role:</strong> {{ user.get_user_role }}</p>
<p><strong>{% trans 'Last login:' %}</strong> {{ user.last_login|date }}</p>
<p><strong>{% trans 'Role:' %}</strong> {{ user.get_user_role }}</p>
</td>
</tr>
</table>
@ -48,7 +49,7 @@ table .info{
<div class="card">
<div class="card-body">
{% if user.is_lecturer %}
<p class="h5">My Courses</p>
<p class="h5">{% trans 'My Courses' %}</p>
{% if courses %}
<ul class="list-group">
{% for course in courses %}
@ -56,43 +57,43 @@ table .info{
{% endfor %}
</ul>
{% else %}
<div class="text-danger">No courses assigned!</div>
<div class="text-danger">{% trans 'No courses assigned!' %}</div>
{% endif %}
<hr class="my-0">
{% endif %}
<p class="h5">Personal Info</p>
<p class="h5">{% trans 'Personal Info' %}</p>
<div class="dashboard-description">
<p><strong>First Name:</strong> {{ user.first_name|title }}</p>
<p><strong>Last Name:</strong> {{ user.last_name|title }}</p>
<p><strong>ID No.:</strong> {{ user.username }}</p>
<p><strong>{% trans 'First Name:' %}</strong> {{ user.first_name|title }}</p>
<p><strong>{% trans 'Last Name:' %}</strong> {{ user.last_name|title }}</p>
<p><strong>{% trans 'ID No.:' %}</strong> {{ user.username }}</p>
</div>
{% if user.is_student %}
<hr>
<p class="h5">Applicant Info</p>
<p class="h5">{% trans 'Applicant Info' %}</p>
<div class="dashboard-description">
<p><strong>School:</strong> Hawas Preparatory School</p>
<p><strong>Level:</strong> {{ level.level }}</p>
<p><strong>{% trans 'School:' %}</strong>{% trans 'Hawas Preparatory School' %}</p>
<p><strong>{% trans 'Level:' %}</strong> {{ level.level }}</p>
</div>
{% endif %}
<hr>
<p class="h5">Contact Info</p>
<p class="h5">{% trans 'Contact Info' %}</p>
<div class="dashboard-description">
<p><strong>Email:</strong> {{ user.email }}</p>
<p><strong>Tel No.:</strong> {{ user.phone }}</p>
<p><strong>Address/city:</strong> {{ user.address }}</p>
<p><strong>{% trans 'Email:' %}</strong> {{ user.email }}</p>
<p><strong>{% trans 'Tel No.:' %}</strong> {{ user.phone }}</p>
<p><strong>{% trans 'Address/city:' %}</strong> {{ user.address }}</p>
</div>
<hr>
<p class="h5">Important Dates</p>
<p class="h5">{% trans 'Important Dates' %}</p>
<div class="dashboard-description">
<p><strong>Last login:</strong> {{ user.last_login }}</p>
<p><strong>{% trans 'Last login:' %}</strong> {{ user.last_login }}</p>
{% if current_semester and current_session %}
<p><strong>Academic Year:</strong> {{ current_semester }} Semester {{ current_session }}</p>
<p><strong>{% trans 'Academic Year:' %}</strong> {{ current_semester }} {% trans 'Semester' %} {{ current_session }}</p>
{% endif %}
<p><strong>Registered Date:</strong> {{ user.date_joined|date }}</p>
<p><strong>{% trans 'Registered Date:' %}</strong> {{ user.date_joined|date }}</p>
</div>
</div>
</div>

View File

@ -1,4 +1,5 @@
{% block content %}
{% load i18n %}
<style>
.table {
width: 100%;
@ -31,17 +32,17 @@
</style>
<p class="title-1">Students</p>
<p class="title-1">{% trans 'Students' %}</p>
<div>
<table class="table">
<thead>
<tr>
<th>ID No.</th>
<th>Full Name</th>
<th>Email</th>
<th>Mob No.</th>
<th>Program</th>
<th>{% trans 'ID No.' %}</th>
<th>{% trans 'Full Name' %}</th>
<th>{% trans 'Email' %}</th>
<th>{% trans 'Mob No.' %}</th>
<th>{% trans 'Program' %}</th>
</tr>
</thead>
<tbody>
@ -57,7 +58,7 @@
<tr>
<td>
<span class="text-danger">
No Lecturer(s).
{% trans 'No Lecturer(s).' %}
</span>
</td>
</tr>

View File

@ -1,15 +1,15 @@
{% extends "base.html" %}
{% load i18n %}
{% block title %} {% trans "Progress Page" %} | Learning management system {% endblock %}
{% block title %} {% trans "Progress Page" %} | {% trans 'Learning management system' %} {% endblock %}
{% block description %} {% trans "User Progress Page" %} {% endblock %}
{% block content %}
<nav style="--bs-breadcrumb-divider: '>';" aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="/">Home</a></li>
<li class="breadcrumb-item active" aria-current="page">Progress Page</li>
<li class="breadcrumb-item"><a href="/">{% trans 'Home' %}</a></li>
<li class="breadcrumb-item active" aria-current="page">{% trans 'Progress Page' %}</li>
</ol>
</nav>
@ -57,7 +57,7 @@
<p class="lead text-muted">
{% trans "Below are the results of exams that you have sat." %}
</p>
<div class="info-text bg-danger mb-2">Total complete exams: {{ exams_counter }}</div>
<div class="info-text bg-danger mb-2">{% trans 'Total complete exams:' %} {{ exams_counter }}</div>
<div class="table-responsive">
<table class="table table-bordered table-striped">
@ -67,7 +67,7 @@
<th>{% trans "Quiz Title" %}</th>
<th>{% trans "Score" %}</th>
<th>{% trans "Possible Score" %}</th>
<th>Out of 100%</th>
<th>{% trans 'Out of 100%' %}</th>
</tr>
</thead>
@ -91,7 +91,7 @@
</div>
{% endif %}
{% if not cat_scores and not exams %}
<div class="col-12 p-4 text-center"><h3><i class="far fa-frown"></i></h3> No recordes yet. Try to do some quizzes in your course.</div>
<div class="col-12 p-4 text-center"><h3><i class="far fa-frown"></i></h3> {% trans 'No recordes yet. Try to do some quizzes in your course.' %}</div>
{% endif %}
{% endblock %}

View File

@ -2,18 +2,18 @@
{% load i18n%}
{% block title %} {{ quiz.title }} | Learning management system {% endblock %}
{% block title %} {{ quiz.title }} | {% trans 'Learning management system' %} {% endblock %}
{% block description %} {{ quiz.title }} - {{ quiz.description }} {% endblock %}
{% block content %}
<nav style="--bs-breadcrumb-divider: '>';" aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="/">Home</a></li>
<li class="breadcrumb-item"><a href="/">{% trans 'Home' %}</a></li>
<li class="breadcrumb-item"><a href="{% url 'programs' %}">Programs</a></li>
<li class="breadcrumb-item"><a href="{% url 'program_detail' course.program.id %}">{{ course.program }}</a></li>
<li class="breadcrumb-item"><a href="{{ course.get_absolute_url }}">{{ course }}</a></li>
<li class="breadcrumb-item"><a href="{% url 'quiz_index' course.slug %}">Quizzes</a></li>
<li class="breadcrumb-item"><a href="{% url 'quiz_index' course.slug %}">{% trans 'Quizzes' %}</a></li>
<li class="breadcrumb-item active" aria-current="page">{{ quiz.title|title }}</li>
</ol>
</nav>
@ -105,15 +105,15 @@
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h1 class="modal-title fs-5" id="instractionModalLabel">Quiz instractions</h1>
<h1 class="modal-title fs-5" id="instractionModalLabel">{% trans 'Quiz instractions' %}</h1>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
You can't go back to the previous question after you submit it,
so double check your answer before proceeding to the next one!
{% trans 'You can't go back to the previous question after you submit it,
so double check your answer before proceeding to the next one!' %}
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" data-bs-dismiss="modal">Understood</button>
<button type="button" class="btn btn-primary" data-bs-dismiss="modal">{% trans 'Understood' %}</button>
</div>
</div>
</div>
@ -153,7 +153,7 @@
</ul>
<br>
<input type="submit" value={% trans "Check" %} class="btn btn-large btn-block btn-primary" />
<input type="submit" value="Check" class="btn btn-large btn-block btn-primary" />
<!-- <input type="submit" value={% trans "Previous" %} class="btn btn-large btn-block btn-outline-primary" > -->
</form>
</div>

View File

@ -1,20 +1,21 @@
{% extends 'base.html' %}
{% load i18n %}
{% load crispy_forms_tags %}
{% block content %}
<nav style="--bs-breadcrumb-divider: '>';" aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="/">Home</a></li>
<li class="breadcrumb-item"><a href="{% url 'programs' %}">Programs</a></li>
<li class="breadcrumb-item"><a href="/">{% trans 'Home' %}</a></li>
<li class="breadcrumb-item"><a href="{% url 'programs' %}">{% trans 'Programs' %}</a></li>
<li class="breadcrumb-item"><a href="{% url 'program_detail' course.program.id %}">{{ course.program }}</a></li>
<li class="breadcrumb-item"><a href="{{ course.get_absolute_url }}">{{ course }}</a></li>
<li class="breadcrumb-item"><a href="{% url 'quiz_index' course.slug %}">Quizzes</a></li>
<li class="breadcrumb-item active" aria-current="page">MC Question Form</li>
<li class="breadcrumb-item"><a href="{% url 'quiz_index' course.slug %}">{% trans 'Quizzes' %}</a></li>
<li class="breadcrumb-item active" aria-current="page">{% trans 'MC Question Form' %}</li>
</ol>
</nav>
<div class="title-1 mb-3">Add questions [{{ quiz_obj|truncatechars:15 }}]</div>
<div class="title-1 mb-3">{% trans 'Add questions' %} [{{ quiz_obj|truncatechars:15 }}]</div>
{% if formset.non_form_errors %}
<div class="alert alert-danger">
@ -27,10 +28,10 @@
{% endif %}
<div class="container">
<div class="info-text bg-orange mb-3">{{ quizQuestions }} question added</div>
<div class="info-text bg-orange mb-3">{{ quizQuestions }} {% trans 'question added' %}</div>
<form action="#" method="POST">{% csrf_token %}
{% if form.errors %}<p class="alert alert-danger">Correct the error(s) below.</p>{% endif %}
{% if form.errors %}<p class="alert alert-danger">{% trans 'Correct the error(s) below.' %}</p>{% endif %}
<div class="row">
<div class="col mx-3 py-4 border bg-white">
<div class="mb-2" hidden>
@ -43,17 +44,17 @@
<div class="col mx-3 py-4 border bg-white">
{{ form.choice_order|as_crispy_field }}
<div class="border p-2">
<label class="lead">Choices</label>
<label class="lead">{% trans 'Choices' %}</label>
{{ formset.management_form }}
{% for fs in formset %}
<label for="username">{{ fs.label }}</label>
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text">{{ fs.correct }} <small class="ms-1">Correct</small></span>
<span class="input-group-text">{{ fs.correct }} <small class="ms-1">{% trans 'Correct' %}</small></span>
</div>
{{ fs.choice }}
<div class="input-group-prepend">
<span class="input-group-text">{{ fs.DELETE }} <small class="ms-1">Delete</small></span>
<span class="input-group-text">{{ fs.DELETE }} <small class="ms-1">{% trans 'Delete' %}</small></span>
</div>
</div>
{% endfor %}
@ -63,7 +64,7 @@
<button type="submit" formnovalidate name="another" class="btn btn-outline-primary">
Save and add another
</button>
<button class="btn btn-primary my-4" type="submit">Save</button>
<button class="btn btn-primary my-4" type="submit">{% trans 'Save' %}</button>
</form>
</div>

View File

@ -1,20 +1,21 @@
{% extends 'base.html' %}
{% load crispy_forms_tags %}
{% load i18n %}
{% block content %}
<nav style="--bs-breadcrumb-divider: '>';" aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="/">Home</a></li>
<li class="breadcrumb-item"><a href="{% url 'programs' %}">Programs</a></li>
<li class="breadcrumb-item"><a href="/">{% trans 'Home' %}</a></li>
<li class="breadcrumb-item"><a href="{% url 'programs' %}">{% trans 'Programs' %}</a></li>
<li class="breadcrumb-item"><a href="{% url 'program_detail' course.program.id %}">{{ course.program }}</a></li>
<li class="breadcrumb-item"><a href="{{ course.get_absolute_url }}">{{ course }}</a></li>
<li class="breadcrumb-item"><a href="{% url 'quiz_index' course.slug %}">Quizzes</a></li>
<li class="breadcrumb-item active" aria-current="page">Quiz Form</li>
<li class="breadcrumb-item"><a href="{% url 'quiz_index' course.slug %}">{% trans 'Quizzes' %}</a></li>
<li class="breadcrumb-item active" aria-current="page">{% trans 'Quiz Form' %}</li>
</ol>
</nav>
<div class="title-1">Quiz form for {{ course|truncatechars:15 }}</div>
<div class="title-1">{% trans 'Quiz form for' %} {{ course|truncatechars:15 }}</div>
<br><br>
<div class="container">
@ -51,7 +52,7 @@
<div hidden>
<label for="questions">{{ form.questions.label }}</label><br> {{ form.questions }}
<span class="danger">{{ form.questions.errors }}</span>
<small class="d-block text-muted">Hold down "Control", or "Command" on a Mac, to select more than one.</small>
<small class="d-block text-muted">{% trans 'Hold down' %} "Control", {% trans 'or' %} "Command" {% trans 'on a Mac, to select more than one.' %}</small>
</div>
{{ form.random_order|as_crispy_field }}
{{ form.answers_at_end|as_crispy_field }}
@ -62,7 +63,7 @@
</div>
</div>
</div>
<button class="btn btn-primary my-4" id="{% if form.is_valid %}btn-transition{% endif %}" type="submit">Save &amp; Continue</button>
<button class="btn btn-primary my-4" id="{% if form.is_valid %}btn-transition{% endif %}" type="submit">{% trans 'Save' %} &amp; {% trans 'Continue' %}</button>
</form>
</div>

View File

@ -1,4 +1,5 @@
{% extends 'base.html' %}
{% load i18n %}
{% block title %}{{ title }} | Learning management system{% endblock title %}
{% load i18n %}
{% load static %}
@ -8,21 +9,21 @@
<nav style="--bs-breadcrumb-divider: '>';" aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="/">Home</a></li>
<li class="breadcrumb-item"><a href="{% url 'programs' %}">Programs</a></li>
<li class="breadcrumb-item"><a href="/">{% trans 'Home' %}</a></li>
<li class="breadcrumb-item"><a href="{% url 'programs' %}">{% trans 'Programs' %}</a></li>
<li class="breadcrumb-item"><a href="{% url 'program_detail' pk=1 %}">{{ course.program }}</a></li>
<li class="breadcrumb-item"><a href="{{ course.get_absolute_url }}">{{ course }}</a></li>
<li class="breadcrumb-item active" aria-current="page">Quizzes</li>
<li class="breadcrumb-item active" aria-current="page">{% trans 'Quizzes' %}</li>
</ol>
</nav>
{% if request.user.is_superuser or request.user.is_lecturer %}
<div class="manage-wrap">
<a class="btn btn-primary" href="{% url 'quiz_create' course.slug %}"><i class="fas fa-plus"></i> Add Quiz</a>
<a class="btn btn-primary" href="{% url 'quiz_create' course.slug %}"><i class="fas fa-plus"></i>{% trans 'Add Quiz' %}</a>
</div>
{% endif %}
<div class="title-1">Quizzes [{{ course|truncatechars:25 }}]</div>
<div class="title-1">{% trans 'Quizzes' %} [{{ course|truncatechars:25 }}]</div>
<br>
<br>
@ -35,9 +36,9 @@
<div class="col-md-4 mb-2">
<div class="card p-2 quiz-wrapper">
<div class="d-flex justify-content-between align-items-center text-success mb-4">
<em class="text-left">{{ quiz.category|title }} Quiz</em>
<em class="text-left">{{ quiz.category|title }} {% trans 'Quiz' %}</em>
<div class="text-right text-light bg-danger px-2 small rounded">
{{ quiz.get_questions.count }} Questions
{{ quiz.get_questions.count }} {% trans 'Questions' %}
</div>
</div>
@ -61,10 +62,10 @@
<button class="btn btn-sm p-0 ms-2" type="button" data-bs-toggle="dropdown"><i class="fas fa-ellipsis-v m-0"></i></button>
<div class="dropdown-menu" aria-labelledby="dropdown01">
<div class="dropdown-item">
<a href="{% url 'quiz_update' slug=course.slug pk=quiz.id %}" class="update"><i class="fas fa-pencil-alt"></i> Edit</a>
<a href="{% url 'quiz_update' slug=course.slug pk=quiz.id %}" class="update"><i class="fas fa-pencil-alt"></i>{% trans 'Edit' %}</a>
</div>
<div class="dropdown-item">
<a href="{% url 'quiz_delete' slug=course.slug pk=quiz.id %}" class="delete"><i class="fas fa-trash-alt"></i> Delete</a>
<a href="{% url 'quiz_delete' slug=course.slug pk=quiz.id %}" class="delete"><i class="fas fa-trash-alt"></i>{% trans 'Delete' %}</a>
</div>
</div>
</div>

View File

@ -1,16 +1,16 @@
{% extends 'base.html' %}
{% load i18n %}
{% block title %}
{% trans "Result of" %} {{ sitting.quiz.title }} {% trans "for" %} {{ sitting.user }} | Learning management system
{% trans "Result of" %} {{ sitting.quiz.title }} {% trans "for" %} {{ sitting.user }} | {% trans 'Learning management system' %}
{% endblock %}
{% block content %}
<nav style="--bs-breadcrumb-divider: '>';" aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="/">Home</a></li>
<li class="breadcrumb-item"><a href="{% url 'quiz_marking' %}">Completed Exams</a></li>
<li class="breadcrumb-item active" aria-current="page">Marking</li>
<li class="breadcrumb-item"><a href="/">{% trans 'Home' %}</a></li>
<li class="breadcrumb-item"><a href="{% url 'quiz_marking' %}">{% trans 'Completed Exams' %}</a></li>
<li class="breadcrumb-item active" aria-current="page">{% trans 'Marking' %}</li>
</ol>
</nav>

View File

@ -1,13 +1,13 @@
{% extends 'base.html' %}
{% load i18n %}
{% block title %}{% trans "All Quizzes" %} | Learning management system{% endblock %}
{% block title %}{% trans "All Quizzes" %} | {% trans 'Learning management system' %}{% endblock %}
{% block content %}
<nav style="--bs-breadcrumb-divider: '>';" aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="/">Home</a></li>
<li class="breadcrumb-item active" aria-current="page">Complete Exams</li>
<li class="breadcrumb-item"><a href="/">{% trans 'Home' %}</a></li>
<li class="breadcrumb-item active" aria-current="page">{% trans 'Complete Exams' %}</li>
</ol>
</nav>
@ -26,7 +26,7 @@
{% if sitting_list %}
<div class="info-text bg-danger my-2">Total complete exams: {{ sitting_list.count }}</div>
<div class="info-text bg-danger my-2">{% trans 'Total complete exams:' %} {{ sitting_list.count }}</div>
<table class="table table-bordered table-striped">
<thead>

View File

@ -1,5 +1,6 @@
{% extends 'registration/registration_base.html' %}
{% block title %}Dj Learning Management System - Login{% endblock title %}
{% load i18n %}
{% block title %}{% trans 'Dj Learning Management System - Login' %}{% endblock title %}
{% load crispy_forms_tags %}
{% block content %}
@ -7,28 +8,28 @@
<div class="card">
<div class="form-title">
<i class="fas fa-lock me-2"></i>
Sign in
{% trans 'Sign in' %}
</div>
<div class="card-body">
<form action="" method="POST" id="login-form">{% csrf_token %}
<div class="form-group mb-3">
<label class="mb-2" for="username_id"><i class="fas fa-address-card me-2"></i>ID Number</label>
<label class="mb-2" for="username_id"><i class="fas fa-address-card me-2"></i>{% trans 'ID Number' %}</label>
<input type="text" name="username" id="username_id" class="form-control" required>
<div id="message-wrapper"></div>
</div>
<div class="form-group mb-3">
<label class="mb-2" for="password_id"><i class="fas fa-key me-2"></i>Password</label>
<label class="mb-2" for="password_id"><i class="fas fa-key me-2"></i>{% trans 'Password' %}</label>
<input type="password" name="password" id="password_id" class="form-control" required>
</div>
{% if form.errors %}
<span class="text-danger"><i class="fas fa-exclamation-circle"></i> Invalid ID & Password.</span><br>
<span class="text-danger"><i class="fas fa-exclamation-circle"></i> {% trans 'Invalid ID & Password.' %}</span><br>
{% endif %}
<button type="submit" class="btn btn-primary" id="login-btn"><i class="fas fa-sign-in-alt"></i><small> SIGN IN</small></button>
<button type="submit" class="btn btn-primary" id="login-btn"><i class="fas fa-sign-in-alt"></i><small>{% trans 'SIGN IN' %}</small></button>
</form>
<br>
<div class="login-bottom">
<a href="{% url 'password_reset' %}" class="link">Forgot password ?</a>
<a href="{% url 'password_reset' %}" class="link">{% trans 'Forgot password ?' %}</a>
</div>
</div>
</div>

View File

@ -1,19 +1,20 @@
{% extends 'registration/registration_base.html' %}
{% block title %}Password Reset | Learning management system{% endblock title %}
{% load i18n %}
{% block title %}{% trans 'Password Reset | Learning management system' %}{% endblock title %}
{% load crispy_forms_tags %}
{% block content %}
<div id="login">
<h3 class="login-title">Password Reset</h3>
<h3 class="login-title">{% trans 'Password Reset' %}</h3>
<form action="" method="POST" class="form-box">{% csrf_token %}
<div class="container">
<!-- {{ form|crispy }} -->
<div class="form-group">
<i class="fas fa-envelope"></i>Email {{ form.email }}
<i class="fas fa-envelope"></i>{% trans 'Email' %} {{ form.email }}
<span class="danger">{{ form.email.errors }}</span>
</div>
</div>
<button type="submit" class="btn btn-primary"><small>Request Password Reset</small></button>
<button type="submit" class="btn btn-primary"><small>{% trans 'Request Password Reset' %}</small></button>
</form>
</div>
{% endblock content %}

View File

@ -1,15 +1,16 @@
{% extends 'registration/registration_base.html' %}
{% block title %}Password Reset Complete | Learning management system{% endblock title %}
{% load i18n %}
{% block title %}{% trans 'Password Reset Complete | Learning management system' %}{% endblock title %}
{% load crispy_forms_tags %}
{% block content %}
<div id="login">
<h3 class="login-title">Password Reset Complete</h3>
<h3 class="login-title">{% trans 'Password Reset Complete' %}</h3>
<div class="container">
<div class="alert alert-success">
<i class="fas fa-check-circle"></i>Your password has been set, you are now able to Log In!
<i class="fas fa-check-circle"></i>{% trans 'Your password has been set, you are now able to Log In!' %}
</div>
<a class="btn btn-primary" href="{% url 'login' %}">Sign In Here</a>
<a class="btn btn-primary" href="{% url 'login' %}">{% trans 'Sign In Here' %}</a>
</div>
</div>
{% endblock content %}

View File

@ -1,5 +1,6 @@
{% extends 'registration/registration_base.html' %}
{% block title %}New Password | Learning management system{% endblock title %}
{% load i18n %}
{% block title %}{% trans 'New Password | Learning management system %}{% endblock title %}
{% load crispy_forms_tags %}
{% block content %}
@ -18,7 +19,7 @@
{% endif %}
<div id="login">
<h3 class="login-title">Confirm New Password</h3>
<h3 class="login-title">{% trans 'Confirm New Password' %}</h3>
<div class="p-3">
<form action="" method="POST" class="form-box text-left">{% csrf_token %}
{{ form|crispy }}
@ -27,7 +28,7 @@
<label for="password2">Confirm Password</label>
<input type="password" id="password2" name="password2" class="form-control" required>
<hr> -->
<input type="submit" class="btn btn-primary" value="Reset Password">
<input type="submit" class="btn btn-primary" value="{% trans 'Reset Password' %}">
</form>
</div>
</div>

View File

@ -1,16 +1,17 @@
{% extends 'registration/registration_base.html' %}
{% block title %}Email Sent | Learning management system{% endblock title %}
{% load i18n %}
{% block title %}{% trans 'Email Sent | Learning management system' %}{% endblock title %}
{% load crispy_forms_tags %}
{% block content %}
<div id="login">
<h3 class="login-title">Email sent</h3>
<h3 class="login-title">{% trans 'Email sent' %}</h3>
<div class="container">
<div class="alert alert-success">
<i class="fas fa-check-circle"></i>An Email has been sent with instructions
to reset your password, check your email.
<i class="fas fa-check-circle"></i>{% trans 'An Email has been sent with instructions
to reset your password, check your email.' %}
</div>
<a class="btn btn-primary" href="{% url 'login' %}"><i class="far fa-arrow-alt-circle-left"></i>Back To Login</a>
<a class="btn btn-primary" href="{% url 'login' %}"><i class="far fa-arrow-alt-circle-left"></i>{% trans 'Back To Login' %}</a>
</div>
</div>
{% endblock content %}

View File

@ -1,5 +1,6 @@
{% extends 'registration/registration_base.html' %}
{% block title %} Register | Learning management system {% endblock title %}
{% load i18n %}
{% block title %}{% trans 'Register | Learning management system' %}{% endblock title %}
{% load crispy_forms_tags %}
{% block content %}
@ -8,7 +9,7 @@
<div class="blue-gradient text-light p-3 mb-5">
<h1 class="lead my-0">
<i class="fas fa-lock mr-2"></i>Create Your Account
<i class="fas fa-lock mr-2"></i>{% trans 'Create Your Account' %}
</h1>
</div>
@ -16,7 +17,7 @@
{% csrf_token %}
<div class="row">
<div class="col-lg-6">
<h1 class="lead p-2 bg-light">Login Form</h1>
<h1 class="lead p-2 bg-light">{% trans 'Login Form' %}</h1>
<div class="mb-3">
<label for="username_id" class="form-label">{{ form.username.label }}</label>
{{ form.username }}
@ -36,7 +37,7 @@
</div>
</div>
<div class="col-lg-6">
<h1 class="lead p-2 bg-light">Personal Info</h1>
<h1 class="lead p-2 bg-light">{% trans 'Personal Info' %}</h1>
<div class="mb-3">
<label for="address_id" class="form-label">{{ form.address.label }}</label>
{{ form.address }}
@ -69,13 +70,13 @@
</div>
{% if form.errors %}
<p class="text-danger my-2"><i class="fas fa-exclamation-circle"></i> Invalid ID & Password.</p><br>
<p class="text-danger my-2"><i class="fas fa-exclamation-circle"></i>{% trans 'Invalid ID & Password.' %}</p><br>
{% endif %}
<button type="submit" class="btn btn-primary" id="login-btn"><i class="fas fa-sign-in-alt"></i><small> SIGN UP</small></button>
<button type="submit" class="btn btn-primary" id="login-btn"><i class="fas fa-sign-in-alt"></i><small>{% trans 'SIGN UP' %}</small></button>
</form>
<br>
<span> Already Registered ? </span><a href="{% url 'login' %}" class="link">Login</a>
<span> {% trans 'Already Registered ?' %} </span><a href="{% url 'login' %}" class="link">{% trans 'Login' %}</a>
</div>
{% endblock content %}

View File

@ -4,26 +4,26 @@
{% load quiz_tags %}
{% block title %} {{ quiz.title}} | Learning management system {% endblock %}
{% block title %} {{ quiz.title}} | {% trans 'Learning management system' %} {% endblock %}
{% block description %} {% trans "Quiz Results for" %} {{ quiz.title }} {% endblock %}
{% block content %}
<nav style="--bs-breadcrumb-divider: '>';" aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="/">Home</a></li>
<li class="breadcrumb-item"><a href="{% url 'programs' %}">Programs</a></li>
<li class="breadcrumb-item"><a href="/">{% trans 'Home' %}</a></li>
<li class="breadcrumb-item"><a href="{% url 'programs' %}">{% trans 'Programs' %}</a></li>
<li class="breadcrumb-item"><a href="{% url 'program_detail' course.program.id %}">{{ course.program }}</a></li>
<li class="breadcrumb-item"><a href="{{ course.get_absolute_url }}">{{ course }}</a></li>
<li class="breadcrumb-item"><a href="{% url 'quiz_index' course.slug %}">Quizzes</a></li>
<li class="breadcrumb-item"><a href="{% url 'quiz_index' course.slug %}">{% trans 'Quizzes' %}</a></li>
<li class="breadcrumb-item"><a href="{% url 'quiz_take' course.id quiz.slug %}">{{ quiz.title|title }}</a></li>
<li class="breadcrumb-item active" aria-current="page">Result</li>
<li class="breadcrumb-item active" aria-current="page">{% trans 'Result' %}</li>
</ol>
</nav>
<div id="progress-card">
<div class="col-md-6 mx-auto">
<h5 class="lead">Calculating your result...</h5>
<h5 class="lead">{% trans 'Calculating your result...' %}</h5>
<div class="progress">
<div class="progress-bar progress-bar-striped" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100"></div>
</div>

View File

@ -1,41 +1,42 @@
{% extends 'base.html' %}
{% block title %}{{ title }} | Learning management system{% endblock title %}
{% load i18n %}
{% block title %}{{ title }} | {% trans 'Learning management system' %}{% endblock title %}
{% load static %}
{% block content %}
<nav style="--bs-breadcrumb-divider: '>';" aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="/">Home</a></li>
<li class="breadcrumb-item active" aria-current="page">Manage Score</li>
<li class="breadcrumb-item"><a href="/">{% trans 'Home' %}</a></li>
<li class="breadcrumb-item active" aria-current="page">{% trans 'Manage Score' %}</li>
</ol>
</nav>
{% include 'snippets/messages.html' %}
<div class="title-1 mb-3"><i class="fas fa-table"></i>Manage Score</div>
<div class="title-1 mb-3"><i class="fas fa-table"></i>{% trans 'Manage Score' %}</div>
{% if current_semester %}
<div class="row">
<div class="col-md-8">
<div class="card text-center">
<p class="form-title">
{{ current_semester }} Semester - <i class="result-title">{{ current_session }}</i>
{{ current_semester }} {% trans 'Semester' %} - <i class="result-title">{{ current_session }}</i>
</p>
<div class="container">
<div class="dropdown">
<button class="btn btn-primary dropdown-toggle mx-auto mb-2" type="button" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Select Your Course Here
{% trans 'Select Your Course Here' %}
</button>
<div class="dropdown-menu">
{% for course in courses %}
<a class="dropdown-item" href="{% url 'add_score_for' course.id %}" title="{{ course.code }}">{{ course.title }}</a>
{% empty %}
<p class="dropdown-item">No course.</p>
<p class="dropdown-item">{% trans 'No course.' %}</p>
{% endfor %}
</div>
</div>
<p>To manage scores, please select the course using the button above.</p>
<p>{% trans 'To manage scores, please select the course using the button above.' %}</p>
</div>
</div>
</div>

View File

@ -1,14 +1,15 @@
{% extends 'base.html' %}
{% block title %}{{ title }} | Learning management system{% endblock title %}
{% load i18n %}
{% block title %}{{ title }} | {% trans 'Learning management system' %}{% endblock title %}
{% load static %}
{% block content %}
<nav style="--bs-breadcrumb-divider: '>';" aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="/">Home</a></li>
<li class="breadcrumb-item"><a href="/">{% trans 'Home' %}</a></li>
<li class="breadcrumb-item"><a href="{{ course.get_absolute_url }}">{{ course }}</a></li>
<li class="breadcrumb-item active" aria-current="page">Manage Score</li>
<li class="breadcrumb-item active" aria-current="page">{% trans 'Manage Score' %}</li>
</ol>
</nav>
@ -20,13 +21,13 @@
{% for course in courses %}
<a class="dropdown-item" href="{% url 'add_score_for' course.id %}" title="{{ course.code }}">{{ course.title }}</a>
{% empty %}
<p class="dropdown-item">No course.</p>
<p class="dropdown-item">{% trans 'No course.' %}</p>
{% endfor %}
</div>
</div>
<br>
<h4 class="title-1">Students result form | {{ course|truncatechars:15 }}</h4>
<h4 class="title-1">{% trans 'Students result form' %} | {{ course|truncatechars:15 }}</h4>
<p>{{ course.summary }}</p>
{% include 'snippets/messages.html' %}
@ -34,30 +35,30 @@
<form action="" method="POST">
{% csrf_token %}
<div class="btn-flex">
<button title="Save Score" type="submit" class="btn btn-primary">Save</button>
<button title="Save Score" type="submit" class="btn btn-primary">{% trans 'Save' %}</button>
<a target="_blank" href="{% url 'result_sheet_pdf_view' id=course.id %}">
<span data-toggle="tooltip" title="Print Result sheet" class="btn btn-warning">
<i class="far fa-file-pdf"></i> Grade report
<i class="far fa-file-pdf"></i> {% trans 'Grade report' %}
</span>
</a>
</div>
<h4 class="mt-3">{{ current_semester }} Semester <i class="text-light px-2 rounded small bg-danger">{{ current_session }}</i></h4>
<h4 class="mt-3">{{ current_semester }} {% trans 'Semester' %} <i class="text-light px-2 rounded small bg-danger">{{ current_session }}</i></h4>
<div class="table-responsive">
<table class="table table-light">
<thead>
<tr>
<th>#</th>
<th>Student</th>
<th>Assignment</th>
<th>Mid exam</th>
<th>Quiz</th>
<th>Attendance</th>
<th>Final exam</th>
<th>Total</th>
<th>Point</th>
<th>Grade</th>
<th>Comment</th>
<th>{% trans 'Student' %}</th>
<th>{% trans 'Assignment' %}</th>
<th>{% trans 'Mid exam' %}</th>
<th>{% trans 'Quiz' %}</th>
<th>{% trans 'Attendance' %}</th>
<th>{% trans 'Final exam' %}</th>
<th>{% trans 'Total' %}</th>
<th>{% trans 'Point' %}</th>
<th>{% trans 'Grade' %}</th>
<th>{% trans 'Comment' %}</th>
</tr>
</thead>
<tbody>
@ -101,7 +102,7 @@
<td></td>
<td>
<span class="text-danger">
No Student.
{% trans 'No Student.' %}
</span>
</td>
<td></td>

View File

@ -1,12 +1,13 @@
{% extends 'base.html' %}
{% block title %}{{ title }} | Learning management system{% endblock title %}
{% load i18n %}
{% block title %}{{ title }} | {% trans 'Learning management system' %}{% endblock title %}
{% block content %}
<nav style="--bs-breadcrumb-divider: '>';" aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="/">Home</a></li>
<li class="breadcrumb-item active" aria-current="page">Assesment Results</li>
<li class="breadcrumb-item"><a href="/">{% trans 'Home' %}</a></li>
<li class="breadcrumb-item active" aria-current="page">{% trans 'Assesment Results' %}</li>
</ol>
</nav>
@ -24,24 +25,24 @@
{% endfor %}
{% endif %}
<div class="title-1"><i class="fa fa-spell-check"></i>Assesment Results</div>
<p>{{ student.level }} Result</p>
<div class="title-1"><i class="fa fa-spell-check"></i>{% trans 'Assesment Results' %}</div>
<p>{{ student.level }} {% trans 'Result' %}</p>
<div class="table-responsive p-0 px-2 mt-3">
<div class="table-title"><u>First Semester:</u></div>
<div class="table-title"><u>{% trans 'First Semester:' %}</u></div>
<table class="table table-light">
<thead>
<tr>
<th>#</th>
<th>Course Title</th>
<th>Course Code</th>
<th>Cr.Hr(s)</th>
<th>Assignment</th>
<th>Mid exam</th>
<th>Quiz</th>
<th>Attendance</th>
<th>Final exam</th>
<th>Total</th>
<th>{% trans 'Course Title' %}</th>
<th>{% trans 'Course Code' %}</th>
<th>{% trans 'Cr.Hr(s)' %}</th>
<th>{% trans 'Assignment' %}</th>
<th>{% trans 'Mid exam' %}</th>
<th>{% trans 'Quiz' %}</th>
<th>{% trans 'Attendance' %}</th>
<th>{% trans 'Final exam' %}</th>
<th>{% trans 'Total' %}</th>
</tr>
</thead>
{% for course in courses %}
@ -70,20 +71,20 @@
</div>
<div class="table-responsive p-3 mt-3">
<div class="table-title"><u>Second Semester:</u></div>
<div class="table-title"><u>{% trans 'Second Semester:' %}</u></div>
<table class="table table-light">
<thead>
<tr>
<th>#</th>
<th>Course Title</th>
<th>Course Code</th>
<th>Cr.Hr(s)</th>
<th>Assignment</th>
<th>Mid exam</th>
<th>Quiz</th>
<th>Attendance</th>
<th>Final exam</th>
<th>Total</th>
<th>{% trans 'Course Title' %}</th>
<th>{% trans 'Course Code %}</th>
<th>{% trans 'Cr.Hr(s)' %}</th>
<th>{% trans 'Assignment' %}</th>
<th>{% trans 'Mid exam' %}</th>
<th>{% trans 'Quiz' %}</th>
<th>{% trans 'Attendance' %}</th>
<th>{% trans 'Final exam' %}</th>
<th>{% trans 'Total' %}</th>
</tr>
</thead>
{% for course in courses %}

View File

@ -1,12 +1,13 @@
{% extends 'base.html' %}
{% block title %}{{ title }} | Learning management system{% endblock title %}
{% load i18n %}
{% block title %}{{ title }} | {% trans 'Learning management system' %}{% endblock title %}
{% block content %}
<nav style="--bs-breadcrumb-divider: '>';" aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="/">Home</a></li>
<li class="breadcrumb-item active" aria-current="page">Grade Results</li>
<li class="breadcrumb-item"><a href="/">{% trans 'Home' %}</a></li>
<li class="breadcrumb-item active" aria-current="page">{% trans 'Grade Results' %}</li>
</ol>
</nav>
@ -24,21 +25,21 @@
{% endfor %}
{% endif %}
<div class="title-1"><i class="fas fa-table"></i>Grade Results</div>
<p>{{ student.level }} Result</p>
<div class="title-1"><i class="fas fa-table"></i>{% trans 'Grade Results' %}</div>
<p>{{ student.level }} {% trans 'Result' %}</p>
<div class="table-responsive">
<div class="table-title"><u>First Semester:</u></div>
<div class="table-title"><u>{% trans 'First Semester:' %}</u></div>
<table class="table table-light">
<thead>
<tr>
<th>#</th>
<th>Course Title</th>
<th>Course Code</th>
<th>Cr.Hr</th>
<th>Grade</th>
<th>Points</th>
<th>Comment</th>
<th>{% trans 'Course Title' %}</th>
<th>{% trans 'Course Code' %}</th>
<th>{% trans 'Cr.Hr' %}</th>
<th>{% trans 'Grade' %}</th>
<th>{% trans 'Points' %}</th>
<th>{% trans 'Comment' %}</th>
</tr>
</thead>
{% for course in courses %}
@ -54,9 +55,9 @@
<td>{{ course.point }}</td>
{% if course.comment == 'PASS' %}
<td class="success"><i class="fas fa-check-circle"></i> PASS</td>
<td class="success"><i class="fas fa-check-circle"></i>{% trans 'PASS' %}</td>
{% elif course.comment == 'FAIL' %}
<td class="danger"><i class="fas fa-exclamation-circle"></i> FAIL</td>
<td class="danger"><i class="fas fa-exclamation-circle"></i>{% trans 'FAIL' %}</td>
{% else %}
<td></td>
{% endif %}
@ -75,7 +76,7 @@
<th></th>
<th></th>
<th></th>
<th>Total first semester credit: {{ total_first_semester_credit }}</th>
<th>{% trans 'Total first semester credit:' %} {{ total_first_semester_credit }}</th>
</tr>
<tr class="bg-orange text-white">
<th></th>
@ -84,7 +85,7 @@
<th></th>
<th></th>
<th></th>
<th>First Semester GPA: {{ result.gpa }}</th>
<th>{% trans 'First Semester GPA:' %} {{ result.gpa }}</th>
</tr>
{% endif %}
{% endfor %}
@ -93,17 +94,17 @@
</div>
<div class="table-responsive p-0 px-2 mt-3">
<div class="table-title"><u>Second Semester:</u></div>
<div class="table-title"><u>{% trans 'Second Semester:' %}</u></div>
<table class="table table-light">
<thead>
<tr>
<th>#</th>
<th>Course Title</th>
<th>Course Code</th>
<th>Cr.Hr</th>
<th>GRADE</th>
<th>Points</th>
<th>Comment</th>
<th>{% trans 'Course Title' %}</th>
<th>{% trans 'Course Code' %}</th>
<th>{% trans 'Cr.Hr' %}</th>
<th>{% trans 'GRADE' %}</th>
<th>{% trans 'Points' %}</th>
<th>{% trans 'Comment' %}</th>
</tr>
</thead>
{% for course in courses %}
@ -119,9 +120,9 @@
<td>{{ course.point }}</td>
{% if course.comment == 'PASS' %}
<td class="success"><i class="fas fa-check-circle"></i> PASS</td>
<td class="success"><i class="fas fa-check-circle"></i>{% trans 'PASS' %}</td>
{% elif course.comment == 'FAIL' %}
<td class="danger"><i class="fas fa-exclamation-circle"></i> FAIL</td>
<td class="danger"><i class="fas fa-exclamation-circle"></i>{% trans 'FAIL' %}</td>
{% else %}
<td></td>
{% endif %}
@ -135,12 +136,12 @@
{% if result.semester == "Second" %}
<tr style="background: #f3f2f2;">
<th></th>
<th>Total second semester credit: {{ total_sec_semester_credit }}</th>
<th>{% trans 'Total second semester credit:' %} {{ total_sec_semester_credit }}</th>
<th></th>
<th></th>
<th></th>
<th></th>
<th>Total Credit: {{ total_first_and_second_semester_credit }}</th>
<th>{% trans 'Total Credit:' %} {{ total_first_and_second_semester_credit }}</th>
</tr>
<tr style="background: #f3f2f2;">
<th></th>
@ -149,7 +150,7 @@
<th></th>
<th></th>
<th></th>
<th>Second Semester GPA: {{ result.gpa }}</th>
<th>{% trans 'Second Semester GPA:' %} {{ result.gpa }}</th>
</tr>
<tr style="background: #fd7e14; color: #fff;">
<th></th>
@ -158,7 +159,7 @@
<th></th>
<th></th>
<th></th>
<th>Previous CGPA: {{ previousCGPA }}</th>
<th>{% trans 'Previous CGPA:' %} {{ previousCGPA }}</th>
</tr>
{% endif %}
{% endfor %}
@ -173,14 +174,14 @@
<tr>
<th></th>
<th></th>
<th><label>First Semester GPA:</label> {{ result.gpa }}</th>
<th><label>{% trans 'First Semester GPA:' %}</label> {{ result.gpa }}</th>
</tr>
<br>
{% elif result.semester == "Second" %}
<tr>
<th></th>
<th></th>
<th><label>Second Semester GPA:</label> {{ result.gpa }}</th>
<th><label>{% trans 'Second Semester GPA:' %}</label> {{ result.gpa }}</th>
</tr>
<br>
{% endif %}
@ -188,7 +189,7 @@
<tr>
<th></th>
<th></th>
<th><label>Previous CGPA:</label> {{ previousCGPA }}</th>
<th><label>{% trans 'Previous CGPA:' %}</label> {{ previousCGPA }}</th>
</tr>
</tbody>
<br>

View File

@ -1,5 +1,6 @@
{% extends "base.html" %}
{% block title %}Search result for {{ query }} | Learning management system{% endblock title %}
{% load i18n %}
{% block title %}{% trans 'Search result for' %} {{ query }} | {% trans 'Learning management system' %}{% endblock title %}
{% load class_name %}
@ -7,8 +8,8 @@
<nav style="--bs-breadcrumb-divider: '>';" aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="/">Home</a></li>
<li class="breadcrumb-item active" aria-current="page">Search</li>
<li class="breadcrumb-item"><a href="/">{% trans 'Home' %}</a></li>
<li class="breadcrumb-item active" aria-current="page">{% trans 'Search' %}</li>
</ol>
</nav>
@ -39,13 +40,13 @@
</style>
<div class="card p-3" style="box-shadow: 0px 2px 5px 0px rgba(0, 0, 0, 0.3); border-radius: 10px;">
<h5 class="text-muted m-0">{{ count }} result{{ count|pluralize }} for <b><em class="text-orange"> {{ query }}</em></b></h5>
<h5 class="text-muted m-0">{{ count }} {% trans 'result' %}{{ count|pluralize }} {% trans 'for' %} <b><em class="text-orange"> {{ query }}</em></b></h5>
<hr>
{% for object in object_list %}
{% with object|class_name as klass %}
{% if klass == "Program" %}
<div class="session-wrapper">
<div class="session"><div class="info-text bg-orange">Program</div></div>
<div class="session"><div class="info-text bg-orange">{% trans 'Program' %}</div></div>
</div>
<div class="col-12 class-item">
<!-- <p><b>Program of</b> {{ object }}</p> -->
@ -55,37 +56,37 @@
{% elif klass == "Course" %}
<div class="session-wrapper">
<div class="session"><div class="info-text bg-orange">Course</div></div>
<div class="session"><div class="info-text bg-orange">{% trans 'Course' %}</div></div>
</div>
<div class="col-12 class-item">
<p><b>Program of</b> {{ object.program }}</p>
<p><b>{% trans 'Program of' %}</b> {{ object.program }}</p>
<h4><a href="{{ object.get_absolute_url }}"><b>{{ object }}</b></a></h4>
<p>{{ object.summary }}</p>
</div><hr>
{% elif klass == "NewsAndEvents" %}
<div class="session-wrapper">
<div class="session"><div class="info-text bg-orange">News And Events</div></div>
<div class="session"><div class="info-text bg-orange">{% trans 'News And Events' %}</div></div>
</div>
<div class="col-12 class-item">
<p><b>Date: </b> {{ object.updated_date|timesince }} ago</p>
<p><b>{% trans 'Date:' %} </b> {{ object.updated_date|timesince }} ago</p>
<h4><a href="{{ object.get_absolute_url }}"><b>{{ object.title }}</b></a></h4>
<p>{{ object.summary }}</p>
</div><hr>
{% elif klass == "Quiz" %}
<div class="session-wrapper">
<div class="session"><div class="info-text bg-orange">Quiz</div></div>
<div class="session"><div class="info-text bg-orange">{% trans 'Quiz' %}</div></div>
</div>
<div class="col-12 class-item">
<p>{{ object.category }} quiz, <b>Course:</b> {{ object.course }}</p>
<p>{{ object.category }} {% trans 'quiz' %}, <b>{% trans 'Course:' %}</b> {{ object.course }}</p>
<h4><a href="{{ object.get_absolute_url }}"><b>{{ object.title }}</b></a></h4>
<p>{{ object.description }}</p>
</div><hr>
{% else %}
<div class="session-wrapper">
<div class="session"><div class="info-text bg-orange">Program</div></div>
<div class="session"><div class="info-text bg-orange">{% trans 'Program' %}</div></div>
</div>
<div class="col-12 col-lg-8 offset-lg-4">
<a href="{{ object.get_absolute_url }}" class="class-item d-flex">{{ object }} | {{ object|class_name }}</a>
@ -118,12 +119,12 @@
</div>
<div class="col-12 pl-5">
<h5>Search by:</h5>
<h5>{% trans 'Search by:' %}</h5>
<ul class="pl-3">
<li>Program <span class="text-orange">&gt;</span> Title or Description</li>
<li>Course <span class="text-orange">&gt;</span> Title, Code or Description</li>
<li>News And Events <span class="text-orange">&gt;</span> Title, Description or just by typing "news" or "event"</li>
<li>Quiz <span class="text-orange">&gt;</span> Title, Description or Category(practice, assignment and exam)</li>
<li>{% trans 'Program' %} <span class="text-orange">&gt;</span> {% trans 'Title or Description' %}</li>
<li>{% trans 'Course' %} <span class="text-orange">&gt;</span>{% trans 'Title, Code or Description' %}</li>
<li>{% trans 'News And Events' %} <span class="text-orange">&gt;</span> {% trans 'Title, Description or just by typing "news" or "event %}li>
<li>{% trans 'Quiz' %} <span class="text-orange">&gt;</span>{% trans 'Title, Description or Category(practice, assignment and exam)' %}</li>
</ul>
</div>
</div>

View File

@ -1,5 +1,6 @@
{% extends 'base.html' %}
{% block title %}{{ title }} | Learning management system{% endblock title %}
{% load i18n %}
{% block title %}{{ title }} | {% trans 'Learning management system' %}{% endblock title %}
{% load crispy_forms_tags %}
{% load static %}
@ -7,12 +8,12 @@
<nav style="--bs-breadcrumb-divider: '>';" aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="/">Home</a></li>
<li class="breadcrumb-item active" aria-current="page">Admin Panel</li>
<li class="breadcrumb-item"><a href="/">{% trans 'Home' %}</a></li>
<li class="breadcrumb-item active" aria-current="page">{% trans 'Admin Panel' %}</li>
</ol>
</nav>
<div class="title-1"><i class="fas fa-user-tie"></i>Admin Panel</div>
<div class="title-1"><i class="fas fa-user-tie"></i>{% trans 'Admin Panel' %}</div>
<br>
<br>
{% if messages %}
@ -33,51 +34,51 @@
<div class="row">
<div class="col-md-6">
<div class="border-bottom">
Manage<a class="link" href="{% url 'lecturer_list' %}"> Lecturers &raquo;</a>
{% trans 'Manage' %}<a class="link" href="{% url 'lecturer_list' %}">{% trans 'Lecturers' %} &raquo;</a>
<p class="text-muted">CRUD (Create, Retrieve, Update &amp; Delete) lecturers</p>
</div>
<div class="border-bottom mt-3">
Manage<a class="link" href="{% url 'student_list' %}"> Students &raquo;</a>
<p class="text-muted">CRUD (Create, Retrieve, Update &amp; Delete) students</p>
{% trans 'Manage' %}<a class="link" href="{% url 'student_list' %}">{% trans 'Students' %} &raquo;</a>
<p class="text-muted">CRUD (Create, Retrieve, Update &amp; Delete) {% trans 'students' %}</p>
</div>
<div class="border-bottom mt-3">
Manage<a class="link" href="{% url 'session_list' %}"> Session &raquo;</a>
<p class="text-muted">CRUD (Create, Retrieve, Update &amp; Delete) sessions</p>
{% trans 'Manage' %}<a class="link" href="{% url 'session_list' %}">{% trans 'Session' %} &raquo;</a>
<p class="text-muted">CRUD (Create, Retrieve, Update &amp; Delete) {% trans 'sessions' %}</p>
</div>
<div class="mt-3">
Manage<a class="link" href="{% url 'semester_list' %}"> Semester &raquo;</a>
<p class="text-muted">CRUD (Create, Retrieve, Update &amp; Delete) semesters</p>
{% trans 'Manage' %}<a class="link" href="{% url 'semester_list' %}"> {% trans 'Semester' %} &raquo;</a>
<p class="text-muted">CRUD (Create, Retrieve, Update &amp; Delete) {% trans 'semesters' %}</p>
</div>
</div>
<div class="col-md-6">
<div class="border-bottom">
Course Add &amp; Drop
{% trans 'Course Add' %} &amp; {% trans 'Drop' %}
<label class="switch switch-text switch-success switch-pill" style="float: right;">
<input type="checkbox" class="switch-input" checked="true">
<span data-on="On" data-off="Off" class="switch-label"></span>
<span class="switch-handle"></span>
</label>
<p class="text-muted">Switch
<p class="text-muted">{% trans 'Switch' %}
<i class="info-text py-0 px-2 bg-success text-light">ON</i> or <i class="info-text py-0 px-2 bg-danger text-light">OFF</i>
</p>
</div>
<div class="border-bottom mt-3">
Manage<a class="link" href="{% url 'programs' %}"> Programs &amp; Courses &raquo;</a>
<p class="text-muted">CRUD (Create, Retrieve, Update &amp; Delete) programs</p>
{% trans 'Manage' %}<a class="link" href="{% url 'programs' %}"> {% trans 'Programs' %} &amp; {% trans 'Courses' %} &raquo;</a>
<p class="text-muted">CRUD (Create, Retrieve, Update &amp; Delete) {% trans 'programs' %}</p>
</div>
<div class="border-bottom mt-3">
Manage<a class="link" href="{% url 'course_allocation_view' %}"> Course Allocations &raquo;</a>
<p class="text-muted">CRUD (Create, Retrieve, Update &amp; Delete) course allocations</p>
{% trans 'Manage' %}<a class="link" href="{% url 'course_allocation_view' %}"> {% trans 'Course Allocations' %} &raquo;</a>
<p class="text-muted">CRUD (Create, Retrieve, Update &amp; Delete) {% trans 'course allocations' %}</p>
</div>
<div class="mt-3">
Manage<a class="link" href="{% url 'home' %}"> News &amp; Events &raquo;</a>
<p class="text-muted">CRUD (Create, Retrieve, Update &amp; Delete) News &amp; Events</p>
{% trans 'Manage' %}<a class="link" href="{% url 'home' %}"> {% trans 'News' %} &amp; {% trans 'Events' %} &raquo;</a>
<p class="text-muted">CRUD (Create, Retrieve, Update &amp; Delete) {% trans 'News' %} &amp; {% trans 'Events' %}</p>
</div>
</div>
</div>

View File

@ -1,5 +1,6 @@
{% extends 'base.html' %}
{% block title %}{{ title }} | Learning management system{% endblock title %}
{% load i18n %}
{% block title %}{{ title }} | {% trans 'Learning management system' %}{% endblock title %}
{% load crispy_forms_tags %}
{% load static %}
@ -7,8 +8,8 @@
<nav style="--bs-breadcrumb-divider: '>';" aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="/">Home</a></li>
<li class="breadcrumb-item active" aria-current="page">Password Change</li>
<li class="breadcrumb-item"><a href="/">{% trans 'Home' %}</a></li>
<li class="breadcrumb-item active" aria-current="page">{% trans 'Password Change' %}</li>
</ol>
</nav>
@ -17,11 +18,11 @@
<div class="row">
<div class="col-md-6 mx-auto">
<div class="card">
<p class="form-title"><i class="fas fa-lock"></i> Change Password</p>
<p class="form-title"><i class="fas fa-lock"></i>{% trans 'Change Password' %}</p>
<div class="card-body">
<form action="" method="POST">{% csrf_token %}
{{ form|crispy }}
<center><input class="btn btn-primary" type="submit" value="Change Password"></center><br>
<center><input class="btn btn-primary" type="submit" value="{% trans 'Change Password' %}"></center><br>
</form>
</div>
</div>

View File

@ -1,5 +1,6 @@
{% extends 'base.html' %}
{% block title %}{{ title }} | Learning management system{% endblock title %}
{% load i18n %}
{% block title %}{{ title }} | {% trans 'Learning management system' %}{% endblock title %}
{% load crispy_forms_tags %}
{% load static %}
@ -7,12 +8,12 @@
<nav style="--bs-breadcrumb-divider: '>';" aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="/">Home</a></li>
<li class="breadcrumb-item active" aria-current="page">Account setting</li>
<li class="breadcrumb-item"><a href="/">{% trans 'Home' %}</a></li>
<li class="breadcrumb-item active" aria-current="page">{% trans 'Account setting' %}</li>
</ol>
</nav>
<p class="title-1"><i class="fas fa-user-edit"></i>Account Settings</p>
<p class="title-1"><i class="fas fa-user-edit"></i>{% trans 'Account Settings' %}</p>
{% include 'snippets/messages.html' %}
@ -20,7 +21,7 @@
<div class="row mb-4">
<div class="col-md-6">
<div class="card">
<div class="form-title">Email &amp; Personal Info</div>
<div class="form-title">{% trans 'Email' %} &amp; {% trans 'Personal Info' %}</div>
<div class="card-body">
{{ form.email|as_crispy_field }}
{{ form.first_name|as_crispy_field }}
@ -33,13 +34,13 @@
</div>
<div class="col-md-6">
<div class="card">
<p class="form-title">Others</p>
<p class="form-title">{% trans 'Others' %}</p>
<div class="card-body">
{{ form.picture|as_crispy_field }}
</div>
</div>
</div>
</div>
<button class="btn btn-primary" type="submit">Update Profile</button>
<button class="btn btn-primary" type="submit">{% trans 'Update Profile' %}</button>
</form>
{% endblock content %}

View File

@ -1,4 +1,6 @@
{% load i18n %}
{% if filter.form %}
<form action="" method="get">
<div class="d-flex flex-wrap align-items-center">
{% for field in filter.form %}
@ -7,7 +9,7 @@
</div>
{% endfor %}
<button class="btn btn-sm mb-2" type="submit">
<i class="fa fa-sliders"></i> Filter
<i class="fa fa-sliders"></i> {% trans 'Filter' %}
</button>
</div>
</form>

View File

@ -1,20 +1,21 @@
{% extends 'base.html' %}
{% block title %}{{ title }} | Learning management system{% endblock title %}
{% load i18n %}
{% block title %}{{ title }} | {% trans 'Learning management system' %}{% endblock title %}
{% load crispy_forms_tags %}
{% block content %}
<nav style="--bs-breadcrumb-divider: '>';" aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="/">Home</a></li>
<li class="breadcrumb-item"><a href="{% url 'programs' %}">Programs</a></li>
<li class="breadcrumb-item"><a href="/">{% trans 'Home' %}</a></li>
<li class="breadcrumb-item"><a href="{% url 'programs' %}">{% trans 'Programs' %}</a></li>
<li class="breadcrumb-item"><a href="{% url 'program_detail' course.program.id %}">{{ course.program }}</a></li>
<li class="breadcrumb-item"><a href="{% url 'course_detail' course.slug %}">{{ course }}</a></li>
<li class="breadcrumb-item active" aria-current="page">File upload</li>
<li class="breadcrumb-item active" aria-current="page">{% trans 'File upload' %}</li>
</ol>
</nav>
<p class="title-1">File upload for {{ course|truncatechars:25 }}</p>
<p class="title-1">{% trans 'File upload for' %} {{ course|truncatechars:25 }}</p>
<br><br>
{% include 'snippets/messages.html' %}
@ -22,15 +23,15 @@
<div class="row">
<div class="col-md-8 p-0 mx-auto">
<div class="card">
<p class="form-title">File Upload Form</p>
<p class="form-title">{% trans 'File Upload Form' %}</p>
<div class="card-body">
<form action="" method="POST" enctype="multipart/form-data">{% csrf_token %}
{{ form|crispy }}
<div class="form-group">
<button class="btn btn-primary" type="submit">Upload</button>
<a class="btn btn-danger" href="{% url 'course_detail' course.slug %}" style="float: right;">Cancel</a>
<button class="btn btn-primary" type="submit">{% trans 'Upload' %}</button>
<a class="btn btn-danger" href="{% url 'course_detail' course.slug %}" style="float: right;">{% trans 'Cancel' %}</a>
</div>
</form>
</div>

View File

@ -1,20 +1,21 @@
{% extends 'base.html' %}
{% block title %}{{ title }} | Learning management system{% endblock title %}
{% load i18n %}
{% block title %}{{ title }} | {% trans 'Learning management system' %}{% endblock title %}
{% load crispy_forms_tags %}
{% block content %}
<nav style="--bs-breadcrumb-divider: '>';" aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="/">Home</a></li>
<li class="breadcrumb-item"><a href="{% url 'programs' %}">Programs</a></li>
<li class="breadcrumb-item"><a href="/">{% trans 'Home' %}</a></li>
<li class="breadcrumb-item"><a href="{% url 'programs' %}">{% trans 'Programs' %}</a></li>
<li class="breadcrumb-item"><a href="{% url 'program_detail' course.program.id %}">{{ course.program }}</a></li>
<li class="breadcrumb-item"><a href="{% url 'course_detail' course.slug %}">{{ course }}</a></li>
<li class="breadcrumb-item active" aria-current="page">Video upload</li>
<li class="breadcrumb-item active" aria-current="page">{% trans 'Video upload' %}</li>
</ol>
</nav>
<p class="title-1">Video upload for {{ course|truncatechars:25 }}</p>
<p class="title-1">{% trans 'Video upload for' %} {{ course|truncatechars:25 }}</p>
<div class="title-line"></div><br>
{% include 'snippets/messages.html' %}
@ -22,14 +23,14 @@
<div class="row">
<div class="col-md-8 mx-auto">
<div class="card">
<p class="form-title">Video Upload Form</p>
<p class="form-title">{% trans 'Video Upload Form' %}</p>
<div class="card-body">
<form action="" method="POST" enctype="multipart/form-data">{% csrf_token %}
{{ form|crispy }}
<div class="form-group">
<button class="btn btn-primary" type="submit">Upload</button>
<a class="btn btn-danger" href="{% url 'course_detail' course.slug %}" style="float: right;">Cancel</a>
<button class="btn btn-primary" type="submit">{% trans 'Upload' %}</button>
<a class="btn btn-danger" href="{% url 'course_detail' course.slug %}" style="float: right;">{% trans 'Cancel' %}</a>
</div>
</form>
</div>

View File

@ -1,13 +1,14 @@
{% extends 'base.html' %}
{% block title %}{{ video.title }} | Learning management system{% endblock title %}
{% load i18n %}
{% block title %}{{ video.title }} | {% trans 'Learning management system' %}{% endblock title %}
{% load static %}
{% block content %}
<nav style="--bs-breadcrumb-divider: '>';" aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="/">Home</a></li>
<li class="breadcrumb-item"><a href="{% url 'programs' %}">Programs</a></li>
<li class="breadcrumb-item"><a href="/">{% trans 'Home' %}</a></li>
<li class="breadcrumb-item"><a href="{% url 'programs' %}">{% trans 'Programs' %}</a></li>
<li class="breadcrumb-item"><a href="{% url 'program_detail' video.course.program.id %}">{{ video.course.program }}</a></li>
<li class="breadcrumb-item"><a href="{% url 'course_detail' video.course.slug %}">{{ video.course }}</a></li>
<li class="breadcrumb-item active" aria-current="page">{{ video.title }}</li>
@ -27,11 +28,11 @@
<div class="col-md-10 mx-auto d-block">
<div class=""><video src="{{ video.video.url }}" controls ></video></div>
<p><i class="fas fa-calendar"></i> {{ video.timestamp|timesince }} ago</p>
<p><i class="fas fa-calendar"></i> {{ video.timestamp|timesince }} {% trans 'ago' %}</p>
{% if video.summary %}
<p class="text-orange text-center">{{ video.summary }}</p>
{% else %}
No video description set.
{% trans 'No video description set.' %}
{% endif %}
</div>