Giter Club home page Giter Club logo

vmchecker's Introduction

vmchecker user guide

This is a guide for teaching assistants using vmchecker. For information about vmchecker structure, sources and contributing guidelines check HACKING.rst

Course directory structure

The files in each course's vmchecker-storer directory:

  • auth_file.json - custom accounts for students who cannot use LDAP for authentication
    • entries are of the form "username" : "password"
    • after editing this file check that authentication still works as JSON formatting errors may block the login for all students
  • config - course configuration file (see bellow)
  • repo - a git repository of all students assignments
    Structure: repo/assignment-name/student-name/
    • archive.zip - the student's last submission for this assignment
    • archive - unzipped version of this submission. The contents of this directory are stored in the git repository. You can use git to see previous versions of the student's submissions for this assignment.
    • results - this is only present if the submission was tested.
      • build-stdout.vmr build-stderr.vmr - output of the submission's and test compilation
      • run-stdout.vmr run-stderr.vmr - output from running the tests
      • run-km.vmr - kernel messages (dmesg, dbgview)
      • vmchecker-stderr.vmr - vmchecker internal errors
      • grade.vmr - see Grading section bellow.

Grading

To grade a homework you must edit repo/assignment-name/student-name/results/grade.vmr.

Penalties for exceeding the deadline will be automatically computed based on the submission's upload time, the assignment's deadline (official holidays are not counted as penalties).

For an unmarked submission, the grade.vmr file contains only one word: "ok".

vmchecker reads all lines from grade.vmr and interprets only the first word on the line. If the word is a number (convertible to float in Python) than that number is added to the total grade (10 for a perfect submission).

Examples (considering the submission sent before the deadline):

+1.0 nice algorithm
-0.2: ugly intendation
It's almost unreadable!

-0.1: inconsitent naming
0.1: nice README

graded by: Lucian Adrian Grijincu

The previous example is graded at 10 + 1.0 - 0.2 - 0.1 = 10.7. The grade is not bounded by 10 because some assignments may have bonuses.

The spacing before the first number on the line is ignored. After the number you may only put whitespace or ':'. Anything else and the number is treated as a string and not added to the grade.

As lines that do not begin with a number are ignored by the grading tools, but displayed to the student, you can use this file to comment and argument the penalty/bonuses given. Writing your name in the file will tell the student who to contact if he has any remarks regarding the grading.

ATENTION BUG!: vmchecker will DELETE results and grade.vmr when the student send another submission for that assignment. vmchecker does not prevent a student from uploading a homework again after it was graded!

Config

TODO

Add a new assignment

An example assignment specification:

[assignment minishell-windows]
Deadline = 2010.03.31 23:59:00
Machine = so-win
Timeout=150
AssignmentTitle = Minishell (Windows)
StatementLink = http://elf.cs.pub.ro/so/wiki/teme/tema-1
OrderNumber = 2

The string after assignment is the ID of the assignment. This may NOT contain spaces!

  • Deadline - the date after which students are penalized for late submissions
  • Machine - the ID of the virtual machine used to test this assignment
  • Timeout is the ammount of time (in seconds) after which testing is aborted.
  • AssignmentTitle - a human readable name for the assignment
  • StatementLink - a link to a resource (pdf, html, etc.) describing the assignment
  • OrderNumber is used to order assignments when presented to the student. These should be numbers starting from 1 for the first assignment and incremented for each new one.

Assignment test archives must be placed in tests/assignment-id.zip

Resubmit an assignment

In order to resubmit a student upload for rechecking you must:

  • delete the results folder from the current upload, e.g. rm -rf vmchecker-storer/repo/assign1/student.name/current/results
  • run vmchecker-resubmit -c <course-id> -u <student-name> -a <assignment-name>

vmchecker-resubmit also has an --all option if you want to mass resubmit.

Add a new instance

To create an instance for a new school year, based of the previous year:

  • create a new folder
  • inside the folder run vmchecker-init-course storer
  • copy config, build/run scripts and tests from previous year
  • update config accordingly
  • point vmchecker-storer symbolic link to new instance folder

vmchecker's People

Contributors

brtzsnr avatar calin-iorgulescu avatar claudiugh avatar cojocar avatar crushack avatar deathmeek avatar ironmissy avatar luciang avatar mgax avatar mihai-bleont avatar razvand avatar valenting avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vmchecker's Issues

Submiting login data in Internet Explorer

At SO, there is a problem with the vmchecker login form in Internet Explorer browser:

You enter the login data (username and password), hit Enter or click on Login and nothing happens - the fields get empty and the user remains on the login page.

[Design] Remove horizontal scroll from popup window

The horizontal scroll in the popup window decreases usability.
Two proposed solutions to solve this:

  1. Resize the popup window so it's width fits the text inside it. This could create problems with very long lines though.
  2. Automatically insert a line break in lines larger than X characters and resize the window to fit X characters in width. X could be a classic value like 80.

compute grade & penalty when updating database

update_db.py reads grade from the first line of results/job_results.
however it should add different points found in the file, apply penalty and save the mark

results/job_results might look like:

+0.1 implementare
-0.2 memory leak at line 666
-0.3 possible deadlock

update_db.py should add 10 + 0.1 - 0.2 - 0.3 then substract the penalty, say 0.5, to get the final grade 8.9

the users should pick the course before logging in

There are two issues stemming from users selecting course after logging in:

  • students mess up and send the homework in the wrong course
  • messed up configs for one course can bring down other ones (e.g. the auth_config.json file)

Student Name

We need the student's name when rendering the global results table, in order to display the name nicely. We also need the student's id when the authentication is performed.

Uploaded archive history

We want to be able to:

  • see list with history of uploaded assignments
  • download from vmchecker last uploaded assignment

Upload ASCII text files only

Update user interface to only allow uploading of ASCII text files. If user uploads files that use another encoding, the upload process should fail.

Feature request: pre-checker script

In the current architecture, each assignment is associated with a virtual machine and a checker. There are situations where this modes doesn't match the needs of the assignment.

For example we want a mechanism where a submitted homework needs to run on a virtual machine and then run the same on different virtual machine. Or another case where the virtual machine is not on the checker machine and the vm should first be copied on the tester.

I am proposing a rather large feature request: a sort of a script before the checker script for the setup before the run. A pseudoscript for this could be something like:

upload assesment on vm1
result1 = vm1.runchecker()
upload assesment on vm2
result2 = vm2.runchecker()
return (result1+result2)/2

Or:

get vm1 from ssh://admin@server/home/$student/vm.zip
unzip vm1.zip
upload assesment on vm1
result = vm1.runchekcer()
return result

eliminate duplicate tasks from queue

queue_manager doesn't check that there can be more submissions of the same assignment from the same user in the queue. so if somebody sends 5 archives in a very short time (for example by double clicking or fixing a missed bug) all 5 homeworks will be evaluated.

Limit size of output files

I've come across an output file (run-stdout.vmr) of 82MB in size. This should be taken into account. It messes:

  • the storage
  • the database used (currently Git)
  • the interface (it wouldn't be able to list such a large file)

Output should be limited for each assignment to a given threshold.

Most of the increase in output size is due to left out print statements and infinite loops in the assignment code.

LSB compliant startup script for vmchecker

The vmchecker init script (placed in /etc/init.d/vmchecker) is not LSB compliant. When upgrading insserv, the following error ocurs:

error: Unable to migrate to dependency based boot sequencing.
error: Problems detected: insserv: warning: script 'vmchecker' missing LSB tags and overrides,  , package klogd
removed but not purged, package sysklogd removed but not purged

See http://wiki.debian.org/LSBInitScripts/DependencyBasedBoot for
more information about dependency based boot sequencing. To
reattempt the migration process run 'dpkg-reconfigure sysv-rc'.

errorTrace in testing queue

Testing queue displays the following message (for all courses):

"Coada temelor ce urmează să fie testate

{
"errorTrace": "Traceback (most recent call last):\n File "/usr/lib/python2.5/site-packages/vmchecker/websutil.py", line 239, in get_test_queue_contents\n look_for_keys=False)\n File "/usr/lib/pymodules/python2.5/paramiko/client.py", line 291, in connect\n sock.connect(addr)\n File "", line 1, in connect\nerror: (113, 'No route to host')\n"
}"

Update default assigment selection to current assignment

When deadline for an assignment passes, the default selection for an assigment should be updated to the new assignment.

This would helpfully prevent situations when students upload a new assignment archive over an old assigment.

Team assignment support

Explore how team assignments could work from vmchecker's perspective:

  • how to create a team (all members must agree);
  • once a team is created, notify someone (TA?);
  • who uploads an assignment: all members or just one;
  • if only one team member uploads assigment, make it visible for the other members as well (both in results and in TAs view).

prerequisites for uploading a homework

Define a list of files that must exist in an uploaded archive (e.g Makefile , there is no reason to send a homework to checker if there is no way to compile it).
Also , think about a black list of files ( e.g , object files) that shouldn't be found in an archive.

Windows compile warnings

There is only a summary with no. of errors and no. of warnings, but there is no detailed list of warnings. Also, there seem to be about 1-2 warnings that are present in all uploaded homeworks.

Stored homeworks should be matched with lowercase username

Logging in with mixed lowercase or uppercase combination of the same username and uploading a homework generates two different entries.

Reproduction:

  • log in with username and submit a homework
  • log in with uSername and submit the same homework
  • check the grade list

The submission appears twice, and seems to be stored as the users are completely different.

queue manager locker

It's possible to run two queue_managers simultaneously that listen on the same directory. This screws things up and can hang the virtual machines. A locking mechanism should be implemented so that no two queue_managers listen on the same directory.

add holidays to penalty script

Usually during holiday no penalties should be applied.

Let's take for example SO course and the Easter holiday: April 20th - april 27th. The deadline was on 17th of April.
A homework submitted:

  • before 17th should take full points
  • on 18th will have 0.25 points of penalty
  • on 19th will have 0.50 points of penalty
  • during the holiday will have 0.50 points of penalty (penalty doesn't increase)
  • on 27th will have 0.75 points of penalty

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.