Bug 49902 - Better error message for duplicate exam names
Better error message for duplicate exam names
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-errata
Assigned To: Daniel Tröder
Sönke Schwardt-Krummrich
:
Depends on: 49637
Blocks:
  Show dependency treegraph
 
Reported: 2019-07-22 16:39 CEST by Jürn Brodersen
Modified: 2019-11-14 17:57 CET (History)
3 users (show)

See Also:
What kind of report is it?: Development Internal
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 Jürn Brodersen univentionstaff 2019-07-22 16:39:12 CEST
Better error message for duplicate exam names

In case a teacher is trying to save an exam with a name that is already used for another planed exam a traceback is thrown.

Note:
The actual planning feature is not yet released (2019-07-22)


'''
Interner Server-Fehler in "schoolexam/exam/add".
Request: schoolexam/exam/add

Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.7/univention/management/console/base.py", line 260, in execute
    function.__func__(self, request, *args, **kwargs)
  File "/usr/lib/pymodules/python2.7/univention/management/console/modules/decorators.py", line 192, in _response
    return function(self, request)
  File "/usr/lib/pymodules/python2.7/univention/management/console/modules/decorators.py", line 636, in _decorated
    return function(self, request, *args, **kwargs)
  File "/usr/lib/pymodules/python2.7/ucsschool/lib/schoolldap.py", line 145, in wrapper_func
    return func(*args, **kwargs)
  File "/usr/lib/pymodules/python2.7/univention/management/console/modules/schoolexam/__init__.py", line 262, in add
    self._save_exam(request)
  File "/usr/lib/pymodules/python2.7/ucsschool/lib/schoolldap.py", line 145, in wrapper_func
    return func(*args, **kwargs)
  File "/usr/lib/pymodules/python2.7/univention/management/console/modules/schoolexam/__init__.py", line 201, in _save_exam
    raise UMC_Error(_('An exam with the name "%s" already exists. Please choose a different name for the exam.') % new_values['directory'])
KeyError: 'directory'
'''
Comment 1 Daniel Tröder univentionstaff 2019-09-16 16:12:19 CEST
[4.4] bfe1fcc54 Bug #49902: fix KeyError
[4.4] 1f4a8d7b5 Bug #49902: advisory

ucs-school-umc-exam (9.0.1-16)
Comment 2 Sönke Schwardt-Krummrich univentionstaff 2019-09-19 17:24:17 CEST
OK: code change
OK: installation
OK: update
??: ucs-test
OK: changelog entry
~OK: advisory
OK: functional change
OK: package built and installable
Comment 3 Sönke Schwardt-Krummrich univentionstaff 2019-11-14 17:57:10 CET
UCS@school 4.4 v4 has been released.

https://docs.software-univention.de/changelog-ucsschool-4.4v4-de.html

If this error occurs again, please clone this bug.