mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-25 08:34:29 +00:00
Anwesenheiten im FAS bei Studenten und Lehrveranstaltungen sichtbar
This commit is contained in:
@@ -0,0 +1,56 @@
|
||||
<?php
|
||||
/* Copyright (C) 2015 fhcomplete.org
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* Authors: Andreas Oesterreicher <[email protected]>
|
||||
*/
|
||||
require_once('../config/vilesci.config.inc.php');
|
||||
?>
|
||||
// ********** FUNKTIONEN ********** //
|
||||
var anwesenheitStudentUID='';
|
||||
|
||||
// ****
|
||||
// * Laedt die Trees
|
||||
// ****
|
||||
function loadanwesenheit(student_uid,lehrveranstaltung_id)
|
||||
{
|
||||
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
|
||||
anwesenheitStudentUID=student_uid;
|
||||
|
||||
//anwesenheit laden
|
||||
url = "<?php echo APP_ROOT; ?>rdf/anwesenheit.rdf.php?ts="+gettimestamp();
|
||||
|
||||
if(student_uid!='')
|
||||
url=url+"&student_uid="+student_uid;
|
||||
if(lehrveranstaltung_id!='')
|
||||
url=url+"&lehrveranstaltung_id="+lehrveranstaltung_id;
|
||||
|
||||
var treeanwesenheit=document.getElementById('anwesenheit-tree');
|
||||
|
||||
//Alte DS entfernen
|
||||
var oldDatasources = treeanwesenheit.database.GetDataSources();
|
||||
while(oldDatasources.hasMoreElements())
|
||||
{
|
||||
treeanwesenheit.database.RemoveDataSource(oldDatasources.getNext());
|
||||
}
|
||||
|
||||
var rdfService = Components.classes["@mozilla.org/rdf/rdf-service;1"].getService(Components.interfaces.nsIRDFService);
|
||||
var TerminTreeDatasource = rdfService.GetDataSource(url);
|
||||
TerminTreeDatasource.QueryInterface(Components.interfaces.nsIRDFRemoteDataSource);
|
||||
treeanwesenheit.database.AddDataSource(TerminTreeDatasource);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,107 @@
|
||||
<?php
|
||||
/* Copyright (C) 2015 fhcomplete.org
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* Authors: Andreas Oesterreicher <[email protected]>
|
||||
*/
|
||||
header("Cache-Control: no-cache");
|
||||
header("Cache-Control: post-check=0, pre-check=0",false);
|
||||
header("Expires Mon, 26 Jul 1997 05:00:00 GMT");
|
||||
header("Pragma: no-cache");
|
||||
header("Content-type: application/vnd.mozilla.xul+xml");
|
||||
|
||||
require_once('../config/vilesci.config.inc.php');
|
||||
|
||||
echo '<?xml version="1.0" encoding="UTF-8"?>'."\n";
|
||||
|
||||
echo '<?xml-stylesheet href="'.APP_ROOT.'skin/tempus.css" type="text/css"?>';
|
||||
echo '<?xml-stylesheet href="'.APP_ROOT.'content/bindings.css" type="text/css"?>';
|
||||
|
||||
$student_uid = filter_input(INPUT_GET,'student_uid');
|
||||
$lehrveranstaltung_id= filter_input(INPUT_GET,'lehrveranstaltung_id');
|
||||
|
||||
?>
|
||||
|
||||
<window id="anwesenheit-window" title="anwesenheit"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
onload="loadanwesenheit('<?php echo $student_uid;?>','<?php echo $lehrveranstaltung_id;?>');">
|
||||
|
||||
<script type="application/x-javascript" src="<?php echo APP_ROOT; ?>content/anwesenheit.js.php" />
|
||||
<script type="application/x-javascript" src="<?php echo APP_ROOT; ?>content/functions.js.php" />
|
||||
<script type="application/x-javascript" src="<?php echo APP_ROOT; ?>content/phpRequest.js.php" />
|
||||
<vbox flex="1">
|
||||
<groupbox id="anwesenheit-groupbox-anwesenheit" flex="1">
|
||||
<caption label="Anwesenheit" />
|
||||
<hbox flex="1">
|
||||
<tree id="anwesenheit-tree" seltype="single" hidecolumnpicker="false" flex="1"
|
||||
datasources="rdf:null"
|
||||
ref="http://www.technikum-wien.at/anwesenheit"
|
||||
persist="hidden, height"
|
||||
>
|
||||
<treecols>
|
||||
<treecol id="anwesenheit-treecol-lehrveranstaltung" label="Lehrveranstaltung" flex="1" hidden="<?php echo ($lehrveranstaltung_id==''?'false':'true');?>"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/anwesenheit/rdf#lehrveranstaltung_bezeichnung" onclick="anwesenheitTreeSort()"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="anwesenheit-treecol-nachname" label="Nachname" flex="1" hidden="<?php echo ($lehrveranstaltung_id==''?'true':'false');?>"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/anwesenheit/rdf#nachname" onclick="anwesenheitTreeSort()"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="anwesenheit-treecol-vorname" label="Vorname" flex="1" hidden="<?php echo ($lehrveranstaltung_id==''?'true':'false');?>"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/anwesenheit/rdf#vorname" onclick="anwesenheitTreeSort()"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="anwesenheit-treecol-prozent" label="Anwesenheit in Prozent" flex="1" hidden="false"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/anwesenheit/rdf#prozent" onclick="anwesenheitTreeSort()"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="anwesenheit-treecol-anwesend" label="Anwesend" flex="1" hidden="true"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/anwesenheit/rdf#anwesend" onclick="anwesenheitTreeSort()"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="anwesenheit-treecol-nichtanwesend" label="Nicht anwesend" flex="1" hidden="true"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/anwesenheit/rdf#nichtanwesend" onclick="anwesenheitTreeSort()"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="anwesenheit-treecol-uid" label="UID" flex="1" hidden="true"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/anwesenheit/rdf#uid" onclick="anwesenheitTreeSort()"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
</treecols>
|
||||
|
||||
<template>
|
||||
<rule>
|
||||
<treechildren>
|
||||
<treeitem uri="rdf:*">
|
||||
<treerow properties="rdf:http://www.technikum-wien.at/anwesenheit/rdf#ampel">
|
||||
<treecell label="rdf:http://www.technikum-wien.at/anwesenheit/rdf#lehrveranstaltung_bezeichnung" />
|
||||
<treecell label="rdf:http://www.technikum-wien.at/anwesenheit/rdf#nachname" />
|
||||
<treecell label="rdf:http://www.technikum-wien.at/anwesenheit/rdf#vorname" />
|
||||
<treecell label="rdf:http://www.technikum-wien.at/anwesenheit/rdf#prozent" />
|
||||
<treecell label="rdf:http://www.technikum-wien.at/anwesenheit/rdf#anwesend" />
|
||||
<treecell label="rdf:http://www.technikum-wien.at/anwesenheit/rdf#nichtanwesend" />
|
||||
<treecell label="rdf:http://www.technikum-wien.at/anwesenheit/rdf#uid" />
|
||||
</treerow>
|
||||
</treeitem>
|
||||
</treechildren>
|
||||
</rule>
|
||||
</template>
|
||||
</tree>
|
||||
</hbox>
|
||||
</groupbox>
|
||||
|
||||
</vbox>
|
||||
</window>
|
||||
@@ -765,6 +765,12 @@ function LeAuswahl()
|
||||
document.getElementById('lehrveranstaltung-termine').setAttribute('src','termine.xul.php?lehrveranstaltung_id='+lehrveranstaltung_id);
|
||||
}
|
||||
|
||||
if(document.getElementById('lehrveranstaltung-tabs').selectedItem==document.getElementById('lehrveranstaltung-tab-anwesenheit'))
|
||||
{
|
||||
// Anwesenheit Laden
|
||||
document.getElementById('lehrveranstaltung-anwesenheit').setAttribute('src','anwesenheit.xul.php?lehrveranstaltung_id='+lehrveranstaltung_id);
|
||||
}
|
||||
|
||||
LeDetailDisableFields(true);
|
||||
//Details zuruecksetzen
|
||||
LeDetailReset();
|
||||
@@ -2365,3 +2371,25 @@ function LehrveranstaltungTermineIFrameLoad()
|
||||
catch(e)
|
||||
{}
|
||||
}
|
||||
|
||||
/**
|
||||
* Laedt die Anwesenheiten einer Lehrveranstaltung wenn auf den Tab gewechselt wird
|
||||
*/
|
||||
function LehrveranstaltungTermineIFrameLoad()
|
||||
{
|
||||
var tree = document.getElementById('lehrveranstaltung-tree');
|
||||
|
||||
if (tree.currentIndex==-1)
|
||||
return;
|
||||
try
|
||||
{
|
||||
//Ausgewaehlte LV holen
|
||||
var col = tree.columns ? tree.columns["lehrveranstaltung-treecol-lehrveranstaltung_id"] : "lehrveranstaltung-treecol-lehrveranstaltung_id";
|
||||
var lehrveranstaltung_id=tree.view.getCellText(tree.currentIndex,col);
|
||||
|
||||
if(lehrveranstaltung_id!='')
|
||||
document.getElementById('lehrveranstaltung-anwesenheit').setAttribute('src','anwesenheit.xul.php?lehrveranstaltung_id='+lehrveranstaltung_id);
|
||||
}
|
||||
catch(e)
|
||||
{}
|
||||
}
|
||||
|
||||
@@ -27,6 +27,12 @@ header("Pragma: no-cache");
|
||||
header("Content-type: application/vnd.mozilla.xul+xml");
|
||||
|
||||
require_once('../../config/vilesci.config.inc.php');
|
||||
require_once('../../include/functions.inc.php');
|
||||
require_once('../../include/benutzerberechtigung.class.php');
|
||||
|
||||
$user = get_uid();
|
||||
$rechte = new benutzerberechtigung();
|
||||
$rechte->getBerechtigungen($user);
|
||||
|
||||
echo '<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>';
|
||||
|
||||
@@ -249,6 +255,11 @@ echo '<?xul-overlay href="'.APP_ROOT.'content/lvplanung/lehrveranstaltungnotenov
|
||||
<tab id="lehrveranstaltung-tab-notizen" label="Notizen" />
|
||||
<tab id="lehrveranstaltung-tab-lvangebot" label="LV-Angebot" />
|
||||
<tab id="lehrveranstaltung-tab-termine" label="Termine" onclick="LehrveranstaltungTermineIFrameLoad()"/>
|
||||
<?php
|
||||
if($rechte->isBerechtigt('student/anwesenheit'))
|
||||
echo '<tab id="lehrveranstaltung-tab-anwesenheit" label="Anwesenheit" onclick="LehrveranstaltungAnwesenheitIFrameLoad();"/>';
|
||||
?>
|
||||
|
||||
</tabs>
|
||||
<tabpanels id="lehrveranstaltung-tabpanels-main" flex="1">
|
||||
<vbox id="lehrveranstaltung-detail" />
|
||||
@@ -259,6 +270,10 @@ echo '<?xul-overlay href="'.APP_ROOT.'content/lvplanung/lehrveranstaltungnotenov
|
||||
</vbox>
|
||||
<vbox id="lehrveranstaltung-lvangebot" />
|
||||
<iframe id="lehrveranstaltung-termine" src="" style="margin-top:10px;" />
|
||||
<?php
|
||||
if($rechte->isBerechtigt('student/anwesenheit'))
|
||||
echo '<iframe id="lehrveranstaltung-anwesenheit" src="" style="margin-top:10px;" />';
|
||||
?>
|
||||
</tabpanels>
|
||||
</tabbox>
|
||||
</vbox>
|
||||
|
||||
@@ -370,6 +370,11 @@ else
|
||||
<tab id="student-tab-funktionen" label="Funktionen" onclick="StudentFunktionIFrameLoad();"/>
|
||||
<tab id="student-tab-notizen" label="Notizen"/>
|
||||
<tab id="student-tab-termine" label="Termine" onclick="StudentTermineIFrameLoad();"/>
|
||||
<?php
|
||||
if($rechte->isBerechtigt('student/anwesenheit'))
|
||||
echo '<tab id="student-tab-anwesenheit" label="Anwesenheit" onclick="StudentAnwesenheitIFrameLoad();"/>';
|
||||
?>
|
||||
|
||||
</tabs>
|
||||
<tabpanels id="student-tabpanels-main" flex="1">
|
||||
<vbox id="student-detail" style="margin-top:10px;" />
|
||||
@@ -394,6 +399,11 @@ else
|
||||
<box class="Notiz" flex="1" id="student-box-notizen"/>
|
||||
</vbox>
|
||||
<iframe id="student-termine" src="" style="margin-top:10px;" />
|
||||
<?php
|
||||
if($rechte->isBerechtigt('student/anwesenheit'))
|
||||
echo '<iframe id="student-anwesenheit" src="" style="margin-top:10px;" />';
|
||||
?>
|
||||
|
||||
</tabpanels>
|
||||
</tabbox>
|
||||
</vbox>
|
||||
|
||||
@@ -1532,6 +1532,12 @@ function StudentAuswahl()
|
||||
document.getElementById('student-termine').setAttribute('src','termine.xul.php?student_uid='+uid);
|
||||
}
|
||||
|
||||
// ***** Anwesenheit *****
|
||||
if(document.getElementById('student-content-tabs').selectedItem==document.getElementById('student-tab-anwesenheit'))
|
||||
{
|
||||
document.getElementById('student-anwesenheit').setAttribute('src','anwesenheit.xul.php?student_uid='+uid);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Notizen laden
|
||||
@@ -5309,6 +5315,19 @@ function StudentTermineIFrameLoad()
|
||||
}
|
||||
}
|
||||
|
||||
// ****
|
||||
// * Laedt den Anwesenheit IFrame
|
||||
// ****
|
||||
function StudentAnwesenheitIFrameLoad()
|
||||
{
|
||||
uid = document.getElementById('student-detail-textbox-uid').value;
|
||||
if(uid!='')
|
||||
{
|
||||
url = 'anwesenheit.xul.php?student_uid='+uid+'&ts='+gettimestamp();
|
||||
document.getElementById('student-anwesenheit').setAttribute('src',url);
|
||||
}
|
||||
}
|
||||
|
||||
// ****
|
||||
// * Funktionen IFrame ins leere zeigen lassen
|
||||
// ****
|
||||
|
||||
Reference in New Issue
Block a user