mirror of
https://github.com/ae-utbm/sith.git
synced 2024-11-22 06:03:20 +00:00
pedagogy: simplify and implement department system according to old database model
This commit is contained in:
parent
d44fa73b2a
commit
358a625cc4
@ -1113,6 +1113,7 @@ Welcome to the wiki page!
|
||||
manager="Laurent HEYBERGER",
|
||||
semester=settings.SITH_PEDAGOGY_UV_SEMESTER[3][0],
|
||||
language=settings.SITH_PEDAGOGY_UV_LANGUAGE[0][0],
|
||||
department=settings.SITH_PROFILE_DEPARTMENTS[-2][0],
|
||||
credits=5,
|
||||
title="Participation dans une association étudiante",
|
||||
objectives="* Permettre aux étudiants de réaliser, pendant un semestre, un projet culturel ou associatif et de le valoriser.",
|
||||
|
@ -43,6 +43,7 @@ class UVForm(forms.ModelForm):
|
||||
"credit_type",
|
||||
"semester",
|
||||
"language",
|
||||
"department",
|
||||
"credits",
|
||||
"hours_CM",
|
||||
"hours_TD",
|
||||
|
@ -1,5 +1,5 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.11.20 on 2019-06-17 16:08
|
||||
# Generated by Django 1.11.20 on 2019-06-18 08:52
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.conf import settings
|
||||
@ -15,34 +15,6 @@ class Migration(migrations.Migration):
|
||||
dependencies = [migrations.swappable_dependency(settings.AUTH_USER_MODEL)]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name="EducationDepartment",
|
||||
fields=[
|
||||
(
|
||||
"id",
|
||||
models.AutoField(
|
||||
auto_created=True,
|
||||
primary_key=True,
|
||||
serialize=False,
|
||||
verbose_name="ID",
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name="StudyField",
|
||||
fields=[
|
||||
(
|
||||
"id",
|
||||
models.AutoField(
|
||||
auto_created=True,
|
||||
primary_key=True,
|
||||
serialize=False,
|
||||
verbose_name="ID",
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name="UV",
|
||||
fields=[
|
||||
@ -123,6 +95,29 @@ class Migration(migrations.Migration):
|
||||
verbose_name="credits",
|
||||
),
|
||||
),
|
||||
(
|
||||
"department",
|
||||
models.CharField(
|
||||
choices=[
|
||||
("TC", "TC"),
|
||||
("IMSI", "IMSI"),
|
||||
("IMAP", "IMAP"),
|
||||
("INFO", "INFO"),
|
||||
("GI", "GI"),
|
||||
("E", "E"),
|
||||
("EE", "EE"),
|
||||
("GESC", "GESC"),
|
||||
("GMC", "GMC"),
|
||||
("MC", "MC"),
|
||||
("EDIM", "EDIM"),
|
||||
("HUMA", "Humanities"),
|
||||
("NA", "N/A"),
|
||||
],
|
||||
default="NA",
|
||||
max_length=10,
|
||||
verbose_name="departmenmt",
|
||||
),
|
||||
),
|
||||
("title", models.CharField(max_length=300, verbose_name="title")),
|
||||
(
|
||||
"manager",
|
||||
|
@ -98,7 +98,13 @@ class UV(models.Model):
|
||||
null=False,
|
||||
)
|
||||
# Double star type not implemented yet
|
||||
# Departments not implemented yet
|
||||
|
||||
department = models.CharField(
|
||||
_("departmenmt"),
|
||||
max_length=10,
|
||||
choices=settings.SITH_PROFILE_DEPARTMENTS,
|
||||
default=settings.SITH_PROFILE_DEPARTMENTS[-1][0],
|
||||
)
|
||||
|
||||
# All texts about the UV
|
||||
title = models.CharField(_("title"), max_length=300)
|
||||
@ -240,19 +246,3 @@ class UVCommentReport(models.Model):
|
||||
"""
|
||||
|
||||
pass
|
||||
|
||||
|
||||
class EducationDepartment(models.Model):
|
||||
"""
|
||||
Education department of the school
|
||||
"""
|
||||
|
||||
pass
|
||||
|
||||
|
||||
class StudyField(models.Model):
|
||||
"""
|
||||
Speciality inside an Education Department
|
||||
"""
|
||||
|
||||
pass
|
||||
|
@ -7,6 +7,7 @@
|
||||
{% block content %}
|
||||
<p><a href="{{ url('pedagogy:guide') }}">{% trans %}Back{% endtrans %}</a></p>
|
||||
<h1>{{ object.code }} - {{ object.title }}</h1>
|
||||
<p>{% trans %}Department: {% endtrans %}{{ object.department }}</p>
|
||||
<p>{{ object.objectives|markdown }}</p>
|
||||
<p>{{ object.program|markdown }}</p>
|
||||
<p>{{ object.skills|markdown }}</p>
|
||||
|
@ -41,6 +41,7 @@ def create_uv_template(user_id, code="IFC1", exclude_list=[]):
|
||||
"credit_type": "TM",
|
||||
"semester": "SPRING",
|
||||
"language": "FR",
|
||||
"department": "TC",
|
||||
"credits": 3,
|
||||
"hours_CM": 10,
|
||||
"hours_TD": 28,
|
||||
|
@ -52,20 +52,4 @@ urlpatterns = [
|
||||
url(r"^uv/create$", UVCreateView.as_view(), name="uv_create"),
|
||||
url(r"^uv/(?P<uv_id>[0-9]+)/delete$", UVDeleteView.as_view(), name="uv_delete"),
|
||||
url(r"^uv/(?P<uv_id>[0-9]+)/edit$", UVUpdateView.as_view(), name="uv_update"),
|
||||
url(
|
||||
r"^department/create$",
|
||||
EducationDepartmentCreateView.as_view(),
|
||||
name="department_create",
|
||||
),
|
||||
url(
|
||||
r"^department/(?P<department_id>[0-9]+)/delete$",
|
||||
EducationDepartmentDeleteView.as_view(),
|
||||
name="department_delete",
|
||||
),
|
||||
url(r"^study/create$", StudyFieldCreateView.as_view(), name="study_create"),
|
||||
url(
|
||||
r"^study/(?P<study_id>[0-9]+)/delete$",
|
||||
StudyFieldDeleteView.as_view(),
|
||||
name="study_delete",
|
||||
),
|
||||
]
|
||||
|
@ -217,35 +217,3 @@ class UVUpdateView(CanEditPropMixin, UpdateView):
|
||||
|
||||
def get_success_url(self):
|
||||
return reverse_lazy("pedagogy:uv_detail", kwargs={"uv_id": self.object.id})
|
||||
|
||||
|
||||
class EducationDepartmentCreateView(CreateView):
|
||||
"""
|
||||
Add a new Education Department (Privileged)
|
||||
"""
|
||||
|
||||
pass
|
||||
|
||||
|
||||
class EducationDepartmentDeleteView(DeleteView):
|
||||
"""
|
||||
Allow to delete an Education Department (Privileged)
|
||||
"""
|
||||
|
||||
pass
|
||||
|
||||
|
||||
class StudyFieldCreateView(CreateView):
|
||||
"""
|
||||
Add a new Study Field (Privileged)
|
||||
"""
|
||||
|
||||
pass
|
||||
|
||||
|
||||
class StudyFieldDeleteView(DeleteView):
|
||||
"""
|
||||
Allow to delete an Study Field (Privileged)
|
||||
"""
|
||||
|
||||
pass
|
||||
|
Loading…
Reference in New Issue
Block a user