Show More
Commit Description:
merge with algo and add brython files that were missing
Commit Description:
merge with algo and add brython files that were missing
References:
File last commit:
Show/Diff file:
Action:
app/controllers/sources_controller.rb
| 27 lines
| 722 B
| text/x-ruby
| RubyLexer
|
r564 | class SourcesController < ApplicationController | |||
r565 | before_filter :authenticate | |||
r564 | ||||
def direct_edit | ||||
r565 | @problem = Problem.find(params[:pid]) | |||
@source = '' | ||||
r564 | end | |||
r565 | ||||
def direct_edit_submission | ||||
@submission = Submission.find(params[:sid]) | ||||
@source = @submission.source.to_s | ||||
@problem = @submission.problem | ||||
@lang_id = @submission.language.id | ||||
render 'direct_edit' | ||||
end | ||||
r581 | def get_latest_submission_status | |||
@problem = Problem.find(params[:pid]) | ||||
@submission = Submission.find_last_by_user_and_problem(params[:uid],params[:pid]) | ||||
puts User.find(params[:uid]).login | ||||
puts Problem.find(params[:pid]).name | ||||
puts 'nil' unless @submission | ||||
respond_to do |format| | ||||
format.js | ||||
end | ||||
end | ||||
r564 | end | |||