Class: Courses::ExamsController

Inherits:
GakuController
  • Object
show all
Defined in:
app/controllers/gaku/courses/exams_controller.rb

Instance Method Summary collapse

Instance Method Details

#gradingObject



12
13
14
15
16
17
18
19
20
21
22
23
# File 'app/controllers/gaku/courses/exams_controller.rb', line 12

def grading
  @course = Course.find(params[:course_id])
  @exam = Exam.includes(exam_portions: :exam_portion_scores).find(params[:id])
  @students = @course.students
  @grading_methods = @course.grading_methods
  @gradable_scope = @course
  init_portion_scores

  @grading_calculations = Grading::Collection::Calculations.new(@grading_methods, @students, @exam, @gradable_scope).calculate

  render 'gaku/shared/grading/grading'
end

#indexObject



7
8
9
10
# File 'app/controllers/gaku/courses/exams_controller.rb', line 7

def index
  @course = Course.find(params[:course_id])
  respond_with @course
end