예제 #1
0
</head>
<body>
';
    $message = $bodyprefix . $mailbody . "\n</body>\n</html>\n";
    domail($toAddress, $subject, $message, $headers);
    // send author a copy, so he 'll know he is confirmed of sending the email.
    $recipients = htmlentities(preg_replace('/,/', ",\n", $toAddress));
    domail($replyto, $subject . ', your copy', $bodyprefix . $mailbody . "\n<br/><hr/>The above mail has been sent to the following recipients:\n<pre>" . $recipients . "\n</pre>\n" . "\n</body>\n</html>\n", $headers);
    if ($triggerList != '') {
        $subject = 'You have mail at your fontys email address';
        domail($triggerList, $subject, "See the subject.\n" . "One way to read your mail there is to visit " . "http://webmail.fontys.nl\n---\nKind Regards,\n Peerweb services", 'From: peerweb@fontysvenlo.org');
        //$headers
    }
}
$prjSel->setJoin('milestone_grp using (prj_id,milestone)');
$prjList = $prjSel->getSelector();
$sql = "select * from student\n" . "where snummer={$peer_id}";
$resultSet = $dbConn->Execute($sql);
if ($resultSet === false) {
    print "error fetching judge data with {$sql} : " . $dbConn->ErrorMsg() . "<br/>\n";
}
if (!$resultSet->EOF) {
    extract($resultSet->fields);
}
$page_opening = "Email to group members From: {$roepnaam} {$voorvoegsel} {$achternaam} <span style='font-family: courier'>&lt;{$email1}&gt;</span>";
$page = new PageContainer();
$page->setTitle('Mail-list page');
$nav = new Navigation($tutor_navtable, basename($PHP_SELF), $page_opening);
$page->addBodyComponent($nav);
$page->addFileContentsOnce('templates/tinymce_include.html');
$page->addHeadText('<script type="text/javascript">
예제 #2
0
    }
    $subSelect = $cols . "\n from" . $join;
    //    $dbConn->log($subSelect);
}
$grades = "";
$con = '';
foreach ($gradeColumns as $grade) {
    $grades .= $con . "subselect.{$grade},subselect.{$grade}_mul";
    $con = "\n\t,";
}
$sql = "select snummer,achternaam,roepnaam,voorvoegsel, afko, year, \n" . "milestone,grp_num,\"alias\",tutor,\"role\",{$grades},sw.final_grade \n" . "from prj_grp join all_prj_tutor using(prjtg_id)\n" . " join student using(snummer) \n" . " left join milestone_grade using(prjm_id,snummer)\n" . " left join student_role using (prjm_id,snummer)\n" . " left join project_roles using (prj_id,rolenum)\n" . " join ({$subSelect}) subselect using(snummer)\n" . " left join (select snummer,round(grade_weight_sum/w.weight_sum,1) \n" . " as final_grade from project_grade_weight_sum_product\n" . " cross join (select weight_sum from project_weight_sum where prj_id={$prj_id}) w where prj_id={$prj_id} ) sw using(snummer)\n" . "where prjm_id={$prjm_id} order by grp_num,achternaam,roepnaam";
$pp = array();
$dbConn->log($sql);
$spreadSheetWriter = new SpreadSheetWriter($dbConn, $sql);
$title = "Results for all participants in project {$afko} {$year} milestone {$milestone}";
$spreadSheetWriter->setFilename($filename)->setLinkUrl($server_url . $PHP_SELF)->setTitle($title)->setColorChangerColumn(7);
//->setRowParser( new RowWithArraysParser());
$spreadSheetWriter->processRequest();
$pp['spreadSheetWidget'] = $spreadSheetWriter->getWidget();
$page = new PageContainer();
$page->setTitle('Get group tables');
$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);
$rainbow = new RainBow();
$pp['rtable'] = getQueryToTableChecked($dbConn, $sql, false, 7, $rainbow, -1, '', '');
$pp['selector'] = $prjSel->getSelector();
$pp['selectionDetails'] = $prjSel->getSelectionDetails();
$page->addBodyComponent($nav);
$page->addHtmlFragment('templates/milestonegrades.html', $pp);
$page->show();
예제 #3
0
$page->setTitle('Peer assessment, define project');
$page_opening = "Define the number of criteria for the project.";
$nav = new Navigation($tutor_navtable, basename($PHP_SELF), $page_opening);
$nav->setInterestMap($tabInterestCount);
$page->addBodyComponent($nav);
$form1 = new HtmlContainer("<fieldset id='form1'><legend><b>Project milestone and number of criteria.</b></legend>");
$form1Form = new HtmlContainer("<form id='project' method='post' name='project' action='{$PHP_SELF}'>");
$input_prj_selector = "<select name='prj_id' onchange='submit()'>\n" . getOptionListGrouped($dbConn, "select afko||': '||description||' ('||year||')' as name" . ", year as namegrp,prj_id as value from project order by year desc,afko", $prj_id) . "\n</select>\n";
if ($isTutorOwner) {
    $input_num_criteria = "<input class='" . $validator->validationClass('critcount') . "' type='text' align='right' size='1' maxlength='2' name='critcount' value='{$critcount}'/>";
    $input_submit_button = "<input type='submit' name='setcrit' value='Set Criteria'/>";
} else {
    $input_num_criteria = "{$critcount}";
    $input_submit_button = '';
}
$project_selector = $prjSel->getSelector();
$sql = "select bc.criterium_id as bc,pc.criterium_id as ac,pc.criterium_id as uc,nl_short,nl,de_short,de,en_short,en\n" . " from base_criteria bc natural left join (select prjm_id,criterium_id from prjm_criterium \n" . "   where prjm_id={$prjm_id}) pc order by bc";
$resultSet = $dbConn->Execute($sql);
if ($resultSet === false) {
    $dbConn->log("cannot get date with {$sql}, reason: " . $dbConn->ErrorMsg() . "<br/>\n");
}
$rainbow = new RainBow(STARTCOLOR, COLORINCREMENT_RED, COLORINCREMENT_GREEN, COLORINCREMENT_BLUE);
$table = "<table style='border-collapse:collapse' border='1'>\n<tr valign='top' >\n   <th>C</th>\n   <th>S</th>\n   <th>U</th>\n   <th colspan='2'>NL</th>\n   <th colspan='2'>DE</th>\n   <th colspan='2'>EN</th>\n   </tr>";
while (!$resultSet->EOF) {
    extract($resultSet->fields);
    $color = $rainbow->getNext();
    $checked = isset($ac) && '' != $ac ? 'checked' : '';
    $table .= "<tr valign='top' style='background:{$color}'>\n   <td>{$bc}</td>\n   <td > <input type='checkbox' name='criterium_id[]', value='{$bc}' {$checked}/></td>\n   <td>{$uc}</td>\n   <td >{$nl_short}</td>\n   <td >{$nl}</td>\n   <td >{$de_short}</td>\n   <td >{$de}</td>\n   <td >{$en_short}</td>\n   <td >{$en}</td>\n   </tr>\n";
    $resultSet->moveNext();
}
$table .= "</table>";
예제 #4
0
    echo 'Error: ' . $dbConn->ErrorMsg() . ' with ' . $sql;
} else {
    extract($resultSet->fields);
    $zip_filesize = number_format($zip_filesize, 0, ',', '.');
}
echo $nav->show();
?>
<div id='navmain' style='padding:1em;'>
    <h1>Read uploaded files</h1>
    <fieldset><legend>select project/milestone</legend>
        <form method="get" name="project" action="<?php 
echo $PHP_SELF;
?>
">
<?php 
echo $prjSel->getSelector();
?>
<input type="submit" value="Get Project"/>
  <?php 
echo $prj_id;
?>
M<?php 
echo $milestone;
?>
/prjm_id=<?php 
echo $prjm_id;
?>
( <?php 
echo $doccount;
?>
 documents).
예제 #5
0
$prjSel->setJoin('milestone_grp using (prj_id,milestone) natural join activity_project ');
$prjSel->setJoin(' all_project_scribe using(prj_id) ');
$prjSel->setWhere(' prj_id in (select prj_id from project_task) and ' . $peer_id . '=scribe');
extract($prjSel->getSelectedData());
$_SESSION['prj_id'] = $prj_id;
$_SESSION['prjm_id'] = $prjm_id;
$_SESSION['milestone'] = $milestone;
$filename = 'presencelist_' . $afko . '-' . date('Ymd') . '.csv';
$csvout = 'N';
$csvout_checked = '';
if (isset($_REQUEST['csvout'])) {
    $csvout = $_REQUEST['csvout'];
    $csvout_checked = $csvout == 'Y' ? 'checked' : '';
}
//pagehead2("Presence list to $afko $year $description");//,$scripts);
$prj_id_selector = $prjSel->getSelector();
$selection_details = $prjSel->getSelectionDetails();
$sql = "select st.snummer,roepnaam||coalesce(' '||voorvoegsel||' ',' ')||achternaam as name," . " '#'||task_number||': '||apt.afko||': '||apt.description as checktitle,\n" . " pt.name as task_name,\n" . " coalesce(grade::text,mark) as check, ptc.comment as title,photo,grp_num \n" . " from prj_grp join all_prj_tutor apt using(prjtg_id)\n" . " natural join student st \n" . " join portrait tp using (snummer) \n" . " join project_task pt using(prj_id)\n" . " left join project_task_completed_latest ptc using(snummer,task_id)\n" . " where prj_id={$prj_id} \n" . " order by grp_num,achternaam,roepnaam, task_number\n";
$dbConn->log($sql);
$page = new PageContainer();
include 'js/balloonscript.php';
$page->setTitle('Overview of tasks completed');
$page->addHeadComponent(new Component("<style type='text/css'>\n    *.notered { \n\tbackground-image:url('images/redNote.png');\n    }\n    *.notegreen { \n\tbackground-image:url('images/greenNote.png');\n    }\n    *.noteblue { \n\tbackground-image:url('images/blueNote.png');\n    }\n </style>"));
$page_opening = "Task completed list for project {$afko} {$description} prj_id {$prj_id}";
$nav = new Navigation($tutor_navtable, basename($PHP_SELF), $page_opening);
$page->addBodyComponent($nav);
$tableBuilder = new TableBuilder($dbConn, new TaskRowFactory());
$task_table = $tableBuilder->getTable($sql, 'snummer');
$templatefile = 'templates/taskoverview.html';
$template_text = file_get_contents($templatefile, true);
$text = '';
예제 #6
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');
$page->addScriptResource('js/jquery-ui-1.8.17.custom.min.js');
$pp['rtable'] = getQueryToTableChecked2($dbConn, $sql, true, -1, new RainBow(), 'doctype[]', $doctype_set, $inputColumns);
if (count($datePickers) > 0) {
    foreach ($datePickers as $dp) {
        $page->addJqueryFragment("\$('#" . $dp . "').datepicker(dpoptions);");
    }
}
예제 #7
0
$criteria = criteriaShortAsArray(getCriteria($prjm_id), 'en');
$criteria[] = 'Overall';
$sql = "select prjtg_id,tutor_grade from prj_tutor where prjm_id={$prjm_id}";
$sql2 = "";
$resultSet = $dbConn->Execute($sql);
$con = " ";
while (!$resultSet->EOF) {
    extract($resultSet->fields);
    $sql2 .= $con . " select * from assessment_grade_set({$prjtg_id},{$tutor_grade})\n";
    $con = "union\n\t";
    $resultSet->moveNext();
}
//echo "<pre>$sql2</pre>\n";
$sql = "select s.snummer,achternaam,roepnaam,voorvoegsel,gebdat,grp_num,coalesce(mg.grade,tutor_grade) as group_grade," . "ags.grade,\n" . "ags.multiplier,ags.multiplier[array_upper(ags.multiplier,1)] as final_mult," . "ags.grade[array_upper(ags.grade,1)] as peers_grade,tutor,mg.grade as final_tutor_grade,operator,date_trunc('second',ts) as trans_time\n" . " from  \n" . " prj_grp \n " . " join all_prj_tutor using(prjtg_id) \n" . " join student s using(snummer)\n " . "left join ({$sql2}) ags using(prjtg_id,snummer)\n" . " left join milestone_grade mg using(snummer,prjm_id) left join transaction using(trans_id)\n" . " where prjm_id={$prjm_id} order by grp_num,achternaam";
$spreadSheetWriter = new SpreadSheetWriter($dbConn, $sql);
$title = "Results for all peer assessment groups in project {$afko} {$year} milestone {$milestone}";
$spreadSheetWriter->setFilename($filename)->setLinkUrl($server_url . $PHP_SELF)->setTitle($title)->setColorChangerColumn(5)->setRowParser(new RowWithArraysParser());
$spreadSheetWriter->processRequest();
$pp['spreadSheetWidget'] = $spreadSheetWriter->getWidget();
$pp['projectSelector'] = $prjSel->getSelector();
$pp['selectionDetails'] = $prjSel->getSelectionDetails();
$page = new PageContainer();
$page->setTitle('All group tables');
$page_opening = "Group peer assessment results for all groups of 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);
$rainbow = new RainBow();
$pp['rtable'] = getQueryToTableChecked($dbConn, $sql, false, 5, $rainbow, -1, '', '');
$page->addBodyComponent($nav);
$page->addHtmlFragment('templates/allgroupresult.html', $pp);
$page->show();