Bug 49859 - Add UMC call to delete exams
Add UMC call to delete exams
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: 49861
  Show dependency treegraph
 
Reported: 2019-07-17 09:21 CEST by Ole Schwiegert
Modified: 2019-07-26 14:03 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
Proposed patch (2.78 KB, patch)
2019-07-23 17:39 CEST, Jürn Brodersen
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ole Schwiegert univentionstaff 2019-07-17 09:21:35 CEST
The UMC module needs a call to delete exams.

The command should contain an array 'exams' containing all exam names that are to be deleted.

Only unstarted exams can be deleted
Domain and school admins can delete all (unstarted) exams
Teachers can only delete their own unstarted exams
Comment 1 Ole Schwiegert univentionstaff 2019-07-17 09:57:14 CEST
Implemented on fb/4.4/49861 (including changelog&advisory)
Comment 2 Jürn Brodersen univentionstaff 2019-07-23 17:38:42 CEST
Two small things:
It looks like you left a few unnecessary decorators? See the attached patch :)

"Domain Admins" is hardcoded, that might break in Ad connector environments. The patch uses the method used by "60univention-ldap-server_acl-slave". To be honest I'm not sure if the ucr variable "groups/default/domainadmins" would be set on slave in that scenario, but afaik that's the only way.

Otherwise it looks good :)
Comment 3 Jürn Brodersen univentionstaff 2019-07-23 17:39:00 CEST
Created attachment 10131 [details]
Proposed patch
Comment 4 Ole Schwiegert univentionstaff 2019-07-24 08:51:12 CEST
Aye you are right. I applied the patch

Package: ucs-school-umc-exam
Version: 9.0.1-13A~4.4.0.201907240848
Branch: ucs_4.4-0
Scope: ucs-school-4.4
Comment 5 Jürn Brodersen univentionstaff 2019-07-24 12:01:54 CEST
What I tested:
Deletion without saml -> OK
Deletion with saml -> OK
Deletion as Administrator -> OK
Running exams can't be deleted -> OK
Teacher can only delete own exams -> OK
YAML -> OK
Comment 6 Jürn Brodersen univentionstaff 2019-07-26 14:03:51 CEST
4.4 v3 released