Module: Course::Assessment::AssessmentAbility

Includes:
Course::Assessment::Answer::ProgrammingAbility, SubmissionQuestionAbility
Included in:
Course::AssessmentsAbilityComponent
Defined in:
app/models/course/assessment/assessment_ability.rb

Instance Method Summary collapse

Methods included from Course::Assessment::Answer::ProgrammingAbility

#allow_staff_download_programming_files, #allow_students_create_programming_files, #allow_students_destroy_programming_files, #allow_students_download_programming_files, #can_update_submission?, #creator?, #current_answer?, #multiple_file_submission?

Methods included from SubmissionQuestionAbility

#allow_staff_view_past_answers_submission_questions, #allow_students_view_past_answers_submission_question

Instance Method Details

#define_permissionsObject


6
7
8
9
10
11
12
13
# File 'app/models/course/assessment/assessment_ability.rb', line 6

def define_permissions
  if user
    define_student_assessment_permissions
    define_staff_assessment_permissions
  end

  super
end

#define_staff_assessment_permissionsObject


28
29
30
31
32
33
34
35
36
# File 'app/models/course/assessment/assessment_ability.rb', line 28

def define_staff_assessment_permissions
  allow_managers_manage_tab_and_categories
  allow_staff_manage_assessments
  allow_manager_publish_assessment_submission_grades
  allow_staff_grade_assessment_submissions
  allow_staff_manage_assessment_annotations
  allow_staff_read_assessment_tests
  allow_staff_read_submission_questions
end

#define_student_assessment_permissionsObject


15
16
17
18
19
20
21
22
23
24
25
26
# File 'app/models/course/assessment/assessment_ability.rb', line 15

def define_student_assessment_permissions
  allow_students_show_assessments
  allow_students_access_assessment
  allow_students_attempt_assessment
  allow_students_read_material
  allow_students_create_assessment_submission
  allow_students_update_own_assessment_submission
  allow_students_manage_annotations_for_own_assessment_submissions
  allow_students_read_own_assessment_answers
  allow_students_read_submission_question
  allow_student_to_destroy_own_attachments_text_response_question
end