Ultime commit!
This commit is contained in:
parent
729bc1bea1
commit
f767b7a41b
25 changed files with 186 additions and 532 deletions
|
|
@ -307,7 +307,7 @@ class FormationPlanPdf(EpcBaseDocTemplate):
|
||||||
self.build(self.story)
|
self.build(self.story)
|
||||||
|
|
||||||
|
|
||||||
class PeriodSemesterPdf(EpcBaseDocTemplate):
|
class PeriodeSemestrePdf(EpcBaseDocTemplate):
|
||||||
"""
|
"""
|
||||||
PDF for periods during semesters
|
PDF for periods during semesters
|
||||||
"""
|
"""
|
||||||
|
|
@ -319,7 +319,7 @@ class PeriodSemesterPdf(EpcBaseDocTemplate):
|
||||||
def produce(self, context):
|
def produce(self, context):
|
||||||
|
|
||||||
for sem in range(1, 7):
|
for sem in range(1, 7):
|
||||||
modules = context['sem{0}'.format(str(sem))]
|
modules = [m for m in context['modules'] if getattr(m, 'sem{0}'.format(sem))]
|
||||||
total = context['tot{0}'.format(str(sem))]
|
total = context['tot{0}'.format(str(sem))]
|
||||||
data = [['Semestre {0}'.format(sem), '{0} h.'.format(total)]]
|
data = [['Semestre {0}'.format(sem), '{0} h.'.format(total)]]
|
||||||
for line in modules:
|
for line in modules:
|
||||||
|
|
|
||||||
23
cms/tests.py
23
cms/tests.py
|
|
@ -1,6 +1,6 @@
|
||||||
import os
|
import os
|
||||||
|
|
||||||
from django.db.models import Sum
|
from django.db.models import Sum, F
|
||||||
|
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
from django.contrib.auth.models import User
|
from django.contrib.auth.models import User
|
||||||
|
|
@ -37,11 +37,19 @@ class PdfTestCase(TestCase):
|
||||||
self.assertEqual(response['content-type'], 'application/pdf')
|
self.assertEqual(response['content-type'], 'application/pdf')
|
||||||
self.assertGreater(len(response.content), 200)
|
self.assertGreater(len(response.content), 200)
|
||||||
|
|
||||||
|
def test_periodes_pdf(self):
|
||||||
|
response = self.client.get(reverse('periodes-pdf'))
|
||||||
|
self.assertEqual(
|
||||||
|
response['content-disposition'],
|
||||||
|
'attachment; filename="periode_formation.pdf"'
|
||||||
|
)
|
||||||
|
self.assertEqual(response['content-type'], 'application/pdf')
|
||||||
|
self.assertGreater(len(response.content), 200)
|
||||||
|
|
||||||
def test_periode_presentiel(self):
|
def test_periode_presentiel(self):
|
||||||
tot = 0
|
tot = 0
|
||||||
for m in Module.objects.all():
|
for m in Module.objects.all():
|
||||||
tot += m.total_presentiel
|
tot += m.total_presentiel
|
||||||
tot = Module.objects.aggregate(Sum('total_presentiel'))
|
|
||||||
self.assertEqual(tot, 1200)
|
self.assertEqual(tot, 1200)
|
||||||
|
|
||||||
def test_periode_pratique(self):
|
def test_periode_pratique(self):
|
||||||
|
|
@ -51,3 +59,14 @@ class PdfTestCase(TestCase):
|
||||||
def test_periode_travail_perso(self):
|
def test_periode_travail_perso(self):
|
||||||
tot = Module.objects.aggregate(Sum('travail_perso'))
|
tot = Module.objects.aggregate(Sum('travail_perso'))
|
||||||
self.assertEqual(tot['travail_perso__sum'], 1200)
|
self.assertEqual(tot['travail_perso__sum'], 1200)
|
||||||
|
|
||||||
|
def test_periode(self):
|
||||||
|
liste = Module.objects.filter(pratique_prof=0)
|
||||||
|
context = {}
|
||||||
|
for i in range(1, 7):
|
||||||
|
semestre = 'sem{}'.format(i)
|
||||||
|
context.update({
|
||||||
|
semestre: liste.exclude(semestre=0),
|
||||||
|
'tot{}'.format(i): liste.aggregate(Sum(F(semestre)))['{}__sum'.format(semestre)]
|
||||||
|
})
|
||||||
|
print(context)
|
||||||
|
|
|
||||||
52
cms/views.py
52
cms/views.py
|
|
@ -7,11 +7,11 @@ import os
|
||||||
import tempfile
|
import tempfile
|
||||||
|
|
||||||
|
|
||||||
from django.db.models import F, Sum
|
from django.db.models import Sum
|
||||||
from django.http import HttpResponse
|
from django.http import HttpResponse
|
||||||
from django.views.generic import ListView, TemplateView, DetailView
|
from django.views.generic import ListView, TemplateView, DetailView
|
||||||
|
|
||||||
from cms.pdf import PeriodSemesterPdf, ModuleDescriptionPdf, FormationPlanPdf
|
from cms.pdf import PeriodeSemestrePdf, ModuleDescriptionPdf, FormationPlanPdf
|
||||||
|
|
||||||
from cms.models import (
|
from cms.models import (
|
||||||
Domaine, Processus, Module, Competence, Concept, UploadDoc
|
Domaine, Processus, Module, Competence, Concept, UploadDoc
|
||||||
|
|
@ -95,6 +95,7 @@ def print_module_pdf(request, pk):
|
||||||
pdf = ModuleDescriptionPdf(path)
|
pdf = ModuleDescriptionPdf(path)
|
||||||
module = Module.objects.get(pk=pk)
|
module = Module.objects.get(pk=pk)
|
||||||
pdf.produce(module)
|
pdf.produce(module)
|
||||||
|
|
||||||
with open(path, mode='rb') as fh:
|
with open(path, mode='rb') as fh:
|
||||||
response = HttpResponse(fh.read(), content_type='application/pdf')
|
response = HttpResponse(fh.read(), content_type='application/pdf')
|
||||||
response['Content-Disposition'] = 'attachment; filename="EDS_module_{0}.pdf"'.format(module.code)
|
response['Content-Disposition'] = 'attachment; filename="EDS_module_{0}.pdf"'.format(module.code)
|
||||||
|
|
@ -119,8 +120,8 @@ def print_periode_formation(request):
|
||||||
filename = 'periode_formation.pdf'
|
filename = 'periode_formation.pdf'
|
||||||
path = os.path.join(tempfile.gettempdir(), filename)
|
path = os.path.join(tempfile.gettempdir(), filename)
|
||||||
context = {}
|
context = {}
|
||||||
context = get_context(context)
|
context = get_detail_semestre(context)
|
||||||
pdf = PeriodSemesterPdf(path)
|
pdf = PeriodeSemestrePdf(path)
|
||||||
pdf.produce(context)
|
pdf.produce(context)
|
||||||
|
|
||||||
with open(path, mode='rb') as fh:
|
with open(path, mode='rb') as fh:
|
||||||
|
|
@ -129,30 +130,21 @@ def print_periode_formation(request):
|
||||||
return response
|
return response
|
||||||
|
|
||||||
|
|
||||||
def get_context(context):
|
def get_detail_semestre(context):
|
||||||
"""
|
"""
|
||||||
Retrive periods
|
Retrive periods
|
||||||
"""
|
"""
|
||||||
# liste = Module.objects.exclude(total_presentiel=0)
|
context['tot']= 0
|
||||||
liste = Module.objects.filter(pratique_prof=0)
|
liste = Module.objects.filter(pratique_prof=0)
|
||||||
|
for i in range(1, 7):
|
||||||
|
sss = 'sem{}'.format(i)
|
||||||
|
tot_sem = liste.aggregate(Sum(sss))['{}__sum'.format(sss)] # total du semestre
|
||||||
|
context.update({
|
||||||
|
'tot{}'.format(i): tot_sem
|
||||||
|
})
|
||||||
|
context['tot'] += tot_sem # total des semestres
|
||||||
|
|
||||||
context['sem1'] = liste.exclude(sem1=0)
|
context['modules'] = liste
|
||||||
context['tot1'] = liste.aggregate(Sum(F('sem1')))['sem1__sum']
|
|
||||||
context['sem2'] = liste.exclude(sem2=0)
|
|
||||||
context['tot2'] = liste.aggregate(Sum(F('sem2')))['sem2__sum']
|
|
||||||
context['sem3'] = liste.exclude(sem3=0)
|
|
||||||
context['tot3'] = liste.aggregate(Sum(F('sem3')))['sem3__sum']
|
|
||||||
context['sem4'] = liste.exclude(sem4=0)
|
|
||||||
context['tot4'] = liste.aggregate(Sum(F('sem4')))['sem4__sum']
|
|
||||||
context['sem5'] = liste.exclude(sem5=0)
|
|
||||||
context['tot5'] = liste.aggregate(Sum(F('sem5')))['sem5__sum']
|
|
||||||
context['sem6'] = liste.exclude(sem6=0)
|
|
||||||
context['tot6'] = liste.aggregate(Sum(F('sem6')))['sem6__sum']
|
|
||||||
|
|
||||||
context['tot'] = (
|
|
||||||
context['tot1'] + context['tot2'] + context['tot3'] + context['tot4']
|
|
||||||
+ context['tot5'] + context['tot6']
|
|
||||||
)
|
|
||||||
return context
|
return context
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -161,7 +153,7 @@ class PeriodeView(TemplateView):
|
||||||
|
|
||||||
def get_context_data(self, **kwargs):
|
def get_context_data(self, **kwargs):
|
||||||
context = super().get_context_data(**kwargs)
|
context = super().get_context_data(**kwargs)
|
||||||
return get_context(context)
|
return get_detail_semestre(context)
|
||||||
|
|
||||||
|
|
||||||
class CompetenceListView(ListView):
|
class CompetenceListView(ListView):
|
||||||
|
|
@ -175,8 +167,10 @@ class TravailPersoListView(ListView):
|
||||||
|
|
||||||
def get_context_data(self, **kwargs):
|
def get_context_data(self, **kwargs):
|
||||||
context = super().get_context_data(**kwargs)
|
context = super().get_context_data(**kwargs)
|
||||||
context = get_context(context)
|
context = get_detail_semestre(context)
|
||||||
context['total_perso'] = Module.objects.aggregate((Sum('travail_perso')))['travail_perso__sum']
|
context.update({
|
||||||
context['total_presentiel'] = context['tot']
|
'total_perso' : Module.objects.aggregate((Sum('travail_perso')))['travail_perso__sum'],
|
||||||
context['total_pratique'] = Module.objects.aggregate((Sum('pratique_prof')))['pratique_prof__sum']
|
'total_presentiel' : context['tot'],
|
||||||
return get_context(context)
|
'total_pratique': Module.objects.aggregate((Sum('pratique_prof')))['pratique_prof__sum']
|
||||||
|
})
|
||||||
|
return context
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||||
# SECURITY WARNING: don't run with debug turned on in production!
|
# SECURITY WARNING: don't run with debug turned on in production!
|
||||||
DEBUG = True
|
DEBUG = True
|
||||||
|
|
||||||
ALLOWED_HOSTS = ['eds.webzos.net', 'localhost', '127.0.0.1']
|
ALLOWED_HOSTS = ['eds.webzos.net', 'localhost']
|
||||||
|
|
||||||
|
|
||||||
# Application definition
|
# Application definition
|
||||||
|
|
@ -136,6 +136,7 @@ TINYMCE_DEFAULT_CONFIG = {
|
||||||
TINYMCE_SPELLCHECKER = True
|
TINYMCE_SPELLCHECKER = True
|
||||||
TINYMCE_COMPRESSOR = True
|
TINYMCE_COMPRESSOR = True
|
||||||
|
|
||||||
|
|
||||||
PDF_FOOTER_TEXT = 'Ecole Santé-social Pierre-Coullery | Prévoyance 82 - 2300 La Chaux-de-Fonds | 032 886 33 00 | cifom-epc@rpn.ch'
|
PDF_FOOTER_TEXT = 'Ecole Santé-social Pierre-Coullery | Prévoyance 82 - 2300 La Chaux-de-Fonds | 032 886 33 00 | cifom-epc@rpn.ch'
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
"""
|
"""
|
||||||
import os
|
import os
|
||||||
from django.urls import path, re_path, include
|
from django.urls import path, include
|
||||||
from django.contrib import admin
|
from django.contrib import admin
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
from django.views.static import serve
|
from django.views.static import serve
|
||||||
|
|
@ -19,15 +19,14 @@ urlpatterns = [
|
||||||
path('processus/', views.ProcessusListView.as_view(), name='processus-list'),
|
path('processus/', views.ProcessusListView.as_view(), name='processus-list'),
|
||||||
path('module/<int:pk>/', views.ModuleDetailView.as_view(), name='module-detail'),
|
path('module/<int:pk>/', views.ModuleDetailView.as_view(), name='module-detail'),
|
||||||
path('modules/', views.ModuleListView.as_view(), name='module-list'),
|
path('modules/', views.ModuleListView.as_view(), name='module-list'),
|
||||||
|
path('module_pdf/<int:pk>/', views.print_module_pdf, name='module-pdf'),
|
||||||
path('periodes/', views.PeriodeView.as_view(), name='periodes'),
|
path('periodes/', views.PeriodeView.as_view(), name='periodes'),
|
||||||
path('periodes_pdf/', views.print_periode_formation, name='periodes-pdf'),
|
path('periodes_pdf/', views.print_periode_formation, name='periodes-pdf'),
|
||||||
path('evaluation/', views.EvaluationView.as_view(), name='evaluation'),
|
|
||||||
path('competences/', views.CompetenceListView.as_view(), name='competences'),
|
path('competences/', views.CompetenceListView.as_view(), name='competences'),
|
||||||
path('travail/', views.TravailPersoListView.as_view(), name='travail'),
|
path('travail/', views.TravailPersoListView.as_view(), name='travail'),
|
||||||
path('module_pdf/<int:pk>/', views.print_module_pdf, name='module-pdf'),
|
|
||||||
path('upload/', views.UploadDocListView.as_view(), name='uploaddoc-list'),
|
path('upload/', views.UploadDocListView.as_view(), name='uploaddoc-list'),
|
||||||
path('document/<int:pk>/', views.ConceptDetailView.as_view(), name='concept-detail'),
|
path('concept/<int:pk>/', views.ConceptDetailView.as_view(), name='concept-detail'),
|
||||||
path('upload/<int:pk>/', views.UploadDocDetailView.as_view(), name='uploaddoc-detail'),
|
|
||||||
path('tinymce/', include('tinymce.urls'), name='tinymce-js'),
|
path('tinymce/', include('tinymce.urls'), name='tinymce-js'),
|
||||||
|
|
||||||
# Serve docs by Django to allow LoginRequiredMiddleware to apply
|
# Serve docs by Django to allow LoginRequiredMiddleware to apply
|
||||||
|
|
|
||||||
|
|
@ -1,94 +0,0 @@
|
||||||
{% load i18n static %}<!DOCTYPE html>
|
|
||||||
{% get_current_language as LANGUAGE_CODE %}{% get_current_language_bidi as LANGUAGE_BIDI %}
|
|
||||||
<html lang="{{ LANGUAGE_CODE|default:"fr" }}" {% if LANGUAGE_BIDI %}dir="rtl"{% endif %}>
|
|
||||||
<head>
|
|
||||||
<title>{% block title %}{% endblock %}</title>
|
|
||||||
<link rel="stylesheet" type="text/css" href="{% block stylesheet %}{% static "admin/css/base.css" %}{% endblock %}" />
|
|
||||||
{% block extrastyle %}{% endblock %}
|
|
||||||
{% if LANGUAGE_BIDI %}
|
|
||||||
<link rel="stylesheet" type="text/css" href="{% block stylesheet_rtl %}{% static "admin/css/rtl.css" %}{% endblock %}" />
|
|
||||||
{% endif %}
|
|
||||||
{% block extrahead %}
|
|
||||||
<script type="text/javascript" src="{% static "js/tiny_mce/tiny_mce.js" %}"></script>
|
|
||||||
{% endblock %}
|
|
||||||
{% block blockbots %}
|
|
||||||
<meta name="robots" content="NONE,NOARCHIVE" />
|
|
||||||
{% endblock %}
|
|
||||||
</head>
|
|
||||||
{% load i18n %}
|
|
||||||
|
|
||||||
<body class="{% if is_popup %}popup {% endif %}{% block bodyclass %}{% endblock %}"
|
|
||||||
data-admin-utc-offset="{% now "Z" %}">
|
|
||||||
|
|
||||||
<!-- Container -->
|
|
||||||
<div id="container">
|
|
||||||
|
|
||||||
{% if not is_popup %}
|
|
||||||
<!-- Header -->
|
|
||||||
<div id="header">
|
|
||||||
<div id="branding">
|
|
||||||
{% block branding %}{% endblock %}
|
|
||||||
</div>
|
|
||||||
{% block usertools %}
|
|
||||||
{% if has_permission %}
|
|
||||||
<div id="user-tools">
|
|
||||||
{% block welcome-msg %}
|
|
||||||
{% trans 'Welcome,' %}
|
|
||||||
<strong>{% firstof user.get_short_name user.get_username %}</strong>.
|
|
||||||
{% endblock %}
|
|
||||||
{% block userlinks %}
|
|
||||||
{% if site_url %}
|
|
||||||
<a href="{{ site_url }}">{% trans 'View site' %}</a> /
|
|
||||||
{% endif %}
|
|
||||||
{% if user.is_active and user.is_staff %}
|
|
||||||
{% url 'django-admindocs-docroot' as docsroot %}
|
|
||||||
{% if docsroot %}
|
|
||||||
<a href="{{ docsroot }}">{% trans 'Documentation' %}</a> /
|
|
||||||
{% endif %}
|
|
||||||
{% endif %}
|
|
||||||
{% if user.has_usable_password %}
|
|
||||||
<a href="{% url 'admin:password_change' %}">{% trans 'Change password' %}</a> /
|
|
||||||
{% endif %}
|
|
||||||
<a href="{% url 'admin:logout' %}">{% trans 'Log out' %}</a>
|
|
||||||
{% endblock %}
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
{% endblock %}
|
|
||||||
{% block nav-global %}{% endblock %}
|
|
||||||
</div>
|
|
||||||
<!-- END Header -->
|
|
||||||
{% block breadcrumbs %}
|
|
||||||
<div class="breadcrumbs">
|
|
||||||
<a href="{% url 'admin:index' %}">{% trans 'Home' %}</a>
|
|
||||||
{% if title %} › {{ title }}{% endif %}
|
|
||||||
</div>
|
|
||||||
{% endblock %}
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% block messages %}
|
|
||||||
{% if messages %}
|
|
||||||
<ul class="messagelist">{% for message in messages %}
|
|
||||||
<li{% if message.tags %} class="{{ message.tags }}"{% endif %}>{{ message|capfirst }}</li>
|
|
||||||
{% endfor %}</ul>
|
|
||||||
{% endif %}
|
|
||||||
{% endblock messages %}
|
|
||||||
|
|
||||||
<!-- Content -->
|
|
||||||
<div id="content" class="{% block coltype %}colM{% endblock %}">
|
|
||||||
{% block pretitle %}{% endblock %}
|
|
||||||
{% block content_title %}{% if title %}<h1>{{ title }}</h1>{% endif %}{% endblock %}
|
|
||||||
{% block content %}
|
|
||||||
{% block object-tools %}{% endblock %}
|
|
||||||
{{ content }}
|
|
||||||
{% endblock %}
|
|
||||||
{% block sidebar %}{% endblock %}
|
|
||||||
<br class="clear" />
|
|
||||||
</div>
|
|
||||||
<!-- END Content -->
|
|
||||||
|
|
||||||
{% block footer %}<div id="footer"></div>{% endblock %}
|
|
||||||
</div>
|
|
||||||
<!-- END Container -->
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
|
|
@ -1,13 +0,0 @@
|
||||||
{% extends "./base.html" %}
|
|
||||||
{% block title %}EDS{% endblock %}
|
|
||||||
|
|
||||||
{% block branding %}
|
|
||||||
<h1 id="site-name"><a href="{% url 'admin:index' %}">{{ site_header|default:_('Django administration') }}</a></h1>
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
{% block nav-global %}{% endblock %}
|
|
||||||
{% block breadcrumbs %}
|
|
||||||
<div class="breadcrumbs">
|
|
||||||
<a href="{% url 'home' %}">Accueil</a>
|
|
||||||
</div>
|
|
||||||
{% endblock %}
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
helle
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
{% block title %}EDS{% endblock %}
|
{% block title %}EDS{% endblock %}
|
||||||
|
|
||||||
{% block branding %}
|
{% block branding %}
|
||||||
<h1 id="site-name"><a href="{% url 'home' %}">Ecole Santé-social Pierre-Coullery</a> Formation en Education sociale</h1>
|
<h1 id="site-name"><a href="{% url 'home' %}">Ecole Santé-social Pierre-Coullery</a> Formation en Education sociale, dipl. ES</h1>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% block usertools %}
|
{% block usertools %}
|
||||||
<div id="user-tools">
|
<div id="user-tools">
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,6 @@
|
||||||
{% extends "./base_site.html" %}
|
{% extends "./base_site.html" %}
|
||||||
{% load i18n static %}
|
{% load i18n static %}
|
||||||
|
|
||||||
{% block coltype %}colMS{% endblock %}
|
|
||||||
|
|
||||||
{% block bodyclass %}{{ block.super }}{% endblock %}
|
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div id="content-main">
|
<div id="content-main">
|
||||||
<h1>Liste des compétences du PEC avec les modules correspondants</h1>
|
<h1>Liste des compétences du PEC avec les modules correspondants</h1>
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,11 @@
|
||||||
{% extends "./base_site.html" %}
|
{% extends "./base_site.html" %}
|
||||||
{% load i18n static %}
|
{% load i18n static %}
|
||||||
{% block coltype %}colMS{% endblock %}
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
|
||||||
<div id="content-main">
|
<div id="content-main">
|
||||||
<div style="margin:auto;width:50%;">
|
<div style="margin:auto;width:80%;">
|
||||||
<h1><b>{{object}}</b></h1>
|
<h1>{{ object }}</h1>
|
||||||
{% if object.published %}
|
{% if object.published %}
|
||||||
<p>{{ object.texte|safe }}</p>
|
<p>{{ object.texte|safe }}</p>
|
||||||
{% else %}
|
{% else %}
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,6 @@
|
||||||
{% extends "./base_site.html" %}
|
{% extends "./base_site.html" %}
|
||||||
{% load i18n static %}
|
{% load i18n static %}
|
||||||
|
|
||||||
{% block coltype %}colMS{% endblock %}
|
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
|
||||||
<div id="content-main">
|
<div id="content-main">
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,6 @@
|
||||||
{% extends "./base_site.html" %}
|
{% extends "./base_site.html" %}
|
||||||
{% load i18n static %}
|
{% load i18n static %}
|
||||||
|
|
||||||
{% block coltype %}colMS{% endblock %}
|
|
||||||
{% block bodyclass %}{{ block.super }}{% endblock %}
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div id="content-main">
|
<div id="content-main">
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,119 +0,0 @@
|
||||||
{% extends "./base_site.html" %}
|
|
||||||
{% load i18n static %}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{% block coltype %}colMS{% endblock %}
|
|
||||||
|
|
||||||
{% block bodyclass %}{{ block.super }}{% endblock %}
|
|
||||||
|
|
||||||
|
|
||||||
{% block content %}
|
|
||||||
<script type="text/javascript" src="{% static 'js/Chart.min.js' %}"></script>
|
|
||||||
<style>
|
|
||||||
.container{
|
|
||||||
width: 1200px;
|
|
||||||
margin: 0 auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ul.tabs{
|
|
||||||
margin: 0px;
|
|
||||||
padding: 0px;
|
|
||||||
list-style: none;
|
|
||||||
}
|
|
||||||
ul.tabs li{
|
|
||||||
background: none;
|
|
||||||
color: #222;
|
|
||||||
display: inline-block;
|
|
||||||
padding: 10px 15px;
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
|
|
||||||
ul.tabs li.current{
|
|
||||||
background: #ededed;
|
|
||||||
color: #222;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tab-content{
|
|
||||||
display: none;
|
|
||||||
background: #ededed;
|
|
||||||
padding: 15px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tab-content.current{
|
|
||||||
display: inherit;
|
|
||||||
}
|
|
||||||
|
|
||||||
</style>
|
|
||||||
<script type="text/javascript">
|
|
||||||
$(document).ready(function(){
|
|
||||||
$('select').change(function(){
|
|
||||||
cl = $(this).attr('class');
|
|
||||||
tt = 'select.' + cl +' option:selected'
|
|
||||||
tot = 0;
|
|
||||||
max = $(tt).length * 3;
|
|
||||||
$(tt).each(function(){
|
|
||||||
tot = tot + parseInt($(this).val());
|
|
||||||
});
|
|
||||||
$('#tot_' + cl).text(Math.round(tot/max*100) + ' %');
|
|
||||||
});
|
|
||||||
$('ul.tabs li').click(function(){
|
|
||||||
var tab_id = $(this).attr('data-tab');
|
|
||||||
|
|
||||||
$('ul.tabs li').removeClass('current');
|
|
||||||
$('.tab-content').removeClass('current');
|
|
||||||
|
|
||||||
$(this).addClass('current');
|
|
||||||
$("#"+tab_id).addClass('current');
|
|
||||||
});
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
<div id="content-main">
|
|
||||||
<h1>Evaluation des compétences</h1>
|
|
||||||
<div class="container">
|
|
||||||
<div>
|
|
||||||
<ul class="tabs">
|
|
||||||
<li class="tab-link current" data-tab="P01">P01</li>
|
|
||||||
<li class="tab-link" data-tab="P02">P02</li>
|
|
||||||
<li class="tab-link" data-tab="P03">P03</li>
|
|
||||||
<li class="tab-link" data-tab="P04">P04</li>
|
|
||||||
<li class="tab-link" data-tab="P05">P05</li>
|
|
||||||
<li class="tab-link" data-tab="P06">P06</li>
|
|
||||||
<li class="tab-link" data-tab="P07">P07</li>
|
|
||||||
<li class="tab-link" data-tab="P08">P08</li>
|
|
||||||
</ul>
|
|
||||||
<hr>
|
|
||||||
</div>
|
|
||||||
{% for p in object_list %}
|
|
||||||
<div id="{{p.code}}" class="tab-content">
|
|
||||||
<table>
|
|
||||||
<tr>
|
|
||||||
<th>{{p}}</th>
|
|
||||||
<td width="100px">
|
|
||||||
<div id="tot_{{p.code}}"></div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
{% for c in p.competence_set.all %}
|
|
||||||
<tr>
|
|
||||||
<td>{{c}}</td>
|
|
||||||
<td>
|
|
||||||
<select class="{{p.code}}" >
|
|
||||||
<option value="0">0</option>
|
|
||||||
<option value="1">1</option>
|
|
||||||
<option value="2">2</option>
|
|
||||||
<option value="3">3</option>
|
|
||||||
</select>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
{% endfor %}
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
{% endfor %}
|
|
||||||
</div><!-- container -->
|
|
||||||
</div>
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,12 +1,10 @@
|
||||||
{% extends "./base_site.html" %}
|
{% extends "./base_site.html" %}
|
||||||
{% load i18n static %}
|
{% load i18n static %}
|
||||||
|
|
||||||
{% block coltype %}colMS{% endblock %}
|
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
|
||||||
<div id="content-main">
|
<div id="content-main">
|
||||||
|
<h1> Plan général de la formation</h1>
|
||||||
<table id="plan">
|
<table id="plan">
|
||||||
<tr>
|
<tr>
|
||||||
<th width="300px">Domaines</th>
|
<th width="300px">Domaines</th>
|
||||||
|
|
@ -67,7 +65,7 @@
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td rowspan="2" class="l2 p">{{ P04.url|safe }}</td>
|
<td rowspan="2" class="l2 p">{{ P04.url|safe }}</td>
|
||||||
<td></td>
|
<td> </td>
|
||||||
<td> </td>
|
<td> </td>
|
||||||
<td> </td>
|
<td> </td>
|
||||||
<td> </td>
|
<td> </td>
|
||||||
|
|
@ -75,7 +73,7 @@
|
||||||
<td class="l2 m">{{ M09.url_code|safe }}</td>
|
<td class="l2 m">{{ M09.url_code|safe }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td></td>
|
<td> </td>
|
||||||
<td> </td>
|
<td> </td>
|
||||||
<td> </td>
|
<td> </td>
|
||||||
<td> </td>
|
<td> </td>
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,6 @@
|
||||||
{% extends "./base_site.html" %}
|
{% extends "./base_site.html" %}
|
||||||
{% load i18n static %}
|
{% load i18n static %}
|
||||||
|
|
||||||
{% block coltype %}colMS{% endblock %}
|
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div id="content-main">
|
<div id="content-main">
|
||||||
<h1>{{ object }}</h1>
|
<h1>{{ object }}</h1>
|
||||||
|
|
|
||||||
|
|
@ -1,89 +0,0 @@
|
||||||
{% extends "./base_site.html" %}
|
|
||||||
{% load i18n static %}
|
|
||||||
|
|
||||||
{% block coltype %}colMS{% endblock %}
|
|
||||||
|
|
||||||
{% block content %}
|
|
||||||
|
|
||||||
<div id="content-main">
|
|
||||||
<h1>{{object}}</h1>
|
|
||||||
<table>
|
|
||||||
<tr>
|
|
||||||
<th>Domaine</th>
|
|
||||||
<td>{{object.processus.domaine.url|safe}}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th>Processus</th>
|
|
||||||
<td>{{object.processus.url|safe}}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th>Situation emblématique</th>
|
|
||||||
<td>{{object.situation|linebreaksbr}}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th>Compétences visées</th>
|
|
||||||
<td><p>L'éducateur social, l'éducatrice sociale:</p>
|
|
||||||
{% for c in object.competence_set.all %}
|
|
||||||
- {{c.nom}} ({{c.code}})<br>
|
|
||||||
{% if user.is_authenticated %}
|
|
||||||
{% for sc in c.souscompetence_set.all %}
|
|
||||||
-- {{sc.nom}} <br>
|
|
||||||
{%endfor %}
|
|
||||||
{% endif %}
|
|
||||||
{% endfor %}
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<!-- <tr><th>Ressources à acquérir</th><td>{% for c in object.ressource_set.all %}- {{c}}<br />{% endfor %}</td></tr> -->
|
|
||||||
<tr>
|
|
||||||
<th>Objectifs à atteindre</th>
|
|
||||||
<td>
|
|
||||||
{% for c in object.objectif_set.all %}
|
|
||||||
- {{c}}<br>
|
|
||||||
{% endfor %}
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th>Didactique</th>
|
|
||||||
<td>{{ object.didactique }}</td>
|
|
||||||
</tr>
|
|
||||||
<!-- <tr><th>Contenu</th><td>{{object.contenu|linebreaksbr}}</td></tr> -->
|
|
||||||
<tr>
|
|
||||||
<th>Evaluation</th>
|
|
||||||
<td>{{object.evaluation|linebreaksbr}}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th>Type</th>
|
|
||||||
<td>{{object.type}}, obligatoire</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th>Semestre</th>
|
|
||||||
<td>Sem. {{object.semestre}}</td>
|
|
||||||
</tr>
|
|
||||||
{% if object.periode_presentiel > 0 %}
|
|
||||||
<tr>
|
|
||||||
<th>Présentiel</th>
|
|
||||||
<td>{{object.periode_presentiel}} heures</td>
|
|
||||||
</tr>
|
|
||||||
{% endif %}
|
|
||||||
{% if object.pratique_prof > 0 %}
|
|
||||||
<tr>
|
|
||||||
<th>Pratique prof.</th>
|
|
||||||
<td>{{object.pratique_prof}} heures</td>
|
|
||||||
</tr>
|
|
||||||
{% endif %}
|
|
||||||
{% if object.travail_perso > 0 %}
|
|
||||||
<tr>
|
|
||||||
<th>Travail perso.</th>
|
|
||||||
<td>{{object.travail_perso}} heures</td>
|
|
||||||
</tr>
|
|
||||||
{% endif %}
|
|
||||||
<tr>
|
|
||||||
<th>Responsable</th>
|
|
||||||
<td>{{object.processus.domaine.responsable.descr|safe}}</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
<p><a href="{% url 'module-pdf' object.id %}">Imprimer en PDF</a></p>
|
|
||||||
</div>
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,10 +1,6 @@
|
||||||
{% extends "./base_site.html" %}
|
{% extends "./base_site.html" %}
|
||||||
{% load i18n static %}
|
{% load i18n static %}
|
||||||
|
|
||||||
{% block coltype %}colMS{% endblock %}
|
|
||||||
|
|
||||||
{% block bodyclass %}{{ block.super }}{% endblock %}
|
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
|
||||||
<div id="content-main">
|
<div id="content-main">
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,6 @@
|
||||||
{% extends "./base_site.html" %}
|
{% extends "./base_site.html" %}
|
||||||
{% load i18n static %}
|
{% load i18n static %}
|
||||||
|
|
||||||
{% block coltype %}colMS{% endblock %}
|
|
||||||
|
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div id="content-main">
|
<div id="content-main">
|
||||||
<h1>Périodes de formation</h1>
|
<h1>Périodes de formation</h1>
|
||||||
|
|
@ -18,16 +15,20 @@
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2">
|
<td colspan="2">
|
||||||
<table align="left">
|
<table align="left">
|
||||||
{% for s in sem1 %}
|
{% for s in modules %}
|
||||||
|
{% if s.sem1 > 0 %}
|
||||||
<tr><td width="290px">{{ s }}</td><td>{{ s.sem1 }} h.</td></tr>
|
<tr><td width="290px">{{ s }}</td><td>{{ s.sem1 }} h.</td></tr>
|
||||||
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</table>
|
</table>
|
||||||
</td>
|
</td>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td colspan="2">
|
<td colspan="2">
|
||||||
<table align="left">
|
<table align="left">
|
||||||
{% for s in sem2 %}
|
{% for s in modules %}
|
||||||
|
{% if s.sem2 > 0 %}
|
||||||
<tr><td width="290px">{{ s }}</td><td>{{ s.sem2 }} h.</td></tr>
|
<tr><td width="290px">{{ s }}</td><td>{{ s.sem2 }} h.</td></tr>
|
||||||
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</table>
|
</table>
|
||||||
</td>
|
</td>
|
||||||
|
|
@ -46,19 +47,23 @@
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2">
|
<td colspan="2">
|
||||||
<table align="left">
|
<table align="left">
|
||||||
{% for s in sem3 %}
|
{% for s in modules %}
|
||||||
|
{% if s.sem3 > 0 %}
|
||||||
<tr><td width="290px">{{ s }}</td><td>{{ s.sem3 }} h.</td></tr>
|
<tr><td width="290px">{{ s }}</td><td>{{ s.sem3 }} h.</td></tr>
|
||||||
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</table>
|
</table>
|
||||||
</td>
|
</td>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td colspan="2">
|
<td colspan="2">
|
||||||
<table align="left">
|
<table align="left">
|
||||||
{% for s in sem4 %}
|
{% for s in modules %}
|
||||||
|
{% if s.sem4 > 0 %}
|
||||||
<tr>
|
<tr>
|
||||||
<td width="290px">{{ s }}</td>
|
<td width="290px">{{ s }}</td>
|
||||||
<td>{{ s.sem4 }} h.</td>
|
<td>{{ s.sem4 }} h.</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</table>
|
</table>
|
||||||
</td>
|
</td>
|
||||||
|
|
@ -77,19 +82,23 @@
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2">
|
<td colspan="2">
|
||||||
<table align="left">
|
<table align="left">
|
||||||
{% for s in sem5 %}
|
{% for s in modules %}
|
||||||
|
{% if s.sem5 > 0 %}
|
||||||
<tr><td width="290px">{{ s }}</td><td>{{ s.sem5 }} h.</td></tr>
|
<tr><td width="290px">{{ s }}</td><td>{{ s.sem5 }} h.</td></tr>
|
||||||
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</table>
|
</table>
|
||||||
</td>
|
</td>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td colspan="2">
|
<td colspan="2">
|
||||||
<table align="left">
|
<table align="left">
|
||||||
{% for s in sem6 %}
|
{% for s in modules %}
|
||||||
|
{% if s.sem6 > 6 %}
|
||||||
<tr>
|
<tr>
|
||||||
<td width="290px">{{ s }}</td>
|
<td width="290px">{{ s }}</td>
|
||||||
<td>{{ s.sem6 }} h.</td>
|
<td>{{ s.sem6 }} h.</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</table>
|
</table>
|
||||||
</td>
|
</td>
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,6 @@
|
||||||
{% extends "./base_site.html" %}
|
{% extends "./base_site.html" %}
|
||||||
{% load i18n static %}
|
{% load i18n static %}
|
||||||
|
|
||||||
{% block coltype %}colMS{% endblock %}
|
|
||||||
|
|
||||||
{% block bodyclass %}{{ block.super }} dashboard{% endblock %}
|
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div id="content-main">
|
<div id="content-main">
|
||||||
<h1>{{ object }}</h1>
|
<h1>{{ object }}</h1>
|
||||||
|
|
|
||||||
|
|
@ -1,17 +1,13 @@
|
||||||
{% extends "./base_site.html" %}
|
{% extends "./base_site.html" %}
|
||||||
{% load i18n static %}
|
{% load i18n static %}
|
||||||
|
|
||||||
{% block coltype %}colMS{% endblock %}
|
|
||||||
|
|
||||||
{% block bodyclass %}{{ block.super }}{% endblock %}
|
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div id="content-main">
|
<div id="content-main">
|
||||||
<h1>Liste des processus</h1>
|
<h1>Liste des processus</h1>
|
||||||
<table>
|
<table>
|
||||||
{% for p in object_list %}
|
{% for p in object_list %}
|
||||||
<tr>
|
<tr>
|
||||||
<th>{{p.code}}</th>
|
<td>{{ p.code }}</td>
|
||||||
<td><a href=" {% url 'processus-detail' p.id %}">{{ p.nom }}</a></td>
|
<td><a href=" {% url 'processus-detail' p.id %}">{{ p.nom }}</a></td>
|
||||||
</tr>
|
</tr>
|
||||||
{% for m in p.module_set.all %}
|
{% for m in p.module_set.all %}
|
||||||
|
|
|
||||||
|
|
@ -3,8 +3,6 @@
|
||||||
|
|
||||||
{% block coltype %}colMS{% endblock %}
|
{% block coltype %}colMS{% endblock %}
|
||||||
|
|
||||||
{% block bodyclass %}{{ block.super }}{% endblock %}
|
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
|
||||||
<div id="content-main">
|
<div id="content-main">
|
||||||
|
|
|
||||||
|
|
@ -1,13 +0,0 @@
|
||||||
{% extends "./base_site.html" %}
|
|
||||||
{% load i18n static %}
|
|
||||||
|
|
||||||
{% block coltype %}colMS{% endblock %}
|
|
||||||
|
|
||||||
{% block content %}
|
|
||||||
|
|
||||||
<div id="content-main">
|
|
||||||
<iframe src="{{fichier.url}}" width="1200" height="800" align="middle"></iframe>
|
|
||||||
</div>
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,22 +1,9 @@
|
||||||
{% extends "./base_site.html" %}
|
{% extends "./base_site.html" %}
|
||||||
{% load i18n static %}
|
{% load i18n static %}
|
||||||
|
|
||||||
{% block extrastyle %}{{ block.super }}<link rel="stylesheet" type="text/css" href="{% static "admin/css/dashboard.css" %}" />
|
|
||||||
<link rel="stylesheet" type="text/css" href="{% static "css/main.css" %}" />{% endblock %}
|
|
||||||
|
|
||||||
{% block coltype %}colMS{% endblock %}
|
|
||||||
|
|
||||||
{% block bodyclass %}{{ block.super }} dashboard{% endblock %}
|
|
||||||
|
|
||||||
{% block breadcrumbs %}
|
|
||||||
<div class="breadcrumbs">
|
|
||||||
<a href="{% url 'home' %}">Accueil</a>
|
|
||||||
<a href="{% url 'uploaddoc-list' %}">Téléchargements</a>
|
|
||||||
</div>
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div id="content-main">
|
<div id="content-main">
|
||||||
|
<div style="margin:auto;width:60%;">
|
||||||
<h1>Documents en téléchargement</h1>
|
<h1>Documents en téléchargement</h1>
|
||||||
{% if object_list %}
|
{% if object_list %}
|
||||||
<ul class="liste-verticale">
|
<ul class="liste-verticale">
|
||||||
|
|
@ -27,7 +14,7 @@
|
||||||
{% else %}
|
{% else %}
|
||||||
<p>No documents.</p>
|
<p>No documents.</p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue