From df475ef50ab6307bc6cacfd9783814fbcc73656d Mon Sep 17 00:00:00 2001 From: Gerald Raab Date: Mon, 18 Jun 2007 15:41:02 +0000 Subject: [PATCH] --- admin/sync/fas/sync_fas_vilesci_note.php | 169 +-- include/js/tablesort/icons/01_ascending.gif | Bin 0 -> 71 bytes include/js/tablesort/icons/01_descending.gif | Bin 0 -> 71 bytes include/js/tablesort/icons/01_unsorted.gif | Bin 0 -> 63 bytes include/js/tablesort/table.css | 93 ++ include/js/tablesort/table.js | 1002 +++++++++++++++++ vilesci/stammdaten/studiengang_details.php | 2 +- vilesci/stammdaten/studiengang_uebersicht.php | 17 +- 8 files changed, 1200 insertions(+), 83 deletions(-) create mode 100644 include/js/tablesort/icons/01_ascending.gif create mode 100644 include/js/tablesort/icons/01_descending.gif create mode 100644 include/js/tablesort/icons/01_unsorted.gif create mode 100644 include/js/tablesort/table.css create mode 100644 include/js/tablesort/table.js diff --git a/admin/sync/fas/sync_fas_vilesci_note.php b/admin/sync/fas/sync_fas_vilesci_note.php index 0dff5e3f1..c8baa12ce 100644 --- a/admin/sync/fas/sync_fas_vilesci_note.php +++ b/admin/sync/fas/sync_fas_vilesci_note.php @@ -137,7 +137,8 @@ $fasnoten_arr[$row->lehrveranstaltung_fk][$row->note_pk]["notenlektor_fk"] = $row->notenlektor_fk; $fasnoten_arr[$row->lehrveranstaltung_fk][$row->note_pk]["student_fk"] = $row->student_fk; $fasnoten_arr[$row->lehrveranstaltung_fk][$row->note_pk]["ext_id"] = $row->note_pk; - $fasnoten_arr[$row->lehrveranstaltung_fk][$mehrfach_arr[$row->lehrveranstaltung_fk]["main"]]["bemerkung"] .= "\n".$bemerkung_history; + if ($bemerkung_history != "") + $fasnoten_arr[$row->lehrveranstaltung_fk][$mehrfach_arr[$row->lehrveranstaltung_fk]["main"]]["bemerkung"] .= "\n".$bemerkung_history; } } @@ -218,7 +219,7 @@ $text .= ""; - $sqlstr = "SELECT DISTINCT student_fk FROM note where student_fk > 3000 and student_fk < 4000 order by student_fk"; + $sqlstr = "SELECT DISTINCT student_fk FROM note where student_fk >= 1 and student_fk < 500 order by student_fk"; if($result = pg_query($conn_fas, $sqlstr)) { @@ -262,107 +263,125 @@ foreach($lehreinheit_id_arr as $lehreinh) { if (key_exists($lehreinh,$lehreinheiten_sync_arr)) + { $lehreinheit_id = $lehreinheiten_sync_arr[$lehreinh]; break; + } } } else $lehreinheit_id = "FEHLT"; + + //begin insert tbl_pruefung $anz_processed_pruef++; - $pruef = new pruefung($conn); - - $pruef->lehreinheit_id=$lehreinheit_id; - $pruef->student_uid=$student_uid; - $pruef->mitarbeiter_uid=$mitarbeiter_uid; - $pruef->note=$note; - $pruef->pruefungstyp_kurzbz=$pruefungstyp_kurzbz; - $pruef->datum=$datum; - $pruef->anmerkung=$anmerkung; - $pruef->insertamum=$insertamum; - $pruef->insertvon=$insertvon; - $pruef->updateamum=$insertamum; - $pruef->updatevon=$updatevon; - $pruef->ext_id=$ext_id; - if (!($pruef->pruefung_id=checkUpdatePruefung($conn,$pruef))) - $pruef->new = 1; - - - if($pruef->pruefung_id == -1) - $anz_not_updated_pruef++; - else if($pruef->student_uid == "FEHLT") + if($student_uid == "FEHLT") { $insert_error_pruef++; $text .= "Prüfung: Datensatz FAS ID".$idkey.": student_uid ohne zuordnung
"; } - else if($pruef->lehreinheit_id == "FEHLT") + else if($lehreinheit_id == "FEHLT") { $insert_error_pruef++; $text .= "Prüfung: Datensatz FAS ID".$idkey.": Lehreinheit ohne zuordnung
"; - } + } else { - if(!$pruef->save()) - { - $text .= "Prüfung: Datensatz FAS ID".$idkey.": ".$pruef->errormsg."
"; - if($pruef->new) - $insert_error_pruef++; - else - $update_error_pruef++; - } - else - if($pruef->new) - $anz_insert_pruef++; - else - $anz_update_pruef++; - } - - if ($zeugnistabeintrag == 1) - { - - $anz_processed_zeug++; + $pruef = new pruefung($conn); + + $pruef->lehreinheit_id=$lehreinheit_id; + $pruef->student_uid=$student_uid; + $pruef->mitarbeiter_uid=$mitarbeiter_uid; + $pruef->note=$note; + $pruef->pruefungstyp_kurzbz=$pruefungstyp_kurzbz; + $pruef->datum=$datum; + $pruef->anmerkung=$anmerkung; + $pruef->insertamum=$insertamum; + $pruef->insertvon=$insertvon; + $pruef->updateamum=date("Y-m-d H:m:s"); + $pruef->updatevon=$updatevon; + $pruef->ext_id=$ext_id; - $zeug = new zeugnisnote($conn); - $zeug->lehrveranstaltung_id = $lehrveranstaltung_id; - $zeug->student_uid = $student_uid; - $zeug->studiensemester_kurzbz = $studiensemester_kurzbz; - $zeug->note = $note; - $zeug->uebernahmedatum = null; - $zeug->benotungsdatum = $datum; - $zeug->updateamum = $insertamum; - $zeug->updatevon = $updatevon; - $zeug->insertamum = $insertamum; - $zeug->insertvon = $insertvon; - $zeug->ext_id = $ext_id; - $zeug->bemerkung = $anmerkung; + if (!($pruef->pruefung_id=checkUpdatePruefung($conn,$pruef))) + $pruef->new = 1; - if (!($zeug->check = checkUpdateZeugnis($conn,$zeug))) - $zeug->new = 1; - - if($zeug->check == -1) - $anz_not_updated_zeug++; - else if($zeug->student_uid == "FEHLT") - { - $insert_error_zeug++; - $text .= "Zeugnis: Datensatz FAS ID".$idkey.": student_uid ohne zuordnung
"; - } + if($pruef->pruefung_id == -1) + $anz_not_updated_pruef++; + else { - if(!$zeug->save()) + if(!$pruef->save()) { - $text .= "Zeugnis: Datensatz FAS ID".$idkey.": ".$zeug->errormsg."
"; - if($zeug->new) - $insert_error_zeug++; + $text .= "Prüfung: Datensatz FAS ID".$idkey.": ".$pruef->errormsg."
"; + if($pruef->new) + $insert_error_pruef++; else - $update_error_zeug++; + $update_error_pruef++; } else - if($zeug->new) - $anz_insert_zeug++; + if($pruef->new) + $anz_insert_pruef++; else - $anz_update_zeug++; + $anz_update_pruef++; + } + } + + //begin insert tbl_zeugnisnote + if ($zeugnistabeintrag == 1) + { + $anz_processed_zeug++; + + if($student_uid == "FEHLT") + { + $insert_error_zeug++; + $text .= "Zeugnis: Datensatz FAS ID".$idkey.": student_uid ohne zuordnung
"; + } + else if ($lehrveranstaltung_id == "FEHLT") + { + $insert_error_zeug++; + $text .= "Zeugnis: Datensatz FAS ID".$idkey.": lehrveranstaltung_id ohne zuordnung
"; + } + else + { + $zeug = new zeugnisnote($conn); + + $zeug->lehrveranstaltung_id = $lehrveranstaltung_id; + $zeug->student_uid = $student_uid; + $zeug->studiensemester_kurzbz = $studiensemester_kurzbz; + $zeug->note = $note; + $zeug->uebernahmedatum = null; + $zeug->benotungsdatum = $datum; + $zeug->updateamum = date("Y-m-d H:m:s"); + $zeug->updatevon = $updatevon; + $zeug->insertamum = $insertamum; + $zeug->insertvon = $insertvon; + $zeug->ext_id = $ext_id; + $zeug->bemerkung = $anmerkung; + + if (!($zeug->check = checkUpdateZeugnis($conn,$zeug))) + $zeug->new = 1; + + if($zeug->check == -1) + $anz_not_updated_zeug++; + + else + { + if(!$zeug->save()) + { + $text .= "Zeugnis: Datensatz FAS ID".$idkey.": ".$zeug->errormsg."
"; + if($zeug->new) + $insert_error_zeug++; + else + $update_error_zeug++; + } + else + if($zeug->new) + $anz_insert_zeug++; + else + $anz_update_zeug++; + } } } diff --git a/include/js/tablesort/icons/01_ascending.gif b/include/js/tablesort/icons/01_ascending.gif new file mode 100644 index 0000000000000000000000000000000000000000..be9e959f68fd52f9dab28096d6ecbaeb8751048b GIT binary patch literal 71 zcmZ?wbhEHb4R@jgi3`07vl?XaE2J literal 0 HcmV?d00001 diff --git a/include/js/tablesort/table.css b/include/js/tablesort/table.css new file mode 100644 index 000000000..4c29fdafd --- /dev/null +++ b/include/js/tablesort/table.css @@ -0,0 +1,93 @@ +table.example { + border:1px solid black; + border-collapse:collapse; +} +table.example th, table.example td { + border:1px solid #aaaaaa; + padding: 2px 15px 2px 15px; +} +table.example thead th { + background-color:#ccccff; +} +table.example tfoot td { + background-color:#ffccff; +} + +table.example tr.tbody_header { + font-weight:bold; + text-align:center; + background-color:#dddddd; +} + +table.example a.pagelink { + padding-left:5px; + padding-right:5px; + border:1px solid #666666; + margin:0px 5px 0px 5px; +} +table.example a.currentpage { + background-color:yellow; +} +/* Striping */ +tr.alternate { + background-color:#E6E6CC; +} + +/* Sorting */ +th.table-sortable { + cursor:pointer; + background-image:url("icons/01_unsorted.gif"); + background-position:center left; + background-repeat:no-repeat; + padding-left:12px; +} +th.table-sorted-asc { + background-image:url("icons/01_ascending.gif"); + background-position:center left; + background-repeat:no-repeat; +} +th.table-sorted-desc { + background-image:url("icons/01_descending.gif"); + background-position:center left; + background-repeat:no-repeat; +} +th.table-filtered { + background-image:url("filter.gif"); + background-position:center left; + background-repeat:no-repeat; +} +select.table-autofilter { + font-size:smaller; +} + +/* Examples which stray from the default */ +table.altstripe tr.alternate2 { + background-color:#ccffff; +} + +/* Sort Icon Styles */ +table.sort01 th.table-sortable { background-image:url("icons/01_unsorted.gif"); } +table.sort01 th.table-sorted-asc { background-image:url("icons/01_ascending.gif"); } +table.sort01 th.table-sorted-desc { background-image:url("icons/01_descending.gif"); } + + + +/* Icons box */ +.iconset { + margin:5px; + border:1px solid #cccccc; + border-color:#cccccc #666666 #666666 #cccccc; + text-align:center; + cursor:pointer; + width:100px; +} +.iconset img { + margin:3px; +} + +/* Documentation */ +tr.doc_section { + font-weight:bold; + text-align:center; + background-color:#dddddd; +} \ No newline at end of file diff --git a/include/js/tablesort/table.js b/include/js/tablesort/table.js new file mode 100644 index 000000000..1af466ae4 --- /dev/null +++ b/include/js/tablesort/table.js @@ -0,0 +1,1002 @@ +/** + * Copyright (c)2005-2007 Matt Kruse (javascripttoolbox.com) + * + * Dual licensed under the MIT and GPL licenses. + * This basically means you can use this code however you want for + * free, but don't claim to have written it yourself! + * Donations always accepted: http://www.JavascriptToolbox.com/donate/ + * + * Please do not link to the .js files on javascripttoolbox.com from + * your site. Copy the files locally to your server instead. + * + */ +/** + * Table.js + * Functions for interactive Tables + * + * Copyright (c) 2007 Matt Kruse (javascripttoolbox.com) + * Dual licensed under the MIT and GPL licenses. + * + * @version 0.981 + * + * @history 0.981 2007-03-19 Added Sort.numeric_comma, additional date parsing formats + * @history 0.980 2007-03-18 Release new BETA release pending some testing. Todo: Additional docs, examples, plus jQuery plugin. + * @history 0.959 2007-03-05 Added more "auto" functionality, couple bug fixes + * @history 0.958 2007-02-28 Added auto functionality based on class names + * @history 0.957 2007-02-21 Speed increases, more code cleanup, added Auto Sort functionality + * @history 0.956 2007-02-16 Cleaned up the code and added Auto Filter functionality. + * @history 0.950 2006-11-15 First BETA release. + * + * @todo Add more date format parsers + * @todo Add style classes to colgroup tags after sorting/filtering in case the user wants to highlight the whole column + * @todo Correct for colspans in data rows (this may slow it down) + * @todo Fix for IE losing form control values after sort? + */ + +/** + * Sort Functions + */ +var Sort = (function(){ + var sort = {}; + // Default alpha-numeric sort + // -------------------------- + sort.alphanumeric = function(a,b) { + return (a==b)?0:(a0) { + var rows = section.rows; + for (var j=0,L2=rows.length; j0) { + var cells = row.cells; + for (var k=0,L3=cells.length; k1 && cells[cells.length-1].cellIndex>0) { + // Define the new function, overwrite the one we're running now, and then run the new one + (this.getCellIndex = function(td) { + return td.cellIndex; + })(td); + } + // Safari will always go through this slower block every time. Oh well. + for (var i=0,L=cells.length; i=0 && node.options) { + // Sort select elements by the visible text + return node.options[node.selectedIndex].text; + } + return ""; + }, + 'IMG':function(node) { + return node.name || ""; + } + }; + + /** + * Get the text value of a cell. Only use innerText if explicitly told to, because + * otherwise we want to be able to handle sorting on inputs and other types + */ + table.getCellValue = function(td,useInnerText) { + if (useInnerText && def(td.innerText)) { + return td.innerText; + } + if (!td.childNodes) { + return ""; + } + var childNodes=td.childNodes; + var ret = ""; + for (var i=0,L=childNodes.length; i-1) { + filters={ 'filter':filters.options[filters.selectedIndex].value }; + } + // Also allow for a regular input + if (filters.nodeName=="INPUT" && filters.type=="text") { + filters={ 'filter':"/^"+filters.value+"/" }; + } + // Force filters to be an array + if (typeof(filters)=="object" && !filters.length) { + filters = [filters]; + } + + // Convert regular expression strings to RegExp objects and function strings to function objects + for (var i=0,L=filters.length; ipageend) { + hideRow = true; + } + } + } + + row.style.display = hideRow?"none":""; + } + } + + if (def(page)) { + // Check to see if filtering has put us past the requested page index. If it has, + // then go back to the last page and show it. + if (pagestart>=unfilteredrowcount) { + pagestart = unfilteredrowcount-(unfilteredrowcount%pagesize); + tdata.page = page = pagestart/pagesize; + for (var i=pagestart,L=unfilteredrows.length; i0) { + if (typeof(args.insert)=="function") { + func.insert(cell,colValues); + } + else { + var sel = ''; + cell.innerHTML += "
"+sel; + } + } + } + }); + if (val = classValue(t,table.FilteredRowcountPrefix)) { + tdata.container_filtered_count = document.getElementById(val); + } + if (val = classValue(t,table.RowcountPrefix)) { + tdata.container_all_count = document.getElementById(val); + } + }; + + /** + * Attach the auto event so it happens on load. + * use jQuery's ready() function if available + */ + if (typeof(jQuery)!="undefined") { + jQuery(table.auto); + } + else if (window.addEventListener) { + window.addEventListener( "load", table.auto, false ); + } + else if (window.attachEvent) { + window.attachEvent( "onload", table.auto ); + } + + return table; +})(); diff --git a/vilesci/stammdaten/studiengang_details.php b/vilesci/stammdaten/studiengang_details.php index 59ae95748..54780a7f5 100644 --- a/vilesci/stammdaten/studiengang_details.php +++ b/vilesci/stammdaten/studiengang_details.php @@ -157,7 +157,7 @@ $htmlstr .= "
\n"; $htmlstr .= " \n"; $htmlstr .= " \n"; - $htmlstr .= " \n"; + $htmlstr .= " \n"; $htmlstr .= " \n"; $htmlstr .= " \n"; $htmlstr .= " \n"; diff --git a/vilesci/stammdaten/studiengang_uebersicht.php b/vilesci/stammdaten/studiengang_uebersicht.php index 6abd7f973..407741c69 100644 --- a/vilesci/stammdaten/studiengang_uebersicht.php +++ b/vilesci/stammdaten/studiengang_uebersicht.php @@ -18,14 +18,16 @@ if (!$sg->getAll('kurzbzlang',false)) die($sg->errormsg); - $htmlstr = "
Kennzahl
Kurzbezeichnung
\n"; - $htmlstr .= " \n"; - $htmlstr .= " "; - $htmlstr .= " "; + //$htmlstr = "
KzKurzbezKurzLang TypBezeichnungAktivTelefonEmail
\n"; + $htmlstr = "
\n"; + $htmlstr .= " \n"; + $htmlstr .= " "; + $htmlstr .= " \n"; $i = 0; foreach ($sg->result as $stg) { - $htmlstr .= " \n"; + //$htmlstr .= " \n"; + $htmlstr .= " \n"; $htmlstr .= " \n"; $htmlstr .= " \n"; $htmlstr .= " \n"; @@ -45,7 +47,7 @@ $htmlstr .= " \n"; $i++; } - $htmlstr .= "
KzKurzbezKurzLang TypBezeichnungAktivTelefonEmail
".$stg->studiengang_kz."".$stg->kurzbz."".$stg->kurzbzlang."
\n"; + $htmlstr .= "\n"; ?> @@ -54,7 +56,8 @@ Studiengänge Uebersicht - + +