コード例 #1
0
ファイル: activegroup.php プロジェクト: homberghp/peerweb
$sql = "select coalesce('That is '||short||': '||role||' for this project','') as role_one \n" . "from project_roles where prj_id={$prj_id} and rolenum=1";
//$dbConn->log($sql);
$resultSet = $dbConn->Execute($sql);
if ($resultSet !== false && !$resultSet->EOF) {
    extract($resultSet->fields);
    $pp = array_merge($pp, $resultSet->fields);
}
$page_opening = "Data for active group {$grp_num}";
$page = new PageContainer();
$page->setTitle('Project group data');
$nav = new Navigation($tutor_navtable, basename($PHP_SELF), $page_opening);
ob_start();
tutorHelper($dbConn, $isTutor);
$page->addBodyComponent(new Component(ob_get_clean()));
$page->addBodyComponent($nav);
$pp['prjList'] = $prjSel->getWidget();
$sqlm = "select '<a href=''mailto:'||rtrim(email1)||'''>'||roepnaam||coalesce(' '||voorvoegsel||' ',' ')||achternaam||'</a>' as name," . "role\n" . " from prj_grp pg join student using (snummer)\n" . "join all_prj_tutor using(prjtg_id)\n" . "  join student_role using (prjm_id,snummer)\n" . "  join project_roles using(prj_id,rolenum)\n" . " where pg.prjtg_id={$prjtg_id} order by achternaam,roepnaam";
$pp['memberTable'] = simpleTableString($dbConn, $sqlm);
if (!$resultSet->EOF) {
    $pp = array_merge($pp, $resultSet->fields);
    extract($resultSet->fields);
    $pp['field_alias'] = makeinputfor('alias', $alias, $may_change, 15);
    $pp['field_long_name'] = makeinputfor('long_name', $long_name, $may_change, 40);
    $pp['field_productname'] = makeinputfor('productname', $productname, $may_change, 60);
    $pp['field_website'] = $may_change ? makeinputfor('website', $website, $may_change, 80) : "<a href='{$website}'>{$website}</a>";
    $pp['field_youtube_link'] = $may_change ? makeinputfor('youtube_link', $youtube_link, $may_change, 80) : "<a href='{$youtube_link}'>{$youtube_link}</a>";
    $icon = "<a href='{$youtube_link}' target='_blank'><img src='{$youtube_icon_url}' alt='youtube_icon_url' border='0'/></a>";
    $pp['field_youtube_icon_url'] = $may_change ? $icon . '<br/>' . makeinputfor('youtube_icon_url', $youtube_icon_url, $may_change, 80) : $icon;
    $weblink = '';
    if ($website != '') {
        $weblink = '<a href=\'' . $website . '\' target=\'_blank\'>' . $long_name . '</a>';
コード例 #2
0
ファイル: imail.php プロジェクト: homberghp/peerweb
<html>
<head>
<title>' . $subject . '</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" >
</head>
<body>
';
    $message = $bodyprefix . $pp['mailbody'] . "\n</body>\n</html>\n";
    domail($toAddress, $subject, $message, $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
    }
}
$prjList = $prjSel->getWidget();
$sql = "select s.*,pt.* from student s join prj_grp using(snummer)\n" . "join all_prj_tutor pt using(prjtg_id) where prjm_id={$prjm_id} and snummer={$snummer}";
$resultSet = $dbConn->Execute($sql);
if ($resultSet === false) {
    print "error fetching student data with <pre>{$sql} </pre>: " . $dbConn->ErrorMsg() . "<br/>\n";
}
if (!$resultSet->EOF) {
    $pp = array_merge($pp, $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);
$nav->setInterestMap($tabInterestCount);
if (isset($_REQUEST['getall']) && (!isset($mailto) || count($mailto) == 0)) {
    $sql = "select snummer as mailto \n" . "from prj_grp join all_prj_tutor using(prjtg_id)\n" . "where prjm_id={$prjm_id} ";
コード例 #3
0
ファイル: icontestant.php プロジェクト: homberghp/peerweb
$pg->setWhereConstraint(" snummer <> {$snummer}");
$pg->setPictSize('84', '126');
$pg->setMaxCol(8);
$criteria = getCriteria($prjm_id);
$rainbow = new RainBow();
$criteriaList = getCriterialist($criteria, $lang, $rainbow);
$rainbow = new RainBow(STARTCOLOR, COLORINCREMENT_RED, COLORINCREMENT_GREEN, COLORINCREMENT_BLUE);
$remarkList = 'no remarks';
if (isset($prjtg_id)) {
    $sqlC = "SELECT judge,roepnaam||coalesce(' '||voorvoegsel,'')||' '||achternaam||coalesce(' ('||role||')','') as naam ,ja.prj_id,\n" . "grp_num,criterium,milestone,grade from judge_assessment ja \n" . " left join student_role sr on(ja.prjm_id=sr.prjm_id and ja.judge=sr.snummer)\n" . " left join project_roles pr on(ja.prj_id=pr.prj_id and sr.rolenum=pr.rolenum)\n" . " where contestant={$judge} and prjtg_id={$prjtg_id} \n" . "order by achternaam,judge,criterium";
    $gcTable = groupContestantTable($dbConn, $sqlC, false, $criteria, $lang, $rainbow);
    $remarkList = remarkListIndividual($dbConn, $prjtg_id, $contestant_snummer);
} else {
    $gcTable = "<p>No project group selected</p>";
}
$groupPhotos = $pg->getGroupPhotos();
ob_start();
//
?>
<div id='content' style='padding:1em;'>
  <?php 
echo $prjSel->getWidget();
?>
  <?php 
if (!$prjSel->isEmptySelector()) {
    include_once 'templates/icontestant.html';
}
?>
</div><?php 
$page->addBodyComponent(new Component(ob_get_clean()));
$page->show();
コード例 #4
0
ファイル: reverseView.php プロジェクト: homberghp/peerweb
            }
        }
    }
}
// after processing build (new) page
// first assure that grp_num is (still) open
$grp_open = grpOpen2($dbConn, $judge, $prjtg_id);
$sql = "select count(*) as assessment_count from assessment where judge={$judge}";
//$dbConn->log($sql);
$resultSet = $dbConn->Execute($sql);
if ($resultSet === false) {
    echo "Cannot get assessment data with <pre>{$sql}</pre> Cause: " . $dbConn->ErrorMsg() . "\n";
}
extract($resultSet->fields);
if ($assessment_count != 0) {
    $widget = $prjSel->getWidget();
} else {
    $widget = "<h1>Sorry, you are not enlisted for an assessment</h1>";
}
//
$judge_grp = $grp_num;
?>
<div id="content" style='padding:1em;'>
  <?php 
echo $prjSel->getWidget();
if (!$prjSel->isEmptySelector()) {
    ?>
<div class='navleft selected' style='padding-left:0pt;'>
<?php 
    if ($grp_open) {
        $gradetype = $langmap['gradetype'][$lang];
コード例 #5
0
<html>
<body>
<?php 
require_once './peerlib/studentPrjMilestoneSelector.php';
$prjSel = new StudentMilestoneSelector($dbConn, 2133872, 1);
$psel = $prjSel->getWidget();
echo $psel;
?>
</body>
</html>