Exemplo n.º 1
0
function analyse_result_page_elements($resultelement)
{
    $readings = new stdClass();
    $aux = new stdClass();
    $elementarray = explode("\n", $resultelement);
    //print("elemento a analizar:<BR>");
    //print_object($elementarray);
    $reference = "=";
    foreach ($elementarray as $singledata) {
        //look for page number fragment NNN]
        if (strpos($singledata, ']') == strlen($singledata) - 1) {
            $pagenumber = substr($singledata, 0, strlen($singledata) - 1);
            $readings->PageNumber = $pagenumber;
            continue;
        }
        if ($singledata) {
            $aux = get_grades($singledata, $reference);
            if (isset($aux->value)) {
                $label = $aux->label;
                $value = $aux->value;
                $readings->{$label} = $value;
            }
        }
    }
    //print_object($readings);
    return $readings;
}
Exemplo n.º 2
0
/* 
 * Sameer Jain
 * sameejain@my.smccd.edu
 * CIS 380
 * OL
 * final
 * Sameer Jain
 * 12/18/15
 */
require '../model/database.php';
require '../model/product_db.php';
$student_id = filter_input(INPUT_POST, 'student_id');
$score = filter_input(INPUT_POST, 'score');
$event_id = filter_input(INPUT_POST, 'event_id');
$students = get_students();
$events = get_grades();
$event_counter = 0;
$student_counter = 0;
foreach ($events as $event) {
    if (in_array($event_id, $event)) {
        $event_counter++;
    }
}
foreach ($students as $student) {
    if (in_array($student_id, $student)) {
        $student_counter++;
    }
}
if ($student_id == NULL || $event_id == NULL || $score == NULL || $student_counter == 0 || $event_counter == 0) {
    $error = "Invalid product data. Check all fields and try again.";
    include '../errors/error.php';
Exemplo n.º 3
0
function uses_outcomes($prefix, $courseid)
{
    $grades = get_grades($prefix, $courseid);
    //if ($grades['P'] && $grades['M'] && $grades['D']) return true;
    if ($grades['P']) {
        return true;
    }
    return false;
}
Exemplo n.º 4
0
<?php

/* 
 * Sameer Jain
 * sameejain@my.smccd.edu
 * CIS 380
 * OL
 * final
 * Sameer Jain
 * 12/18/15
 */
require '../model/database.php';
require '../model/product_db.php';
$action = filter_input(INPUT_POST, 'action');
if ($action == NULL) {
    $action = 'list_info';
}
if ($action == 'list_info') {
    $grades = get_grades();
    include 'grade_info.php';
}