Compare commits
9 Commits
bce994a9b7
...
vsl
| Author | SHA1 | Date | |
|---|---|---|---|
| b7710390fa | |||
|
|
9702c54572 | ||
| 241b04e6ff | |||
| 1dc776d888 | |||
| 3802a3ce61 | |||
|
|
6688861a95 | ||
| 9c457b17f5 | |||
| e941c6537f | |||
| 78efd478a8 |
@@ -9,7 +9,7 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
if: github.actor != 'github-actions[bot]'
|
if: github.actor != 'github-actions[bot]'
|
||||||
runs-on: self-hosted
|
#runs-on: self-hosted
|
||||||
container:
|
container:
|
||||||
image: alpine:latest
|
image: alpine:latest
|
||||||
steps:
|
steps:
|
||||||
|
|||||||
@@ -52,6 +52,7 @@ INSTALLED_APPS = [
|
|||||||
'studenteval.apps.StudentevalConfig',
|
'studenteval.apps.StudentevalConfig',
|
||||||
'comm_op.apps.CommOpConfig',
|
'comm_op.apps.CommOpConfig',
|
||||||
'custom_admin.apps.CustomAdminConfig',
|
'custom_admin.apps.CustomAdminConfig',
|
||||||
|
'vsl.apps.VslConfig',
|
||||||
'rangefilter',
|
'rangefilter',
|
||||||
'django.contrib.admin',
|
'django.contrib.admin',
|
||||||
'carnet_rouge.apps.CarnetRougeConfig',
|
'carnet_rouge.apps.CarnetRougeConfig',
|
||||||
|
|||||||
@@ -3,5 +3,5 @@ database = django_prod
|
|||||||
user = django_usr
|
user = django_usr
|
||||||
password = YwVHV36ovBTXWugb
|
password = YwVHV36ovBTXWugb
|
||||||
default-character-set = utf8
|
default-character-set = utf8
|
||||||
host =33.15.0.2
|
host =33.15.0.1
|
||||||
port =3306
|
port =3306
|
||||||
|
|||||||
@@ -67,11 +67,7 @@ networks:
|
|||||||
external: true
|
external: true
|
||||||
volumes:
|
volumes:
|
||||||
reskreen-data:
|
reskreen-data:
|
||||||
driver: local
|
|
||||||
driver_opts:
|
|
||||||
device: /home/prod/Reskreen
|
|
||||||
o: bind
|
|
||||||
type: none
|
|
||||||
configs:
|
configs:
|
||||||
env-reskreen-frontend:
|
env-reskreen-frontend:
|
||||||
external: true
|
external: true
|
||||||
|
|||||||
@@ -119,12 +119,18 @@ class cl_Student_eval(models.Model):
|
|||||||
if eval.ID == self.ID:
|
if eval.ID == self.ID:
|
||||||
to_be_set = True
|
to_be_set = True
|
||||||
else:
|
else:
|
||||||
#print(f"check eval {eval} {eval.nEval_Type} ({eval.nEval_Type == 1}) ? {eval.sRef} == {self.sRef} => {eval.sRef == self.sRef} {self}")
|
print("check eval")
|
||||||
|
print(eval)
|
||||||
|
print(self)
|
||||||
|
|
||||||
if eval.nEval_Type == "1" and eval.sRef == self.sRef:
|
if eval.nEval_Type == "1" and eval.sRef == self.sRef:
|
||||||
print(f"Eval mirror found {eval} / {self}")
|
print(f"Eval mirror found type 1 {eval} / {self}")
|
||||||
to_be_set = True
|
to_be_set = True
|
||||||
elif eval.nEval_Type == "2" and eval.dtDate == self.dtDate:
|
elif eval.nEval_Type == "2" and eval.sRef == self.sRef:
|
||||||
print(f"Eval mirror found {eval} / {self}")
|
print(f"Eval mirror found type 2 {eval} / {self}")
|
||||||
|
to_be_set = True
|
||||||
|
if eval.nEval_Type == "3" and eval.sRef == self.sRef:
|
||||||
|
print(f"Eval mirror found type 3 {eval} / {self}")
|
||||||
to_be_set = True
|
to_be_set = True
|
||||||
|
|
||||||
if to_be_set:
|
if to_be_set:
|
||||||
@@ -137,7 +143,7 @@ class cl_Student_eval(models.Model):
|
|||||||
|
|
||||||
if self.o_Encadrant_eval is not None and self.o_Auto_eval is not None:
|
if self.o_Encadrant_eval is not None and self.o_Auto_eval is not None:
|
||||||
self.mirrored = True
|
self.mirrored = True
|
||||||
#print(f" auto = {self.o_Auto_eval} / encadrant = {self.o_Encadrant_eval}")
|
print(f" auto = {self.o_Auto_eval} / encadrant = {self.o_Encadrant_eval}")
|
||||||
|
|
||||||
|
|
||||||
def get_all_evals_for_student(self,sStudent=None):
|
def get_all_evals_for_student(self,sStudent=None):
|
||||||
|
|||||||
@@ -103,14 +103,14 @@
|
|||||||
<table class="w-full">
|
<table class="w-full">
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr class="border-b">
|
<tr class="border-b">
|
||||||
<th class="py-2 px-4 text-left font-semibold">Avis Global</th>
|
<th class="py-2 px-4 text-left font-semibold">Avis Global {{object.o_Encadrant_eval.ID}}</th>
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="border-b">
|
<tr class="border-b">
|
||||||
<td class="py-2 px-4">{{ object.o_Encadrant_eval.sDesc_global | safe }}</td>
|
<td class="py-2 px-4">{{ object.o_Encadrant_eval.sDesc_global | safe }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="border-b">
|
<tr class="border-b">
|
||||||
<th class="py-2 px-4 text-left font-semibold">Avis Global (auto)</th>
|
<th class="py-2 px-4 text-left font-semibold">Avis Global (auto) {{object.o_Auto_eval.ID}}</th>
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="border-b">
|
<tr class="border-b">
|
||||||
|
|||||||
0
vsl/__init__.py
Normal file
0
vsl/__init__.py
Normal file
11
vsl/admin.py
Normal file
11
vsl/admin.py
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
from django.contrib import admin
|
||||||
|
from vsl.models import VslDest
|
||||||
|
|
||||||
|
|
||||||
|
@admin.register(VslDest)
|
||||||
|
class vsl_destAdmin(admin.ModelAdmin):
|
||||||
|
list_display = ('id', 'name')
|
||||||
|
|
||||||
|
ordering = ('id',)
|
||||||
|
list_per_page = 100
|
||||||
|
search_fields = ('name',)
|
||||||
6
vsl/apps.py
Normal file
6
vsl/apps.py
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
from django.apps import AppConfig
|
||||||
|
|
||||||
|
|
||||||
|
class VslConfig(AppConfig):
|
||||||
|
default_auto_field = 'django.db.models.BigAutoField'
|
||||||
|
name = 'vsl'
|
||||||
23
vsl/migrations/0001_initial.py
Normal file
23
vsl/migrations/0001_initial.py
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
# Generated by Django 5.0.10 on 2025-06-04 16:48
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
initial = True
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.CreateModel(
|
||||||
|
name='VslDest',
|
||||||
|
fields=[
|
||||||
|
('id', models.AutoField(primary_key=True, serialize=False, verbose_name='ID du Suivi')),
|
||||||
|
('name', models.CharField(max_length=255, verbose_name='Dénomination')),
|
||||||
|
('date_creation', models.DateTimeField(auto_now_add=True, verbose_name='Date de création')),
|
||||||
|
('date_modification', models.DateTimeField(auto_now=True, verbose_name='Date de modification')),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
]
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
# Generated by Django 5.0.10 on 2025-06-04 16:49
|
||||||
|
|
||||||
|
from django.db import migrations
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('vsl', '0001_initial'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.RenameField(
|
||||||
|
model_name='vsldest',
|
||||||
|
old_name='date_creation',
|
||||||
|
new_name='dtCreate',
|
||||||
|
),
|
||||||
|
migrations.RenameField(
|
||||||
|
model_name='vsldest',
|
||||||
|
old_name='date_modification',
|
||||||
|
new_name='dtUpdate',
|
||||||
|
),
|
||||||
|
]
|
||||||
18
vsl/migrations/0003_rename_name_vsldest_dest.py
Normal file
18
vsl/migrations/0003_rename_name_vsldest_dest.py
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
# Generated by Django 5.0.10 on 2025-06-04 16:50
|
||||||
|
|
||||||
|
from django.db import migrations
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('vsl', '0002_rename_date_creation_vsldest_dtcreate_and_more'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.RenameField(
|
||||||
|
model_name='vsldest',
|
||||||
|
old_name='name',
|
||||||
|
new_name='dest',
|
||||||
|
),
|
||||||
|
]
|
||||||
18
vsl/migrations/0004_rename_dest_vsldest_name.py
Normal file
18
vsl/migrations/0004_rename_dest_vsldest_name.py
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
# Generated by Django 5.0.10 on 2025-06-04 16:51
|
||||||
|
|
||||||
|
from django.db import migrations
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('vsl', '0003_rename_name_vsldest_dest'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.RenameField(
|
||||||
|
model_name='vsldest',
|
||||||
|
old_name='dest',
|
||||||
|
new_name='name',
|
||||||
|
),
|
||||||
|
]
|
||||||
0
vsl/migrations/__init__.py
Normal file
0
vsl/migrations/__init__.py
Normal file
22
vsl/models.py
Normal file
22
vsl/models.py
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
from django.db import models
|
||||||
|
|
||||||
|
|
||||||
|
class VslDest(models.Model):
|
||||||
|
# ID auto-incrémenté par défaut
|
||||||
|
id = models.AutoField("ID du Suivi", primary_key=True)
|
||||||
|
|
||||||
|
# Champ de chaîne de caractères avec une longueur maximale de 255 caractères
|
||||||
|
name = models.CharField("Dénomination", max_length=255)
|
||||||
|
|
||||||
|
# Champ pour la date de création, automatiquement défini à la création
|
||||||
|
dtCreate = models.DateTimeField("Date de création", auto_now_add=True)
|
||||||
|
|
||||||
|
# Champ pour la date de modification, automatiquement mis à jour à chaque modification
|
||||||
|
dtUpdate = models.DateTimeField("Date de modification", auto_now=True)
|
||||||
|
|
||||||
|
def __str__(self):
|
||||||
|
return self.name
|
||||||
|
class Meta:
|
||||||
|
verbose_name = "Destination VSL"
|
||||||
|
verbose_name_plural = "Destinations VSL"
|
||||||
|
ordering = ["id"]
|
||||||
3
vsl/tests.py
Normal file
3
vsl/tests.py
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
from django.test import TestCase
|
||||||
|
|
||||||
|
# Create your tests here.
|
||||||
3
vsl/views.py
Normal file
3
vsl/views.py
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
from django.shortcuts import render
|
||||||
|
|
||||||
|
# Create your views here.
|
||||||
Reference in New Issue
Block a user