ratings (Ratings)

A tested document

This is a tested document. The following instructions are used for initialization:

>>> import lino
>>> lino.startup('lino_prima.projects.prima1.settings')
>>> from lino.api.doctest import *
>>> from lino_prima.lib.prima.fixtures.demo import SCORES
>>> SCORES.get_score(20)
19.5
>>> SCORES.get_score(40)
39.0
>>> SCORES.get_score(10)
8.5

Rating summaries

>>> ar = rt.login("robin")
>>> # ar.show(ratings.RatingsSummaries)
>>> subject = school.Subject.objects.get(designation="Religion")
>>> qs = school.Course.objects.filter(subject=subject, group__designation="6A")
>>> qs
<QuerySet [Course #99 ('Religion in 6A'), Course #137 ('Religion in 6A (2023/24)')]>
>>> course = qs.first()
>>> qs = school.Skill.objects.filter(subject=subject)
>>> skill = qs.first()
>>> ar.show(ratings.SummariesByCourse, course)
==================== =========== ===========
 Skill                P1          P2
-------------------- ----------- -----------
 Knowledge            77,5        78,8
 Behaviour            71,0        76,2
 Attitude             65,4        75,8
 **Total (3 rows)**   **213,9**   **230,8**
==================== =========== ===========
>>> flt = dict(master=course.group, skill=skill)
>>> flt.update(challenge__isnull=True, enrolment__isnull=True)
>>> rs = ratings.RatingsSummary.objects.get(**flt)
>>> ar.show(ratings.ChallengeSummaries, rs)
=========================== ============ =========== ===========
 Exam or project section     Max. score   P1          P2
--------------------------- ------------ ----------- -----------
 `Exam 353 (13.09.) <…>`__   5,0          76,7
 `Exam 355 (14.09.) <…>`__   15,0         76,7
 `Exam 357 (15.09.) <…>`__   12,0         75,0
 `Exam 359 (10.09.) <…>`__   5,0          86,7
 `Exam 354 (01.04.) <…>`__   12,0                     70,8
 `Exam 356 (12.04.) <…>`__   5,0                      73,3
 `Exam 358 (23.04.) <…>`__   15,0                     86,7
 `Exam 360 (19.03.) <…>`__   12,0                     79,2
 **Total (8 rows)**          **81,0**     **315,1**   **310,0**
=========================== ============ =========== ===========

API reference

class lino_prima.plugins.ratings.Exam
group
subject
heading
date
period
seqno
user
class lino_prima.plugins.ratings.Challenge
skill
exam
project_section
max_score
class lino_prima.plugins.ratings.ChallengeRating
enrolment
challenge
teacher
period
date_done
score
smiley
predicate