Class: Course::Condition::AssessmentsController

Inherits:
Course::ConditionsController show all
Defined in:
app/controllers/course/condition/assessments_controller.rb

Instance Method Summary collapse

Methods included from ApplicationSignInCallbacksConcern

#sign_in

Methods included from ApplicationPaginationConcern

#page_param

Methods included from ApplicationAnnouncementsConcern

#global_announcements, #unread_global_announcements

Methods included from ApplicationInstanceUserConcern

#current_instance_user

Methods included from ApplicationUserTimeZoneConcern

#set_time_zone

Methods included from ApplicationUserConcern

#handle_access_denied, #publicly_accessible?

Methods included from ApplicationComponentsConcern

#handle_component_not_found

Instance Method Details

#createObject


10
11
12
13
14
15
16
# File 'app/controllers/course/condition/assessments_controller.rb', line 10

def create
  if @assessment_condition.save
    redirect_to return_to_path, success: t('course.condition.assessments.create.success')
  else
    render 'new'
  end
end

#destroyObject


29
30
31
32
33
34
35
# File 'app/controllers/course/condition/assessments_controller.rb', line 29

def destroy
  if @assessment_condition.destroy
    redirect_to return_to_path, success: t('course.condition.assessments.destroy.success')
  else
    redirect_to return_to_path, danger: t('course.condition.assessments.destroy.error')
  end
end

#editObject


18
19
# File 'app/controllers/course/condition/assessments_controller.rb', line 18

def edit
end

#newObject


7
8
# File 'app/controllers/course/condition/assessments_controller.rb', line 7

def new
end

#updateObject


21
22
23
24
25
26
27
# File 'app/controllers/course/condition/assessments_controller.rb', line 21

def update
  if @assessment_condition.update_attributes(assessment_condition_params)
    redirect_to return_to_path, success: t('course.condition.assessments.update.success')
  else
    render 'edit'
  end
end