<?php pagehead2('Help', "\n<link rel='stylesheet' type='text/css' href='{$root_url}/style/newdivstyle.css'/>\n<style type='text/css'>\n p {text-align: justify;}\n p:first-letter {font-size:180%; font-weight:bold; color:#800;}\n </style>\n"); ?> <div class='navopening'> <form action="close.html"> <table border='0' width='100%'> <tr> <td> <h1 style='color:white;'>Help peer web </h1> </td> <td align='right' width='15%'> <input type="image" src="<?php echo IMAGEROOT; ?> /error.png" name="close" alt="Close" onClick="self.close()"> </td> </tr> </table> </form></div> <div style='padding:2em 1em 2em 2em;'> <p>At the moment there is very little help...</p> <form action="close.html"> <input type="button" class="button" name="close" value="Close" onClick="self.close()"> </form> <hr> </div> <!-- $Id: help.php 1723 2014-01-03 08:34:59Z hom $ --> </body> </html>
} $sql = "select capabilities from passwd where userid={$newsnummer}"; $resultSet = $dbConn->Execute($sql); if ($resultSet === false) { $dbMsg .= "error cause " + $dbConn->ErrorMsg(); } else { $caps = $resultSet->fields['capabilities']; } $cap_widget = mkbitsetFields('capability', $caps, $cap_names); $col = 0; $bitset_widget = "<table>\n"; foreach ($cap_widget as $name => $widget) { if ($col % 4 == 0) { $bitset_widget .= "<tr>\n"; } $bitset_widget .= "\t{$widget}\n"; $col++; if ($col % 4 == 0) { $bitset_widget .= "</tr>\n"; } } $bitset_widget .= "</table>"; pagehead2('Edit capabilities'); $page_opening = "Set the capabilities of a peerweb user."; $nav = new Navigation($tutor_navtable, basename($PHP_SELF), $page_opening); echo $nav->show(); include_once 'templates/editcapabilities.xhtml'; ?> </body> </html>
$spreadSheetWriter = new SpreadSheetWriter($dbConn, $expanded_query); $filename = 'anyquery' . date('Y-m-d-H-i'); $spreadSheetWriter->setFilename($filename)->setTitle("Query {$query_name} ({$peer_id}) {$fdate}")->setLinkUrl($server_url . $PHP_SELF)->setAutoZebra(true); $spreadSheetWriter->processRequest(); $spreadSheetWidget = $spreadSheetWriter->getWidget(); $scripts = '<script type="text/javascript" src="js/jquery.js"></script> <script src="js/jquery.tablesorter.js"></script> <script type="text/javascript"> $(document).ready(function() { $("#myTable").tablesorter({widgets: [\'zebra\']}); }); </script> <link rel=\'stylesheet\' type=\'text/css\' href=\'' . SITEROOT . '/style/tablesorterstyle.css\'/> '; pagehead2('Execute and sql query to the database', $scripts); $page_opening = "Execute a query"; $nav = new Navigation($tutor_navtable, basename($PHP_SELF), $page_opening); $my_queries = "select any_query_id,owner,query_name,query,query_comment from any_query where active"; $resultSet = $dbConn->Execute($my_queries); $my_queries_table = ''; if ($resultSet !== FALSE) { if (!$resultSet->EOF) { $my_queries_table .= "<table border='1' style='border-collapse:collapse; background:rgba(224,224,224,0.8)' width='100%'>\n" . "<tr><th>query id</th><th>owner id</th><th>query comment</th><th>query text</th><th> </th></tr>"; while (!$resultSet->EOF) { extract($resultSet->fields); $my_queries_table .= "<tr>" . "<td><a href='{$PHP_SELF}?query_id={$any_query_id}'>{$any_query_id}: {$query_name}</a></td>" . "<td>{$owner}</td>" . "<td>{$query_comment}</td><td><pre>{$query}</pre></td><td><a href='{$PHP_SELF}?delete_query={$any_query_id}' title='delete query'><img src='images/delete-icon.png' border='0' alt='delete'/></td></tr>\n"; $resultSet->moveNext(); } $my_queries_table .= "</table>\n"; }
$spreadSheetWriter->processRequest(); $spreadSheetWidget = $spreadSheetWriter->getWidget(); $sqlhead = "select distinct '<a href=''student_admin.php?snummer='||snummer||'''target=''_blank''>'||snummer||'</a>' as snummer,\n" . "'<img src='''||photo||''' style=''height:24px;width:auto;''/>' as foto,\n" . "achternaam||rtrim(coalesce(', '||voorvoegsel,'')::text) as achternaam ,roepnaam, \n" . "pcn,cohort,t.tutor as slb,gebdat as birth_date,rtrim(email1) as email1,\n" . "studieplan_short as studieplan,faculty_short as facul,sclass,hoofdgrp,\n" . "straat,huisnr,plaats,phone_gsm,phone_home\n" . " from \n"; $sql2 = $sqlhead . ' student_email s natural join portrait ' . $sqltail; //$dbConn->log($sql2); $scripts = '<script type="text/javascript" src="js/jquery.js"></script> <script src="js/jquery.tablesorter.js"></script> <script type="text/javascript"> $(document).ready(function() { $("#myTable").tablesorter({widgets: [\'zebra\']}); }); </script> <link rel=\'stylesheet\' type=\'text/css\' href=\'' . SITEROOT . '/style/tablesorterstyle.css\'/> '; pagehead2('list students by a hoofgrp', $scripts); $page_opening = "Hoofdgrp list {$faculty_short}:{$hoofdgrp} "; $nav = new Navigation($tutor_navtable, basename($PHP_SELF), $page_opening); $nav->setInterestMap($tabInterestCount); echo $nav->show(); ?> <div id='navmain' style='padding:1em;'> <fieldset><legend>Select hoofdgrp</legend> <p>Choose the hoofdgrp of which you want to retrieve the data. hoofdgrp is a label that is given to a student as a selection criterion. Typically it is used to label students in course type and year or semester.</p> <p>If you want to retrieve it (named <?php echo $filename; ?> ) as a <strong>spread sheet</strong>, select the spreadsheet option below.</p> <form method="get" name="project" action="<?php
// always get actual db document set $sql = "select doctype,version_limit from project_deliverables where prjm_id={$prjm_id} order by doctype"; $resultSet = $dbConn->Execute($sql); if ($resultSet === false) { die("<br>Cannot get document types with " . $sql . " reason " . $dbConn->ErrorMsg() . "<br>"); } $i = 0; $doctype_set = array(); while (!$resultSet->EOF) { extract($resultSet->fields); array_push($doctype_set, $doctype); $resultSet->moveNext(); } //echo "<pre>doctype_set \n";print_r($doctype_set);echo "</pre>\n"; $pp = array(); pagehead2('Define types of deliverables students can upload.', file_get_contents('templates/simpledatepicker.html')); $page_opening = "Define the types of deliverables students can upload per milestones in a project. " . "<font style='font-size:6pt'>prj_id={$prj_id} milestone={$milestone}</font>"; $page = new PageContainer(); $page->setTitle('Define types of deliverables students can upload.'); $nav = new Navigation($tutor_navtable, basename($PHP_SELF), $page_opening); $page->addBodyComponent($nav); $prjSel->setJoin('milestone_grp using (prj_id,milestone)'); $pp['prj_id_selector'] = $prjSel->getSelector(); $sql = "select distinct udt.description as upload_description,udt.url,coalesce(version_limit,0) as version_limit," . "due, pd.publish_early,udt.doctype,pd.rights[0:2],warn_members,indiv_group\n" . "\tfrom uploaddocumenttypes udt left join " . "( select * from project_deliverables join prj_milestone using(prjm_id) where prjm_id={$prjm_id} ) pd \n" . "\tusing(prj_id,doctype)\n" . "\twhere prj_id={$prj_id} order by due,udt.doctype"; // echo "<pre>$sql</pre>\n"; $inputColumns = array('0' => array('type' => 'T', 'size' => '40'), '1' => array('type' => 'U', 'size' => '40'), '2' => array('type' => 'N', 'size' => '3'), '3' => array('type' => 'D', 'size' => '10'), '4' => array('type' => 'B', 'size' => '1', 'colname' => 'publish_early'), '5' => array('type' => 'H', 'size' => '0'), '6' => array('type' => 'R', 'size' => '2', 'rightsChars' => 'GPW'), '7' => array('type' => 'B', 'size' => '1', 'colname' => 'warn_members'), '8' => array('type' => 'Z', 'size' => 1, 'options' => array('Ind' => 'I', 'Grp' => 'G'))); $pp['checked'] = $warn_members == 'true' ? 'checked' : ''; $pp['prj_id'] = $prj_id; $pp['milestone'] = $milestone; $datePickers = array(); $page->addScriptResource('js/jquery-1.7.1.min.js');
$sqlt = "select s.snummer as contestant, " . "roepnaam||' '||coalesce(voorvoegsel,'')||' '||achternaam as naam, " . "ags.grade as peerg,\n" . "ags.multiplier[array_upper(ags.multiplier,1)] as grp_multiplier, " . "coalesce(round(mg.grade,2),round({$productgrade}*ags.multiplier[array_upper(ags.multiplier,1)],2)) as tutorg \n" . " from student s join assessment_grade_set({$prjtg_id},{$productgrade}) ags using (snummer)" . " join all_prj_tutor using(prjtg_id) " . " left join milestone_grade mg using(prjm_id,snummer) order by achternaam,roepnaam,snummer"; $spreadSheetWriter = new SpreadSheetWriter($dbConn, $sqlt); $spreadSheetWriter->setFilename($filename)->setLinkUrl($server_url . $PHP_SELF . '?class_id=' . $class_id)->setTitle($title)->setAutoZebra(true)->setWeights(array(1, 2, 3, 4))->setFirstWeightsColumn(2)->setWeightSumsColumn(9)->setRowParser(new RowWithArraysPreHeadersParser(array('contestant', 'name', criteriaShortAsArray($criteria, 'en'), 'multiplier', 'tutorg'))); $spreadSheetWriter->processRequest(); $scripts = '<script type="text/javascript" src="js/jquery.js"></script> <script src="js/jquery.tablesorter.js"></script> <script type="text/javascript"> $(document).ready(function() { // do stuff when DOM is ready $("#groupresult").tablesorter({ }); }); </script> <link rel=\'stylesheet\' type=\'text/css\' href=\'' . SITEROOT . '/style/tablesorterstyle.css\'/> '; pagehead2('groupresult', $scripts); $prj_id_selector = $prjSel->getSelector(); $prj_data = $prjSel->getSelectionDetails(); extract($prjSel->getSelectedData()); $grpList = '<select name="prjtg_id" onchange="submit()">' . "\n"; $grpList .= getOptionList($dbConn, "select distinct grp_num||' ('||tutor||')'||coalesce(': '||alias ,'')" . "||' (#'||prjtg_id||')' as name,\n" . " prjtg_id as value,case when prj_tutor_open=true then 'background:#fee' else 'font-weight:bold;background:#efe' end as style,grp_num\n" . " from all_prj_tutor \n" . " where prjm_id={$prjm_id} order by grp_num ", $prjtg_id); $grpList .= "\n</select>\n"; $page_opening = "Group results for {$afko} \"{$description}\" {$year} prj_id {$prj_id} mil {$milestone} ({$prjm_id})"; $nav = new Navigation($tutor_navtable, basename($PHP_SELF), $page_opening); $nav->setInterestMap($tabInterestCount); $prj_widget = $prjSel->getWidget(); $spreadSheetWidget = $spreadSheetWriter->getWidget(); $remarkList = remarkList($dbConn, $prjtg_id); echo $nav->show(); ?> <div id='navmain' style='padding:1em;'>
for (i=0,n=theForm.elements.length;i<n;i++) { if (theForm.elements[i].className.indexOf(cName) !=-1) { theForm.elements[i].checked = status; if (status) { theForm.elements[i].parentNode.className=cClass; } } } } </script> <style type="text/css"> th, *.rs{ background:rgba(255,255,255,0.4); } </style> '; // get group tables for a project pagehead2('Get presence list', $script); $page_opening = "Presence list for students attending activities xyz"; $nav = new Navigation($tutor_navtable, basename($PHP_SELF), $page_opening); $nav->setInterestMap($tabInterestCount); $nav->show(); $sql3 = "select datum||', '||' ('||act_id||', #'||coalesce(apc.count,0)||') '||act_type_descr||' '||rtrim(short)" . "||'*'||part||': '||rtrim(description) as name, act_id as value," . "to_char(datum,'IYYY')||':'||milestone as namegrp\n" . " from activity join activity_type using(act_type) join prj_milestone using(prjm_id) " . "left join act_part_count apc using(act_id) \n\t" . " where prjm_id={$prjm_id}\n" . "order by namegrp desc,datum desc,part asc"; $actSel = new Selector($dbConn, 'act_id', $sql3, $act_id); $act_id_selector = $actSel->getSelector(); $participant = array(); $sql = "select snummer as participant from activity_participant where act_id={$act_id}"; $resultSet = $dbConn->Execute($sql); if ($resultSet === false) { print "error fetching participant data with {$sql} : " . $dbConn->ErrorMsg() . "<br/>\n"; } else { while (!$resultSet->EOF) { array_push($participant, $resultSet->fields['participant']);
$resultSet = $dbConn->Execute($sql); if ($resultSet !== false && !$resultSet->EOF) { extract($resultSet->fields); } } $tutor = $tutor_code; //echo $_REQUEST['prjtg_id']."<br/>\n"; if (isset($_REQUEST['prjtg_id'])) { $prjtg_id = validate($_REQUEST['prjtg_id'], 'integer', $_SESSION['prjtg_id']); } $_SESSION['prj_id'] = $prj_id; $_SESSION['milestone'] = $milestone; $_SESSION['prjm_id'] = $prjm_id; $_SESSION['prjtg_id'] = $prjtg_id; $scripts = file_get_contents('js/balloonscript.html'); pagehead2('groupphotos', $scripts); $prjSel->setSubmitOnChange(false); $prj_id_selector = $prjSel->getSelector(); $grpList = '<select name="prjtg_id" onChange="submit()">' . "\n\t"; $grpList .= getOptionList($dbConn, "select distinct pt.grp_num||' (tutor: '||tutor||')'" . "||coalesce(', group name: '||grp_name ,'') as name,\n" . "pt.prjtg_id as value,\n" . "pt.grp_num " . " from prj_tutor pt \n" . " join tutor t on(userid=tutor_id)\n" . " left join grp_alias using( prjtg_id )\n" . " where pt.prjm_id={$prjm_id} order by pt.grp_num", $prjtg_id, array()); $grpList .= "</select>\n"; $sql = "SELECT * from all_prj_tutor"; if (isset($prjtg_id)) { $sql .= "\n where prjtg_id={$prjtg_id} "; } $sql .= "\nlimit 1 \n"; $resultSet = $dbConn->Execute($sql); if ($resultSet === false) { die("<br>Cannot get projectdata with \"" . $sql . '", cause ' . $dbConn->ErrorMsg() . "<br>"); } if (!$resultSet->EOF) {
$sqlhead = "select distinct '<a href=''student_admin.php?snummer='||snummer||'''target=''_blank''>'||snummer||'</a>' as snummer,\n" . "'<img src='''||photo||''' style=''height:24px;width:auto;''/>' as foto,\n" . "achternaam||rtrim(coalesce(', '||voorvoegsel,'')::text) as achternaam ,roepnaam, \n" . "pcn,cohort,t.tutor as slb,gebdat as birth_date,rtrim(email1) as email1,\n" . "studieplan_short as studieplan,faculty_short as facul,sclass,hoofdgrp,\n" . "straat,huisnr,plaats,phone_gsm,phone_home\n" . " from \n"; $sql2 = $sqlhead . ' student_email s natural join portrait ' . $sqltail; //$dbConn->log($sql2); $scripts = '<script type="text/javascript" src="js/jquery.js"></script> <script src="js/jquery.tablesorter.js"></script> <script type="text/javascript"> $(document).ready(function() { $("#myTable").tablesorter({widgets: [\'zebra\']}); }); </script> <link rel=\'stylesheet\' type=\'text/css\' href=\'' . SITEROOT . '/style/tablesorterstyle.css\'/> '; $sql_slb = "select mine,namegrp,name,userid as value from tutor_selector({$peer_id}) \n" . "order by mine,namegrp,name"; $slbList = "<select name='slb'>\n" . getOptionListGrouped($dbConn, $sql_slb, $slb) . "\n</select>"; pagehead2('list students by a slb', $scripts); $page_opening = "student list for slb "; $nav = new Navigation($tutor_navtable, basename($PHP_SELF), $page_opening); $nav->setInterestMap($tabInterestCount); echo $nav->show(); ?> <div id='navmain' style='padding:1em;'> <fieldset><legend>Select students by slb (study coach)</legend> <p>Choose the slb for to see then pupils.</p> <p>If you want to retrieve it (named <?php echo $filename; ?> ) as a <strong>spread sheet</strong>, select the spreadsheet option below.</p> <form method="get" name="project" action="<?php echo $PHP_SELF;
$spreadSheetWriter->processRequest(); $spreadSheetWidget = $spreadSheetWriter->getWidget(); $sqlhead = "select distinct '<a href=\"student_admin.php?snummer='||s.snummer||'\" target=\"_blank\">'||s.snummer||'</a>' as snummer,"; $rainbow = new RainBow(STARTCOLOR, COLORINCREMENT_RED, COLORINCREMENT_GREEN, COLORINCREMENT_BLUE); $scripts = '<script type="text/javascript" src="js/jquery.js"></script> <script src="js/jquery.tablesorter.js"></script> <script type="text/javascript"> $(document).ready(function() { // do stuff when DOM is ready $("#myTable").tablesorter({ }); }); </script> <link rel=\'stylesheet\' type=\'text/css\' href=\'' . SITEROOT . '/style/tablesorterstyle.css\'/> '; pagehead2('Get group tables'); //,$scripts); $page_opening = "Group lists for project {$afko} {$description} <span style='font-size:8pt;'>prjm_id {$prjm_id} prj_id {$prj_id} milestone {$milestone} </span>"; $nav = new Navigation($tutor_navtable, basename($PHP_SELF), $page_opening); $nav->setInterestMap($tabInterestCount); $prjSel->setJoin('milestone_grp using (prj_id,milestone)'); $prj_id_selector = $prjSel->getSelector(); $emailList = ''; $grpList = array(); $resultSet = $dbConn->Execute($sqlhead . $sqltail); if ($resultSet === false) { $dbConn->log('failed wth' . $dbConn->ErrorMsg()); } else { while (!$resultSet->EOF) { $email = $resultSet->fields["email1"]; $alias = $resultSet->fields["alias"];
<?php include_once './peerlib/peerutils.inc'; require_once './peerlib/validators.inc'; require_once 'rubberstuff.php'; include_once 'navigation2.inc'; $tutor_navtable = array(); $activeRubberProject = ''; extract($_SESSION); requireCap(CAP_MKCLASSES); $css = '<style type=\'text/css\'><!-- .flink {text-align:right} th.flink > a {text-decoration:none;color:#008;} --> </style>'; pagehead2('Rubber', $css); $page_opening = "Rubber reports at {$rubberbase}"; $nav = new Navigation($tutor_navtable, basename($PHP_SELF), $page_opening); $nav->show(); $_SESSION['conf_editor_basedir'] = $rubberbase; echo "<br/>\n"; $rubberTree = array(); if ($handle1 = opendir($rubberbase)) { while (false !== ($subdirname = readdir($handle1))) { // build tree $subdirpath = "{$rubberbase}/{$subdirname}"; if (!isset($rubberSystemDirs[$subdirname]) && is_dir($subdirpath)) { if ($activeRubberProject == '') { $_SESSION['activeRubberProject'] = $activeRubberProject = $subdirname; } if ($subdirname == $activeRubberProject) {
// "left join grp_alias using(prjtg_id) where prjm_id=$prjm_id order by grp_num"; $sqlgrp = "select distinct grp_num||' ('||tutor||')'||' ['||prjtg_id||']'||coalesce(': '||alias ,'')" . " as name,\n" . " prjtg_id as value,case when ago.open=true then 'background:#fee' else 'font-weight:bold;background:#efe' end as style\n" . " from prj_grp natural join prj_tutor \n" . "join tutor on(userid=tutor_id)\n" . " natural join assessment_grp_open ago \n" . " natural left join grp_alias \n" . " where prjm_id={$prjm_id} order by prjtg_id"; //echo " <pre>$sqlgrp</pre>\n"; $grpList = getOptionList($dbConn, $sqlgrp, $grp_num); $scripts = '<script type="text/javascript" src="js/jquery.js"></script> <script src="js/jquery.tablesorter.js"></script> <script type="text/javascript"> $(document).ready(function() { // do stuff when DOM is ready $("#myTable").tablesorter({ }); }); </script> <link rel=\'stylesheet\' type=\'text/css\' href=\'' . SITEROOT . '/style/tablesorterstyle.css\'/> '; pagehead2('Get the raw data of an assessment', $scripts); $page_opening = "Scores voor module {$afko}: {$description} ({$year}) milestone {$milestone} " . "<span style='font-size:6pt;'>({$prj_id} M {$milestone})</span>"; $nav = new Navigation($tutor_navtable, basename($PHP_SELF), $page_opening); $nav->setInterestMap($tabInterestCount); $prjSel->setJoin('available_assessment using (prjm_id)'); $prj_id_selector = $prjSel->getSelector(); echo $nav->show(); ?> <div id='navmain' style='padding:1em;'> <p>Deze pagina maakt het mogelijk de ingevulde waarden voor een module (project) op te halen. De gegevens worden gepresenteerd als een tabel of een csv file die automatisch door excel wordt opengemaakt</p> <p>De naam van de csv-file wordt gemaakt van module afkorting, grp,milestone en datum van opvragen. Daarbij wordt groep als een underscore weergegeven indien alle groepen wordt opgevraagd. Voorbeeld:<strong>PRJ11Am1_2004-10-09.csv</strong></p> <form method="post" name="moduleresult" action="<?php echo $PHP_SELF; ?>
if (isset($_REQUEST['class_cluster']) && isset($_REQUEST['newuserid'])) { $newuserid = $_REQUEST['newuserid']; $sql1 = "begin work;\n" . "delete from tutor_class_cluster where userid={$newuserid};\n"; for ($i = 0; $i < count($_REQUEST['class_cluster']); $i++) { if ($_REQUEST['cluster_order'][$i] > 0) { $sql1 .= "insert into tutor_class_cluster select {$newuserid},{$_REQUEST['class_cluster'][$i]},{$_REQUEST['cluster_order'][$i]};\n"; } } $sql1 .= "commit;\n"; $rs = $dbConn->Execute($sql1); } $sql = "select cluster_name, cluster_description, class_cluster,sort_order,coalesce(cluster_order,0) as cluster_order\n" . " from class_cluster left join (select class_cluster,cluster_order from tutor_class_cluster where userid={$newuserid}) tcc using(class_cluster)\n" . "order by sort_order"; $resultSet = $dbConn->Execute($sql); if ($resultSet === false) { die('cannot get cluster data:' . $dbConn->ErrorMsg() . ' with <pre>' . $sql . "</pre>\n"); } while (!$resultSet->EOF) { extract($resultSet->fields); $cluster_widget .= "<tr>" . "<td>{$class_cluster} <input type='hidden' name='class_cluster[]' value ='{$class_cluster}'/></td>" . "<td>{$cluster_name}</td>" . "<td>{$cluster_description}</td>" . "<td><input type='number' name='cluster_order[]' style='text-align:right; width:3em;' value='{$cluster_order}' min='0'/></td>" . "</tr>\n"; $resultSet->moveNext(); } $cluster_widget .= "</table><br/>"; pagehead2('Set tutor cluster assignment'); $page_opening = "Set the class cluster(s) the tutor should see/works in."; $nav = new Navigation($tutor_navtable, basename($PHP_SELF), $page_opening); echo $nav->show(); include_once 'templates/tutorcluster.xhtml'; ?> </body> </html>
$sql = "select * from student where class_id='{$class_id}' order by achternaam,roepnaam"; $filename = $classname . date('-Y-M-d') . '.csv'; $dbConn->queryToCSV($sql, $filename, ',', true); exit(0); } $scripts = '<script type="text/javascript" src="jquery/jquery.js"></script> <script src="jquery/jquery.tablesorter.js"></script> <script type="text/javascript"> $(document).ready(function() { $("#myTable").tablesorter({widgets: [\'zebra\']}); }); </script> <link rel=\'stylesheet\' type=\'text/css\' href=\'' . SITEROOT . '/style/tablesorterstyle.css\'/> '; pagehead2('Class administration', $scripts); if (isset($_REQUEST['oldclass_id'])) { $_SESSION['oldclass_id'] = $oldclass_id = $_REQUEST['oldclass_id']; } if (isset($_POST['newhoofdgrp'])) { //$newhoofdgrp= preg_replace('/\W+/g','',$_POST['newhoofdgrp']); $_SESSION['newhoofdgrp'] = $newhoofdgrp = $_POST['newhoofdgrp']; } if (isset($_POST['sethoofdgrp']) && isset($newhoofdgrp) && isset($_POST['studenten'])) { $memberset = '\'' . implode("','", $_POST['studenten']) . '\''; $sql = "update student set hoofdgrp='{$newhoofdgrp}' " . "where snummer in ({$memberset})"; $resultSet = $dbConn->Execute($sql); if ($resultSet === false) { die("<br>Cannot update student with " . $sql . " reason " . $dbConn->ErrorMsg() . "<br>"); } }
$csvout = 'N'; $csvout_checked = ''; if (isset($_REQUEST['csvout'])) { $csvout = $_REQUEST['csvout']; $csvout_checked = $csvout == 'Y' ? 'checked' : ''; } // <a href='../emailaddress.php?snummer=snummer'>snummer</a> $fdate = date('Ymd-Hi'); $filename = 'jaag_buit-' . $fdate; $sql = "select * from jaag_buit_html"; $sqlcsv = "select * from jaag_buit"; $spreadSheetWriter = new SpreadSheetWriter($dbConn, $sqlcsv); $spreadSheetWriter->setFilename($filename)->setTitle("Jaag buit {$fdate}")->setLinkUrl($server_url . $PHP_SELF)->setFilename($filename)->setAutoZebra(true); $spreadSheetWriter->processRequest(); $spreadSheetWidget = $spreadSheetWriter->getWidget(); pagehead2('Jaag Buit', $scripts); $page_opening = "Resultaat van jaagactie tot nu toe"; $nav = new Navigation($tutor_navtable, basename($PHP_SELF), $page_opening); echo $nav->show(); ?> <div id='navmain' style='padding:1em;'> <fieldset><legend>Select output type</legend> <form method="get" name="project" action="<?php echo $PHP_SELF; ?> "> <input type='submit' name='get' value='Get' /> Excel file: <?php echo $spreadSheetWidget; ?>
$sql = "select pt.grp_num,ga.* from prj_tutor pt left join grp_alias ga using(prjtg_id) where prjm_id={$prjm_id} order by grp_num"; $inputColumns = array('1' => array('type' => 'T', 'size' => '40'), '2' => array('type' => 'T', 'size' => '15'), '3' => array('type' => 'T', 'size' => '64'), '4' => array('type' => 'N', 'size' => '64'), '5' => array('type' => 'H', 'size' => '0'), '6' => array('type' => 'T', 'size' => '64'), '7' => array('type' => 'T', 'size' => '64')); $table = getQueryToTableChecked2($dbConn, $sql, false, -1, new RainBow(0x46b4b4, 64, 32, 0), 'document[]', $doctype_set, $inputColumns); //$table = simpleTableString($dbConn, $sql, "<table id='myTable' class='tablesorter' summary='your requested data'" // . " style='empty-cells:show;border-collapse:collapse' border='1'>"); $scripts = '<script type="text/javascript" src="js/jquery.js"></script> <script src="js/jquery.tablesorter.js"></script> <script type="text/javascript"> $(document).ready(function() { $("#myTable").tablesorter({widgets: [\'zebra\']}); }); </script> <link rel=\'stylesheet\' type=\'text/css\' href=\'' . SITEROOT . '/style/tablesorterstyle.css\'/> '; pagehead2('Get class list', $scripts); $page_opening = "Group details for project "; $nav = new Navigation(array(), basename($PHP_SELF), $page_opening); $nav->show(); ?> <div id='navmain' style='padding:1em;'> <?php echo $pSel; ?> <form method="post" action="<?php echo $PHP_SELF; ?> " > <?php echo $table; ?>
} $scripts = '<script type="text/javascript" src="js/jquery.js"></script> <script src="js/jquery.tablesorter.js"></script> <script type="text/javascript"> $(document).ready(function() { $("#myTable").tablesorter({widgets: [\'zebra\']}); }); </script> <link rel=\'stylesheet\' type=\'text/css\' href=\'' . SITEROOT . '/style/tablesorterstyle.css\'/> '; $myClassSelector = new ClassSelectorClass($dbConn, $class_id); $classSelectorWidget = $myClassSelector->setAutoSubmit(true)->setSelectorName('newclass_id')->getSelector(); $sql = "select distinct snummer,achternaam,roepnaam,voorvoegsel,lang \n" . " from student \n" . "join student_class using(class_id)\n" . " where class_id={$class_id} " . " order by achternaam,roepnaam"; $rainbow = new RainBow(); $memberTable = simpletableString($dbConn, $sql, "<table id='myTable' class='tablesorter' summary='your requested data'" . " style='empty-cells:show;border-collapse:collapse' border='1'>"); pagehead2('Add/move individual student to class.', $scripts); $page_opening = "Add individual student to a class. <span style='font-size:6pt;'>class_id {$class_id}</span>"; $nav = new Navigation($tutor_navtable, basename($PHP_SELF), $page_opening); $nav->setInterestMap($tabInterestCount); $nav->show(); include_once 'templates/addtoclass.html'; ?> <!-- db_name=<?php echo $db_name; ?> --> <!-- $Id: addtoclass.php 1853 2015-07-25 14:17:12Z hom $ --> </body> </html>
define('MAXCOL', '5'); $class_id = '1'; $tutor = $tutor_code; extract($_SESSION); $year = date('Y'); # get actual course_year $sql = "select value as year from peer_settings where key='course_year'"; $resultSet = $dbConn->Execute($sql); if (!$resultSet->EOF) { extract($resultSet->fields); } if (isset($_REQUEST['class_id'])) { $_SESSION['class_id'] = $class_id = $_REQUEST['class_id']; } $style = file_get_contents('js/balloonscript.html'); pagehead2('class photos', $style); $classSelectorClass = new ClassSelectorClass($dbConn, $class_id); $oldClassSelector = $classSelectorClass->setAutoSubmit(true)->addConstraint('sort1 < 10 and student_count <>0')->getSelector(); $sql = "select * from hoofdgrp where hoofdgrp='{$class_id}'"; $sql = "select * from student_class natural join faculty where class_id='{$class_id}'"; $resultSet = $dbConn->Execute($sql); if ($resultSet === false) { die("<br>Cannot get class data with " . $sql . " reason " . $dbConn->ErrorMsg() . "<br>"); } if (!$resultSet->EOF) { extract($resultSet->fields); } $tablehead = "<h2><a href='photolist.php?class_id={$class_id}'>" . "Class photos for class {$faculty_short}.{$sclass} {$class_id}: {$year}-" . ($year + 1) . "<img src='images/pdf_icon.png' border='0'/></a></h2>\n"; $page_opening = "Class photos for class {$faculty_short}.{$sclass} {$class_id} {$year}-" . ($year + 1); $nav = new Navigation($tutor_navtable, basename($PHP_SELF), $page_opening); $nav->setInterestMap($tabInterestCount);