Browse Source

Confirmation before clobbering; only grade certain students.

master
Ben Kurtovic 8 years ago
parent
commit
5a9ac3d28f
3 changed files with 8 additions and 5 deletions
  1. +4
    -1
      lib/kgrader/cli.rb
  2. +0
    -4
      lib/kgrader/roster.rb
  3. +4
    -0
      lib/kgrader/task.rb

+ 4
- 1
lib/kgrader/cli.rb View File

@@ -47,7 +47,10 @@ module KGrader
end

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_desk
end


+ 0
- 4
lib/kgrader/roster.rb View File

@@ -19,10 +19,6 @@ module KGrader
@students ||= @fs.load(rosterfile).map! { |item| item.first }
end

def intersect(other)
# TODO
end

private
def rosterfile
@fs.roster @course.name, @semester


+ 4
- 0
lib/kgrader/task.rb View File

@@ -10,9 +10,13 @@ module KGrader
end

def grade(options = {})
students = @roster.students
students &= options[:students] unless options[:students].nil?

# TODO
puts "Grading #{@course.name}:#{@semester} assignment #{@assignment}..."
puts "- options: #{options}"
puts "- students: #{students.inspect}"
end

def commit(options = {})


Loading…
Cancel
Save