Skip to content

Instantly share code, notes, and snippets.

@torsday
Created November 24, 2014 19:29
Show Gist options
  • Save torsday/8a6e0fc188fb72ee3128 to your computer and use it in GitHub Desktop.
Save torsday/8a6e0fc188fb72ee3128 to your computer and use it in GitHub Desktop.
tci_82865566.rb
class Shared::AnswersController < ApplicationController
before_filter :authenticate_student_or_teacher!
def create
@lesson = Lesson.where(id: params[:lesson_id]).first
authorize! :read, @lesson
@challenge = @lesson.challenge
@challenge_result = current_student ? @challenge.result_for_student(current_student) : @challenge.result_for_staffer(current_staffer)
@max_num_attempts = false
challenge_answer(params[:question_id], params[:answer_id])
respond_to do |format|
format.js
format.html
end
end
@torsday
Copy link
Author

torsday commented Nov 24, 2014

Checked the source code of view-source:http://demo.teachtci.com/shared/programs/156/lessons/1474/challenge, all the remote's properly show up within their tags as true.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment