Exemple #1
0
     $query = "UPDATE imas_assessment_sessions SET bestscores='{$scorelist}',feedback='{$feedback}'";
     if (isset($_POST['updategroup'])) {
         $qp = getasidquery($_GET['asid']);
         $query .= " WHERE {$qp[0]}='{$qp[1]}' AND assessmentid='{$qp[2]}'";
         //$query .= getasidquery($_GET['asid']);
     } else {
         $query .= "WHERE id='{$_GET['asid']}'";
     }
     $q2 = "SELECT assessmentid,lti_sourcedid FROM imas_assessment_sessions WHERE id='{$_GET['asid']}'";
     $res = mysql_query($q2) or die("Query failed : {$q2} " . mysql_error());
     $row = mysql_fetch_row($res);
     $aid = $row[0];
     if (strlen($row[1]) > 1) {
         //update LTI score
         require_once "../includes/ltioutcomes.php";
         calcandupdateLTIgrade($row[1], $row[0], $scores);
     }
 } else {
     echo "No authority to change scores.";
     exit;
 }
 mysql_query($query) or die("Query failed : {$query} " . mysql_error());
 if ($from == 'isolate') {
     header('Location: ' . $urlmode . $_SERVER['HTTP_HOST'] . rtrim(dirname($_SERVER['PHP_SELF']), '/\\') . "/isolateassessgrade.php?stu={$stu}&cid={$_GET['cid']}&aid={$aid}&gbmode={$gbmode}");
 } else {
     if ($from == 'gisolate') {
         header('Location: ' . $urlmode . $_SERVER['HTTP_HOST'] . rtrim(dirname($_SERVER['PHP_SELF']), '/\\') . "/isolateassessbygroup.php?stu={$stu}&cid={$_GET['cid']}&aid={$aid}&gbmode={$gbmode}");
     } else {
         if ($from == 'stugrp') {
             header('Location: ' . $urlmode . $_SERVER['HTTP_HOST'] . rtrim(dirname($_SERVER['PHP_SELF']), '/\\') . "/managestugrps.php?cid={$_GET['cid']}&aid={$aid}");
         } else {
Exemple #2
0
                    } else {
                        $scores[$loc] = $sv;
                    }
                }
                $feedback = $_POST['feedback-' . $line['id']];
            }
            $scorelist = implode(",", $scores);
            if (count($sp) > 1) {
                $scorelist .= ';' . $sp[1] . ';' . $sp[2];
            }
            $query = "UPDATE imas_assessment_sessions SET bestscores='{$scorelist}',feedback='{$feedback}' WHERE id='{$line['id']}'";
            mysql_query($query) or die("Query failed : {$query} " . mysql_error());
            if (strlen($line['lti_sourcedid']) > 1) {
                //update LTI score
                require_once "../includes/ltioutcomes.php";
                calcandupdateLTIgrade($line['lti_sourcedid'], $aid, $scores);
            }
        }
    }
    if ($page == -1) {
        header('Location: ' . $urlmode . $_SERVER['HTTP_HOST'] . rtrim(dirname($_SERVER['PHP_SELF']), '/\\') . "/gb-itemanalysis.php?stu={$stu}&cid={$cid}&aid={$aid}&asid=average");
    } else {
        $page++;
        header('Location: ' . $urlmode . $_SERVER['HTTP_HOST'] . rtrim(dirname($_SERVER['PHP_SELF']), '/\\') . "/gradeallq.php?stu={$stu}&cid={$cid}&aid={$aid}&qid={$qid}&page={$page}");
    }
    exit;
}
require "../assessment/displayq2.php";
list($qsetid, $cat) = getqsetid($qid);
$query = "SELECT name,defpoints,isgroup,groupsetid,deffeedbacktext FROM imas_assessments WHERE id='{$aid}'";
$result = mysql_query($query) or die("Query failed : {$query}: " . mysql_error());