Univention Bugzilla – Bug 49701
Unstarted exam project files
Last modified: 2019-07-26 14:00:59 CEST
It should be possible to create projects in the backend that have not yet been started. There must be no support in the frontend for creating projects that have not yet been started, but all other systems must be able to handle these project files without changing their expected behavior (class work module, backup, etc). Such a class work may also contain incomplete information. Only the name is needed.
Following changes were implemented in efb/4.4/KA: - Exams have the examStared field which defaults to False - The wizard sets examStarted to True when starting an exam - The distribution.util.Project.list() function now lists only started exams. This can be changed via the parameter only_started which defaults to True - The backup script now uses the list function and thus only processes started exams - The schoolexam UMC call query already uses the list function and thus only lists started exams at the moment - The minimum content of a project/exam file are now: name, __type__
This breaks the distribution module, currently no projects are shown since they aren't exams. Since that filter is exam specific, I would prefer it in the exam module instead of using "only_started=False". What is the difference between "isDistributed" and "examStarted"? (In reply to Ole Schwiegert from comment #1) > - The distribution.util.Project.list() function now lists only started > exams. This can be changed via the parameter only_started which defaults to > True > - The schoolexam UMC call query already uses the list function and thus only > lists started exams at the moment
I totally agree with you. I folded the examStarted property back into isDistributed which is only ever true for exams that are started at the moment. The parameter is renamed to only_distributed and defaults to False. Thus the filter is not exam-specific anymore and can remain in the distribution module.
Small Patch (checked in with cdad440eb): for iproject in util.distribution.Project.list() -> for iproject in util.distribution.Project.list(only_distributed=True) Otherwise stopping an exam, in case a planed one exists, throws an error. The code doesn't seem to be prepared for groups at that point. Looks good so far.
4.4 v3 released