Commit a2b431b1 authored by Sli's avatar Sli

Merge branch 'pedagogy_v2' into 'master'

New version of the pedagogy

See merge request !212
parents 78b61642 d844bccb
Pipeline #1916 passed with stage
in 23 minutes and 14 seconds
......@@ -52,6 +52,7 @@ from counter.models import Customer, ProductType, Product, Counter, Selling, Stu
from com.models import Sith, Weekmail, News, NewsDate
from election.models import Election, Role, Candidature, ElectionList
from forum.models import Forum, ForumTopic
from pedagogy.models import UV
class Command(BaseCommand):
......@@ -84,6 +85,7 @@ class Command(BaseCommand):
Group(name="Banned to subscribe").save()
Group(name="SAS admin").save()
Group(name="Forum admin").save()
Group(name="Pedagogy admin").save()
self.reset_index("core", "auth")
root = User(
id=0,
......@@ -857,6 +859,18 @@ Welcome to the wiki page!
start_date=timezone.now(),
role=settings.SITH_CLUB_ROLES_ID["Board member"],
).save()
# Adding user tutu
tutu = User(
username="tutu",
last_name="Tu",
first_name="Tu",
email="tutu@git.an",
date_of_birth="1942-06-12",
)
tutu.set_password("plop")
tutu.save()
tutu.groups = [settings.SITH_GROUP_PEDAGOGY_ADMIN_ID]
tutu.save()
# Adding subscription for sli
s = Subscription(
......@@ -895,6 +909,18 @@ Welcome to the wiki page!
start=s.subscription_start,
)
s.save()
# Tutu
s = Subscription(
member=tutu,
subscription_type=default_subscription,
payment_method=settings.SITH_SUBSCRIPTION_PAYMENT_METHOD[0][0],
)
s.subscription_start = s.compute_start()
s.subscription_end = s.compute_end(
duration=settings.SITH_SUBSCRIPTIONS[s.subscription_type]["duration"],
start=s.subscription_start,
)
s.save()
Selling(
label=dcons.name,
......@@ -1077,3 +1103,35 @@ Welcome to the wiki page!
start_date=friday + timedelta(hours=24 * 7 * i),
end_date=friday + timedelta(hours=24 * 7 * i + 8),
).save()
# Create som data for pedagogy
UV(
code="PA00",
author=User.objects.get(id=0),
credit_type=settings.SITH_PEDAGOGY_UV_TYPE[3][0],
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.",
program="""* Semestre précédent proposition d'un projet et d'un cahier des charges
* Evaluation par un jury de six membres
* Si accord réalisation dans le cadre de l'UV
* Compte-rendu de l'expérience
* Présentation""",
skills="""* Gérer un projet associatif ou une action éducative en autonomie:
* en produisant un cahier des charges qui -définit clairement le contexte du projet personnel -pose les jalons de ce projet -estime de manière réaliste les moyens et objectifs du projet -définit exactement les livrables attendus
* en étant capable de respecter ce cahier des charges ou, le cas échéant, de réviser le cahier des charges de manière argumentée.
* Relater son expérience dans un rapport:
* qui permettra à d'autres étudiants de poursuivre les actions engagées
* qui montre la capacité à s'auto-évaluer et à adopter une distance critique sur son action.""",
key_concepts="""* Autonomie
* Responsabilité
* Cahier des charges
* Gestion de projet""",
hours_THE=121,
hours_TE=4,
).save()
# -*- coding: utf-8 -*-
# Generated by Django 1.11.20 on 2019-07-04 13:00
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [("core", "0029_auto_20180426_2013")]
operations = [
migrations.AlterField(
model_name="notification",
name="type",
field=models.CharField(
choices=[
("POSTER_MODERATION", "A new poster needs to be moderated"),
("MAILING_MODERATION", "A new mailing list needs to be moderated"),
(
"PEDAGOGY_MODERATION",
"A new pedagogy comment has been signaled for moderation",
),
("NEWS_MODERATION", "There are %s fresh news to be moderated"),
("FILE_MODERATION", "New files to be moderated"),
(
"SAS_MODERATION",
"There are %s pictures to be moderated in the SAS",
),
("NEW_PICTURES", "You've been identified on some pictures"),
("REFILLING", "You just refilled of %s €"),
("SELLING", "You just bought %s"),
("GENERIC", "You have a notification"),
],
default="GENERIC",
max_length=32,
verbose_name="type",
),
)
]
......@@ -670,6 +670,10 @@ class AnonymousUser(AuthAnonymousUser):
def was_subscribed(self):
return False
@property
def is_subscribed(self):
return False
@property
def subscribed(self):
return False
......
......@@ -30,6 +30,12 @@ $shadow-color: rgb(223, 223, 223);
$background-bouton-color: hsl(0, 0%, 90%);
/*--------------------------MEDIA QUERY HELPERS------------------------*/
$small-devices: 576px;
$medium-devices: 768px;
$large-devices: 992px;
$extra-large-devices: 1200px;
/*--------------------------------GENERAL------------------------------*/
body {
......@@ -1564,7 +1570,6 @@ footer {
form {
margin: 0px auto;
margin-bottom: 10px;
width: 60%;
}
label {
......@@ -1668,3 +1673,445 @@ label {
}
}
/* --------------------------------------pedagogy-----------------------------------*/
$pedagogy-blue: #1bb9ea;
$pedagogy-orange: #ea7900;
$pedagogy-hover-blue: #0e97ce;
$pedagogy-light-blue: #caf0ff;
$pedagogy-white-text: #f0f0f0;
.pedagogy {
&.star-not-checked {
color : #f7f7f7;
margin-bottom: 0px;
margin-top: 0px;
}
&.star-checked {
color: $pedagogy-orange;
margin-bottom: 0px;
margin-top: 0px;
}
@media screen and (max-width: $large-devices){
&.star-not-checked {
margin-left: 5px;
margin-right: 5px;
}
&.star-checked {
margin-left: 5px;
margin-right: 5px;
}
}
#dynamic_view {
font-size: 1.1em;
table {
}
td {
text-align: center;
border: none;
}
}
#search_form {
margin: 0px;
width: 100%;
.input-search {
background: $pedagogy-light-blue;
width: 300px;
height: 21px;
}
.button-search {
background: $pedagogy-orange;
color: white;
font-weight: bold;
margin-left: 20px;
}
.radio-guide input[type="radio"],input[type="checkbox"] {
display:none;
}
.radio-guide {
margin-top: 10px;
color: white;
}
.radio-guide label {
display:inline-block;
background-color: $pedagogy-blue;
padding: 10px 20px;
font-family:Arial;
font-size:16px;
border-radius: 4px;
}
.radio-guide input[type="radio"]:checked + label {
background-color:$pedagogy-orange;
}
.radio-guide input[type="checkbox"]:checked + label {
background-color:$pedagogy-orange;
}
.radio-guide label:hover {
background-color: $pedagogy-hover-blue;
}
#radioAUTUMN + label {
margin-left: 50px;
}
}
#uv_detail {
color: #062f38;
.uv-quick-info-container {
display: grid;
grid-template-columns: 20% 20% 20% 20% auto;
grid-template-rows: auto auto;
grid-template-areas:
"hours-cm hours-td hours-tp hours-te hours-the"
"department credit-type semester . ." ;
}
.department {
grid-area: department;
}
.credit-type {
grid-area: credit-type;
}
.semester {
grid-area: semester;
}
.hours-cm {
grid-area: hours-cm;
}
.hours-td {
grid-area: hours-td;
}
.hours-tp {
grid-area: hours-tp;
}
.hours-te {
grid-area: hours-te;
}
.hours-the {
grid-area: hours-the;
}
#leave_comment {
.leave-comment-grid-container {
display: grid;
grid-template-columns: 270px auto;
grid-template-rows: 100%;
grid-template-areas: "stars comment";
@media screen and (max-width: $large-devices){
grid-template-columns: 100%;
grid-template-rows: auto auto;
grid-template-areas:
"stars"
"comment";
}
}
.ui-accordion-content {
background-color: $white-color;
border-color: $pedagogy-orange;
border-right: none;
}
.form-stars {
grid-area: stars;
}
.form-comment {
grid-area: comment;
}
.ui-accordion-header {
background-color: $pedagogy-orange;
color: $pedagogy-white-text;
clip-path: polygon(0 0%, 0 100%, 30% 100%, 33% 0);
@media screen and (max-width: $large-devices){
clip-path: none;
}
}
.ui-accordion-header-icon {
color: $pedagogy-white-text;
margin-right: 10px;
}
.input-stars {
margin-top: 20px;
}
input[type="submit"] {
float: right;
}
}
.uv-details-container {
display: grid;
grid-template-columns: 150px 100px auto;
grid-template-rows: 156px 1fr;
grid-template-areas:
"grade grade-stars uv-infos"
". . uv-infos";
@media screen and (max-width: $large-devices){
grid-template-columns: 50% 50%;
grid-template-rows: auto auto;
grid-template-areas:
"grade grade-stars"
"uv-infos uv-infos";
}
}
.grade {
grid-area: grade;
color: $pedagogy-white-text;
background-color: $pedagogy-blue;
padding-right: 10px;
> p {
text-align: right;
font-weight: bold;
}
}
.grade-stars {
grid-area: grade-stars;
color: $pedagogy-white-text;
background-color: $pedagogy-blue;
font-weight: bold;
}
.uv-infos {
grid-area: uv-infos;
padding-left: 10px;
}
.comment-container {
display: grid;
grid-template-columns: 300px auto;
grid-template-rows: auto auto auto;
grid-template-areas:
"grade-block comment"
"grade-block info"
"comment-end-bar comment-end-bar";
margin-bottom: 30px;
margin-top: 10px;
@media screen and (max-width: $large-devices){
grid-template-columns: auto;
grid-template-rows: auto auto auto auto;
grid-template-areas:
"grade-block"
"comment"
"info"
"comment-end-bar"
}
.grade-block {
grid-area: grade-block;
width: 300px;
display: grid;
grid-template-columns: 150px 150px;
grid-template-rows: 156px auto;
grid-template-areas:
"grade-type grade-stars"
"grade-extension grade-extension";
grid-gap: 15px;
clip-path: polygon(0 0, 0 100%, 100% 100%, 100% 30px, 270px 0);
align-items: start;
background-color: $pedagogy-blue;
@media screen and (max-width: $large-devices){
grid-template-columns: 50% auto;
grid-template-rows: auto;
grid-template-areas:"grade-type grade-stars";
width: auto;
clip-path: none;
align-content: space-evenly;
align-items: end;
}
.grade-extension {
grid-area: grade-extension;
background-color: $pedagogy-blue;
}
.grade-type {
grid-area: grade-type;
> p {
color: $pedagogy-white-text;
font-weight: bold;
text-align: right;
}
}
.grade-stars {
grid-area: grade-stars;
}
}
.comment {
grid-area: comment;
display: grid;
grid-template-columns: auto;
grid-template-rows: auto auto;
grid-template-areas:
"anchor"
"markdown";
@media screen and (max-width: $large-devices){
border-left: solid;
border-right: solid;
border-color: $pedagogy-blue;
}
.anchor {
grid-area: anchor;
text-align: right;
margin-right: 15px;
}
.markdown {
grid-area: markdown;
min-height: 139px;
margin-top: 0px;
margin-right: 0px;
padding: 10px;
text-align: justify;
overflow: auto;
}
}
.info {
grid-area: info;
padding-bottom: 10px;
@media screen and (max-width: $large-devices){
border-left: solid;
border-right: solid;
border-color: $pedagogy-blue;
}
.status-reported {
color: red;
float: left;
padding-left: 10px;
}
.actions {
float: right;
}
}
.comment-end-bar {
grid-area: comment-end-bar;
display: grid;
grid-template-columns: 33% auto auto;
grid-template-rows: 2.5em;
grid-template-areas: "author date report";
background-color: $pedagogy-blue;
margin-top: -1px;
@media screen and (max-width: $large-devices){
grid-template-columns: auto;
grid-template-rows: auto auto auto;
grid-template-areas:
"report"
"date"
"author";
margin-top: 0px;
text-align: center;
}
.author {
grid-area: author;
padding-top: 6px;
padding-left: 20px;
background-color: $pedagogy-orange;
clip-path: polygon(0 10px, 0 100%, 350px 200%, 300px 10px);
@media screen and (max-width: $large-devices){
clip-path: none;
padding: 0px;
padding-bottom: 7px;
}
a {
color: $pedagogy-white-text;
font-weight: bold;
}
a:hover {
color: $pedagogy-hover-blue;
}
}
.date {
grid-area: date;
color: $pedagogy-white-text;
@media screen and (max-width: $large-devices){
padding-bottom: 7px;
}
}
.report {
grid-area: report;
justify-self: right;
padding-right: 30px;
padding-left: 30px;
a {
color: $pedagogy-white-text;
}
a:hover {
color: $pedagogy-hover-blue;
}
@media screen and (max-width: $large-devices){
text-align: center;
justify-self: inherit;
padding-bottom: 7px;
background-color: $white-color;
border-left: solid;
border-right: solid;
border-color: $pedagogy-blue;
a {
color: $black-color;
}
}
}
}
}
}
}
\ No newline at end of file
......@@ -185,7 +185,7 @@
<a href="{{ url('matmat:search_clear') }}">{% trans %}Matmatronch{% endtrans %}</a>
<a href="/launderette">{% trans %}Launderette{% endtrans %}</a>
<a href="{{ url('core:file_list') }}">{% trans %}Files{% endtrans %}</a>
{# <a href="https://ae2.utbm.fr/uvs/">{% trans %}Pedagogy{% endtrans %}</a> #}
<a href="{{ url('pedagogy:guide') }}">{% trans %}Pedagogy{% endtrans %}</a>
</div>
</div>
<div class="dropdown">
......
......@@ -104,6 +104,16 @@
<li><a href="{{ url('club:tools', club_id=m.club.id) }}">{{ m.club }}</a></li>
{% endfor %}
</ul>
<hr>
<h4>{% trans %}Pedagogy{% endtrans %}</h4>
<ul>
{% if user.is_in_group(settings.SITH_GROUP_PEDAGOGY_ADMIN_ID) or user.is_root %}
<li><a href="{{ url('pedagogy:uv_create') }}">{% trans %}Create UV{% endtrans %}</a></li>
<li><a href="{{ url('pedagogy:moderation') }}">{% trans %}Moderate comments{% endtrans %}</a></li>
{% endif %}
</ul>
<hr>
<h4>{% trans %}Elections{% endtrans %}</h4>
<ul>
......@@ -113,6 +123,8 @@
<li><a href="{{ url('election:create') }}">{% trans %}Create a new election{% endtrans %}</a></li>
{%- endif -%}
</ul>
<hr>
<h4>{% trans %}Other tools{% endtrans %}</h4>
<ul>
<li><a href="{{ url('core:to_markdown') }}">{% trans %}Convert dokuwiki/BBcode syntax to Markdown{% endtrans %}</a></li>
......
......@@ -6,7 +6,7 @@
msgid ""
msgstr ""
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-05-20 17:55+0200\n"
"POT-Creation-Date: 2019-07-08 22:46+0200\n"
"PO-Revision-Date: 2016-07-18\n"
"Last-Translator: Skia <skia@libskia.so>\n"
"Language-Team: AE info <ae.info@utbm.fr>\n"
......@@ -127,8 +127,8 @@ msgstr "numéro"
msgid "journal"
msgstr "classeur"
#: accounting/models.py:269 core/models.py:809 core/models.py:1345
#: core/models.py:1391 core/models.py:1420 counter/models.py:353
#: accounting/models.py:269 core/models.py:813 core/models.py:1349
#: core/models.py:1395 core/models.py:1424 counter/models.py:353
#: counter/models.py:446 counter/models.py:615 eboutic/models.py:42
#: eboutic/models.py:85 forum/models.py:298 forum/models.py:391
#: stock/models.py:99
......@@ -136,7 +136,7 @@ msgid "date"
msgstr "date"
#: accounting/models.py:270 counter/models.py:123 counter/models.py:616
#: stock/models.py:102
#: pedagogy/models.py:220 stock/models.py:102
msgid "comment"
msgstr "commentaire"
......@@ -166,7 +166,7 @@ msgid "accounting type"
msgstr "type comptable"
#: accounting/models.py:304 accounting/models.py:450 accounting/models.py:485
#: accounting/models.py:519 core/models.py:1419 counter/models.py:412
#: accounting/models.py:519 core/models.py:1423 counter/models.py:412
msgid "label"
msgstr "étiquette"
......@@ -218,7 +218,7 @@ msgstr "Compte"
msgid "Company"
msgstr "Entreprise"
#: accounting/models.py:317 sith/settings.py:375
#: accounting/models.py:317 sith/settings.py:377
#: stock/templates/stock/shopping_list_items.jinja:37
msgid "Other"
msgstr "Autre"
......@@ -265,7 +265,7 @@ msgstr ""
"Vous devez fournir soit un type comptable simplifié ou un type comptable "
"standard"
#: accounting/models.py:442 counter/models.py:159
#: accounting/models.py:442 counter/models.py:159 pedagogy/models.py:91
msgid "code"
msgstr "code"
......@@ -377,9 +377,12 @@ msgstr "Compte en banque : "
#: election/templates/election/election_detail.jinja:401
#: forum/templates/forum/macros.jinja:21 forum/templates/forum/macros.jinja:134
#: launderette/templates/launderette/launderette_admin.jinja:16
#: launderette/views.py:226 sas/templates/sas/album.jinja:26
#: sas/templates/sas/moderation.jinja:18 sas/templates/sas/picture.jinja:74
#: sas/templates/sas/picture.jinja:124
#: launderette/views.py:226 pedagogy/templates/pedagogy/guide.jinja:51
#: pedagogy/templates/pedagogy/guide.jinja:74
#: pedagogy/templates/pedagogy/guide.jinja:110
#: pedagogy/templates/pedagogy/uv_detail.jinja:178
#: sas/templates/sas/album.jinja:26 sas/templates/sas/moderation.jinja:18
#: sas/templates/sas/picture.jinja:74 sas/templates/sas/picture.jinja:124
#: stock/templates/stock/stock_shopping_list.jinja:43
#: stock/templates/stock/stock_shopping_list.jinja:69
#: trombi/templates/trombi/detail.jinja:35
......@@ -433,6 +436,10 @@ msgstr "Nouveau compte club"
#: forum/templates/forum/macros.jinja:20 forum/templates/forum/macros.jinja:62
#: forum/templates/forum/macros.jinja:128
#: launderette/templates/launderette/launderette_list.jinja:16
#: pedagogy/templates/pedagogy/guide.jinja:50
#: pedagogy/templates/pedagogy/guide.jinja:73
#: pedagogy/templates/pedagogy/guide.jinja:109
#: pedagogy/templates/pedagogy/uv_detail.jinja:177
#: sas/templates/sas/album.jinja:18 sas/templates/sas/picture.jinja:100
#: trombi/templates/trombi/detail.jinja:9
#: trombi/templates/trombi/edit_profile.jinja:34
......@@ -524,6 +531,7 @@ msgid "Effective amount"
msgstr "Montant effectif"
#: accounting/templates/accounting/club_account_details.jinja:36
#: sith/settings.py:421
msgid "Closed"
msgstr "Fermé"