Exemple #1
0
<?php

require_once './peerlib/peerutils.inc';
require_once './peerlib/validators.inc';
include_once 'navigation2.inc';
require_once 'studentpicker.php';
require_once 'prjMilestoneSelector2.php';
requireCap(CAP_TUTOR);
$prjm_id = $prj_id = $milestone = 1;
$newsnummer = 0;
unset($_SESSION['newsnummer']);
extract($_SESSION);
$prjSel = new PrjMilestoneSelector2($dbConn, $peer_id, $prjm_id);
extract($prjSel->getSelectedData());
$_SESSION['prj_id'] = $prj_id;
$_SESSION['prjm_id'] = $prjm_id;
$_SESSION['milestone'] = $milestone;
if (isset($_GET['newsnummer'])) {
    unset($_POST['newsnummer']);
    $_REQUEST['newsnummer'] = $newsnummer = validate($_GET['newsnummer'], 'integer', '0');
    //    $dbConn->log('GET '.$newsnummer);
} else {
    if (isset($_POST['newsnummer'])) {
        unset($_GET['newsnummer']);
        $_REQUEST['newsnummer'] = $newsnummer = validate($_POST['newsnummer'], 'integer', '0');
        //    $dbConn->log('POST '.$newsnummer);
    } else {
        unset($_POST['newsnummer']);
        unset($_REQUEST['newsnummer']);
        unset($_GET['newsnummer']);
    }
Exemple #2
0
        if (isset($operator)) {
            $trans_title = "title = 'operator {$operator} at {$ts} from {$from_ip}'";
        }
        return "\t<td>\n" . "\t\t<div style='font-size:80%' id='radio_{$snummer}' class='{$divClass}'>\n" . "\t\t\t<input type='radio' class='absent a{$grp_id}' name='mark_{$snummer}[]'" . " value='' {$checkedAbsent} style='vertical-align: middle' onChange='this.parentNode.className=\"absent\"'>Absent&nbsp;<br/>\n" . "\t\t\t<input type='radio' class='present p{$grp_id}' name='mark_{$snummer}[]'" . " value='P' {$checkedPresent} style='vertical-align: middle' onChange='this.parentNode.className=\"present\"'/>Present&nbsp;<br/>\n" . "\t\t\t<input type='radio' class='reason r{$grp_id}' name='mark_{$snummer}[]' " . "value='A' {$checkedReason} style='vertical-align: middle' onChange='this.parentNode.className=\"reason\"'/>Absent with reason&nbsp;\n" . "\t\t</div>\n\t</td>" . "\t<td class='tabledata'><textarea rows='2' cols='50' name='comment[]'>{$comment}</textarea></td>\n";
        //      ."\t<td class='tabledata num' $trans_title >$trans_id</td>\n";
    }
    public function buildHeaderCell($valueArray)
    {
        return '';
    }
}
$prjm_id = 0;
$act_id = 1;
extract($_SESSION);
//$dbConn->setSqlAutoLog(true);
$prjSel = new PrjMilestoneSelector2($dbConn, $peer_id, $prjm_id);
$prjSel->setJoin(' all_project_scribe aps using(prj_id) ');
$prjSel->setWhere(" {$peer_id} =aps.scribe ");
extract($prjSel->getSelectedData());
$_SESSION['prj_id'] = $prj_id;
$_SESSION['prjm_id'] = $prjm_id;
$_SESSION['milestone'] = $milestone;
if (isset($_REQUEST['act_id'])) {
    $_SESSION['act_id'] = $act_id = validate($_REQUEST['act_id'], 'integer', $act_id);
} else {
    if (!defined($_SESSION['act_id'])) {
        // get last defined activity for project milestone
        $sql = "select max(act_id) as act_id from activity where prjm_id={$prjm_id}";
        $rs = $dbConn->Execute($sql);
        if (!$rs->EOF) {
            extract($rs->fields);
Exemple #3
0
<?php

include_once './peerlib/peerutils.inc';
include_once 'navigation2.inc';
require_once './peerlib/simplequerytable.inc';
require_once 'prjMilestoneSelector2.php';
require_once 'studentpicker.php';
//$dbConn->setSqlAutoLog( $db_name <> 'peer' );
requireCap(CAP_TUTOR);
$prjm_id = 0;
$prj_id = 1;
$milestone = 1;
$newsnummer = 1;
extract($_SESSION);
$prjSel = new PrjMilestoneSelector2($dbConn, $peer_id, $prjm_id);
extract($prjSel->getSelectedData());
$_SESSION['prj_id'] = $prj_id;
$_SESSION['prjm_id'] = $prjm_id;
$_SESSION['milestone'] = $milestone;
// unknown project?
$isTutorOwner = checkTutorOwner($dbConn, $prj_id, $peer_id);
// check if this is tutor_owner of this project
$prjm_id_selector = $prjSel->getSimpleForm();
$mail_button = "&nbsp;";
$isAdmin = hasCap(CAP_SYSTEM) ? 'true' : 'false';
$studentPicker = new StudentPicker($dbConn, $newsnummer, 'Search and select participant to add.');
$newsnummer = $studentPicker->processRequest();
if (isset($_REQUEST['baccept']) && $newsnummer != 0) {
    // try to insert this snummer into max prj_grp
    $sql = "insert into project_scribe (prj_id,scribe) values({$prj_id},{$newsnummer})\n";
    $dbConn->Execute($sql);
<?php

require_once './peerlib/peerutils.inc';
require_once './peerlib/validators.inc';
require_once './peerlib/querytotable.inc';
include_once 'navigation2.inc';
require_once 'prjMilestoneSelector2.php';
require_once 'peerlib/project_selector.inc';
requireCap(CAP_TUTOR);
$prj_id = 1;
$prjtg_id = 1;
$milestone = 1;
$prjm_id = 0;
extract($_SESSION);
$prjSel = new PrjMilestoneSelector2($dbConn, $peer_id, $prjm_id);
extract($prjSel->getSelectedData());
$_SESSION['prj_id'] = $prj_id;
$_SESSION['prjm_id'] = $prjm_id;
$_SESSION['milestone'] = $milestone;
extract($_SESSION);
$doctype_set = array();
$grp_num = 1;
if (isset($_REQUEST['grp_num'])) {
    $grp_num = validate($_REQUEST['grp_num'], 'grp_num', $grp_num);
}
// test if this owner can update this group
$isGroupTutor = checkGroupTutor($dbConn, $prjtg_id, $peer_id);
$isTutorOwner = checkTutorOwner($dbConn, $prj_id, $peer_id);
if ($isTutorOwner && isset($_GET['copyroles']) && isset($_GET['roprj_id']) && isset($_GET['target_prj_id'])) {
    $roprj_id = $_GET['roprj_id'];
    $target_prj_id = $_GET['target_prj_id'];
Exemple #5
0
<?php

requireCap(CAP_TUTOR);
include_once './peerlib/peerutils.inc';
include_once 'documentfolders2.inc';
include_once 'navigation2.inc';
require_once 'prjMilestoneSelector2.php';
$prj_id = 1;
$milestone = 1;
$prjm_id = 0;
$prjtg_id = 1;
extract($_SESSION);
$prjSel = new PrjMilestoneSelector2($dbConn, $peer_id, $prjm_id);
$prjSel->setJoin('has_uploads using (prj_id,milestone)');
extract($prjSel->getSelectedData());
$_SESSION['prj_id'] = $prj_id;
$_SESSION['prjm_id'] = $prjm_id;
$_SESSION['milestone'] = $milestone;
$doctype = 1;
if (isset($_REQUEST['doctype'])) {
    $_SESSION['doctype'] = $doctype = validate($_REQUEST['doctype'], 'integer', 1);
}
if (!isset($_SESSION['doctype'])) {
    $sql = "select min(doctype) as doctype from uploads where prjm_id={$prjm_id}";
    $resultSet = $dbConn->Execute($sql);
    if (!$resultSet->EOF) {
        extract($resultSet->fields);
    } else {
        $doctype = 1;
    }
}
Exemple #6
0
<?php

include_once './peerlib/peerutils.inc';
requireCap(CAP_TUTOR);
include_once 'navigation2.inc';
require_once 'prjMilestoneSelector2.php';
require_once 'mailFunctions.php';
$prj_id = 1;
$milestone = 1;
$prjm_id = 0;
extract($_SESSION);
$prjSel = new PrjMilestoneSelector2($dbConn, $peer_id, $prjm_id);
extract($prjSel->getSelectedData());
$_SESSION['prj_id'] = $prj_id;
$_SESSION['prjm_id'] = $prjm_id;
$_SESSION['milestone'] = $milestone;
ob_start();
// get tutor email address
$tutor = $_SESSION['tutor_code'];
$tutor_id = $_SESSION['tutor_id'];
$sql = "select email1 as email from tutor join student on(userid=snummer) where tutor='{$tutor}'";
$resultSet = $dbConn->Execute($sql);
if ($resultSet === false) {
    die("<br>Cannot read tutor email address " . $sql . " reason " . $dbConn->ErrorMsg() . "<br>");
}
$replyto = $resultSet->fields['email'];
$snmailto = array();
$formsubject = "Please fill in your peer assessment data for project \$afko: \$description";
$templatefile = "templates/mailbodytemplate.html.inc";
$sqlsender = "select rtrim(email1) as sender,roepnaam||coalesce(' '||voorvoegsel,'')||' '||achternaam as sender_name," . "coalesce(signature," . "'sent by the peerweb service on behalf of '||roepnaam||coalesce(' '||voorvoegsel,'')||' '||achternaam)\n" . "  as signature from student left join email_signature using(snummer) where snummer='{$peer_id}'";
$rs = $dbConn->Execute($sqlsender);
            $class = "class='hasnote notered' ";
        } else {
            $class = $title = '';
        }
        $result .= "\t\t<td {$class} {$title}>" . $valueArray['check'] . "</td>\n";
        return $result;
    }
}
// get group tables for a project
$prj_id = 0;
$prjm_id = 0;
$milestone = 1;
$afko = 'PRJ00';
$description = '';
extract($_SESSION);
$prjSel = new PrjMilestoneSelector2($dbConn, $peer_id, $prjm_id);
//$prjSel->setJoin('milestone_grp using (prj_id,milestone) natural join activity_project ');
$prjSel->setJoin('activity_project using(prj_id) join all_project_scribe using(prj_id) ');
$prjSel->setWhere(' prjm_id in (select prjm_id from activity) 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);
include_once './peerlib/peerutils.inc';
include_once 'navigation2.inc';
require_once 'prjMilestoneSelector2.php';
require_once 'maillists.inc.php';
if (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE')) {
    include_once 'templates/getrealbrowser.html';
    exit(0);
}
$maillist_dir = '/home/maillists';
//$dbConn->setSqlAutoLog( $db_name <> 'peer' );
requireCap(CAP_TUTOR);
$prjm_id = 0;
$prj_id = 1;
$milestone = 1;
extract($_SESSION);
$prjSel = new PrjMilestoneSelector2($dbConn, $peer_id, $prjm_id);
$prjSel->setWhere(" exists (select * from prj_grp pg join prj_tutor pt on (pg.prjtg_id=pt.prjtg_id) where pt.prjm_id=pm.prjm_id)");
extract($prjSel->getSelectedData());
$_SESSION['prj_id'] = $prj_id;
$_SESSION['prjm_id'] = $prjm_id;
$_SESSION['milestone'] = $milestone;
// unknown project?
$grp_num = 1;
if (isset($_POST['grp_num'])) {
    $_SESSION['grp_num'] = $grp_num = $_POST['grp_num'];
}
$isTutorOwner = checkTutorOwnerMilestone($dbConn, $prjm_id, $peer_id);
// check if this is tutor_owner of this project
if (isset($_POST['maillist'])) {
    createMaillists($dbConn, $prjm_id);
}
Exemple #9
0
<?php

include_once './peerlib/peerutils.inc';
include_once 'navigation2.inc';
require_once 'prjMilestoneSelector2.php';
require_once 'maillists.inc.php';
$maillist_dir = '/home/maillists';
//$dbConn->setSqlAutoLog( $db_name <> 'peer' );
requireCap(CAP_TUTOR);
$prjm_id = 0;
$prj_id = 1;
$milestone = 1;
extract($_SESSION);
$prjSel = new PrjMilestoneSelector2($dbConn, $peer_id, $prjm_id);
$prjSel->setWhere(" exists (select * from prj_grp where prjm_id=pm.prjm_id)");
extract($prjSel->getSelectedData());
$_SESSION['prj_id'] = $prj_id;
$_SESSION['prjm_id'] = $prjm_id;
$_SESSION['milestone'] = $milestone;
// unknown project?
$grp_num = 1;
if (isset($_POST['grp_num'])) {
    $_SESSION['grp_num'] = $grp_num = $_POST['grp_num'];
}
$isTutorOwner = checkTutorOwnerMilestone($dbConn, $prjm_id, $peer_id);
// check if this is tutor_owner of this project
if (isset($_POST['maillist'])) {
    createMaillists($dbConn, $prjm_id);
}
if (isset($_POST['dup'])) {
    $new_prjm_id = $_POST['dup_prjm_id'];
Exemple #10
0
<?php

include_once './peerlib/peerutils.inc';
include_once 'navigation2.inc';
include_once 'openBarChart2.php';
require_once 'prjMilestoneSelector2.php';
require_once 'mailFunctions.php';
//$dbConn->setSqlAutoLog( $db_name <> 'peer' );
requireCap(CAP_TUTOR);
$prjm_id = 0;
$prj_id = 1;
$milestone = 1;
extract($_SESSION);
$prjSel = new PrjMilestoneSelector2($dbConn, $peer_id, $prjm_id);
$prjSel->setWhere('valid_until > now()::date');
extract($prjSel->getSelectedData());
$_SESSION['prj_id'] = $prj_id;
$_SESSION['prjm_id'] = $prjm_id;
$_SESSION['milestone'] = $milestone;
// unknown project?
$grp_num = 1;
if (isset($_POST['grp_num'])) {
    $_SESSION['grp_num'] = $grp_num = $_POST['grp_num'];
}
$isTutorOwner = checkTutorOwnerMilestone($dbConn, $prjm_id, $peer_id);
// check if this is tutor_owner of this project
// process data
groupOpener($dbConn, $prjm_id, $isTutorOwner, $_POST);
$prjm_id_selector = $prjSel->getSimpleForm();
$mail_button = "&nbsp;";
$isAdmin = hasCap(CAP_SYSTEM) ? 'true' : 'false';
Exemple #11
0
include_once './peerlib/peerutils.inc';
require_once './peerlib/validators.inc';
include_once 'navigation2.inc';
require_once 'conffileeditor2.php';
requireCap(CAP_TUTOR);
require_once 'prjMilestoneSelector2.php';
$pp = array();
$pp['cmd_result'] = '';
$pp['executionResult'] = '';
$prj_id = 1;
$milestone = 1;
$prjm_id = 0;
$year = date('Y');
extract($_SESSION);
$prjSel = new PrjMilestoneSelector2($dbConn, $peer_id, $prjm_id);
extract($prjSel->getSelectedData());
$_SESSION['prj_id'] = $prj_id;
$_SESSION['prjm_id'] = $prjm_id;
$_SESSION['milestone'] = $milestone;
$new_repos_name = strtolower($afko) . 'm' . $milestone;
$tutor = $tutor_code;
if ($db_name == 'peer2') {
    $reposroot = '/home/svnt';
    $url_base = 'svnt';
} else {
    $reposroot = '/home/svn';
    $url_base = 'svn';
}
pagehead('Create Subversion repositories');
$page = new PageContainer();
Exemple #12
0
<?php

include_once './peerlib/peerutils.inc';
include_once 'navigation2.inc';
require_once 'prjMilestoneSelector2.php';
requireCap(CAP_TUTOR);
$prj_id = 0;
$milestone = 1;
$grp_num = 1;
$prjtg_id = 1;
$prj_id = 1;
$milestone = 1;
$prjm_id = 0;
extract($_SESSION);
$prjSel = new PrjMilestoneSelector2($dbConn, $peer_id, $prjm_id);
extract($prjSel->getSelectedData());
$_SESSION['prj_id'] = $prj_id;
$_SESSION['prjm_id'] = $prjm_id;
$_SESSION['milestone'] = $milestone;
$csvout = 'N';
$sql = "select max(pm.prj_id) as prj_id, min(pt.grp_num) as grp_num, min(pm.milestone) as milestone\n" . " from (select distinct prjtg_id from assessment ) a join prj_tutor pt using(prjtg_id) join prj_milestone pm using(prjm_id)";
$resultSet = $dbConn->Execute($sql);
if ($resultSet === false) {
    echo "<br>Cannot get prj_id, grp_num with \"" . $sql . '", cause ' . $dbConn->ErrorMsg() . "<br>";
    stacktrace(1);
    die;
}
if (isset($resultSet->fields)) {
    extract($resultSet->fields);
}
extract($_SESSION);
Exemple #13
0
require_once './peerlib/validators.inc';
include_once 'navigation2.inc';
include_once './peerlib/simplequerytable.inc';
require_once 'prjMilestoneSelector2.php';
require_once 'presencetable.php';
require_once 'CheckTable.class.php';
require_once 'maillists.inc.php';
requireScribeCap($peer_id);
// get group tables for a project
$prj_id = 0;
$prjm_id = 0;
$milestone = 1;
$afko = 'PRJ00';
$description = '';
extract($_SESSION);
$prjSel = new PrjMilestoneSelector2($dbConn, $peer_id, $prjm_id);
extract($prjSel->getSelectedData());
$_SESSION['prj_id'] = $prj_id;
$_SESSION['prjm_id'] = $prjm_id;
$_SESSION['milestone'] = $milestone;
if (isset($_REQUEST['createmaillists'])) {
    createGroupMaillists($dbConn, $prjm_id);
    createMaillists($dbConn, $prjm_id);
    //  @system('/bin/kickaliasappender');
}
$prj_id_selector = $prjSel->getSelector();
$selection_details = $prjSel->getSelectionDetails();
$sql = "select distinct grp_num,grp_name, trim(email_to_href(maillist||'@fontysvenlo.org')) as maillist, size as members from prj_grp_email natural join prjtg_size\n" . " where prjm_id={$prjm_id}\n" . " union " . "select distinct grp_num,grp_name, trim(email_to_href(maillist||'@fontysvenlo.org')) as maillist, size as members from prj_grp_email_g0 natural join prjm_size\n" . " where prjm_id={$prjm_id}\n" . " union\n" . "select distinct grp_num,'tutors'::text as grp_name, trim(email_to_href(maillist||'@fontysvenlo.org')) as maillist," . " size as members from prj_tutor_email cross join (select count(*) as size from prj_tutor where prjm_id={$prjm_id}) ptes \n" . " where prjm_id={$prjm_id}\n" . "order by grp_num";
$page = new PageContainer();
$page->setTitle('Create of view maillists for peerweb project');
$page_opening = "Mail lists for project {$afko} {$description} prjm_id {$prjm_id} prj_id {$prj_id} milestone {$milestone}";
Exemple #14
0
<?php

require_once './peerlib/peerutils.inc';
require_once './peerlib/querytotable.inc';
include_once 'navigation2.inc';
require_once 'prjMilestoneSelector2.php';
$warn_members = false;
requireCap(CAP_TUTOR);
$prj_id = $milestone = 1;
$prj_id = 1;
$milestone = 1;
$prjm_id = 0;
extract($_SESSION);
$prjSel = new PrjMilestoneSelector2($dbConn, $peer_id, $prjm_id);
extract($prjSel->getSelectedData());
$_SESSION['prj_id'] = $prj_id;
$_SESSION['prjm_id'] = $prjm_id;
$_SESSION['milestone'] = $milestone;
$doctype_set = array();
if (isset($_POST['update']) && isset($_POST['upload_description'])) {
    //    echo"<pre>"; print_r($_POST); echo "</pre>\n";
    $sql = "begin work;\n";
    // "delete from project_deliverables where prj_id=$prj_id\n".
    // "and milestone=$milestone;\n";
    $duedate = date('Y-m-d', mktime() + 28 * 86400);
    // 28 days of seconds;
    $rowCount = $_POST['rowcount'];
    $postRow = 0;
    for ($i = 0; $i < $rowCount; $i++) {
        $cVersionLimit = $_POST['version_limit'][$i];
        $description = $_POST['upload_description'][$i];
Exemple #15
0
include_once './peerlib/peerutils.inc';
require_once './peerlib/validators.inc';
include_once 'navigation2.inc';
require_once 'prjMilestoneSelector2.php';
//requireCap(CAP_TUTOR);
$prj_id = 1;
$milestone = 1;
$prjm_id = 0;
$grp_num = 1;
$year = 2007;
$prjtg_id = 1;
define('MAXROW', '3');
define('MAXCOL', '5');
extract($_SESSION);
$prjSel = new PrjMilestoneSelector2($dbConn, $peer_id, $prjm_id);
$prjSel->setSubmitOnChange(true);
extract($prjSel->getSelectedData());
if ($prjSel->isSelectionChange()) {
    // guess new prjtg_id
    $sql = "select prjtg_id from prj_tutor where prjm_id={$prjm_id} order by grp_num limit 1";
    $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']);
}
Exemple #16
0
<?php

include_once './peerlib/peerutils.inc';
include_once 'navigation2.inc';
require_once 'prjMilestoneSelector2.php';
requireCap(CAP_TUTOR);
extract($_SESSION);
$year = date('Y');
if (date('m') < '07') {
    $year -= 1;
}
$tutor = $tutor_code;
$milestone = 1;
$class_ids = array();
$prjSel = new PrjMilestoneSelector2($dbConn, $peer_id, $prjm_id);
$prjSel->setWhere('valid_until > now()::date')->setExtraInfo("<span style='color:#800'><p>Note that you can only select <a href='alterproject.php'>project</a>s which have a <b>valid until</b> date in the future.</p></span><br/>");
extract($prjSel->getSelectedData());
$_SESSION['prj_id'] = $prj_id;
$_SESSION['prjm_id'] = $prjm_id;
$_SESSION['milestone'] = $milestone;
if (isset($_SESSION['prjm_id'])) {
    $sql = "select distinct class_id,cl.sclass as sclass \n" . "from prj_grp join student using (snummer) join prj_tutor using(prjtg_id)\n" . "  join student_class cl using(class_id)\n" . "where prjm_id={$prjm_id}\n" . " order by sclass,class_id asc";
    $resultSet = $dbConn->Execute($sql);
    if ($resultSet === false) {
        die("<br>Cannot get groups with \"" . $sql . '", cause ' . $dbConn->ErrorMsg() . "<br>");
    }
    $gcount = 0;
    while (!$resultSet->EOF) {
        $sclass = $resultSet->fields['sclass'];
        $class_id = $resultSet->fields['class_id'];
        $class_ids[$gcount] = $class_id;
Exemple #17
0
        $productname = getOrNull($_POST, $g, 'productname');
        $prjtg_id = getOrNull($_POST, $g, 'prjtg_id');
        $youtube_link = getOrNull($_POST, $g, 'youtube_link');
        $youtube_icon_url = getOrNull($_POST, $g, 'youtube_icon_url');
        if ($prjtg_id != 'null') {
            $sql .= "insert into grp_alias (prjtg_id,alias,long_name,website,productname,youtube_link,youtube_icon_url)\n" . "\nvalues ({$prjtg_id},{$alias},{$long_name},{$website},{$productname},{$youtube_link},{$youtube_icon_url});\n";
        }
    }
    $sql .= "commit;\n";
    //    "<pre>$sql</pre>";
    $resultSet = $dbConn->Execute($sql);
    if ($resultSet === false) {
        die("<br>Cannot set grop details with <pre>" . $sql . "</pre> reason " . $dbConn->ErrorMsg() . "<br>");
    }
}
$prjSel = new PrjMilestoneSelector2($dbConn, $peer_id, $prjm_id);
$pSel = $prjSel->getWidget();
extract($prjSel->getSelectedData());
$_SESSION['prj_id'] = $prj_id;
$_SESSION['prjm_id'] = $prjm_id;
$_SESSION['milestone'] = $milestone;
$doctype_set = array();
$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() {
Exemple #18
0
include_once './peerlib/peerutils.inc';
require_once './peerlib/validators.inc';
include_once 'navigation2.inc';
require_once 'prjMilestoneSelector2.php';
require_once 'TableBuilder.class.php';
require_once 'TaskRowFactory.class.php';
requireScribeCap($peer_id);
// get group tables for a project
$prj_id = 0;
$prjm_id = 0;
$milestone = 1;
$afko = 'PRJ00';
$description = '';
extract($_SESSION);
$prjSel = new PrjMilestoneSelector2($dbConn, $peer_id, $prjm_id);
$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);
        $trans_title = '';
        if (isset($operator)) {
            $trans_title = "title='operator {$operator} at {$ts} from {$from_ip}'";
        }
        return "\t<td class='tabledata num'>" . "<input type='text' name='mark[]' value='{$mark}' size='2' maxlength='2' style='width:12pt;'/></td>\n" . "\t<td class='tabledata'><input type='text' name='comment[]' value='{$comment}' size='40'/></td>\n" . "\t<td class='tabledata num' {$trans_title} >{$trans_id}  </td>\n";
    }
    public function buildHeaderCell($valueArray)
    {
        return '';
    }
}
$prjm_id = 0;
$task_id = 1;
extract($_SESSION);
//$dbConn->setSqlAutoLog(true);
$prjSel = new PrjMilestoneSelector2($dbConn, $peer_id, $prjm_id);
$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;
if (isset($_REQUEST['task_id'])) {
    $_SESSION['task_id'] = $task_id = validate($_REQUEST['task_id'], 'integer', $task_id);
} else {
    if (!defined($_SESSION['task_id'])) {
        // get last defined activity for project milestone
        $sql = "select max(task_id) as task_id from project_task where prj_id={$prj_id}";
        $rs = $dbConn->Execute($sql);
        if (!$rs->EOF) {
            extract($rs->fields);
Exemple #20
0
<?php

include_once './peerlib/peerutils.inc';
include_once 'navigation2.inc';
require_once 'prjMilestoneSelector2.php';
//include_once 'project_selector.inc';
requireCap(CAP_TUTOR);
extract($_SESSION);
$critcount = 4;
$prjSel = new PrjMilestoneSelector2($dbConn, $peer_id, $prjm_id);
extract($prjSel->getSelectedData());
$_SESSION['prj_id'] = $prj_id;
$_SESSION['prjm_id'] = $prjm_id;
$_SESSION['milestone'] = $milestone;
if (isset($_POST['criterium_id']) && isset($_POST['setcrit'])) {
    $critset = implode(",", $_POST['criterium_id']);
    $sql = "begin work;\n" . "delete from prjm_criterium where prjm_id={$prjm_id} and criterium_id not in ({$critset});\n" . "insert into prjm_criterium select {$prjm_id},criterium_id from base_criteria \n" . " where criterium_id in ({$critset}) and ({$prjm_id},criterium_id) not in (select prjm_id,criterium_id from prjm_criterium);\n" . "commit\n";
    $resultSet = $dbConn->Execute($sql);
    if ($resultSet === false) {
        $dbConn->log("cannot insert appplied criteria with <pre>{$sql}</pre>, reason: " . $dbConn->ErrorMsg() . "<br/>\n");
        $dbConn->Execute("rollback;");
    }
}
$prj_id = isset($_SESSION['prj_id']) ? $_SESSION['prj_id'] : -1;
extract(getTutorOwnerData($dbConn, $prj_id));
$_SESSION['prj_id'] = $prj_id;
$isTutorOwner = $tutor == $tutor_code;
$page = new PageContainer();
$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);
Exemple #21
0
<?php

require_once './peerlib/peerutils.inc';
require_once './peerlib/validators.inc';
include_once 'navigation2.inc';
require_once 'studentpicker.php';
require_once 'prjMilestoneSelector2.php';
requireCap(CAP_TUTOR);
$prjm_id = $prj_id = $milestone = 1;
$newauditor = 0;
unset($_SESSION['newauditor']);
extract($_SESSION);
$prjSel = new PrjMilestoneSelector2($dbConn, $peer_id, $prjm_id);
extract($prjSel->getSelectedData());
$_SESSION['prj_id'] = $prj_id;
$_SESSION['prjm_id'] = $prjm_id;
$_SESSION['milestone'] = $milestone;
if (isset($_GET['newauditor'])) {
    unset($_POST['newauditor']);
    $_REQUEST['newauditor'] = $newauditor = validate($_GET['newauditor'], 'snummer', '0');
    //    $dbConn->log('GET '.$newauditor);
} else {
    if (isset($_POST['newauditor'])) {
        unset($_GET['newauditor']);
        $_REQUEST['newauditor'] = $newauditor = validate($_POST['newauditor'], 'snummer', '0');
        //    $dbConn->log('POST '.$newauditor);
    } else {
        unset($_POST['newauditor']);
        unset($_REQUEST['newauditor']);
        unset($_GET['newauditor']);
    }
Exemple #22
0
<?php

/* $Id: groupemail.php 1845 2015-03-19 11:56:26Z hom $ */
include_once './peerlib/peerutils.inc';
include_once 'navigation2.inc';
require_once 'prjMilestoneSelector2.php';
include './peerlib/simplequerytable.inc';
$prj_id = 1;
$milestone = 1;
$prjm_id = 0;
$snummer = 1;
extract($_SESSION);
$pp = array();
$prjSel = new PrjMilestoneSelector2($dbConn, $peer_id, $prjm_id);
extract($prjSel->getSelectedData());
$_SESSION['prj_id'] = $prj_id;
$_SESSION['prjm_id'] = $prjm_id;
$_SESSION['milestone'] = $milestone;
$isTutor = true;
//hasCap( CAP_TUTOR );
// get data stored in session or added to session by helpers
/* get name, lang etc */
$sql = "SELECT roepnaam, voorvoegsel,achternaam,lang,rtrim(email1) as email1,rtrim(email2) as email2,\n" . "coalesce(signature,'sent by the peerweb service on behalf of '||roepnaam||coalesce(' '||voorvoegsel,'')||' '||achternaam)\n" . "  as signature\n" . "FROM student left join alt_email using(snummer) left join email_signature using(snummer) WHERE snummer={$peer_id}";
$resultSet = $dbConn->Execute($sql);
if ($resultSet === false) {
    die('Error: ' . $dbConn->ErrorMsg() . ' with ' . $sql);
}
extract($resultSet->fields);
$lang = strtolower($lang);
if (isset($resultSet->fields['email2'])) {
    $email2 = $resultSet->fields['email2'];
Exemple #23
0
<?php

include_once './peerlib/peerutils.inc';
include_once 'navigation2.inc';
require_once './peerlib/simplequerytable.inc';
require_once 'prjMilestoneSelector2.php';
require_once 'pgrowparser.php';
require_once 'SpreadSheetWriter.php';
requireCap(CAP_TUTOR);
// get group tables for a project
$afko = 'PRJ00';
$prj_id = 1;
$milestone = 1;
$prjm_id = 0;
extract($_SESSION);
$prjSel = new PrjMilestoneSelector2($dbConn, $peer_id, $prjm_id);
$prjSel->setWhere("has_assessment = true");
extract($prjSel->getSelectedData());
$_SESSION['prj_id'] = $prj_id;
$_SESSION['prjm_id'] = $prjm_id;
$_SESSION['milestone'] = $milestone;
$filename = 'peerassessment_grades_' . $afko . '-' . date('Ymd');
/**
 * Get the grades the students received per project/milestone. 
 */
//$prjm_id = 408;
// get the number of milestones, their names and weights
$sql = "select prj_id,prjm_id,milestone,milestone_name,weight from prj_milestone where prj_id={$prj_id}";
$resultSet = $dbConn->Execute($sql);
$gradeColumns = array();
if ($resultSet === 0) {
Exemple #24
0
<?php

include_once './peerlib/peerutils.inc';
include_once 'navigation2.inc';
require_once './peerlib/simplequerytable.inc';
require_once 'prjMilestoneSelector2.php';
require_once './peerlib/pgrowparser.php';
require_once './peerlib/SpreadSheetWriter.php';
requireCap(CAP_TUTOR);
// get group tables for a project
$afko = 'PRJ00';
$prj_id = 1;
$milestone = 1;
$prjm_id = 0;
extract($_SESSION);
$prjSel = new PrjMilestoneSelector2($dbConn, $peer_id, $prjm_id);
extract($prjSel->getSelectedData());
$_SESSION['prj_id'] = $prj_id;
$_SESSION['prjm_id'] = $prjm_id;
$_SESSION['milestone'] = $milestone;
$filename = 'peerweb_grades_' . $afko . '-' . date('Ymd');
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
/**
 * Get the grades the students received per project/milestone. 
 */
//$prjm_id = 408;
// get the number of milestones, their names and weights
$sql = "select prj_id,prjm_id,milestone ,milestone_name,weight from prj_milestone where prj_id={$prj_id}";
Exemple #25
0
include_once 'groupresult3.inc';
include_once 'openBarChart2.php';
require_once 'prjMilestoneSelector2.php';
require_once 'GroupPhoto.class.php';
require_once 'pgrowparser.php';
require_once 'SpreadSheetWriter.php';
require_once 'remarklist.php';
$prj_id = 1;
$prjm_id = 0;
$milestone = 1;
$prjtg_id = 1;
$tutor = $tutor_code;
$grp_num = 1;
extract($_SESSION);
$productgrade = 7.0;
$prjSel = new PrjMilestoneSelector2($dbConn, $peer_id, $prjm_id);
$prjSel->setWhere("has_assessment=true");
extract($prjSel->getSelectedData());
if (isset($_REQUEST['prjtg_id'])) {
    $_SESSION['prjtg_id'] = $prjtg_id = validate($_REQUEST['prjtg_id'], 'integer', $prjtg_id);
    $sql = "select prj_id,milestone,prjm_id,grp_num,prjtg_id,tutor_grade as productgrade \n" . "from all_prj_tutor \n" . " where prjtg_id={$prjtg_id}";
    $resultSet = $dbConn->Execute($sql);
    if ($resultSet === false) {
        die("<br>Cannot get project name with <pre>\"" . $sql . '", cause ' . $dbConn->ErrorMsg() . "</pre><br/>");
    }
    if (!$resultSet->EOF) {
        extract($resultSet->fields);
    }
    $prjSel->setPrjmId($prjm_id);
    extract($prjSel->getSelectedData());
} else {