Bug 41568 - Make it possible to start exam for student not underneath of any OU
Make it possible to start exam for student not underneath of any OU
Status: CLOSED FIXED
Product: UCS@school
Classification: Unclassified
Component: UMC - Exam mode
UCS@school 4.1 R2
Other Linux
: P5 normal (vote)
: UCS@school 4.1 R2 vXXX
Assigned To: Florian Best
Daniel Tröder
: interim-3
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2016-06-14 15:24 CEST by Florian Best
Modified: 2016-12-12 13:10 CET (History)
1 user (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 5: Major Usability: Impairs usability in key scenarios
Who will be affected by this bug?: 2: Will only affect a few installed domains
How will those affected feel about the bug?: 2: A Pain – users won’t like this once they notice it
User Pain: 0.114
Enterprise Customer affected?:
School Customer affected?: Yes
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 Florian Best univentionstaff 2016-06-14 15:24:33 CEST
I started a exam with the student uid=test4,cn=users,dc=school,dc=local - which is not underneath of any OU.

Die Ausführung des Kommandos schoolexam-master/create-exam-user ist fehlgeschlagen:

Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.7/univention/management/console/base.py", line 283, in execute
    function(self, request)
  File "/usr/lib/pymodules/python2.7/univention/management/console/modules/decorators.py", line 190, in _response
    return function(self, request)
  File "/usr/lib/pymodules/python2.7/ucsschool/lib/schoolldap.py", line 140, in wrapper_func
    return func(*args, **kwargs)
  File "/usr/lib/pymodules/python2.7/univention/management/console/modules/schoolexam-master/__init__.py", line 152, in create_exam_user
    exam_user_dn = "uid=%s,%s" % (exam_user_uid, self.examUserContainerDN(ldap_admin_write, ldap_position, user.school))
  File "/usr/lib/pymodules/python2.7/univention/management/console/modules/schoolexam-master/__init__.py", line 109, in examUserContainerDN
    ldap_admin_write.searchDn('(objectClass=organizationalRole)', examUsers, scope='base')
  File "/usr/lib/pymodules/python2.7/univention/admin/uldap.py", line 381, in searchDn
    raise univention.admin.uexceptions.ldapError(_err2str(msg), original_exception=msg)
ldapError: Invalid DN syntax: invalid DN
Comment 1 Florian Best univentionstaff 2016-09-15 13:25:58 CEST
The problem here is that school is None which results in a LDAP DN of "cn=examusers,None".
Comment 2 Florian Best univentionstaff 2016-11-10 19:53:06 CET
The exam user is created in the school where the exam is written if she doesn't lie in any OU.

ucs-school-umc-exam.yaml:
r74318 | YAML Bug #41568 Bug #41562

ucs-school-umc-exam (6.0.7-7):
r74316 | Bug #41568: Make it possible to start exam for student not underneath of any OU
Comment 3 Daniel Tröder univentionstaff 2016-11-25 16:42:20 CET
OK: code change

OK: manual test:
# univention-ldapsearch -xLLL 'uid=*stud' dn
dn: uid=stud,cn=users,dc=uni,dc=dtr
dn: uid=exam-stud,cn=examusers,ou=SchuleEinz,dc=uni,dc=dtr

OK: automated tests: r74745: added Students created directly under cn=users,$ldap_base to
 - 101_exam_mode
 - 101_exam_mode_group_members
 - 101_exam_mode_settings

OK: advisory
Comment 4 Sönke Schwardt-Krummrich univentionstaff 2016-12-12 13:10:26 CET
UCS@school 4.1 R2 v9 has been released.

http://docs.software-univention.de/changelog-ucsschool-4.1R2v9-de.html