Permalink
Browse files

New version (2003113000), Analysis of Assessments added.

  • Loading branch information...
1 parent c2d27ab commit 285b8f7fef12c9fefe983ad6716a65fb53a6a281 rkingdon committed Dec 1, 2003
Showing with 559 additions and 55 deletions.
  1. +11 −1 mod/workshop/db/mysql.php
  2. +3 −0 mod/workshop/db/mysql.sql
  3. +41 −18 mod/workshop/lib.php
  4. +501 −35 mod/workshop/submissions.php
  5. +1 −1 mod/workshop/version.php
  6. +2 −0 mod/workshop/view.php
View
@@ -65,7 +65,17 @@ function workshop_upgrade($oldversion) {
execute_sql("INSERT INTO `{$CFG->prefix}log_display` VALUES ('workshop', 'view', 'workshop', 'name')");
execute_sql("INSERT INTO `{$CFG->prefix}log_display` VALUES ('workshop', 'update', 'workshop', 'name')");
}
-
+
+ if ($oldversion < 2003113000) {
+ execute_sql("ALTER TABLE `{$CFG->prefix}workshop` ADD `teacherloading` tinyint(3) unsigned
+ NOT NULL default '5'");
+ execute_sql("ALTER TABLE `{$CFG->prefix}workshop` ADD `assessmentstodrop` tinyint(3) unsigned
+ NOT NULL default '0'");
+ execute_sql("ALTER TABLE `{$CFG->prefix}workshop_assessments` ADD `donotuse` tinyint(3) unsigned
+ NOT NULL default '0' AFTER `resubmission`");
+ execute_sql("ALTER TABLE `{$CFG->prefix}workshop_grades` ADD INDEX (`assessmentid`)");
+ }
+
return true;
}
@@ -30,6 +30,8 @@ CREATE TABLE `prefix_workshop` (
`biasweight` tinyint(3) unsigned NOT NULL default '5',
`reliabilityweight` tinyint(3) unsigned NOT NULL default '5',
`gradingweight` tinyint(3) unsigned NOT NULL default '5',
+ `teacherloading` tinyint(3) unsigned NOT NULL default '5',
+ `assessmentstodrop` tinyint(3) unsigned NOT NULL default '0',
`showleaguetable` tinyint(3) unsigned NOT NULL default '0',
PRIMARY KEY (`id`)
) COMMENT='Defines workshop';
@@ -73,6 +75,7 @@ CREATE TABLE `prefix_workshop_assessments` (
`gradinggrade` int(3) NOT NULL default '0',
`mailed` tinyint(3) unsigned NOT NULL default '0',
`resubmission` tinyint(3) unsigned NOT NULL default '0',
+ `donotuse` tinyint(3) unsigned NOT NULL default '0',
`generalcomment` text NOT NULL,
`teachercomment` text NOT NULL,
PRIMARY KEY (`id`)
View
@@ -46,7 +46,7 @@
14 => 4.0);
$WORKSHOP_FWEIGHTS = array( 0 => 0, 1 => 0.1, 2 => 0.25, 3 => 0.5, 4 => 0.75, 5 => 1.0, 6 => 1.5,
- 7 => 2.0, 8 => 3.0, 9 => 5.0, 10 => 7.5, 11=> 10.0);
+ 7 => 2.0, 8 => 3.0, 9 => 5.0, 10 => 7.5, 11=> 10.0, 12=>50.0);
if (!defined("COMMENTSCALE")) {
define("COMMENTSCALE", 20);
@@ -3384,38 +3384,57 @@ function workshop_print_submission_assessments($workshop, $submission, $type) {
case "teacher" :
if ($submission->teachergrade) { // if there's a final teacher's grade...
$str = "$submission->teachergrade ";
- }
+ }
foreach ($assessments as $assessment) {
if (isteacher($workshop->course, $assessment->userid)) {
- $str .= "<A HREF=\"assessments.php?action=viewassessment&a=$workshop->id&aid=$assessment->id\">[";
+
+ $str .= "<A HREF=\"assessments.php?action=viewassessment&a=$workshop->id&aid=$assessment->id\">";
+ if ($assessment->donotuse) {
+ $str .= "&lt;";
+ } else {
+ $str .= "[";
+ }
$str .= number_format($assessment->grade, 0);
if ($assessment->gradinggrade) { // funny, teacher is grading self!
$str .= "/".number_format($assessment->gradinggrade*100/COMMENTSCALE, 0)."%";
- }
- $str .= "]</A> ";
}
+ if ($assessment->donotuse) {
+ $str .= "&gt;</A> ";
+ } else {
+ $str .= "]</A> ";
+ }
}
+ }
break;
case "student" :
if ($submission->peergrade) { // if there's a final peer grade...
$str = "$submission->peergrade ";
- }
+ }
foreach ($assessments as $assessment) {
if (isstudent($workshop->course, $assessment->userid)) {
- $str .= "<A HREF=\"assessments.php?action=viewassessment&a=$workshop->id&aid=$assessment->id\">{";
+ $str .= "<A HREF=\"assessments.php?action=viewassessment&a=$workshop->id&aid=$assessment->id\">";
+ if ($assessment->donotuse) {
+ $str .= "&lt;";
+ } else {
+ $str .= "{";
+ }
$str .= number_format($assessment->grade, 0);
if ($assessment->gradinggrade) {
$str .= "/".number_format($assessment->gradinggrade*100/COMMENTSCALE, 0)."%";
- }
- $str .= "}</A> ";
}
+ if ($assessment->donotuse) {
+ $str .= "&gt;</A> ";
+ } else {
+ $str .= "}</A> ";
+ }
}
+ }
break;
- }
}
+ }
if (!$str) {
$str = "&nbsp;"; // be kind to Mozilla browsers!
- }
+ }
return $str;
}
@@ -3569,27 +3588,31 @@ function workshop_print_upload_form($workshop) {
function workshop_print_user_assessments($workshop, $user) {
// Returns the number of assessments and a hyperlinked list of grading grades for the assessments made by this user
- if ($assessments = workshop_get_user_assessments($workshop, $user)) {
+ if ($assessments = workshop_get_user_assessments_done($workshop, $user)) {
$n = count($assessments);
$str = "$n (";
foreach ($assessments as $assessment) {
if ($assessment->timegraded) {
$gradingscaled = intval($assessment->gradinggrade * $workshop->grade / COMMENTSCALE);
$str .= "<A HREF=\"assessments.php?action=viewassessment&a=$workshop->id&aid=$assessment->id\">";
$str .= "$gradingscaled</A> ";
- }
+ }
else {
$str .= "<A HREF=\"assessments.php?action=viewassessment&a=$workshop->id&aid=$assessment->id\">";
- $str .= "-</A> ";
- }
+ if ($assessment->donotuse) {
+ $str .= "&lt;".number_format($assessment->grade, 0)."&gt;</A> ";
+ } else {
+ $str .= number_format($assessment->grade, 0)."</A> ";
+ }
}
- $str .= ")";
}
+ $str .= ")";
+ }
else {
$str ="0";
- }
- return $str;
}
+ return $str;
+}
//////////////////////////////////////////////////////////////////////////////////////
Oops, something went wrong.

0 comments on commit 285b8f7

Please sign in to comment.