Univention Bugzilla – Bug 48511
Apple School Manager Connector breaks off completely if a class group has more than 12 teachers assigned
Last modified: 2023-08-11 18:21:22 CEST
Unfortunately the Apple School Manager Connector breaks off completely if a class group has more than 12 teachers assigned to it. Is this a limitation of apple? It would be nice if the connector would only assign the first 12 teachers found to the class and then still run. Traceback (most recent call last): File "/usr/sbin/asm-upload", line 98, in <module> main() File "/usr/sbin/asm-upload", line 89, in main zip_path = asmUpload.upload() File "/usr/lib/pymodules/python2.7/univention/asm/asm_upload.py", line 60, in upload zip_path = AsmZipFile(file_path, self.ou_whitelist).write_zip() File "/usr/lib/pymodules/python2.7/univention/asm/csv/zip_file.py", line 99, in write_zip self.csv_files = self.create_csv_files() File "/usr/lib/pymodules/python2.7/univention/asm/csv/zip_file.py", line 76, in create_csv_files self.csv_files = create_csv_files(tmp_dir, self.ou_whitelist) File "/usr/lib/pymodules/python2.7/univention/asm/csv/csv_file.py", line 369, in create_csv_files cls(path, ou_whitelist).write_csv() File "/usr/lib/pymodules/python2.7/univention/asm/csv/csv_file.py", line 182, in write_csv for obj in objs: File "/usr/lib/pymodules/python2.7/univention/asm/csv/csv_file.py", line 158, in find_and_create_objects yield self.asm_model_class.from_dn(ucs_obj.dn) File "/usr/lib/pymodules/python2.7/univention/asm/models/classes.py", line 157, in from_dn additional_instructor_ids=additional_instructor_ids File "/usr/lib/pymodules/python2.7/univention/asm/models/classes.py", line 93, in __init__ assert len(additional_instructor_ids) < 13, 'No more than 12 additional instructors are allowed.' AssertionError: No more than 12 additional instructors are allowed.
(In reply to Christina Scheinig from comment #0) > Unfortunately the Apple School Manager Connector breaks off completely if a > class group has more than 12 teachers assigned to it. > > Is this a limitation of apple? Yes > It would be nice if the connector would only assign the first 12 teachers > found to the class and then still run. @michel: what do you think about a change to printing a warning instead of exiting with an error? If I remember correctly, the teachers are ordered alphabetically. So each export (mostly) the same users would be exported (not having changes each export).
(In reply to Daniel Tröder from comment #1) > (In reply to Christina Scheinig from comment #0) > > Unfortunately the Apple School Manager Connector breaks off completely if a > > class group has more than 12 teachers assigned to it. > > > > Is this a limitation of apple? > Yes > > > It would be nice if the connector would only assign the first 12 teachers > > found to the class and then still run. > @michel: what do you think about a change to printing a warning instead of > exiting with an error? Sure, I think that's necessary. > > If I remember correctly, the teachers are ordered alphabetically. So each > export (mostly) the same users would be exported (not having changes each > export). I think that will lead to a problem. What happens if a teacher is not synchronized into the class? For example, will the classroom app not be usable?
(In reply to Michel Smidt from comment #2) > I think that will lead to a problem. What happens if a teacher is not > synchronized into the class? For example, will the classroom app not be > usable? No idea - probably: the teacher will not be recognized as an instructor for that class. That's why it currently raises an exception: to not let this problem be unnoticed.
The customer needs a workaround, so that the connector is not blocking further progresses. They add new schools to the Connector several times a week and unfortunately there are several schools where all teachers have been put into single class groups. Since the membership of teachers in class groups is managed by the schools themselves through the UMC, they run the risk that each school could paralyze the School Manager Connector at any time.
(In reply to Christina Scheinig from comment #4) > The customer needs a workaround, so that the connector is not blocking > further progresses. So, as discussed Daniel will create a workaround which skips after 12 teachers, warns (in the log) and go on with the next school.
Created attachment 9816 [details] Synchronize only 15 teachers and print a warning. The patch makes ensures that only 15 instructors per class are synchronized and prints a warning if a class has more teachers than that.
The patch was applied to the sources and a test was extended to fail with the old version and succeed with the new code. [4.3 cc87ec5] Bug #48511: adapt to changes in ucsschool testing lib [4.3 e399424] Bug #48511: synchronize only 15 instructors per class Package: univention-apple-school-manager-connector Version: 1.0.0-21A~4.3.0.201901301212 Branch: ucs_4.3-0 Scope: univention-asm A new app version was created in the test appcenter and the packages have been uploaded (version 1.2 -> apple-school-manager_20190130121404). A UPDATE text was added for version 1.2.
What I tested: Added 16 teachers to class -> Only 15 are synchronized -> OK -> verified It felt random to me which teachers are synchronized and which aren't. But I don't think that is a problem for this particular use case (all teachers in a single class group).
(In reply to Jürn Brodersen from comment #8) > It felt random to me which teachers are synchronized and which aren't. But I > don't think that is a problem for this particular use case (all teachers in > a single class group). Yes - it kind of is: the list is sorted by 1. school name 2. teacher name. If someone needs this to be a certain subset of those teachers, he'll have to define the the selection method.
Published in 4.3/apple-school-manager=1.2 | apple-school-manager_20190130121404 4.4/apple-school-manager=2.0 | apple-school-manager_20190130121404