projects (School management)

This page contains code snippets (lines starting with >>>), which are being tested during our development workflow. The following snippet initializes the demo project used throughout this page.

>>> import lino
>>> lino.startup('lino_prima.projects.prima1.settings')
>>> from lino.api.doctest import *

Glossary

education project

When a given pupil starts a predefined series of exercises and tests.

Class reference

class lino_prima.lib.projects.Project

Django model to represent an education project.

20250914

Verify the fix for #6318 (Fehlermeldung beim Aufruf der Klasse 5C). Project #2 is an intended duplicate of project #1, which is represented as the ?! for Guillaume Borsu.

>>> from etgen.html2rst import html2rst
>>> prj = projects.Project.objects.get(pk=2)
>>> grp = prj.enrolment.group
>>> ar = rt.login("robin")
>>> print(html2rst(school.pupils_and_projects(grp, ar)))
...
Pupil Erle Tier Ber Bes Leb



`Guillaume Borsu <…>`__ `?! <…>`__ `⚒ <…>`__ `⚒ <…>`__ `⚒ <…>`__ `⚒ <…>`__

`Fleurine Borsus <…>`__ `[img add] <…>`__ `[img add] <…>`__ `[img add] <…>`__ `[img add] <…>`__ `[img add] <…>`__

`Gustave Borsut <…>`__ `[img add] <…>`__ `[img add] <…>`__ `[img add] <…>`__ `[img add] <…>`__ `[img add] <…>`__

`Félicie Bosmans <…>`__ `⚒ <…>`__ `⚒ <…>`__ `⚒ <…>`__ `⚒ <…>`__ `⚒ <…>`__

`Jules Bouch <…>`__ `[img add] <…>`__ `[img add] <…>`__ `[img add] <…>`__ `[img add] <…>`__ `[img add] <…>`__

`Gracianne Bouchhout <…>`__ `[img add] <…>`__ `[img add] <…>`__ `[img add] <…>`__ `[img add] <…>`__ `[img add] <…>`__

`Justin Bouillet <…>`__ `⚒ <…>`__ `⚒ <…>`__ `⚒ <…>`__ `⚒ <…>`__ `⚒ <…>`__

`Honorine Bouillère <…>`__ `[img add] <…>`__ `[img add] <…>`__ `[img add] <…>`__ `[img add] <…>`__ `[img add] <…>`__

`Louis Boulanger <…>`__ `[img add] <…>`__ `[img add] <…>`__ `[img add] <…>`__ `[img add] <…>`__ `[img add] <…>`__

`Héloïse Bourton <…>`__ `⚒ <…>`__ `⚒ <…>`__ `⚒ <…>`__ `⚒ <…>`__ `⚒ <…>`__

`Léon Bouxin <…>`__ `[img add] <…>`__ `[img add] <…>`__ `[img add] <…>`__ `[img add] <…>`__ `[img add] <…>`__

`Hélène Brasseur <…>`__ `[img add] <…>`__ `[img add] <…>`__ `[img add] <…>`__ `[img add] <…>`__ `[img add] <…>`__

The teacher can click on the “?!” in order to see the following table, where he is supposed to delete one of the projects.

>>> from django.db.models import Q
>>> ar.show(
...     projects.ProjectsByEnrolment, prj.enrolment,
...     filter=Q(template=prj.template))
============== ============ =========== ======================== ======================= =========================== ===========================
 Short header   Started on   Period      Cleanliness (3 points)   Correction (3 points)   Time managment (3 points)   Work behaviour (3 points)
-------------- ------------ ----------- ------------------------ ----------------------- --------------------------- ---------------------------
 Erle           06/02/2025   2024/25-2
 Erle           06/02/2025   2024/25-2
============== ============ =========== ======================== ======================= =========================== ===========================

20261007

>>> ar = rt.login("robin")
>>> prj = projects.Project.objects.get(pk=2)
>>> ar.show(projects.GeneralRatings)
======= ================ ============ ===========
 value   text             Field name   Max score
------- ---------------- ------------ -----------
 1       Cleanliness      gr_1         3,0
 2       Correction       gr_2         3,0
 3       Time managment   gr_3         3,0
 4       Work behaviour   gr_4         3,0
======= ================ ============ ===========
>>> prj.gr_1 = 5
>>> prj.full_clean()
Traceback (most recent call last):
...
ValueError: score is higher than max_score!