Univention Bugzilla – Bug 43230
"Assign classes" does not work for users from other school slave
Last modified: 2023-06-12 15:39:51 CEST
I guess this is not completely fixed. In Bug #42399 we added a human readable error message like this: """ The request did not specify any school. You have to create a school before continuing. Use the "Schools" UMC module to create one. Die Anfrage enthält keine Schule. Um Fortzufahren, muss zuerst eine "Schule erstellt werden, dazu kann das \"Schulen\"-Modul verwendet werden. """ But this doesn't solve the problem for the race condition in the frontend if there actually exists already a school. In the concrete case there is a school environment which has a lot schools which causes the request to be very slow. We need to update the javascript part of every module, too. Workaround: click away the error message and wait until all schools are loaded or deactivate the autosearch completely. +++ This bug was initially created as a clone of Bug #42399 +++
The problem is even worse. If using the assign teachers module it is impossible on a DC Slave for school-A to assign the classes of a user which is located underneath of school-B (which is another DC Slave).
Reported again, 4.1-3 errata324 (Vahr)
*** Bug 43548 has been marked as a duplicate of this bug. ***
(In reply to Christina Scheinig from comment #1) > The problem is even worse. If using the assign teachers module it is > impossible on a DC Slave for school-A to assign the classes of a user which > is located underneath of school-B (which is another DC Slave). I cannot reproduce this. I tried the following: 1. on dc master: create school "SchoolEins" with edu-slave DC1 2. on dc master: create class "1a" in SchoolEins 3. on dc master: create school "SchoolZwei" with edu-slave DC2 4. on dc master: create teacher "teacher2" in SchoolZwei 5. on dc master: add "teacher2" to SchoolEins [1] 6. on DC1: login as "Administrator" to UMC 7. in DC1-UMC: in "assigning teachers" choose class "1a" and add "teacher2", save 8. on DC1: udm groups/group list --filter cn=SchoolEins-1a → users: uid=teacher2,cn=lehrer,cn=users,ou=SchoolZwei,$LDAP_BASE [1] → python from ucsschool.lib.models import Teacher from ucsschool.importer.utils.shell import * teacher2 = Teacher.from_dn('uid=teacher2,cn=lehrer,cn=users,ou=SchoolZwei,$LDAP_BASE', 'SchoolZwei', lo) teacher2.schools.append('SchoolEins') teacher2.modify(lo)
I was also unable to reproduce this issue. If possible, please provide detailed instructions on how to trigger this problem. UCS@school 4.2 v4 has been released. http://docs.software-univention.de/changelog-ucsschool-4.2v4-de.html If this error occurs again, please clone this bug.
(In reply to Sönke Schwardt-Krummrich from comment #5) > I was also unable to reproduce this issue. If possible, please provide > detailed instructions on how to trigger this problem. > > UCS@school 4.2 v4 has been released. > > http://docs.software-univention.de/changelog-ucsschool-4.2v4-de.html > > If this error occurs again, please clone this bug. It is not easily reproducible because it is a race condition in the javascript part of nearly every module and actually is a problem then. This will block further progress on large environments with many schools or a slow LDAP server, etc. We could try to simulate it by adding a time.sleep(2) into the /schools request which then will cause that the search is triggered without the form being loaded completely. Then the request will miss a required parameter "school" which tells one a wrong error message, that no school exists yet and questions one to create one. Closing this issue is kind of ignorance as there are already 2 customers affected.
(In reply to Florian Best from comment #6) > It is not easily reproducible because it is a race condition in the > javascript part of nearly every module and actually is a problem then. This > will block further progress on large environments with many schools or a > slow LDAP server, etc. In this case it should be reproducible with a very large environment? Since it was set to worksforme, we can simply re-open it. But, until nobody is able to reproduce it in a normal way, I'll set it to NEEDMOREINFO. > We could try to simulate it by adding a time.sleep(2) into the /schools > request which then will cause that the search is triggered without the form > being loaded completely. Then the request will miss a required parameter > "school" which tells one a wrong error message, that no school exists yet > and questions one to create one. > > Closing this issue is kind of ignorance as there are already 2 customers > affected. On the other hand, we have seen a lot of issues which were solved due to other fixes and I've seen a lot of issues which were a temporary issue in the customer environment. So, that is the normal procedure and not a kind of ignorance.
(In reply to Florian Best from comment #6) > It is not easily reproducible because it is a race condition in the > javascript part of nearly every module and actually is a problem then. This > will block further progress on large environments with many schools or a > slow LDAP server, etc. > > We could try to simulate it by adding a time.sleep(2) into the /schools > request which then will cause that the search is triggered without the form > being loaded completely. Then the request will miss a required parameter > "school" which tells one a wrong error message, that no school exists yet > and questions one to create one. Could a list of required parameters be added to the JS code? Modules could add more parameter names to the list, when they have additional requirements. Before running, the search function would check if all required parameters have been filled. If not it could tell the user to "please wait until the page has finished loading".
This issue has been filled against UCS@school 4.1 (R2). The maintenance with bug and security fixes for UCS@school 4.1 (R2) has ended on 5th of April 2018. Customers still on UCS 4.1 are encouraged to update to UCS 4.3 (or later). Please contact your partner or Univention for any questions. If this issue still occurs in newer UCS versions, please use "Clone this bug" or simply reopen the issue. In this case please provide detailed information on how this issue is affecting you.