Bug 49701 - Unstarted exam project files
Unstarted exam project files
Status: CLOSED FIXED
Product: UCS@school
Classification: Unclassified
Component: UMC - Exam mode
UCS@school 4.4
Other Linux
: P5 normal (vote)
: UCS@school 4.4 v3
Assigned To: Ole Schwiegert
Jürn Brodersen
:
Depends on:
Blocks: 49637
  Show dependency treegraph
 
Reported: 2019-06-21 08:33 CEST by Ole Schwiegert
Modified: 2019-07-26 14:00 CEST (History)
1 user (show)

See Also:
What kind of report is it?: Feature Request
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ole Schwiegert univentionstaff 2019-06-21 08:33:05 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.
Comment 1 Ole Schwiegert univentionstaff 2019-06-21 09:40:22 CEST
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__
Comment 2 Jürn Brodersen univentionstaff 2019-07-02 17:49:30 CEST
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
Comment 3 Ole Schwiegert univentionstaff 2019-07-03 07:57:16 CEST
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.
Comment 4 Jürn Brodersen univentionstaff 2019-07-09 11:10:36 CEST
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.
Comment 5 Jürn Brodersen univentionstaff 2019-07-26 14:00:59 CEST
4.4 v3 released