Esempio n. 1
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}";
Esempio n. 2
0
<?php

include_once './peerlib/peerutils.inc';
require_once './peerlib/validators.inc';
//require_once('rubberstuff.php');
include_once 'navigation2.inc';
require_once './peerlib/conffileeditor2.php';
requireCap(CAP_SYSTEM);
// anticipate a save initiated by user.
$saveResult = ConfFileEditor::save();
$page_opening = "Rubber editor file ";
$page = new PageContainer();
$page->setTitle($page_opening);
$nav = new Navigation($navtable, basename($PHP_SELF), $page_opening);
$page->addBodyComponent($nav);
if ($saveResult != '') {
    $page->addBodyComponent(new Component($saveResult));
}
if (isset($_REQUEST['formEditFile'])) {
    $_SESSION['formFileToEdit'] = $_REQUEST['formEditFile'];
}
$_SESSION['formFileToEdit'] = './templates/editform/html';
$pp = array();
$fileEditor = new ConfFileEditor($PHP_SELF, 'templates/formedit.html');
$fileEditor->setDescription("Edit query, template or tex file");
$fileEditor->getWidgetForPage($page);
$page->show();
Esempio n. 3
0
<?php

/**
 * The simple table editor for the table menu. Menu is one of the tables that support
 * the simple table editor.
 *
 * @package prafda2
 * @author Pieter van den Hombergh
 * $Id: student_admin.php 1102 2012-02-22 21:44:36Z hom $
 */
require_once "ste.php";
requireCap(CAP_LOOKUP_STUDENT);
$page = new PageContainer("Student work placement address " . $PHP_SELF . " on DB " . $db_name);
$ste = new SimpleTableEditor($dbConn, $page, hasCap(CAP_ALTER_STUDENT));
$ste->setFormAction($PHP_SELF)->setRelation('wp_address')->setMenuName('wp_address')->setKeyColumns(array('wp_address_id'))->setFormTemplate('templates/wp_address.html')->setListRowTemplate(array('snummer', 'wp_type', 'company'))->setNameExpression("snummer||': '||wp_type||', start '||start_date||' at '||company")->show();
?>

Esempio n. 4
0
<?php

require_once './peerlib/peerutils.inc';
include_once 'navigation2.inc';
requireCap(CAP_EDIT_RIGHTS);
require_once 'bitset.php';
require_once 'studentpicker.php';
$newsnummer = $peer_id;
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
$cap_names = array('CAP_TUTOR', 'CAP_MKPROJECT', 'CAP_MKCLASSES', 'CAP_ALTER_STUDENT', 'CAP_ALTER_STUDENT_CLASS', 'CAP_LOOKUP_STUDENT', 'CAP_IMPERSONATE_STUDENT', 'CAP_TUTOR_OWNER', 'CAP_RECRUITER', 'CAP_STUDENT_ADMIN', 'CAP_TUTOR_ADMIN', 'CAP_SUBVERSION', 'CAP_SHARING', 'CAP_JAAG', 'CAP_SYSTEM', 'CAP_MENU_ADMIN', 'CAP_EDIT_RIGHTS', 'CAP_MODULE', 'CAP_GIT', 'CAP_SELECT_ALL', 'CAP20', 'CAP21', 'CAP22', 'CAP23', 'CAP24', 'CAP25', 'CAP26', 'CAP27', 'CAP28', 'CAP29', 'CAP_BIGFACE', 'CAP31');
$caps = 0;
$dbMsg = '';
extract($_SESSION);
//        if (isSet($_REQUEST['capuserid'])) {
//            $capuserid = $_REQUEST['capuserid'];
//        }
$studentPicker = new StudentPicker($dbConn, $newsnummer, 'Search user.');
$studentPicker->setShowAcceptButton(false);
$studentPicker->setPresentQuery("select userid as snummer from passwd");
$newsnummer = $studentPicker->processRequest();
$student_picker_text = $studentPicker->getPicker();
if (isset($_REQUEST['capability'])) {
    $caps = collectBitSet($_REQUEST['capability']);
}
if (isset($_REQUEST['setcap']) && isset($newsnummer) && $newsnummer != 0) {
    $sql = "update passwd set capabilities={$caps} where userid={$newsnummer}";
    $resultSet = $dbConn->Execute($sql);
    //            $dbConn->log($sql);
Esempio n. 5
0
<?php

/**
 * The simple table editor for the tutor
 * @author Pieter van den Hombergh
 * $Id: presse.php 1723 2014-01-03 08:34:59Z hom $
 */
include_once "ste.php";
requireCap(CAP_RECRUITER);
$page = new PageContainer("Peerweb presse " . $PHP_SELF . " on DB " . $db_name);
$ste = new SimpleTableEditor($dbConn, $page);
$ste->setShowQuery(true);
$ste->setFormAction($PHP_SELF);
$ste->setRelation('presse');
$ste->setMenuName('presse');
$ste->setKeyColumns(array('presse_id'));
$ste->setNameExpression("rtrim(firma)")->setListRowTemplate(array('firma', 'firmentype', 'ort', 'email_kontaktperson', 'telefon', 'telefax', 'website'))->setOrderList(array('firma'))->setFormTemplate('templates/presse.html')->show();
Esempio n. 6
0
<?php

include_once './peerlib/peerutils.inc';
require_once './peerlib/validators.inc';
require_once 'rubberstuff.php';
include_once 'navigation2.inc';
$tutor_navtable = array();
$activeRubberProject = '';
extract($_SESSION);
requireCap(CAP_MKCLASSES);
$css = '<style type=\'text/css\'><!--
  .flink {text-align:right}
  th.flink > a {text-decoration:none;color:#008;}
-->
</style>';
pagehead2('Rubber', $css);
$page_opening = "Rubber reports at {$rubberbase}";
$nav = new Navigation($tutor_navtable, basename($PHP_SELF), $page_opening);
$nav->show();
$_SESSION['conf_editor_basedir'] = $rubberbase;
echo "<br/>\n";
$rubberTree = array();
if ($handle1 = opendir($rubberbase)) {
    while (false !== ($subdirname = readdir($handle1))) {
        // build tree
        $subdirpath = "{$rubberbase}/{$subdirname}";
        if (!isset($rubberSystemDirs[$subdirname]) && is_dir($subdirpath)) {
            if ($activeRubberProject == '') {
                $_SESSION['activeRubberProject'] = $activeRubberProject = $subdirname;
            }
            if ($subdirname == $activeRubberProject) {