Ultime commit!

This commit is contained in:
alazo 2018-05-23 21:16:25 +02:00
parent 729bc1bea1
commit f767b7a41b
25 changed files with 186 additions and 532 deletions

View file

@ -307,7 +307,7 @@ class FormationPlanPdf(EpcBaseDocTemplate):
self.build(self.story)
class PeriodSemesterPdf(EpcBaseDocTemplate):
class PeriodeSemestrePdf(EpcBaseDocTemplate):
"""
PDF for periods during semesters
"""
@ -319,7 +319,7 @@ class PeriodSemesterPdf(EpcBaseDocTemplate):
def produce(self, context):
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))]
data = [['Semestre {0}'.format(sem), '{0} h.'.format(total)]]
for line in modules:

View file

@ -149,14 +149,14 @@ ul li {
}
.p {
border:1px solid black;
font-size:105%;
border:1px solid black;
font-size:105%;
vertical-align:middle;
}
.m {
border:1px solid black;
font-size:105%;
font-size:105%;
text-align:center;
vertical-align:middle;
height:20px;

View file

@ -1,6 +1,6 @@
import os
from django.db.models import Sum
from django.db.models import Sum, F
from django.conf import settings
from django.contrib.auth.models import User
@ -37,11 +37,19 @@ class PdfTestCase(TestCase):
self.assertEqual(response['content-type'], 'application/pdf')
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):
tot = 0
for m in Module.objects.all():
tot += m.total_presentiel
tot = Module.objects.aggregate(Sum('total_presentiel'))
self.assertEqual(tot, 1200)
def test_periode_pratique(self):
@ -50,4 +58,15 @@ class PdfTestCase(TestCase):
def test_periode_travail_perso(self):
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)

View file

@ -7,11 +7,11 @@ import os
import tempfile
from django.db.models import F, Sum
from django.db.models import Sum
from django.http import HttpResponse
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 (
Domaine, Processus, Module, Competence, Concept, UploadDoc
@ -95,6 +95,7 @@ def print_module_pdf(request, pk):
pdf = ModuleDescriptionPdf(path)
module = Module.objects.get(pk=pk)
pdf.produce(module)
with open(path, mode='rb') as fh:
response = HttpResponse(fh.read(), content_type='application/pdf')
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'
path = os.path.join(tempfile.gettempdir(), filename)
context = {}
context = get_context(context)
pdf = PeriodSemesterPdf(path)
context = get_detail_semestre(context)
pdf = PeriodeSemestrePdf(path)
pdf.produce(context)
with open(path, mode='rb') as fh:
@ -129,30 +130,21 @@ def print_periode_formation(request):
return response
def get_context(context):
def get_detail_semestre(context):
"""
Retrive periods
"""
# liste = Module.objects.exclude(total_presentiel=0)
context['tot']= 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['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']
)
context['modules'] = liste
return context
@ -161,7 +153,7 @@ class PeriodeView(TemplateView):
def get_context_data(self, **kwargs):
context = super().get_context_data(**kwargs)
return get_context(context)
return get_detail_semestre(context)
class CompetenceListView(ListView):
@ -175,8 +167,10 @@ class TravailPersoListView(ListView):
def get_context_data(self, **kwargs):
context = super().get_context_data(**kwargs)
context = get_context(context)
context['total_perso'] = Module.objects.aggregate((Sum('travail_perso')))['travail_perso__sum']
context['total_presentiel'] = context['tot']
context['total_pratique'] = Module.objects.aggregate((Sum('pratique_prof')))['pratique_prof__sum']
return get_context(context)
context = get_detail_semestre(context)
context.update({
'total_perso' : Module.objects.aggregate((Sum('travail_perso')))['travail_perso__sum'],
'total_presentiel' : context['tot'],
'total_pratique': Module.objects.aggregate((Sum('pratique_prof')))['pratique_prof__sum']
})
return context

View file

@ -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!
DEBUG = True
ALLOWED_HOSTS = ['eds.webzos.net', 'localhost', '127.0.0.1']
ALLOWED_HOSTS = ['eds.webzos.net', 'localhost']
# Application definition
@ -136,6 +136,7 @@ TINYMCE_DEFAULT_CONFIG = {
TINYMCE_SPELLCHECKER = 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'

View file

@ -2,7 +2,7 @@
"""
import os
from django.urls import path, re_path, include
from django.urls import path, include
from django.contrib import admin
from django.conf import settings
from django.views.static import serve
@ -19,15 +19,14 @@ urlpatterns = [
path('processus/', views.ProcessusListView.as_view(), name='processus-list'),
path('module/<int:pk>/', views.ModuleDetailView.as_view(), name='module-detail'),
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_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('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('document/<int:pk>/', views.ConceptDetailView.as_view(), name='concept-detail'),
path('upload/<int:pk>/', views.UploadDocDetailView.as_view(), name='uploaddoc-detail'),
path('concept/<int:pk>/', views.ConceptDetailView.as_view(), name='concept-detail'),
path('tinymce/', include('tinymce.urls'), name='tinymce-js'),
# Serve docs by Django to allow LoginRequiredMiddleware to apply

View file

@ -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 %} &rsaquo; {{ 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>

View file

@ -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>&nbsp;&nbsp;
</div>
{% endblock %}

View file

@ -3,7 +3,7 @@
{% block title %}EDS{% endblock %}
{% block branding %}
<h1 id="site-name"><a href="{% url 'home' %}">Ecole Santé-social Pierre-Coullery</a> &nbsp;&nbsp;Formation en Education sociale</h1>
<h1 id="site-name"><a href="{% url 'home' %}">Ecole Santé-social Pierre-Coullery</a> &nbsp;&nbsp; Formation en Education sociale, dipl. ES</h1>
{% endblock %}
{% block usertools %}
<div id="user-tools">

View file

@ -1,10 +1,6 @@
{% extends "./base_site.html" %}
{% load i18n static %}
{% block coltype %}colMS{% endblock %}
{% block bodyclass %}{{ block.super }}{% endblock %}
{% block content %}
<div id="content-main">
<h1>Liste des compétences du PEC avec les modules correspondants</h1>

View file

@ -1,13 +1,13 @@
{% extends "./base_site.html" %}
{% load i18n static %}
{% block coltype %}colMS{% endblock %}
{% block content %}
<div id="content-main">
<div style="margin:auto;width:50%;">
<h1><b>{{object}}</b></h1>
<div style="margin:auto;width:80%;">
<h1>{{ object }}</h1>
{% if object.published %}
<p>{{object.texte|safe}}</p>
<p>{{ object.texte|safe }}</p>
{% else %}
<p>Le document est en travail</p>
{% endif %}

View file

@ -1,12 +1,10 @@
{% extends "./base_site.html" %}
{% load i18n static %}
{% block coltype %}colMS{% endblock %}
{% block content %}
<div id="content-main">
<h1>Domaine: {{object}}</h1>
<h1>Domaine: {{ object }}</h1>
{% for p in object.processus_set.all %}
<div class="processus"><h2>Processus: {{ p.url|safe }}</h2></div>
{% for m in p.module_set.all %}

View file

@ -1,8 +1,6 @@
{% extends "./base_site.html" %}
{% load i18n static %}
{% block coltype %}colMS{% endblock %}
{% block bodyclass %}{{ block.super }}{% endblock %}
{% block content %}
<div id="content-main">
@ -10,17 +8,17 @@
<table border="0">
{% for d in object_list %}
<tr>
<td colspan="3">{{d}}</td></td>
<td colspan="3">{{ d }}</td></td>
</tr>
{% for p in d.processus_set.all %}
<tr>
<th width="10px">&nbsp;</th>
<td colspan="2"><a href=" {% url 'processus-detail' p.id %}">{{p}}</a></td>
<td colspan="2"><a href=" {% url 'processus-detail' p.id %}">{{ p }}</a></td>
</tr>
{% for m in p.module_set.all %}
<tr>
<th colspan="2" width="45px">&nbsp;</th>
<td><a href=" {% url 'module-detail' m.id %}">{{m}}</a></td>
<td><a href=" {% url 'module-detail' m.id %}">{{ m }}</a></td>
</tr>
{% endfor %}
{% endfor %}

View file

@ -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 %}

View file

@ -1,12 +1,10 @@
{% extends "./base_site.html" %}
{% load i18n static %}
{% block coltype %}colMS{% endblock %}
{% block content %}
<div id="content-main">
<h1> Plan général de la formation</h1>
<table id="plan">
<tr>
<th width="300px">Domaines</th>
@ -19,9 +17,9 @@
<th width="180px" style="text-align:center;">Sem6</th>
</tr>
<tr>
<td rowspan="4" class="l1 d">{{D1.url|safe}}</td>
<td rowspan="2" class="l1 p">{{P01.url|safe}}</td>
<td class="l1 m">{{M01.url_code|safe}}</td>
<td rowspan="4" class="l1 d">{{ D1.url|safe }}</td>
<td rowspan="2" class="l1 p">{{ P01.url|safe }}</td>
<td class="l1 m">{{ M01.url_code|safe }}</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
@ -29,7 +27,7 @@
<td>&nbsp;</td>
</tr>
<tr>
<td class="l1 m" >{{M02.url_code|safe}}</td>
<td class="l1 m" >{{ M02.url_code|safe }}</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
@ -37,11 +35,11 @@
<td>&nbsp;</td>
</tr>
<tr>
<td rowspan="2" class="l1 p">{{P02.url|safe}}</td>
<td rowspan="2" class="l1 p">{{ P02.url|safe }}</td>
<td></td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td class="l1 m">{{M03.url_code|safe}}</td>
<td class="l1 m">{{ M03.url_code|safe }}</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
@ -56,92 +54,92 @@
</tr>
<!-- Ligne 2 -->
<tr>
<td rowspan="3" class="l2 d">{{D2.url|safe}}</td>
<td class="l2 p">{{P03.url|safe}}</td>
<td class="l2 m">{{M05.url_code|safe}}</td>
<td rowspan="3" class="l2 d">{{ D2.url|safe }}</td>
<td class="l2 p">{{ P03.url|safe }}</td>
<td class="l2 m">{{ M05.url_code|safe }}</td>
<td>&nbsp;</td>
<td class="l2 m">{{M06.url_code|safe}}</td>
<td class="l2 m">{{ M06.url_code|safe }}</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td rowspan="2" class="l2 p">{{P04.url|safe}}</td>
<td></td>
<td rowspan="2" class="l2 p">{{ P04.url|safe }}</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td class="l2 m">{{M07.url_code|safe}}</td>
<td class="l2 m">{{M09.url_code|safe}}</td>
<td>&nbsp;</td>
<td class="l2 m">{{ M07.url_code|safe }}</td>
<td class="l2 m">{{ M09.url_code|safe }}</td>
</tr>
<tr>
<td></td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td class="l2 m">{{M08.url_code|safe}}</td
<td>&nbsp;</td>
<td class="l2 m">{{ M08.url_code|safe }}</td
><td>&nbsp;</td>
</tr>
<!-- Ligne 3 -->
<tr>
<td rowspan="2" class="l3 d">{{D3.url|safe}}</td>
<td class="l3 p">{{P05.url|safe}}</td>
<td >&nbsp;</td>
<td rowspan="2" class="l3 d">{{ D3.url|safe }}</td>
<td class="l3 p">{{ P05.url|safe }}</td>
<td>&nbsp;</td>
<td colspan="2" class="l3 m">{{M10.url_code|safe}}</td>
<td class="l3 m">{{M12.url_code|safe}}</td>
<td>&nbsp;</td>
<td colspan="2" class="l3 m">{{ M10.url_code|safe }}</td>
<td class="l3 m">{{ M12.url_code|safe }}</td>
<td>&nbsp;</td>
</tr>
<tr>
<td class="l3 p">{{P06.url|safe}}</td>
<td >&nbsp;</td>
<td class="l3 p">{{ P06.url|safe }}</td>
<td>&nbsp;</td>
<td colspan="2" class="l3 m">{{M11.url_code|safe}}</td>
<td>&nbsp;</td>
<td colspan="2" class="l3 m">{{ M11.url_code|safe }}</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<!-- Ligne 4 -->
<tr>
<td class="l4 d">{{D4.url|safe}}</td>
<td class="l4 p">{{P07.url|safe}}</td>
<td >&nbsp;</td>
<td class="l4 d">{{ D4.url|safe }}</td>
<td class="l4 p">{{ P07.url|safe }}</td>
<td>&nbsp;</td>
<td class="l4 m">{{M13.url_code|safe}}</td>
<td>&nbsp;</td>
<td class="l4 m">{{M14.url_code|safe}}</td>
<td class="l4 m">{{ M13.url_code|safe }}</td>
<td>&nbsp;</td>
<td class="l4 m">{{ M14.url_code|safe }}</td>
<td>&nbsp;</td>
</tr>
<!-- Ligne 5 -->
<tr>
<td class="l5 d">{{D5.url|safe}}</td>
<td class="l5 p">{{P08.url|safe}}</td>
<td colspan="6" class="l5 m">{{M15.url_code|safe}}</td>
<td class="l5 d">{{ D5.url|safe }}</td>
<td class="l5 p">{{ P08.url|safe }}</td>
<td colspan="6" class="l5 m">{{ M15.url_code|safe }}</td>
</tr>
<!-- Ligne 6 -->
<tr>
<td class="l6 d">{{D6.url|safe}}</td>
<td class="l6 p">{{P09.url|safe}}</td>
<td colspan="2" class="l6 m">{{M16_1a.url_code|safe}} / {{M16_1b.url_code|safe}} / {{M16_1c.url_code|safe}} / {{M16_1d.url_code|safe}} / {{M16_1e.url_code|safe}}</td>
<td colspan="2" class="l6 m">{{M16_2a.url_code|safe}} / {{M16_2b.url_code|safe}} </td>
<td colspan="2" class="l6 m">{{M16_3a.url_code|safe}} / {{M16_3b.url_code|safe}} / {{M16_3c.url_code|safe}}</td>
<td class="l6 d">{{ D6.url|safe }}</td>
<td class="l6 p">{{ P09.url|safe }}</td>
<td colspan="2" class="l6 m">{{ M16_1a.url_code|safe }} / {{ M16_1b.url_code|safe }} / {{ M16_1c.url_code|safe }} / {{ M16_1d.url_code|safe }} / {{ M16_1e.url_code|safe }}</td>
<td colspan="2" class="l6 m">{{ M16_2a.url_code|safe }} / {{ M16_2b.url_code|safe }} </td>
<td colspan="2" class="l6 m">{{ M16_3a.url_code|safe }} / {{ M16_3b.url_code|safe }} / {{ M16_3c.url_code|safe }}</td>
</tr>
<!-- Ligne 7 -->
<tr>
<td class="l7 d">{{D7.url|safe}}</td>
<td class="l7 p">{{P10.url|safe}}</td>
<td colspan="2" class="l7 m">{{M17_1.url_code|safe}}</td>
<td colspan="2" class="l7 m">{{M17_2.url_code|safe}}</td>
<td colspan="2" class="l7 m">{{M17_3.url_code|safe}}</td>
<td class="l7 d">{{ D7.url|safe }}</td>
<td class="l7 p">{{ P10.url|safe} }</td>
<td colspan="2" class="l7 m">{{ M17_1.url_code|safe }}</td>
<td colspan="2" class="l7 m">{{ M17_2.url_code|safe }}</td>
<td colspan="2" class="l7 m">{{ M17_3.url_code|safe }}</td>
</tr>
<!-- Ligne 8 -->
<tr>
<td class="l8 d">{{D8.url|safe}}</td>
<td class="l8 p">{{P11.url|safe}}</td>
<td colspan="6" class="l8 m">{{MACC.url_code|safe}}</td>
<td class="l8 d">{{ D8.url|safe }}</td>
<td class="l8 p">{{ P11.url|safe }}</td>
<td colspan="6" class="l8 m">{{ MACC.url_code|safe }}</td>
</tr>
</table>
<br>

View file

@ -1,30 +1,28 @@
{% extends "./base_site.html" %}
{% load i18n static %}
{% block coltype %}colMS{% endblock %}
{% block content %}
<div id="content-main">
<h1>{{object}}</h1>
<h1>{{ object }}</h1>
<table>
<tr>
<th width="100px">Domaine</th>
<td>{{object.processus.domaine.url|safe}}</td>
<td>{{ object.processus.domaine.url|safe }}</td>
</tr>
<tr>
<th>Processus</th>
<td>{{object.processus.url|safe}}</td>
<td>{{ object.processus.url|safe }}</td>
</tr>
<tr>
<th>Situation emblématique</th>
<td>{{object.situation|linebreaksbr}}</td>
<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>
- {{ c.nom }} ({{ c.code }})<br>
{% endfor %}
</td>
</tr>
@ -33,8 +31,8 @@
<td>
{% for c in object.competence_set.all %}
{% for sc in c.souscompetence_set.all %}
- {{sc.nom}} (voir {{sc.competence.code}}) <br>
{%endfor %}
- {{ sc.nom }} (voir {{ sc.competence.code }}) <br>
{% endfor %}
{% endfor %}
</td>
</tr>
@ -43,7 +41,7 @@
<th>Objectifs à atteindre</th>
<td>
{% for c in object.objectif_set.all %}
- {{c}}<br>
- {{ c }}<br>
{% endfor %}
</td>
</tr>
@ -54,37 +52,37 @@
<!-- <tr><th>Contenu</th><td>{{object.contenu|linebreaksbr}}</td></tr> -->
<tr>
<th>Evaluation</th>
<td>{{object.evaluation|linebreaksbr}}</td>
<td>{{ object.evaluation|linebreaksbr }}</td>
</tr>
<tr>
<th>Type</th>
<td>{{object.type}}, obligatoire</td>
<td>{{ object.type }}, obligatoire</td>
</tr>
<tr>
<th>Semestre</th>
<td>Sem. {{object.semestre}}</td>
<td>Sem. {{ object.semestre }}</td>
</tr>
{% if object.total_presentiel > 0 %}
<tr>
<th>Présentiel</th>
<td>{{object.total_presentiel}} heures</td>
<td>{{ object.total_presentiel }} heures</td>
</tr>
{% endif %}
{% if object.pratique_prof > 0 %}
<tr>
<th>Pratique prof.</th>
<td>{{object.pratique_prof}} heures</td>
<td>{{ object.pratique_prof }} heures</td>
</tr>
{% endif %}
{% if object.travail_perso > 0 %}
<tr>
<th>Travail perso.</th>
<td>{{object.travail_perso}} heures</td>
<td>{{ object.travail_perso }} heures</td>
</tr>
{% endif %}
<tr>
<th>Responsable</th>
<td>{{object.processus.domaine.responsable.descr|safe}}</td>
<td>{{ object.processus.domaine.responsable.descr|safe }}</td>
</tr>
</table>
<p><a href="{% url 'module-pdf' object.id %}">Imprimer en PDF</a></p>

View file

@ -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 %}
&nbsp;&nbsp;&nbsp; -- {{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 %}

View file

@ -1,10 +1,6 @@
{% extends "./base_site.html" %}
{% load i18n static %}
{% block coltype %}colMS{% endblock %}
{% block bodyclass %}{{ block.super }}{% endblock %}
{% block content %}
<div id="content-main">
@ -12,8 +8,8 @@
<table>
{% for m in object_list %}
<tr>
<th>{{m.code}}</th>
<td><a href=" {% url 'module-detail' m.id %}">{{m.nom}}</a></td>
<th>{{ m.code }}</th>
<td><a href=" {% url 'module-detail' m.id %}">{{ m.nom }}</a></td>
</tr>
{% endfor %}
</table>

View file

@ -1,33 +1,34 @@
{% extends "./base_site.html" %}
{% load i18n static %}
{% block coltype %}colMS{% endblock %}
{% block content %}
<div id="content-main">
<h1>Périodes de formation</h1>
<table>
<tr>
<th width="290px">Semestre 1</th>
<th text-align="right">{{tot1}}h.</th>
<th text-align="right">{{ tot1 }}h.</th>
<th width="40px"></th>
<th width="290px">Semestre 2</th>
<th text-align="right">{{tot2}}h.</th>
<th text-align="right">{{ tot2 }}h.</th>
</tr>
<tr>
<td colspan="2">
<table align="left">
{% for s in sem1 %}
<tr><td width="290px">{{s}}</td><td>{{s.sem1}} h.</td></tr>
{% for s in modules %}
{% if s.sem1 > 0 %}
<tr><td width="290px">{{ s }}</td><td>{{ s.sem1 }} h.</td></tr>
{% endif %}
{% endfor %}
</table>
</td>
<td></td>
<td colspan="2">
<table align="left">
{% for s in sem2 %}
<tr><td width="290px">{{s}}</td><td>{{s.sem2}} h.</td></tr>
{% for s in modules %}
{% if s.sem2 > 0 %}
<tr><td width="290px">{{ s }}</td><td>{{ s.sem2 }} h.</td></tr>
{% endif %}
{% endfor %}
</table>
</td>
@ -38,27 +39,31 @@
</tr>
<tr>
<th>Semestre 3</th>
<th text-align="right">{{tot3}}h.</th>
<th text-align="right">{{ tot3 }}h.</th>
<th></th>
<th>Semestre 4</th>
<th text-align="right">{{tot4}}h.</th>
<th text-align="right">{{ tot4 }}h.</th>
</tr>
<tr>
<td colspan="2">
<table align="left">
{% for s in sem3 %}
<tr><td width="290px">{{s}}</td><td>{{s.sem3}} h.</td></tr>
{% for s in modules %}
{% if s.sem3 > 0 %}
<tr><td width="290px">{{ s }}</td><td>{{ s.sem3 }} h.</td></tr>
{% endif %}
{% endfor %}
</table>
</td>
<td></td>
<td colspan="2">
<table align="left">
{% for s in sem4 %}
<tr>
<td width="290px">{{s}}</td>
<td>{{s.sem4}} h.</td>
</tr>
{% for s in modules %}
{% if s.sem4 > 0 %}
<tr>
<td width="290px">{{ s }}</td>
<td>{{ s.sem4 }} h.</td>
</tr>
{% endif %}
{% endfor %}
</table>
</td>
@ -69,34 +74,38 @@
</tr>
<tr>
<th>Semestre 5</th>
<th text-align="right">{{tot5}}h.</th>
<th text-align="right">{{ tot5 }}h.</th>
<th></th>
<th>Semestre 6</th>
<th text-align="right">{{tot6}}h.</th>
<th text-align="right">{{ tot6 }}h.</th>
</tr>
<tr>
<td colspan="2">
<table align="left">
{% for s in sem5 %}
<tr><td width="290px">{{s}}</td><td>{{s.sem5}} h.</td></tr>
{% for s in modules %}
{% if s.sem5 > 0 %}
<tr><td width="290px">{{ s }}</td><td>{{ s.sem5 }} h.</td></tr>
{% endif %}
{% endfor %}
</table>
</td>
<td></td>
<td colspan="2">
<table align="left">
{% for s in sem6 %}
<tr>
<td width="290px">{{s}}</td>
<td>{{s.sem6}} h.</td>
</tr>
{% for s in modules %}
{% if s.sem6 > 6 %}
<tr>
<td width="290px">{{ s }}</td>
<td>{{ s.sem6 }} h.</td>
</tr>
{% endif %}
{% endfor %}
</table>
</td>
</tr>
</table>
<br>
<p><strong>Total des heures de cours: {{tot}} heures</strong></p>
<p><strong>Total des heures de cours: {{ tot }} heures</strong></p>
<a href="{% url 'periodes-pdf' %}">Imprimer en PDF</a>
</div>
{% endblock %}

View file

@ -1,17 +1,13 @@
{% extends "./base_site.html" %}
{% load i18n static %}
{% block coltype %}colMS{% endblock %}
{% block bodyclass %}{{ block.super }} dashboard{% endblock %}
{% block content %}
<div id="content-main">
<h1>{{object}}</h1>
<h1>{{ object }}</h1>
<table>
<tr>
<th width="100px">Description</th>
<td>{{object.description}}</td>
<td>{{ object.description }}</td>
</tr>
<tr>
<th>Compétences visées</th>
@ -19,24 +15,24 @@
<p>L'éducateur social, l'éducatrice sociale:</p>
{% for m in object.module_set.all %}
{% for c in m.competences.all %}
- {{c.libelle}} ({{c.code}})<br>
- {{ c.libelle }} ({{ c.code }})<br>
{% endfor %}
{% endfor %}
</td>
</tr>
<tr>
<th>Domaine</th>
<td>{{object.domaine.url|safe}}</td>
<td>{{ object.domaine.url|safe }}</td>
</tr>
<tr>
<th>Responsable</th>
<td>{{object.domaine.responsable.descr|safe}}</td>
<td>{{ object.domaine.responsable.descr|safe }}</td>
</tr>
<tr>
<th>Modules concernés</th>
<td>
{% for m in object.module_set.all %}
{{m.url|safe}}<br>
{{ m.url|safe }}<br>
{% endfor %}
</td>
</tr>

View file

@ -1,23 +1,19 @@
{% extends "./base_site.html" %}
{% load i18n static %}
{% block coltype %}colMS{% endblock %}
{% block bodyclass %}{{ block.super }}{% endblock %}
{% block content %}
<div id="content-main">
<h1>Liste des processus</h1>
<table>
{% for p in object_list %}
<tr>
<th>{{p.code}}</th>
<td><a href=" {% url 'processus-detail' p.id %}">{{p.nom}}</a></td>
<td>{{ p.code }}</td>
<td><a href=" {% url 'processus-detail' p.id %}">{{ p.nom }}</a></td>
</tr>
{% for m in p.module_set.all %}
<tr>
<th>&nbsp;</th>
<td><a href=" {% url 'module-detail' m.id %}">{{m}}</a></td>
<td><a href=" {% url 'module-detail' m.id %}">{{ m }}</a></td>
</tr>
{% endfor %}
{% endfor %}

View file

@ -3,8 +3,6 @@
{% block coltype %}colMS{% endblock %}
{% block bodyclass %}{{ block.super }}{% endblock %}
{% block content %}
<div id="content-main">

View file

@ -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 %}

View file

@ -1,33 +1,20 @@
{% extends "./base_site.html" %}
{% 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 %}
<div id="content-main">
<h1>Documents en téléchargement</h1>
{% if object_list %}
<ul class="liste-verticale">
{% for upload in object_list %}
<li><a href="{{ upload.docfile.url }}">{{upload.titre}}</a></li>
{% endfor %}
</ul>
{% else %}
<p>No documents.</p>
{% endif %}
<div style="margin:auto;width:60%;">
<h1>Documents en téléchargement</h1>
{% if object_list %}
<ul class="liste-verticale">
{% for upload in object_list %}
<li><a href="{{ upload.docfile.url }}">{{ upload.titre }}</a></li>
{% endfor %}
</ul>
{% else %}
<p>No documents.</p>
{% endif %}
</div>
</div>
{% endblock %}