Esempio n. 1
0
    $students = array_diff_assoc($allUsers, $adminUsers);
    //we get the student by getting the diff of the two arrays
    $users_key = array_keys($students);
    $vtAction = new vtAction($session->getEmail(), $params);
    $resource = $vtAction->getResource($resource_id);
    if ($resource === false) {
        //problem to get the grade
        redirection($redirectionUrl . '&error=problem_vt');
    }
    $options = $resource->getOptions();
    $isAverageMethodAvailable = true;
    $arrayAverageLength = $vtAction->getAverageMessageLengthPerUser($resource_id);
    if ($arrayAverageLength == "not_implemented") {
        $isAverageMethodAvailable = false;
    }
    $arrayNbMessage = $vtAction->getNbMessagePerUser($resource_id);
    $urlParams = 'resource_id=' . $resource_id . '&type=board&id=' . $params["enc_course_id"] . '&' . voiceboard_get_url_params($params["enc_course_id"]) . '&time=' . $session->timeOfLoad;
    $previousGrade = grade_get_grades($params["enc_course_id"], "mod", "voiceboard", $params["gradeId"], $users_key);
    if (!empty($previousGrade) && isset($previousGrade->items[0])) {
        //extract only the grade information from the object that we get
        //we take the items 0 because we ask only for one grade item
        $previousGrade = $previousGrade->items[0]->grades;
    }
    ?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" >
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>Voice Board grading page</title>
    <link rel="STYLESHEET" href="css/StyleSheet.css" type="text/css" />