Compare commits

..

9 Commits

Author SHA1 Message Date
b7710390fa Add new VSL app with initial models and admin configuration.
Created VslDest model with fields for ID, name, creation date, and update date.
Added VslConfig to settings.py.
Configured admin interface for VslDest.
Initialized migrations for VslDest model.
Included basic test and view files for future development.
2025-06-04 15:04:13 +00:00
github-actions[bot]
9702c54572 Increment version to v3.1.69 2025-05-07 14:23:05 +00:00
241b04e6ff change gitea runner contrainte
Some checks failed
Build and Push Docker Image / build (push) Failing after 1m37s
2025-05-07 14:21:51 +00:00
1dc776d888 Merge branch 'master' of https://gitea.prod.resk-u.ch/CLERC/Reskreen
Some checks failed
Build and Push Docker Image / build (push) Has been cancelled
2025-05-07 14:15:53 +00:00
3802a3ce61 changer volume reskreen-data 2025-05-07 14:15:51 +00:00
github-actions[bot]
6688861a95 Increment version to v3.1.68 2025-04-15 15:24:55 +00:00
9c457b17f5 Merge pull request 'debug-etudiant' (#27) from debug-etudiant into master
All checks were successful
Build and Push Docker Image / build (push) Successful in 2m2s
Reviewed-on: #27
2025-04-15 15:24:31 +00:00
e941c6537f debug get_mirror_eval 2025-04-15 15:21:13 +00:00
78efd478a8 add id to template 2025-04-15 15:02:58 +00:00
18 changed files with 145 additions and 15 deletions

View File

@@ -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:

View File

@@ -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',

View File

@@ -1 +1 @@
v3.1.67 v3.1.69

View File

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

View File

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

View File

@@ -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):

View File

@@ -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
View File

11
vsl/admin.py Normal file
View 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
View File

@@ -0,0 +1,6 @@
from django.apps import AppConfig
class VslConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'vsl'

View 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')),
],
),
]

View File

@@ -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',
),
]

View 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',
),
]

View 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',
),
]

View File

22
vsl/models.py Normal file
View 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
View File

@@ -0,0 +1,3 @@
from django.test import TestCase
# Create your tests here.

3
vsl/views.py Normal file
View File

@@ -0,0 +1,3 @@
from django.shortcuts import render
# Create your views here.