Ejemplo n.º 1
0
<?php

/**
 * mini task_timer
 */
require_once 'component.inc';
$peer_id = $_SESSION['peer_id'];
require_once 'tasktimer.inc';
$page = new PageContainer();
$page->setTitle('Your personal task timer');
$task_div = new HtmlContainer('<div id=\'task_timer_id\' class=\'navopening\'>');
ob_start();
taskTimer($_SESSION['peer_id']);
$task_div->addText("<a href='logout.php' title='logout'><img src='" . IMAGEROOT . "/close_1.png' border='0' alt='logout'/></a>");
$task_div->addText(ob_get_clean());
$page->addBodyComponent($task_div);
$page->show();
Ejemplo n.º 2
0
    $submit_button = '';
}
$resultSet = $dbConn->execute("select count(*) as participants from prj_grp join prj_tutor using(prjtg_id) where prjm_id={$prjm_id}");
extract($resultSet->fields);
// generating output
$page = new PageContainer();
$page->setTitle('Select participating student_class');
$page_opening = "Select the student_class of the participating students";
$nav = new Navigation($tutor_navtable, basename($PHP_SELF), $page_opening);
$page->addBodyComponent($nav);
$resultSet = $dbConn->Execute("select afko,description from project where prj_id={$prj_id}");
extract($resultSet->fields);
$form1Form = new HtmlContainer("<div id='projectsel'>");
$prjSel->setJoin(" (select distinct prjm_id from prj_milestone natural join project  where owner_id={$peer_id}) p_mil using (prjm_id)");
//$dbConn->log($prjSel->getQuery());
$form1Form->addText($prjSel->getWidget());
$form2Form = new HtmlContainer("<form method='post' name='group_def' action='{$PHP_SELF}'>");
//$form2Table = new HtmlContainer( "<table border='3' style='border-collapse:3d; padding:2pt;'" .
//                " align='left'  rules='groups' frame='box'" .
//                "summary='class selection' id='form2table'>" );
$form2Table = new HtmlContainer("<div id='tabs'>");
//$form2Form->addText( "Legend:class name [class size]<br/>\n" );
$sql = "select distinct rtrim(student_class.sclass) as sclass,class_id,sort1,sort2,sort_order,\n" . "rtrim(faculty.faculty_short) as opl_afko, student_count,rtrim(faculty.faculty_short) as faculty_short,\n" . "trim(cluster_name) as cluster_name,class_cluster \n" . "from student_class\n" . " join faculty using(faculty_id)\n" . "join class_cluster using(class_cluster)\n" . "join current_student_class using (class_id) join class_size using(class_id)\n " . "where sort2 < 9 and sclass not like 'UIT%' \n" . "order by sort_order,faculty_short desc,cluster_name,sort1,sort2,sclass asc";
$resultSet = $dbConn->Execute($sql);
if ($resultSet === false) {
    die("<br>Cannot get groups with \"" . $sql . '", cause ' . $dbConn->ErrorMsg() . "<br>");
}
//ob_start();
$opl_afko = '';
$colcount = 0;
$curriculum = '';
Ejemplo n.º 3
0
    $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>";
//$form1Form->addText($table);
$templatefile = 'templates/criteria3.html.inc';
$template_text = file_get_contents($templatefile, true);
if ($template_text === false) {
    $form1Form->addText("<strong>cannot read template file {$templatefile}</strong>");
} else {
    eval("\$text = \"{$template_text}\";");
    $form1Form->addText($text);
}
$form1->add($form1Form);
$page->addBodyComponent($form1);
$page->addBodyComponent(new Component('<!-- db_name=' . $db_name . ' $Id: criteria3.php 1723 2014-01-03 08:34:59Z hom $ -->'));
$page->show();
Ejemplo n.º 4
0
<?php

include_once './peerlib/peerutils.inc';
require_once './peerlib/simplequerytable.inc';
requireCap(CAP_TUTOR);
$page_opening = 'Select or define a project ';
$page = new PageContainer();
$page->setTitle('Fontys knwon courses');
$nav = new Navigation($tutor_navtable, basename($PHP_SELF), $page_opening);
$nav->setInterestMap($tabInterestCount);
$form1 = new HtmlContainer('<fieldset id=\'fieldset1\'><legend>Fontys courses known by peerweb</legend>');
$sql = "select course," . "rtrim(course_description)," . "faculty,faculty_short as inst from fontys_course join faculty using(faculty_id)";
ob_start();
simpletable($dbConn, $sql, '<table border=\'1\' style=\'border-collapse:collapse\' summary=\'table of courses\'>');
$form1->addText(ob_get_clean());
$page->addBodyComponent($form1);
$page->addBodyComponent(new Component('<!-- db_name=$db_name $Id: known_courses.php 1723 2014-01-03 08:34:59Z hom $ -->'));
$page->addBodyComponent($nav);
$page->show();
Ejemplo n.º 5
0
// } else {
//  $submit_button ='';
// }
$project_selector = getProjectSelector($dbConn, $peer_id, $prj_id);
$templatefile = 'templates/defmilestoneform1.html.inc';
$template_text = file_get_contents($templatefile, true);
if ($template_text === false) {
    $form1Form->addText("<strong>cannot read template file {$templatefile}</strong>");
} else {
    eval("\$text = \"{$template_text}\";");
    $form1Form->addText($text);
}
$form1->add($form1Form);
$page->addBodyComponent($nav);
$page->addBodyComponent($form1);
$form2 = new HtmlContainer("<fieldset><legend>Due dates</legend>");
$form2->addText("After you determined the number of milestones, select the due dates. (Defaults are 14 days from now).");
$form2Form = new HtmlContainer("<form method='post' name='duedates' action='{$PHP_SELF}'>");
$sql = "select 'M'||milestone as name, assessment_due,\n" . "  case when prj_milestone_open=true then  'open' else 'closed' end as open \n" . " from prj_milestone where prj_id={$prj_id} order by milestone";
$inputColumns = array('1' => array('type' => 'N', 'size' => '12'));
ob_start();
// collect table data
// column '0' = M<milestone>
$inputColumns = array('1' => array('type' => 'N', 'size' => '12'));
queryToTableChecked2($dbConn, $sql, true, 0, new RainBow(0x46b4b4, 64, 32, 0), 'open[]', array(), $inputColumns);
$form2Form->addText(ob_get_clean());
$form2Form->addText("<input type='hidden' name='prj_id' value='{$prj_id}' />\n" . "<input type='submit' name='submitdue' value='Submit' />\n" . "<input type='reset' name='reset' value='Reset' />");
$form2->add($form2Form);
$page->addBodyComponent($form2);
$page->addBodyComponent(new Component('<!-- db_name=$db_name $Id: defmilestone.php 1723 2014-01-03 08:34:59Z hom $ -->'));
$page->show();
Ejemplo n.º 6
0
$form1 = new HtmlContainer("<div>");
$input_module_code = "<input type='text' size='10' maxlength='10' class='" . $validator->validationClass('afko') . "' name='afko' value='{$afko}' title='Progress module code'/>";
$input_year = "<input type=text size='4' maxlength='4' align='right' name='year' class='" . $validator->validationClass('year') . "' value='{$year}' title='starting year of scollastic year' />";
$input_description = "<input type='text' size='30' maxlength='30' name='project_description' class='" . $validator->validationClass('project_description') . "' value='{$description}' title='module description in 30 characters'/>\n";
$input_valid_until = "<input type='text' maxlength='10' size='8' class='" . $validator->validationClass('valid_until') . "' " . "name='valid_until' id='embeddedPicker' value='{$valid_until}' title='Project entry to be used until. Date in yyyy-mm-dd format' style='text-align:right'/>\n";
$input_comment = "<textarea class='" . $validator->validationClass('comment') . "' name='comment' cols='72' rows='5'>{$comment}</textarea>\n";
$input_update_button = $isTutorOwner ? "<input type='submit' name='bsubmit'\n" . "value='Update' title='Use this to update project data for project_id={$prj_id}' />" : '';
$input_course = "<select name='course' title='set base course'>\n" . getOptionListGrouped($dbConn, "select trim(course_short)||':'||trim(course_description)||'('||course||')' as name,\n" . " course as value,\n" . " faculty_short as namegrp\n" . " from fontys_course fc natural join faculty f\n" . " order by namegrp,name", $course);
$project_selector = getprojectSelector($dbConn, $peer_id, $prj_id);
$sql = "select count(prj_id) as active_project_set from activity_project where prj_id={$prj_id}";
$resultSet = $dbConn->Execute($sql);
if ($resultSet === false) {
    die("<br>Cannot activity_project data with <pre>{$sql}</pre> " . $dbConn->ErrorMsg() . "<br>");
}
$activity_project_checked = $resultSet->fields['active_project_set'] ? 'checked' : '';
$input_activity_project = "<input type='checkbox' name='activity_project' value='set' {$activity_project_checked}/>";
$templatefile = 'templates/defproject.html';
$template_text = file_get_contents($templatefile, true);
if ($template_text === false) {
    $form1Form->addText("<strong>cannot read template file {$templatefile}</strong>");
} else {
    eval("\$text = \"{$template_text}\";");
    $form1->addText($text);
}
$page->addBodyComponent($nav);
$page->addBodyComponent($form1);
$page->addHeadText(file_get_contents('templates/simpledatepicker.html'));
$page->addScriptResource('js/jquery-1.7.1.min.js');
$page->addScriptResource('js/jquery-ui-1.8.17.custom.min.js');
$page->addJqueryFragment('$(\'#embeddedPicker\').datepicker(dpoptions);');
$page->show();
Ejemplo n.º 7
0
} else {
    $submit_button = '';
}
$project_selector = getProjectSelector($dbConn, $peer_id, $prj_id);
$templatefile = 'templates/addmilestone.html';
$template_text = file_get_contents($templatefile, true);
if ($template_text === false) {
    $form1Form->addText("<strong>cannot read template file {$templatefile}</strong>");
} else {
    eval("\$text = \"{$template_text}\";");
    $form1Form->addText($text);
}
$form1->add($form1Form);
$page->addBodyComponent($form1);
$form2 = new HtmlContainer("<fieldset><legend>Defined milestones and due dates.</legend>");
$form2->addText("<p>After you determined the number of milestones, select the due dates. " . "(Defaults are 14 days from now).</p>" . "<p>Weight is used in grade calculation with more milestones per project, <br/>" . "the name is optional and describes the purpose of the milestone/grade and weight.</p>");
$form2Form = new HtmlContainer("<form method='post' name='duedates' action='{$PHP_SELF}'>");
$sql = "select milestone as number, prjm_id, assessment_due,weight, milestone_name,\n" . "  case when prj_milestone_open=true then  'open' else 'closed' end as open \n" . " from prj_milestone where prj_id={$prj_id} order by milestone";
$inputColumns = array('1' => array('type' => 'N', 'size' => '12'));
ob_start();
// collect table data
// column '0' = M<milestone>
$inputColumns = array('2' => array('type' => 'D', 'size' => '10'), '3' => array('type' => 'N', 'size' => '1'), '4' => array('type' => 'T', 'size' => '20'));
$datePickers = array();
queryToTableChecked2($dbConn, $sql, true, 0, new RainBow(0x46b4b4, 64, 32, 0), 'open[]', array(), $inputColumns);
$form2Form->addText(ob_get_clean());
$form2Form->addText("<input type='hidden' name='prj_id' value='{$prj_id}' />\n" . "<input type='submit' name='submitdue' value='Update' />\n" . "<input type='reset' name='reset' value='Reset' />");
$form2->add($form2Form);
$page->addBodyComponent($form2);
$page->addBodyComponent(new Component('<!-- db_name=$db_name $Id: addmilestone.php 1769 2014-08-01 10:04:30Z hom $ -->'));
$page->addHeadText(file_get_contents('templates/simpledatepicker.html'));
Ejemplo n.º 8
0
}
$form1->add($form1Form);
$form2Form = new HtmlContainer("<form id='contacts' method='post' name='contacts' action='{$PHP_SELF}'>");
$form2Table = new HtmlContainer("<table id='contact_table' style='border-collapse:collapse' border='1' summary='contacts table'>");
$form2Table->addText("<tr><th colspan='3'>Grp,tutor</th><th colspan='3'>Current contact</th><th>New contact</th></tr>\n" . "<tr><th>Grp</th>" . "<th>Alias</th>" . "<th>Tutor</th>" . "<th>name</th>" . "<th>number</th>" . "<th>email</th>" . "<th>select</th>" . "</tr>");
$sql = "select pt.grp_num,pt.prjtg_id,alias,\n" . "cs.achternaam as cs_achternaam,cs.voorvoegsel as cs_voorvoegsel,cs.roepnaam as cs_roepnaam,cs.snummer as contact,\n" . "rtrim(cs.email1) as cs_email1,pt.grp_num,\n" . "ts.achternaam||', '||ts.roepnaam||coalesce(' '||ts.voorvoegsel,'') as tutor_naam, tut.tutor\n" . "  from prj_tutor pt join tutor tut on(pt.tutor_id=tut.userid) join student ts on(userid=snummer)\n" . " left join grp_alias ga using(prjtg_id)\n" . " left join prj_contact pc using(prjtg_id)\n" . " left join student cs on (pc.snummer=cs.snummer)\n" . " where prjm_id={$prjm_id} order by pt.grp_num";
//$dbConn->log($sql);
$resultSet = $dbConn->Execute($sql);
$rowStyle = array("style='background:#FFC;'", "style='background:#CFF'");
$rowNr = 0;
if ($resultSet === false) {
    echo "cannot get contact data with<pre> {$sql}</pre>, reason: " . $dbConn->ErrorMsg() . "<BR>\n";
} else {
    if (!$resultSet->EOF) {
        while (!$resultSet->EOF) {
            extract($resultSet->fields);
            $sql = "select rtrim(achternaam)||', '||rtrim(roepnaam)||coalesce(' '||voorvoegsel,'') as name," . "prjtg_id||':'||snummer as value from prj_grp join prj_tutor using(prjtg_id) join student using(snummer)\n" . " where prjtg_id={$prjtg_id}\n" . "order by achternaam, roepnaam";
            $tdStyle = $rowStyle[$rowNr % 2];
            $contact_selector = "<select name='contact[]' style='width:20em' {$tdStyle}>\n" . getOptionList($dbConn, $sql, $prjtg_id . ':' . $contact) . "\n</select>\n";
            $row = "<tr><td {$tdStyle}>{$grp_num}</td>" . "<td {$tdStyle}>{$alias}</td>" . "<td {$tdStyle}>{$tutor_naam}</td>" . "<td {$tdStyle}>{$cs_roepnaam} {$cs_voorvoegsel} {$cs_achternaam}</td>\n" . "<td {$tdStyle}>{$contact}</td>" . "<td {$tdStyle}><a href='mailto:{$cs_email1}'>{$cs_email1}</a></td>" . "<td {$tdStyle}>" . $contact_selector . "</td>\n" . "</tr>\n";
            $form2Table->addText($row);
            $resultSet->moveNext();
            $rowNr++;
        }
    }
}
$form2Form->add($form2Table);
$form2Form->addText("To set these contacts, press <input type='submit' name='bsubmit' value='Apply'/> or <input type='reset'/>" . "<input type='hidden' name='prj_id_milestone' value='{$prj_id}:{$milestone}'/>");
$form1->add($form2Form);
$page->addBodyComponent($form1);
$page->show();