//@filesize($filepath);
 $pp['page_opening'] = "Hello {$jroepnaam} {$jvoorvoegsel} {$jachternaam} " . "<span style='font-size:6pt;'>({$snummer})</span>, " . "this the critique page. ";
 $pp['mime_type_sel'] = $mime_type;
 $pp['grp_name'] = $grp_name;
 $pp['doc_type_sel'] = $documenttype;
 if ($author == $peer_id || $hasCapSystem) {
     $pp['formstart'] = "<form method='post' action='" . $PHP_SELF . "?doc_id=" . $doc_id . "'>";
     $pp['formend'] = "</form>";
     $pp['titleinput'] = "<input type='text' size='80' name='doc_title' value='{$title}' />";
     $pp['docbutton'] = "<tr><td>To modify</td>" . "<td><input type='submit' name='doc_update' value='update'/><input type='reset'/></td></tr>";
     $mime_type_selector = new Selector($dbConn, 'mime_type', "select mime_type as name, mime_type as value from upload_mime_types order by name", $mime_type, false);
     // no auto submit.
     $doc_type_selector = new Selector($dbConn, 'doctype', "select doctype as value, description as name\n" . " from uploaddocumenttypes where prj_id={$prj_id}", $doctype, false);
     $pp['grp_sel'] = new Selector($dbConn, 'new_prjtg_id', "select prjtg_id as value, coalesce('g'||grp_num||' '''||alias||'''','g'||grp_num)||' tutor '||tutor as name \n" . "from all_prj_tutor where prjm_id={$prjm_id} order by grp_num", $prjtg_id, false);
     $pp['mime_type_sel'] = $mime_type_selector->getSelector();
     $pp['doc_type_sel'] = $doc_type_selector->getSelector();
     $checkenable = '';
 } else {
     $pp['formstart'] = '';
     $pp['formend'] = '';
     $pp['titleinput'] = $title;
     $pp['docbutton'] = '';
     $pp['mime_type_sel'] = $mime_type;
     $pp['doc_type_sel'] = $doctype;
     $checkenable = 'disabled';
 }
 $pp['groupRights'] = "Group <input type='checkbox' name='groupread' value='t' " . ($rights[0] == 't' ? 'checked' : '') . " {$checkenable} />";
 $pp['projectRights'] = "Module participants<input type='checkbox' name='projectread' value='t' " . ($rights[1] == 't' ? 'checked' : '') . " {$checkenable}  />";
 $pp['refreshUrl'] = htmlspecialchars("{$PHP_SELF}?doc_id={$doc_id}&sortorder=");
 if ($sortorder == 'desc') {
     $pp['refreshLink'] = "first (current) or <a href='" . $refreshUrl . 'asc' . "'>last</a>";
        } else {
            $dbConn->transactionEnd();
        }
    } else {
        $dbConn->transactionEnd();
    }
}
// get group tables for a project
pagehead('Record task completed');
$page_opening = "Record completion of tasks for project";
$nav = new Navigation($tutor_navtable, basename($PHP_SELF), $page_opening);
$nav->setInterestMap($tabInterestCount);
$nav->show();
$sql3 = "select task_id as value,name||': '||description as name from project_task order by task_number";
$taskSel = new Selector($dbConn, 'task_id', $sql3, $task_id);
$task_id_selector = $taskSel->getSelector();
$participant = array();
$sql = "select snummer as participant from project_task_completed where task_id={$task_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->moveNext();
    }
}
$sql = "select st.snummer," . "achternaam||', '||roepnaam||coalesce(' '||voorvoegsel,'') as name,\n" . "'<img src=\"'||p.photo||'\" width=\\'32\\' height=\\'48\\'/>' as face,ptc.snummer as participant,ptc.mark,ptc.comment,grp_num\n" . ",trans_id,operator,date_trunc('second',ts),from_ip \n" . " from (select snummer,grp_num from prj_grp \n" . " join prj_milestone using(prjm_id) where prjm_id={$prjm_id}) pg \n" . " natural join student st \n" . " natural join portrait p \n" . " natural left join project_task pt \n" . " natural left join project_task_completed_latest ptc\n" . " natural left join transaction \n" . " where task_id={$task_id}\n" . " order by grp_num,achternaam,roepnaam";
$myRowFactory = new MyRowFactory();
$tableBuilder = new TableBuilder($dbConn, $myRowFactory);
?>
Exemple #3
0
    }
}
</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->moveNext();
    }
}
$sql = "select count(*) as present from prj_grp join prj_tutor using(prjtg_id) join activity_participant using(snummer) where act_id={$act_id}\n" . " and prjm_id={$prjm_id} ";
$resultSet = $dbConn->Execute($sql);
if ($resultSet === false) {
    print "error fetching count data with {$sql} : " . $dbConn->ErrorMsg() . "<br/>\n";
Exemple #4
0
    $csvout_checked = $csvout == 'Y' ? 'checked' : '';
}
$sql1 = "select snummer," . "achternaam||rtrim(coalesce(', '||voorvoegsel,'')) as achternaam ,roepnaam," . " sclass,sort1,sort2\n " . "  from activity_participant join activity using(act_id) join student using(snummer)" . "  join student_class using(class_id)\n" . "  where act_id={$act_id} order by sort1,sort2,sclass,achternaam,roepnaam";
$sql2 = "select snummer," . "achternaam||rtrim(coalesce(', '||voorvoegsel,'')) as achternaam ,roepnaam," . " sclass,sort1,sort2\n " . "  from activity_participant join activity using(act_id) join student using(snummer)" . "  join student_class using(class_id)\n" . "  where act_id={$act_id} order by sort1,sort2,sclass,achternaam,roepnaam";
$rainbow = new RainBow(STARTCOLOR, COLORINCREMENT_RED, COLORINCREMENT_GREEN, COLORINCREMENT_BLUE);
if ($csvout == 'Y') {
    $dbConn->queryToCSV($sql2, $filename);
    exit(0);
}
pagehead('Get activity participation');
$page_opening = "List of students attending activities";
$nav = new Navigation($tutor_navtable, basename($PHP_SELF), $page_opening);
$nav->setInterestMap($tabInterestCount);
$sql3 = "select datum||', '||' ('||act_id||', #'||coalesce(apc.count,0)||') '||rtrim(short)||'*'||part||': '||rtrim(description) as name, act_id as value," . "substr(datum::text,1,4) as namegrp\n" . " from activity left join act_part_count apc using(act_id) order by namegrp desc,datum,part";
$prjSel = new Selector($dbConn, 'act_id', $sql3, $act_id);
$act_id_selector = $prjSel->getSelector();
echo $nav->show();
?>
<div id='navmain' style='padding:1em;'>
<fieldset><legend>Select project</legend>
<form method="get" name="activity" action="<?php 
echo $PHP_SELF;
?>
">
<?php 
echo $act_id_selector;
?>
csv:
<input type='checkbox' name='csvout' <?php 
echo $csvout_checked;
?>