/* $Id: activegroup.php 1825 2014-12-27 14:57:05Z hom $ */ include_once './peerlib/peerutils.inc'; include_once './peerlib/simplequerytable.inc'; include_once 'makeinput.inc'; include_once 'tutorhelper.inc'; include_once 'navigation2.inc'; require_once 'studentPrjMilestoneSelector.php'; $prj_id = 1; $milestone = 1; $prjm_id = 0; $grp_num = 1; $prjtg_id = 1; extract($_SESSION); $judge = $snummer; $prjSel = new StudentMilestoneSelector($dbConn, $judge, $prjtg_id); extract($prjSel->getSelectedData()); $_SESSION['prjtg_id'] = $prjtg_id; $_SESSION['prj_id'] = $prj_id; $_SESSION['prjm_id'] = $prjm_id; $_SESSION['milestone'] = $milestone; $_SESSION['grp_num'] = $grp_num; $may_change = hasStudentCap($snummer, CAP_SET_PROJECT_DATA, $prjm_id, $grp_num); if ($may_change && isset($_POST['submit_data'])) { $long_name = substr(pg_escape_string($_POST['long_name']), 0, 40); $alias = substr(pg_escape_string($_POST['alias']), 0, 15); $productname = substr(pg_escape_string($_POST['productname']), 0, 128); $website = substr(pg_escape_string($_POST['website']), 0, 128); $youtube_link = substr(pg_escape_string($_POST['youtube_link']), 0, 128); $youtube_icon_url = substr(pg_escape_string($_POST['youtube_icon_url']), 0, 128); $sql = "select count(*) from grp_alias where prjtg_id={$prjtg_id}";
<?php /* $Id: studentgroupresult.php 1825 2014-12-27 14:57:05Z hom $ */ include_once './peerlib/peerutils.inc'; include_once 'tutorhelper.inc'; include_once 'navigation2.inc'; require_once 'groupresult3.inc'; require_once 'studentPrjMilestoneSelector.php'; $prjm_id = 0; $pp = array(); $pp['productgrade'] = $productgrade = 7; extract($_SESSION); ob_start(); tutorHelper($dbConn, $isTutor); $tutor_Helper = ob_get_clean(); $prjSel = new StudentMilestoneSelector($dbConn, $judge, $prjtg_id); $prjSel->setExtraConstraint(" and prjtg_id in (select distinct prjtg_id from assessment) and " . " (pr.capabilities &" . CAP_READ_PEER_ASSESSMENT_DATA . ") <> 0"); $prjSel->setEmptySelectorResult("<h1>There are no projects of which you may view the peer results</h1>"); extract($prjSel->getSelectedData()); $_SESSION['prjm_id'] = $prjm_id; $_SESSION['prjtg_id'] = $prjtg_id; $studentMayRead = hasStudentCap($snummer, CAP_READ_PEER_ASSESSMENT_DATA, $prjm_id); $pp['prjList'] = $prjList = $prjSel->getWidget(); $page = new PageContainer(); // now test if student is allowed if (!$studentMayRead) { $page_opening = 'You cannot view the results for this project and group'; $page->setTitle($page_opening); $page->addBodyComponent(new Component($tutor_Helper)); $nav = new Navigation($tutor_navtable, basename($PHP_SELF), $page_opening); $page->addBodyComponent($nav);
include_once './peerlib/peerutils.inc'; include_once 'tutorhelper.inc'; require_once './peerlib/validators.inc'; require_once './peerlib/simplequerytable.inc'; include_once 'navigation2.inc'; require_once 'studentPrjMilestoneSelector.php'; $doctype = 0; $version_limit = 2; $url = $PHP_SELF; $filesizelimit = 10000000; $prj_id = 1; $milestone = 1; $prjm_id = 0; $prjtg_id = 1; extract($_SESSION); $prjSel = new StudentMilestoneSelector($dbConn, $snummer, $prjm_id); $prjSel->setExtraConstraint(" and prjm_id in (select distinct prjm_id from project_deliverables) and valid_until > now()::date "); $pp = $prjSel->getSelectedData(); extract($pp); $pp['filesizelimit'] = $filesizelimit; $pp['uploadMessage'] = ''; $_SESSION['prjtg_id'] = $prjtg_id; $_SESSION['prj_id'] = $prj_id; $_SESSION['prjm_id'] = $prjm_id; $_SESSION['milestone'] = $milestone; $_SESSION['grp_num'] = $grp_num; if (!isset($_SESSION['userfile'])) { $_SESSION['userfile'] = ''; } $sql = "select rtrim(afko) as uafko,year as myear,roepnaam as uroepnaam,\n" . " rtrim(email1) as uemail1, rtrim(email2) as uemail2, voorvoegsel as uvoorvoegsel,\n" . "achternaam as uachternaam,grp_num as ugrp,description as udescription,prjm_id,prjtg_id \n" . "from prj_grp join all_prj_tutor using(prjtg_id) join student using(snummer) left join alt_email using(snummer)\n" . "where prjm_id={$prjm_id} and snummer={$snummer}"; $resultSet = $dbConn->Execute($sql);
<?php include_once './peerlib/peerutils.inc'; require_once './peerlib/validators.inc'; include_once 'tutorhelper.inc'; include_once 'navigation2.inc'; require_once 'GroupPhoto.class.php'; require_once 'studentPrjMilestoneSelector.php'; $prj_id = 1; $milestone = 1; $prjm_id = 0; $grp_num = 1; $prjtg_id = 1; extract($_SESSION); $judge = $snummer; $prjSel = new StudentMilestoneSelector($dbConn, $judge, $prjtg_id); extract($prjSel->getSelectedData()); $_SESSION['prjtg_id'] = $prjtg_id; $_SESSION['prj_id'] = $prj_id; $_SESSION['prjm_id'] = $prjm_id; $_SESSION['milestone'] = $milestone; $_SESSION['grp_num'] = $grp_num; tutorHelper($dbConn, $isTutor); pagehead('group photos'); $prjSel->setSubmitOnChange(true); $prj_id_selector = $prjSel->getSelector(); $page_opening = "Group photos for project {$afko}: {$description} {$year}-" . ($year + 1) . "<br/><span style='font-size:6pt;'> prj_id={$prj_id} milestone {$milestone} (prjm_id={$prjm_id}) group {$grp_num} (prjtg_id={$prjtg_id}) {$grp_alias} </span>"; $nav = new Navigation($tutor_navtable, basename($PHP_SELF), $page_opening); $nav->setInterestMap($tabInterestCount); $pg = new GroupPhoto($dbConn, $prjtg_id); //$pg->setWhereConstraint("prjtg_id in (select prjtg_id from prj_grp where snummer=$peer_id)");
<?php /* $Id: rolesetter.php 1825 2014-12-27 14:57:05Z hom $ */ include_once './peerlib/peerutils.inc'; include_once 'tutorhelper.inc'; include_once 'navigation2.inc'; require_once 'studentPrjMilestoneSelector.php'; $prj_id = 1; $milestone = 1; $prjm_id = 0; $prjtg_id = 1; extract($_SESSION); $prjSel = new StudentMilestoneSelector($dbConn, $judge, $prjtg_id); extract($prjSel->getSelectedData()); $_SESSION['prj_id'] = $prj_id; $_SESSION['prjm_id'] = $prjm_id; $_SESSION['milestone'] = $milestone; $_SESSION['grp_num'] = $grp_num; $_SESSION['prjtg_id'] = $prjtg_id; $may_change = hasStudentCap2($snummer, CAP_SET_STUDENT_ROLE, $prjm_id); if ($may_change && isset($_REQUEST['submit_roles'])) { $memberset = implode(",", $_REQUEST['actor']); // first put roles in a map $role_map = array(); for ($i = 0; $i < count($_REQUEST['actor']); $i++) { $actor = $_REQUEST['actor'][$i]; $rolenum = $_REQUEST['rolenum'][$i]; $role_map[$actor] = $rolenum; } //$dbConn->transactionStart( "begin work" ); $resultSet = $dbConn->Execute("select snummer as actor,rolenum \n" . "from prj_grp join prj_tutor using(prjtg_id)" . "left join student_role using( snummer, prjm_id )\n" . " where prjm_id={$prjm_id}\n" . " and snummer in ({$memberset})");
<?php /* $Id: reverseView.php 1825 2014-12-27 14:57:05Z hom $ */ include_once 'peerutils.inc'; include_once 'tutorhelper.inc'; include_once 'navigation2.inc'; require_once 'GroupPhoto.class.php'; require_once 'studentPrjMilestoneSelector.php'; $prj_id = 1; $milestone = 1; $prjm_id = 0; $grp_num = 1; $prjtg_id = 1; extract($_SESSION); $judge = $snummer; $prjSel = new StudentMilestoneSelector($dbConn, $judge, $prjtg_id); $prjSel->setExtraConstraint(" and prjtg_id in (select distinct prjtg_id from assessment) "); extract($prjSel->getSelectedData()); $_SESSION['prjtg_id'] = $prjtg_id; $_SESSION['prj_id'] = $prj_id; $_SESSION['prjm_id'] = $prjm_id; $_SESSION['milestone'] = $milestone; $_SESSION['grp_num'] = $grp_num; // get data stored in session or added to session by helpers $replyText = ''; $script = $lang = 'nl'; //echo "$user<br/>\n"; $sql = "select * from student where snummer={$judge}"; $resultSet = $dbConn->Execute($sql); if ($resultSet === false) { print "error fetching judge data with {$sql} : " . $dbConn->ErrorMsg() . "<br/>\n";
<?php //session_start(); include_once './peerlib/peerutils.inc'; include_once 'tutorhelper.inc'; include_once './peerlib/simplequerytable.inc'; include_once 'documentfolders.inc'; include_once 'navigation2.inc'; require_once 'studentPrjMilestoneSelector.php'; $prj_id = 1; $milestone = 1; $afko = 'undef'; $prjm_id = 0; extract($_SESSION); $prjSel = new StudentMilestoneSelector($dbConn, $judge, $prjm_id); $prjSel->setExtraConstraint(" and prjm_id in (select prjm_id from project_deliverables) "); extract($prjSel->getSelectedData()); $_SESSION['prjtg_id'] = $prjtg_id; $_SESSION['prj_id'] = $prj_id; $_SESSION['prjm_id'] = $prjm_id; $_SESSION['milestone'] = $milestone; $_SESSION['grp_num'] = $grp_num; if (isset($_REQUEST['prj_id_milestone'])) { list($prj_id, $milestone) = explode(':', validate($_REQUEST['prj_id_milestone'], 'prj_id_milestone', $prj_id, ':' . $milestone)); $_SESSION['prj_id'] = $prj_id; $_SESSION['milestone'] = $milestone; } $sql = "select prjm_id from prj_milestone where prj_id={$prj_id} and milestone={$milestone}"; $resultSet = $dbConn->Execute($sql); if ($resultSet === false) { die('Error: ' . $dbConn->ErrorMsg() . ' with ' . $sql);
<html> <body> <?php require_once './peerlib/studentPrjMilestoneSelector.php'; $prjSel = new StudentMilestoneSelector($dbConn, 2133872, 1); $psel = $prjSel->getWidget(); echo $psel; ?> </body> </html>
<?php include_once './peerlib/peerutils.inc'; include_once 'tutorhelper.inc'; include_once 'documentfolders.inc'; require_once './peerlib/simplequerytable.inc'; include_once 'navigation2.inc'; require_once 'studentPrjMilestoneSelector.php'; $prj_id = 1; $milestone = 1; $prjm_id = 0; $grp_num = 1; $prjtg_id = 1; extract($_SESSION); $judge = $snummer; $prjSel = new StudentMilestoneSelector($dbConn, $judge, $prjm_id); $prjSel->setExtraConstraint(" and prjm_id in (select distinct prjm_id from task_timer) "); extract($prjSel->getSelectedData()); $_SESSION['prjtg_id'] = $prjtg_id; $_SESSION['prj_id'] = $prj_id; $_SESSION['prjm_id'] = $prjm_id; $_SESSION['milestone'] = $milestone; $_SESSION['grp_num'] = $grp_num; $year = date('Y'); $month = date('m'); $sql = "select year,month,first_second,last_second from task_timer_year_month order by year desc,month desc limit 1"; $resultSet = $dbConn->Execute($sql); extract($resultSet->fields); $prj_id = 1; $milestone = 1; $grp_num = -1;
include_once './peerlib/peerutils.inc'; include_once 'tutorhelper.inc'; include_once 'navigation2.inc'; require_once 'studentPrjMilestoneSelector.php'; $groupgrade = 7; // some defaults to prevent script faults $afko = 'NOP'; $description = 'No project defined'; $prj_id = 1; $milestone = 1; $prjm_id = 0; $grp_num = 1; $prjtg_id = 1; extract($_SESSION); $judge = $snummer; $prjSel = new StudentMilestoneSelector($dbConn, $judge, $prjtg_id); $prjSel->setExtraConstraint(" and prjtg_id in (select distinct prjtg_id from assessment) "); extract($prjSel->getSelectedData()); $_SESSION['prjtg_id'] = $prjtg_id; $_SESSION['prj_id'] = $prj_id; $_SESSION['prjm_id'] = $prjm_id; $_SESSION['milestone'] = $milestone; $_SESSION['grp_num'] = $grp_num; if (isset($_REQUEST['groupgrade'])) { $tmpnum = $_REQUEST['groupgrade']; if (preg_match("/^\\d{1,2}(\\.?\\d+)?\$/", $tmpnum)) { $_SESSION['groupgrade'] = $groupgrade = $_REQUEST['groupgrade']; } } $sql = "SELECT roepnaam, voorvoegsel,achternaam,coalesce(lang,'EN') as lang \n" . "FROM student WHERE snummer={$snummer}"; $resultSet = $dbConn->Execute($sql);