{"id":72,"date":"2010-10-12T21:26:56","date_gmt":"2010-10-12T21:26:56","guid":{"rendered":"http:\/\/wcarss.ca\/log\/?p=72"},"modified":"2010-10-12T21:26:56","modified_gmt":"2010-10-12T21:26:56","slug":"marking-cis-1500-assignment-1-part-1","status":"publish","type":"post","link":"https:\/\/wcarss.ca\/log\/2010\/10\/marking-cis-1500-assignment-1-part-1\/","title":{"rendered":"Marking CIS 1500 Assignment 1: Part 1"},"content":{"rendered":"<h2>Automating the Grading process<\/h2>\n<p>I&#8217;ve got 90 students to mark and I&#8217;m running behind on time. So the natural<br \/>\nthing to do is to document what I try, what works, and what I end up doing to<br \/>\nfigure out the marks for my students. Anywhere that it would come in, I will<br \/>\nhave removed any personal data from a student. Hopefully, none of the code and<br \/>\nnothing super related to the coding problem they solved comes in, either.<\/p>\n<h2>First thing is first<\/h2>\n<p>The students made submissions through a feature known as &#8220;Dropbox&#8221; (no, not \/that\/ dropbox), and we (the TA&#8217;s) have to download a zip of all of theirsubmissions. This could be great, if it weren&#8217;t for a few obstacles.<\/p>\n<p>Desire2Learn&#8217;s software does not work properly with Mozilla Firefox. It uses<br \/>\nsome javascript to alter database requests that just does not seem to run right<br \/>\nin FF.<\/p>\n<p>I have no ability to select or view &#8216;students from my lab&#8217;. I have three \/paper\/<br \/>\nsheets of separately alphabetised data for each of my labs.<\/p>\n<p>We started off using Ubuntu 10.04 and having students write code on it and<br \/>\ncompile with gcc. Someone in our department decided it was a reasonable choice<br \/>\nto upgrade to 10.04 the week that all the students moved in, and it turns out<br \/>\nthe SunRay terminal server (we use dumb terms for our labs; lower power costs<br \/>\netc) running Solaris is for some reason incompatible with some setting in<br \/>\n10.04&#8217;s XServer. So we switched to Debian 6. And of the four linux servers for<br \/>\nthe CS department, there will always be at least one down &#8211; sometimes two,<br \/>\nrarely three, and on that occasional moment, all of them will be out of<br \/>\ncommission.<\/p>\n<p>It should be noted that &#8216;down&#8217; here means they authenticate and suck you in,<br \/>\nwarn you about your kerberos password expiring in 350ish days (thanks! I&#8217;ll keep<br \/>\nit in mind!), display the MOTD, and then hang. No prompt appears and ^C, ^D, ^Z,<\/p>\n<p>Esc, Alt+Est, Alt+X, or any reasonable combination will cause anything useful.<br \/>\nIt&#8217;s like a program stuck in a while loop.<\/p>\n<p>Back on topic: We decided to let students use Windows and PellesC if they want,<br \/>\nbecause (sigh) it was just far more stably available than our linux systems.<\/p>\n<p>This meant that we needed two separare dropboxes, one for Pelles and one for<br \/>\ngcc. Yes, we know that there should be no differences (these are super simple<br \/>\nassignments), but the argumentation seems to be, &#8220;on the off chance that<br \/>\nsomething crazy happens, this is insurance and we know where this is alleged to<br \/>\nwork.&#8221;<\/p>\n<p>So, D2L forces me to use Internet Explorer,<br \/>\nI have 3 separately alphabetised lists of students on paper (90 out of 530)<br \/>\nI have assignments to collect across two separate dropboxes.<\/p>\n<h2>How to go about it<\/h2>\n<p>I have written out the names of all 90 of my students from the 3 labs into a<br \/>\ntext file, tab-separated. I&#8217;ve also downloaded \/all\/ of the assignments off of<br \/>\nthe site, because it&#8217;s relatively easy to do that. Unfortunately, D2L doesn&#8217;t<br \/>\njust give the most recent submission, it gives all files &#8211; so there&#8217;s some old-<br \/>\nversions floating around that need to be gotten rid of.<\/p>\n<h2>Time to write a script!<\/h2>\n<p>It&#8217;s going to have to get all of the filenames and keep only the newest ones.<br \/>\nThe first way that pops into my head is as follows.<\/p>\n<p># The submissions have the dates in the filename,<br \/>\n# so the reversed output of ls will have the newest<br \/>\n# file listed first.<br \/>\n#<br \/>\nfiles = `ls`<br \/>\nfiles = files.split(&#8220;\\n&#8221;)<br \/>\nfiles.reverse!<\/p>\n<p># Since the names are all generated by Desire2Learn,<br \/>\n# multiple submissions are identical for the first several<br \/>\n# characters. I chose to check against the first 16 or so,<br \/>\n# as that seems like a reasonable maximum length for a last<br \/>\n# name, to deal with the case of two people who share last<br \/>\n# names.<br \/>\n#<br \/>\n# If the first 16 characters match, this is an alternate-<br \/>\n# submission. And since I know they&#8217;re reverse-chronologically<br \/>\n# ordered, I can discard all but the first. Clever!<br \/>\n#<br \/>\ncopy_files = []<br \/>\nold_file = &#8220;&#8230;&#8230;&#8230;&#8230;&#8230;.&#8221;<br \/>\nfiles.each do |file|<br \/>\nif file[0,15] != old_file then<br \/>\ncopy_files &lt;&lt; file<br \/>\nold_file = file[0,15]<br \/>\nend<br \/>\nend<\/p>\n<p># broken out of the loop above for clarity<br \/>\ncopy_files.each do |file|<br \/>\n`cp &#8220;#{file}&#8221; &#8220;filtered\/#{file}&#8221;`<br \/>\nend<\/p>\n<p>Now I need to deal with the much harder problem of only marking my students.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Automating the Grading process I&#8217;ve got 90 students to mark and I&#8217;m running behind on time. So the natural thing to do is to document what I try, what works, and what I end up doing to figure out the marks for my students. Anywhere that it would come in, I will have removed any [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/wcarss.ca\/log\/wp-json\/wp\/v2\/posts\/72"}],"collection":[{"href":"https:\/\/wcarss.ca\/log\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wcarss.ca\/log\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wcarss.ca\/log\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wcarss.ca\/log\/wp-json\/wp\/v2\/comments?post=72"}],"version-history":[{"count":1,"href":"https:\/\/wcarss.ca\/log\/wp-json\/wp\/v2\/posts\/72\/revisions"}],"predecessor-version":[{"id":73,"href":"https:\/\/wcarss.ca\/log\/wp-json\/wp\/v2\/posts\/72\/revisions\/73"}],"wp:attachment":[{"href":"https:\/\/wcarss.ca\/log\/wp-json\/wp\/v2\/media?parent=72"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wcarss.ca\/log\/wp-json\/wp\/v2\/categories?post=72"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wcarss.ca\/log\/wp-json\/wp\/v2\/tags?post=72"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}