def approve
@assignment = Assignment.find_by(id: @request.assignment_id)
lms_facade = @assignment.lms_facade
if @request.approve(lms_facade.from_user(@user), @user)
redirect_to course_requests_path(@course), notice: 'Request approved and extension created successfully in Canvas.'
else
flash[:alert] = "Failed to approve the request. #{@request.errors.full_messages.join(', ')}"
redirect_to course_requests_path(@course)
end
end
This shouldn't hard code the LMS name.
This shouldn't hard code the LMS name.