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


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

@@ -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


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

@@ -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 = {})


Loading…
Cancel
Save