예제 #1
0
<?php

$db = new coreapp();
//$db->authenticate();
//$db->debug($_SESSION);
function __autoload($class_name)
{
    require_once "classes/class." . $class_name . '.php';
}
?>
<!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=utf-8" />
<title>Rubric Self Assessment</title>
<style type="text/css">
  #feedback { font-size: 1.4em; }
  #selectable .ui-selecting { background: #FECA40; }
  .selected { background: #F39814; color: white; }
  .over {border: 1px solid #F39814}
  #selectable { list-style-type: none; margin: 0; padding: 0; }
  #selectable li { margin: 3px; padding: 1px; float: left; width: 100px; height: 80px; font-size: 4em; text-align: center; }
</style>
<link rel="stylesheet" type="text/css" href="css/rubric.css" />
<link rel="stylesheet" type="text/css" href="theme/ui.theme.css" />
<link rel="stylesheet" type="text/css" href="theme/ui.core.css" />
<link rel="stylesheet" type="text/css" href="theme/ui.buttons.css" />
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/ui.core.min.js"></script>
<script type="text/javascript" src="js/jquery.form.js"></script>
<script type="text/javascript" src="js/rubric.js"></script>
예제 #2
0
<?php

$db = new coreapp();
$db->authenticate();
function __autoload($class_name)
{
    require_once "classes/class." . $class_name . '.php';
}
$rubrics = $db->select("select rubrics.name, rubrics.id from rubrics where first_marker_id = 'smusim'");
?>
<!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=utf-8" />
<title>Rubric Self Assessment</title>
<style type="text/css">
  #feedback { font-size: 1.4em; }
  #selectable .ui-selecting { background: #FECA40; }
  .selected { background: #F39814; color: white; }
  .over {border: 1px solid #F39814}
  #selectable { list-style-type: none; margin: 0; padding: 0; }
  #selectable li { margin: 3px; padding: 1px; float: left; width: 100px; height: 80px; font-size: 4em; text-align: center; }
</style>
<link rel="stylesheet" type="text/css" href="css/rubric.css" />
<link rel="stylesheet" type="text/css" href="theme/ui.theme.css" />
<link rel="stylesheet" type="text/css" href="theme/ui.core.css" />
<body>
<h1>My Rubrics</h1>
<?php 
foreach ($rubrics as $rubric) {
    echo "<p><a href='rubric.php?rubric=" . $rubric['id'] . "'>" . $rubric['name'] . "</a></p>";
예제 #3
0
<?php

/*
- finds all students on rubric
- finds all that have already been marked
- takes graded ones away from the list
- returns all ungraded to rubric as JSON data
*/
function __autoload($class_name)
{
    require_once "classes/class." . $class_name . '.php';
}
$db = new coreapp();
$all_students = $db->select("select students.firstname, students.surname, students.id as student_id from \r\nstudents inner join rubric_student on students.id = rubric_student.student_id \r\ninner join rubrics on rubric_student.rubric_id = rubrics.id\r\nwhere rubrics.id = " . $_GET['rubric'] . " order by students.surname ASC");
$already_marked = $db->select("select students.firstname, students.surname, rubric_scores.student_id from rubric_scores \r\ninner join students on rubric_scores.student_id = students.id\r\nwhere rubric_scores.rubric_id = " . $_GET['rubric']);
if (!empty($already_marked)) {
    $students = array_values(array_diff_assoc($all_students, $already_marked));
} else {
    $students = $all_students;
}
echo json_encode($students);