Web Submission Feedback

This consists of several PHP files, working in conjunction with LocalMarmosetSubmissionMirror, which help implement the goals of MarkersMimickingMarmoset.

Set Up

Required Files

The proper directory structure is shown below:

hm.png

Note: When downloading the attached files, be sure to rename the extensions to .php where appropriate.

handmarking.php

Belongs directly under your public_html directory. This will display a list of the assignments currently being handmarked, with a link to each assignment. Details on editing this file in the WebSubmissionFeedback#NewAssns section below.

handmarking Directory

Under public_html, create a handmarking directory and place all of the following files inside:

.htaccess
Either in the same directory or a parent directory, there must be a .htaccess file with contents combining the requirements of HtaccessForPHP and RequireUseridsForSecureWebAccess. See attached file for an example.

permissions.php
This requires a coursestaff.term file to exist in order to work. This file must be created manually under your course's home directory. For details on the format of this file, see ClassListPerlModule.

For documentation on the PHP file itself, and the up-to-date official contents of the file, see RestrictingWebAccessToCourse.

do_mail.php

NOTE: There were some issues with sending mail through php during the W11 term, so the alternative mail_script.sh was used (see attached).

Sends an email to the students with their mark, along with TA comments on their submission. This also saves a copy of the TA's comments in the markingcache directory and adds a file corresponding to the marked student in the processed directory. (For more details on these directories, see the WebSubmissionFeedback#DirStruct section below.)

grab_submissions
Defines functions for reading the student's submissions from the handin directory. This is not a PHP program, but should be in the handmarking directory with the other files.

show_submission.php
Ensures correct display of files in both UTF-8 and UTF-16 encoding.

helpers.php
Defines helper functions required by handmarking.php

Creating New Assignments

Follow the instructions on LocalMarmosetSubmissionMirror to create a subdirectory under handin for each project that will be handmarked. When you have created all the appropriate subdirectories for the assignment (i.e. one per question), edit the available array in handmarking.php by adding a new Bundle object as follows:

new Bundle("Assignment Name", "Question 1", "Question 2", ..., "Question n")

where the first argument is the name of the assignment, and each subsequent argument is the name of the questions being handmarked for the assignment. Note that the question names must match the names of the corresponding subdirectories in handin.

Directory Structure

The above scripts will create a file structure under /~csXXX/course/ta_marmoset/ that looks like the following for each project (i.e. question):

directories.jpg

Below is an explanation of these directories:

currently_marking
Stores a list of files corresponding to students currently in a TA's marking queue. The first line of each file is the id of the marking TA; the second line is the id of the student, followed by a hyphen, followed by the submission number.

markingcache
Stores the TA's comments for each marked submission. Files are named as [TA id]_[student id]-[submission number].

marks
Stores the marks for each student. Files are named by student id and contain a single line consisting of the mark received.

processed
Stores a list of files corresponding to each marked student. The files are in the same format as for currently_marking.

submissionlogs
Stores a list of files corresponding to each student with a Marmoset submission. Each file contains a single line consisting of the student id, followed by a hyphen, followed by the submission number.

Troubleshooting

See TroubleshootingPHP.

Potential Improvements

  • Make it work with commands like submit nicely, too.
  • Provide a facility to see a feedback history.
  • Allow marking of non-text files.

Providing a proper queue

Adapt the following public test code to sort submissions by date?

#!/usr/bin/env perl

# Find all files in the directory ending with .request, and sort them
# by date.

print STDERR "Usage: $0 \n" and exit 1 unless @ARGV == 1;

my $path = shift;
opendir my($dir), $path;
my @files = sort { (stat($a))[9] <=> (stat($b))[9] }
   grep { -f "$path/$_" and /\.request$/ } readdir $dir;
closedir $dir;

print join("\n", @files) . "\n";
Topic attachments
I Attachment History Action Size Date Who Comment
Texttxt do_mail.txt r1 manage 1.7 K 2010-06-20 - 13:01 HumaZafar RENAME TO do_mail.php
Unknown file formatext grab_submission r1 manage 3.1 K 2010-06-20 - 13:02 HumaZafar  
Texttxt helpers.txt r1 manage 4.0 K 2010-06-20 - 13:02 HumaZafar RENAME TO helpers.php
Unknown file formatext htaccess_example r1 manage 0.2 K 2010-06-20 - 13:14 HumaZafar Should be saved as .htaccess
Unix shell scriptsh mail_script.sh r1 manage 0.4 K 2011-04-25 - 12:17 HumaZafar Shell script for emailing handmarking results.
Texttxt permissions.txt r2 r1 manage 0.1 K 2010-10-08 - 10:32 TerryVaskor DO NOT USE THIS FILE; see https://www.cs.uwaterloo.ca/twiki/view/ISG/RestrictingWebAccessToCourse for up-to-date contents
Texttxt show_submission.txt r1 manage 2.2 K 2010-06-20 - 13:03 HumaZafar RENAME TO show_submission.php
Edit | Attach | Watch | Print version | History: r14 < r13 < r12 < r11 < r10 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r14 - 2011-04-25 - HumaZafar
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback