@@ -47,7 +47,10 @@ module KGrader | |||||
end | end | ||||
def clobber | def clobber | ||||
# TODO: confirm | |||||
puts "clobbering means deleting local student repos and roster files" | |||||
print "are you sure? [y/N] " | |||||
abort "aborted" unless ['y', 'yes'].include? STDIN.gets.strip.downcase | |||||
reset_jail | reset_jail | ||||
reset_desk | reset_desk | ||||
end | end | ||||
@@ -19,10 +19,6 @@ module KGrader | |||||
@students ||= @fs.load(rosterfile).map! { |item| item.first } | @students ||= @fs.load(rosterfile).map! { |item| item.first } | ||||
end | end | ||||
def intersect(other) | |||||
# TODO | |||||
end | |||||
private | private | ||||
def rosterfile | def rosterfile | ||||
@fs.roster @course.name, @semester | @fs.roster @course.name, @semester | ||||
@@ -10,9 +10,13 @@ module KGrader | |||||
end | end | ||||
def grade(options = {}) | def grade(options = {}) | ||||
students = @roster.students | |||||
students &= options[:students] unless options[:students].nil? | |||||
# TODO | # TODO | ||||
puts "Grading #{@course.name}:#{@semester} assignment #{@assignment}..." | puts "Grading #{@course.name}:#{@semester} assignment #{@assignment}..." | ||||
puts "- options: #{options}" | puts "- options: #{options}" | ||||
puts "- students: #{students.inspect}" | |||||
end | end | ||||
def commit(options = {}) | def commit(options = {}) | ||||