mirror of
https://github.com/ae-utbm/sith.git
synced 2025-12-20 23:03:21 +00:00
rename UV to UE
This commit is contained in:
@@ -44,7 +44,7 @@ from core.utils import resize_image
|
||||
from counter.models import Counter, Product, ProductType, ReturnableProduct, StudentCard
|
||||
from election.models import Candidature, Election, ElectionList, Role
|
||||
from forum.models import Forum
|
||||
from pedagogy.models import UV
|
||||
from pedagogy.models import UE
|
||||
from sas.models import Album, PeoplePictureRelation, Picture
|
||||
from subscription.models import Subscription
|
||||
|
||||
@@ -661,20 +661,20 @@ class Command(BaseCommand):
|
||||
|
||||
# Create some data for pedagogy
|
||||
|
||||
UV(
|
||||
UE(
|
||||
code="PA00",
|
||||
author=User.objects.get(id=0),
|
||||
credit_type=settings.SITH_PEDAGOGY_UV_TYPE[3][0],
|
||||
credit_type=settings.SITH_PEDAGOGY_UE_TYPE[3][0],
|
||||
manager="Laurent HEYBERGER",
|
||||
semester=settings.SITH_PEDAGOGY_UV_SEMESTER[3][0],
|
||||
language=settings.SITH_PEDAGOGY_UV_LANGUAGE[0][0],
|
||||
semester=settings.SITH_PEDAGOGY_UE_SEMESTER[3][0],
|
||||
language=settings.SITH_PEDAGOGY_UE_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
|
||||
* Si accord réalisation dans le cadre de l'UE
|
||||
* Compte-rendu de l'expérience
|
||||
* Présentation""",
|
||||
skills="""* Gérer un projet associatif ou une action éducative en autonomie:
|
||||
@@ -790,16 +790,16 @@ class Command(BaseCommand):
|
||||
|
||||
subscribers = Group.objects.create(name="Cotisants")
|
||||
subscribers.permissions.add(
|
||||
*list(perms.filter(codename__in=["add_news", "add_uvcomment"]))
|
||||
*list(perms.filter(codename__in=["add_news", "add_uecomment"]))
|
||||
)
|
||||
old_subscribers = Group.objects.create(name="Anciens cotisants")
|
||||
old_subscribers.permissions.add(
|
||||
*list(
|
||||
perms.filter(
|
||||
codename__in=[
|
||||
"view_uv",
|
||||
"view_uvcomment",
|
||||
"add_uvcommentreport",
|
||||
"view_ue",
|
||||
"view_uecomment",
|
||||
"add_uecommentreport",
|
||||
"view_user",
|
||||
"view_picture",
|
||||
"view_album",
|
||||
@@ -875,7 +875,7 @@ class Command(BaseCommand):
|
||||
pedagogy_admin.permissions.add(
|
||||
*list(
|
||||
perms.filter(content_type__app_label="pedagogy")
|
||||
.exclude(codename__in=["change_uvcomment"])
|
||||
.exclude(codename__in=["change_uecomment"])
|
||||
.values_list("pk", flat=True)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -23,7 +23,7 @@ from counter.models import (
|
||||
Selling,
|
||||
)
|
||||
from forum.models import Forum, ForumMessage, ForumTopic
|
||||
from pedagogy.models import UV
|
||||
from pedagogy.models import UE
|
||||
from subscription.models import Subscription
|
||||
|
||||
|
||||
@@ -74,7 +74,7 @@ class Command(BaseCommand):
|
||||
random.sample(old_subscribers, k=min(80, len(old_subscribers))),
|
||||
)
|
||||
self.stdout.write("Creating uvs...")
|
||||
self.create_uvs()
|
||||
self.create_ues()
|
||||
self.stdout.write("Creating products...")
|
||||
self.create_products()
|
||||
self.stdout.write("Creating sales and refills...")
|
||||
@@ -192,7 +192,7 @@ class Command(BaseCommand):
|
||||
memberships = Membership.objects.bulk_create(memberships)
|
||||
Membership._add_club_groups(memberships)
|
||||
|
||||
def create_uvs(self):
|
||||
def create_ues(self):
|
||||
root = User.objects.get(username="root")
|
||||
categories = ["CS", "TM", "OM", "QC", "EC"]
|
||||
branches = ["TC", "GMC", "GI", "EDIM", "E", "IMSI", "HUMA"]
|
||||
@@ -207,7 +207,7 @@ class Command(BaseCommand):
|
||||
+ str(random.randint(10, 90))
|
||||
)
|
||||
uvs.append(
|
||||
UV(
|
||||
UE(
|
||||
code=code,
|
||||
author=root,
|
||||
manager=random.choice(teachers),
|
||||
@@ -229,7 +229,7 @@ class Command(BaseCommand):
|
||||
hours_TE=random.randint(15, 40),
|
||||
)
|
||||
)
|
||||
UV.objects.bulk_create(uvs, ignore_conflicts=True)
|
||||
UE.objects.bulk_create(uvs, ignore_conflicts=True)
|
||||
|
||||
def create_products(self):
|
||||
categories = [
|
||||
|
||||
@@ -184,18 +184,18 @@
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if user.has_perm("pedagogy.add_uv") or user.has_perm("pedagogy.delete_uvcomment") %}
|
||||
{% if user.has_perm("pedagogy.add_ue") or user.has_perm("pedagogy.delete_uecomment") %}
|
||||
<div>
|
||||
<h4>{% trans %}Pedagogy{% endtrans %}</h4>
|
||||
<ul>
|
||||
{% if user.has_perm("pedagogy.add_uv") %}
|
||||
{% if user.has_perm("pedagogy.add_ue") %}
|
||||
<li>
|
||||
<a href="{{ url("pedagogy:uv_create") }}">
|
||||
{% trans %}Create UV{% endtrans %}
|
||||
<a href="{{ url("pedagogy:ue_create") }}">
|
||||
{% trans %}Create UE{% endtrans %}
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if user.has_perm("pedagogy.delete_uvcomment") %}
|
||||
{% if user.has_perm("pedagogy.delete_uecomment") %}
|
||||
<li>
|
||||
<a href="{{ url("pedagogy:moderation") }}">
|
||||
{% trans %}Moderate comments{% endtrans %}
|
||||
|
||||
Reference in New Issue
Block a user