Univention Bugzilla – Bug 43080
show dialog to create room instead of empty room selection
Last modified: 2018-07-04 18:09:00 CEST
If there is no room yet and one opens the computeroom module one one need to select a room from an empty list. This is a first user experience. We should instead show a dialog which tells to create a room via the UMC module.
A solution has been proposed on the branch oschwieg/43080 of ucsschool. Localization and proper messages as well as a check for privileges is still missing and needs further discussion before it would be ready for a merge.
The check for privileges is now working. Proposal for dialog texts: Dialog Title: There are no computer rooms available Es sind keine Computerräume verfügbar Dialog Text(authorized): Do you want to create a computer room now or close the module? Möchten Sie jetzt einen Computerraum anlegen oder das Modul schließen? Dialog Text(not authorized): Please contact your system administrator for the creation of computer rooms. Bitte kontaktieren Sie ihren Administrator für die Erstellung von Computerräumen. Buttons: Close Module Modul schließen Administrate computer rooms Computerräume administrieren
(In reply to Ole Schwiegert from comment #3) > Proposal for dialog texts: […] > Administrate computer rooms > Computerräume administrieren "Manage computer rooms" "Computerräume verwalten" The other suggestions are ok.
Package: ucs-school-umc-computerroom Version: 10.0.1-1A~4.3.0.201804231404
I have no rooms: root@m65:~# python -c ' > import univention.admin.uldap > from ucsschool.lib.models import ComputerRoom, School > lo, po = univention.admin.uldap.getAdminConnection() > for school in School.get_all(lo): > print school.name, ComputerRoom.get_all(lo, school.name)' SchuleEins [] Nothing happens, when I open the "Room management" UMC module. root@m65:~# dpkg -l ucs-school-umc-computerroom ii ucs-school-umc-computerr 10.0.2-1A~4.3.0.2 all
This bug is concerned with the Education->computerroom module and not the school administration->room management module.
You are right. The computer room module does indeed now offer to redirect the user to the room management module, if no room exists. But the room management module does not automatically start an "Add room" dialogue, when no room exists. That was the old, and desired, behavior. It can be observed for example, when opening the "Computers (schools)" module.
(In reply to Daniel Tröder from comment #8) > But the room management module does not automatically start an "Add room" > dialogue, when no room exists. That was the old, and desired, behavior. It > can be observed for example, when opening the "Computers (schools)" module. I discussed this with Ole. He will add this feature to the room management module, too.
Instead of reimplementing this feature in the context of this bug (it is already working in the schoolwizards module), maybe we should work on Bug#35621 since resolving that automatically adds the desired feature to the room management
src: ucs-school-umc-rooms fix: 15.0.1-1A~4.3.0.201805300927 src: ucs-school-umc-computerroom fix: 10.0.2-3A~4.3.0.201805300926 The implemented behavior is now the following: If the user opens the rooms module and the list of rooms for the chosen school is empty, a dialog asking for room creation is shown. Dialog also appears if user switches school and list is also empty If a user opens the computerroom module and there are no computerrooms present there are two possibilities: 1.) The user is school admin and hence is asked if he wants to create a room or close the module 2.) The user is no school admin and is told to ask the admin for further instructions. Module is closed. Deciding to create a room in (1) opens the rooms module and automatically opens the room creation wizard as well. In the edge case that a user has access to multiple schools in the computerroom module the behavior is unchanged and he is shown the list of schools and rooms, even if there are no rooms available. (Decided in discussion with Sönke)
Wrong translation: 267 msgid "Manage computer rooms" 268 msgstr "Computerraum auswählen" -> Computerräume bearbeiten Could you add a check in the callback for the okButton if the form is valid? Currently an undefined error is thrown (only visible on the js console) in case no valid room is set. form.isValid() or just checking if "room" is not undefined should do the trick. Note: setting a non valid school opens an error dialog, see bug 47139.
src: ucs-school-umc-computerroom fix: 10.0.2-5A~4.3.0.201806060904 The forms submit button is now disabled as long as there is no valid room selected in the combobox. Translation fixed.
Sorry I missed these the last time, there are still some missing translations in the rooms (not computerrooms) module. In the dialog that pops up if no rooms exist ''' No rooms found No rooms were found. Would you like to create a room now? Create ''' Otherwise it looks good :)
No surprise since I completely forgot to add any translations to that module. Thanks! Changed Create to Add room to fit existing wording and added missing translations src: ucs-school-umc-rooms fix: 15.0.1-2A~4.3.0.201806070831
OK looks good now :) -> Verified
UCS@school 4.3 v4 has been released. https://docs.software-univention.de/changelog-ucsschool-4.3v4-de.html If this error occurs again, please clone this bug.