From 1615470a8fc59cfdc3e9d3b4657cb3c424499541 Mon Sep 17 00:00:00 2001 From: Paolo Date: Tue, 21 Mar 2017 18:29:25 +0100 Subject: [PATCH 1/8] Third version of the VileSci interface that allows easily to add more prestudent to a group or change their stufe --- application/controllers/system/Users.php | 51 +++++++- application/core/DB_Model.php | 1 + application/views/system/users.php | 146 ++++++++++++++++++++--- 3 files changed, 178 insertions(+), 20 deletions(-) diff --git a/application/controllers/system/Users.php b/application/controllers/system/Users.php index 05744edb7..aeef474ff 100644 --- a/application/controllers/system/Users.php +++ b/application/controllers/system/Users.php @@ -36,6 +36,41 @@ class Users extends VileSci_Controller $users = $returnUsers->retval; } + // Gruppen + $this->load->model('organisation/Gruppe_model', 'GruppeModel'); + $this->GruppeModel->addOrder('beschreibung'); + $gruppen = $this->GruppeModel->loadWhere(array('aktiv' => true, 'aufnahmegruppe' => true)); + if (hasData($gruppen)) + { + // Adding an empty element at the beginning + $emptyElement = new stdClass(); + $emptyElement->gruppe_kurzbz = '-1'; + $emptyElement->beschreibung = 'Select a group...'; + array_unshift($gruppen->retval, $emptyElement); + } + else + { + show_error($gruppen->retval); + } + + // Stufe + $this->load->model('crm/Reihungstest_model', 'ReihungstestModel'); + $this->ReihungstestModel->addSelect('DISTINCT ON(stufe) stufe, stufe AS beschreibung'); + $this->ReihungstestModel->addOrder('stufe'); + $stufen = $this->ReihungstestModel->loadWhere('stufe IS NOT NULL'); + if (hasData($stufen)) + { + // Adding an empty element at the beginning + $emptyElement = new stdClass(); + $emptyElement->stufe = '-1'; + $emptyElement->beschreibung = 'Select a stufe...'; + array_unshift($stufen->retval, $emptyElement); + } + else + { + show_error($stufen->retval); + } + if ($returnUsers == null || isSuccess($returnUsers)) { $viewData = array( @@ -44,7 +79,9 @@ class Users extends VileSci_Controller 'gruppe' => $gruppe, 'reihungstest' => $reihungstest, 'stufe' => $stufe, - 'users' => $users + 'users' => $users, + 'gruppen' => $gruppen->retval, + 'stufen' => $stufen->retval ); $this->load->view('system/users', $viewData); @@ -67,11 +104,12 @@ class Users extends VileSci_Controller if (isSuccess($result)) { - echo "Tutto ok!"; + $href = str_replace("/system/Users/linkToStufe", "/system/Users", $_SERVER["REQUEST_URI"]); + echo "
Data correctly saved - Back
"; } else { - echo "Kaputt!"; + echo "
Error occurred while saving data, please contact the administrator.
"; } } @@ -87,11 +125,12 @@ class Users extends VileSci_Controller if (isSuccess($result)) { - echo "Tutto ok!"; + $href = str_replace("/system/Users/linkToAufnahmegruppe", "/system/Users", $_SERVER["REQUEST_URI"]); + echo "
Data correctly saved - Back
"; } else { - echo "Kaputt!"; + echo "
Error occurred while saving data, please contact the administrator.
"; } } @@ -112,7 +151,9 @@ class Users extends VileSci_Controller sg.bezeichnung, sg.orgform_kurzbz, sgt.bezeichnung AS typ, + s.bezeichnung AS studienplan, ps.rt_stufe, + aufnahmegruppe_kurzbz, rtp.punkte' ); diff --git a/application/core/DB_Model.php b/application/core/DB_Model.php index db6e11408..f34d6fe1c 100644 --- a/application/core/DB_Model.php +++ b/application/core/DB_Model.php @@ -653,6 +653,7 @@ class DB_Model extends FHC_Model { if (($isEntitled = $this->isEntitled($this->dbTable, $permission, FHC_NORIGHT, FHC_MODEL_ERROR)) !== true) { + // TODO: resetQuery return $isEntitled; } } diff --git a/application/views/system/users.php b/application/views/system/users.php index 459976a83..c68c58451 100644 --- a/application/views/system/users.php +++ b/application/views/system/users.php @@ -19,13 +19,49 @@
-
- Stufe: -
-
- Gruppe: -
- + +
+
+
+ + +
+ Assign to:
+ + +
+

@@ -33,20 +69,100 @@ + + + + + + + + + + + + + + + + + + + + + prestudent_id . '"> - '; - echo $user->prestudent_id . ' - '; - echo $user->vorname . ' - '; + + echo ""; + + echo ""; + + echo ""; + + echo ""; + + echo ""; + + echo ""; + + echo ""; + + echo ""; + + echo ""; + + echo ""; + + echo ""; + + echo ""; + + echo ""; + + echo ""; + + echo ""; + + echo ""; } + ?> + +
 Prestudent IDPerson IDVornameNachnameGeschlechtStudiengangOrgFormStudienplanGeburtsdatumEmailStufeGruppePunkte
"; + echo ''; + echo ""; + echo $user->prestudent_id; + echo ""; + echo $user->person_id; + echo ""; + echo $user->vorname; + echo ""; echo $user->nachname; - echo '
'; + echo "
"; + echo $user->geschlecht; + echo ""; + echo $user->kurzbzlang; + echo ""; + echo $user->orgform_kurzbz; + echo ""; + echo $user->studienplan; + echo ""; + echo $user->gebdatum; + echo ""; + echo $user->email; + echo ""; + echo $user->rt_stufe; + echo ""; + echo $user->aufnahmegruppe_kurzbz; + echo ""; + echo $user->punkte; + echo "
+ @@ -62,7 +178,7 @@ $(document).ready(function() { if ($("#linkToStufe")) { - $("#linkToStufe").click(function() { + $("#linkToStufe").change(function() { if ($("#linkUsersForm")) { $("#linkUsersForm").attr("action", ""); @@ -73,7 +189,7 @@ if ($("#linkToGruppe")) { - $("#linkToGruppe").click(function() { + $("#linkToGruppe").change(function() { if ($("#linkUsersForm")) { $("#linkUsersForm").attr("action", ""); From 6977f9c09df9f193aaccb6a539ee594a9d719c84 Mon Sep 17 00:00:00 2001 From: Paolo Date: Wed, 22 Mar 2017 10:11:11 +0100 Subject: [PATCH 2/8] Fourth VileSci interface that allows easily to add more prestudent to a group or change their stufe --- application/views/system/users.php | 18 +++++++++++++----- application/views/widgets/usersfilters.php | 6 ------ 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/application/views/system/users.php b/application/views/system/users.php index c68c58451..701787e57 100644 --- a/application/views/system/users.php +++ b/application/views/system/users.php @@ -29,8 +29,10 @@ { ?>
- Assign to:
- - +
+
+ +     +
"); @@ -189,7 +197,7 @@ if ($("#linkToGruppe")) { - $("#linkToGruppe").change(function() { + $("#linkToGruppe").click(function() { if ($("#linkUsersForm")) { $("#linkUsersForm").attr("action", ""); diff --git a/application/views/widgets/usersfilters.php b/application/views/widgets/usersfilters.php index 0a7553f8b..edc85b224 100644 --- a/application/views/widgets/usersfilters.php +++ b/application/views/widgets/usersfilters.php @@ -35,7 +35,6 @@ - AND - -> -
- AND -
- AND
- - - Variables:
- + + + + + + + + + +
+ Message:
+ +
  + - +
+ Variables:
+ +
- - - - - +
-
-
- -            - templatelib->widget("Vorlage_widget", array("title" => "Vorlage")); ?> -
-
+ + + + + + +
+ templatelib->widget("Vorlage_widget", array("title" => "Vorlage")); ?> + +   + + +
+ +
0) { ?> -
-
- Recipients:
- - Refresh -
+
+ Preview:
- -
-
- -
+
+ + + + + + + + + + +
+ Recipient: + +   + Refresh +
+   +
+ +
Date: Wed, 22 Mar 2017 13:21:36 +0100 Subject: [PATCH 4/8] =?UTF-8?q?Wenn=20Benotung=20deaktiviert=20ist,=20dann?= =?UTF-8?q?=20wird=20der=20Gesamtnote=20Men=C3=BCpunkt=20im=20CIS=20deakti?= =?UTF-8?q?viert?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/tw/cis_menu_lv.inc.php | 30 ++++++++++++++++++++++-------- locale/de-AT/lehre.php | 1 + locale/en-US/lehre.php | 2 +- 3 files changed, 24 insertions(+), 9 deletions(-) diff --git a/include/tw/cis_menu_lv.inc.php b/include/tw/cis_menu_lv.inc.php index ee516d123..f35b51824 100644 --- a/include/tw/cis_menu_lv.inc.php +++ b/include/tw/cis_menu_lv.inc.php @@ -457,14 +457,28 @@ function checkZeilenUmbruch() //Gesamtnote if($is_lector && ((!defined('CIS_LEHRVERANSTALTUNG_GESAMTNOTE_ANZEIGEN') || CIS_LEHRVERANSTALTUNG_GESAMTNOTE_ANZEIGEN) && $angemeldet)) { - $menu[]=array - ( - 'id'=>'core_menu_gesamtnote', - 'position'=>'80', - 'name'=>$p->t('lehre/gesamtnote'), - 'icon'=>'../../../skin/images/button_endnote.png', - 'link'=>'benotungstool/lvgesamtnoteverwalten.php?lvid='.urlencode($lvid).'&stsem='.urlencode($angezeigtes_stsem) - ); + if($lv_obj->benotung) + { + $menu[]=array + ( + 'id'=>'core_menu_gesamtnote', + 'position'=>'80', + 'name'=>$p->t('lehre/gesamtnote'), + 'icon'=>'../../../skin/images/button_endnote.png', + 'link'=>'benotungstool/lvgesamtnoteverwalten.php?lvid='.urlencode($lvid).'&stsem='.urlencode($angezeigtes_stsem) + ); + } + else + { + $menu[]=array + ( + 'id'=>'core_menu_gesamtnote', + 'position'=>'80', + 'name'=>$p->t('lehre/gesamtnote'), + 'icon'=>'../../../skin/images/button_endnote.png', + 'text'=>$p->t('lehre/noteneingabedeaktiviert') + ); + } } // Studentenupload diff --git a/locale/de-AT/lehre.php b/locale/de-AT/lehre.php index 69a144ca5..4304da9d8 100755 --- a/locale/de-AT/lehre.php +++ b/locale/de-AT/lehre.php @@ -44,4 +44,5 @@ $this->phrasen['lehre/nichtzugeteilt']='Sie sind nicht zu dieser Lehrveranstaltu $this->phrasen['lehre/studienordnung']='Studienordnung'; $this->phrasen['lehre/studienplan']='Studienplan'; +$this->phrasen['lehre/noteneingabedeaktiviert']='Noteneingabe deaktiviert'; ?> diff --git a/locale/en-US/lehre.php b/locale/en-US/lehre.php index 94d66c67c..c3d0b5613 100755 --- a/locale/en-US/lehre.php +++ b/locale/en-US/lehre.php @@ -34,5 +34,5 @@ $this->phrasen['lehre/mail']='E-Mail to students'; $this->phrasen['lehre/keinMailverteiler']='There is no e-mail distribution list for the group(s) %s! The students in these groups will not receive an e-mail.'; $this->phrasen['lehre/pinboard']='Pinboard'; - +$this->phrasen['lehre/noteneingabedeaktiviert']='Grades deactivated'; ?> From 2fc38f7eb004ca34b34f1c60ca9100e812a94984 Mon Sep 17 00:00:00 2001 From: oesi Date: Wed, 22 Mar 2017 13:25:19 +0100 Subject: [PATCH 5/8] =?UTF-8?q?=C3=9Cbersetzung=20aktualisiert?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- locale/en-US/lehre.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/locale/en-US/lehre.php b/locale/en-US/lehre.php index c3d0b5613..b597fa582 100755 --- a/locale/en-US/lehre.php +++ b/locale/en-US/lehre.php @@ -34,5 +34,5 @@ $this->phrasen['lehre/mail']='E-Mail to students'; $this->phrasen['lehre/keinMailverteiler']='There is no e-mail distribution list for the group(s) %s! The students in these groups will not receive an e-mail.'; $this->phrasen['lehre/pinboard']='Pinboard'; -$this->phrasen['lehre/noteneingabedeaktiviert']='Grades deactivated'; +$this->phrasen['lehre/noteneingabedeaktiviert']='Grading disabled'; ?> From 9f9477e5438f9c433440d6cc55c6b83aebb4845c Mon Sep 17 00:00:00 2001 From: oesi Date: Wed, 22 Mar 2017 13:43:34 +0100 Subject: [PATCH 6/8] =?UTF-8?q?Minimale=20Treeh=C3=B6he=20bei=20Abschlussp?= =?UTF-8?q?r=C3=BCfungen=20gesetzt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- content/student/studentabschlusspruefungoverlay.xul.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/student/studentabschlusspruefungoverlay.xul.php b/content/student/studentabschlusspruefungoverlay.xul.php index bc4356224..9c4f18f16 100755 --- a/content/student/studentabschlusspruefungoverlay.xul.php +++ b/content/student/studentabschlusspruefungoverlay.xul.php @@ -60,7 +60,7 @@ echo ''; datasources="rdf:null" ref="http://www.technikum-wien.at/abschlusspruefung/liste" flags="dont-build-content" enableColumnDrag="true" - style="margin:0px;" + style="margin:0px;min-height:100px;" persist="hidden, height" context="student-abschlusspruefung-tree-popup" > From 70ba8cabed83634661581e5506eeb215f89cbc67 Mon Sep 17 00:00:00 2001 From: Paolo Date: Wed, 22 Mar 2017 14:16:08 +0100 Subject: [PATCH 7/8] - system/Users: better GUI - added new css and js to templates/header --- application/views/system/users.php | 148 ++++++++++++------ application/views/templates/header.php | 18 ++- application/views/widgets/usersfilters.php | 172 +++++++++++---------- 3 files changed, 204 insertions(+), 134 deletions(-) diff --git a/application/views/system/users.php b/application/views/system/users.php index 701787e57..e93177081 100644 --- a/application/views/system/users.php +++ b/application/views/system/users.php @@ -1,4 +1,4 @@ -load->view("templates/header", array("title" => "MessageReply", "jquery" => true, "tinymce" => true)); ?> +load->view("templates/header", array("title" => "Users manager", "jquery" => true, "tablesort" => true, "jquery_checkboxes" => true, "jquery_custom" => true)); ?>
@@ -17,56 +17,67 @@ ?>
- + +
+
- -
-
-
- -
- Assign to: -
-
- -     - -
-
- -     - -
+ + + + + + + + + + + + + + + + +
+ Assign to: +
+ +   + +
+ +   + +
@@ -78,13 +89,13 @@ if ($users != null) { ?> - +
- - - + + + @@ -205,6 +216,43 @@ } }); } + + $(".tablesorter").each(function(i, v) { + $("#"+v.id).tablesorter( + { + widgets: ["zebra"], + sortList: [[3,0],[4,0]], + headers: {0: { sorter: false}} + }); + + $("#toggle_"+v.id).on('click', function(e) { + $("#"+v.id).checkboxes('toggle'); + e.preventDefault(); + if ($("input.chkbox:checked").size() > 0) + $("#mailSendButton").html('Mail an markierte Personen senden'); + else + $("#mailSendButton").html('Mail an alle senden'); + }); + + $("#uncheck_"+v.id).on('click', function(e) { + $("#"+v.id).checkboxes('uncheck'); + e.preventDefault(); + if ($("input.chkbox:checked").size() > 0) + $("#mailSendButton").html('Mail an markierte Personen senden'); + else + $("#mailSendButton").html('Mail an alle senden'); + }); + + $("#"+v.id).checkboxes('range', true); + }); + + $('.chkbox').change(function() + { + if ($("input.chkbox:checked").size() > 0) + $("#mailSendButton").html('Mail an markierte Personen senden'); + else + $("#mailSendButton").html('Mail an alle senden'); + }); }); function studiengangSelected(value) diff --git a/application/views/templates/header.php b/application/views/templates/header.php index 8aa4ea8dd..97d280585 100644 --- a/application/views/templates/header.php +++ b/application/views/templates/header.php @@ -1,8 +1,10 @@ @@ -25,9 +27,19 @@ if ($tablesort) + + + + + + + + + +
 Prestudent IDPerson IDVornamePrestudent IDPerson IDVorname Nachname Geschlecht Studiengang