Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'master' of github.com:saasbook/course-tools

  • Loading branch information...
commit 5fda0ce5e52608517e8a46046650bb6651be0028 2 parents 7071296 + bffd75f
@maxfeldman14 maxfeldman14 authored
Showing with 115 additions and 0 deletions.
  1. +71 −0 graders/dogrades.sh
  2. +44 −0 misc/email_parser.rb
View
71 graders/dogrades.sh
@@ -0,0 +1,71 @@
+#!/bin/bash
+
+## TODO: deal with peer review scalars
+
+# Start in ~/grading directory
+cd ~/grading
+cp grades.csv hws
+cp grades.csv iters
+cp grades.csv quizzes
+
+# Grade all hws
+echo "Grading HW"
+cd hws
+cp grades.csv hw1
+cp grades.csv hw2
+cp grades.csv hw5
+cd hw1
+# now in grading/hws/hw1
+ruby hw1_grader.rb
+for i in {1..7}
+do
+ enter-grades -f HW1_part$i
+done
+cd ../hw2
+# now in grading/hws/hw2
+ruby hw2_grader.rb
+for i in {1..3}
+do
+ enter-grades -f HW2_part$i
+done
+cd ..
+# now in grading/hws
+ruby generic_grader.rb "HW3" "Homework 3"
+enter-grades -f HW3
+ruby generic_grader.rb "HW4" "Homework 4"
+enter-grades -f HW4
+cd hw5
+# now in grading/hws/hw5
+ruby generic_grader.rb "HW5_part1" "Homework 5a"
+ruby generic_grader.rb "HW5_part2" "Homework 5b"
+enter-grades -f HW5_part1
+enter-grades -f HW5_part2
+# Homeworks are now graded
+echo "Grading Quizzes"
+cd ../../quizzes
+ruby generic_grader.rb "quiz1" "Quiz 1"
+ruby generic_grader.rb "quiz2" "Quiz 2"
+ruby generic_grader.rb "quiz3" "Quiz 3"
+ruby generic_grader.rb "quiz4" "Quiz 4"
+for i in {1..4}
+do
+ enter-grades -f quiz$i
+done
+# quizzes are now graded
+echo "Grading iters"
+cd ../iters
+ruby generic_grader.rb "iter0-1" "I 0-1"
+ruby generic_grader.rb "iter0-2" "I 0-2"
+ruby generic_grader.rb "iter0-3" "I 0-3"
+for i in {1..3}
+do
+ enter-grades -f iter0-$i
+done
+ruby generic_grader.rb "iter1" "I 1"
+ruby generic_grader.rb "iter2" "I 2 (Final)"
+enter-grades -f iter1
+enter-grades -f iter2
+# ruby generic_grader.rb "iter3" "I 3 (Final)"
+# ruby generic_grader.rb "iter4" "I 4 (Final)"
+# Iterations have now been graded
+cd ../
View
44 misc/email_parser.rb
@@ -0,0 +1,44 @@
+#!usr/bin/env ruby
+require 'csv'
+
+# Parse a CSV and do a bit of formatting of customer feedback
+# Write <group num>.txt with formatted feedback
+# NOTE: Does not work with groups that have multiple feedback rows
+
+def main
+ skip_first = true
+ headers = []
+ CSV.foreach('to_email.csv', :encoding => "UTF-8") do |row|
+ if skip_first
+ headers = row
+ skip_first = false
+ next
+ else
+ cur = File.open("#{row[5].to_s}.txt", 'a')
+ cur << "Hi,
+
+Below is the feedback you received from your customer:" << "\n\n"
+ headers.zip(row).each do |header, val|
+ if header == "emails"
+ tmp = val.split
+ val = tmp.join(",")
+ cur << "Customer Feedback, Iteration 2\n"
+ cur << val << "\n\n"
+ next
+ end
+ if header == "Which project is this feedback for?"
+ next
+ end
+ cur << header << "\n"
+ cur << val << "\n\n"
+ end
+ cur.close
+ end
+ end
+
+end
+
+
+if __FILE__ == $0
+ main
+end
Please sign in to comment.
Something went wrong with that request. Please try again.