diff --git a/app/controllers/student_work_controller.rb b/app/controllers/student_work_controller.rb index 5b6de453e..1d40415c8 100644 --- a/app/controllers/student_work_controller.rb +++ b/app/controllers/student_work_controller.rb @@ -2,6 +2,7 @@ class StudentWorkController < ApplicationController layout "base_courses" include StudentWorkHelper require 'bigdecimal' + require "base64" before_filter :find_homework, :only => [:new, :index, :create, :student_work_absence_penalty, :absence_penalty_list, :evaluation_list] before_filter :find_work, :only => [:edit, :update, :show, :destroy, :add_score, :praise_student_work] before_filter :member_of_course, :only => [:index, :new, :create, :show, :add_score, :praise_student_work] @@ -124,7 +125,7 @@ class StudentWorkController < ApplicationController url = "http://192.168.80.21:8080/api/questions/#{@homework.homework_detail_programing.question_id}/solutions.json" solutions = { stundet_work_id:stundet_work.id, - src:stundet_work.description, + src:Base64.encode64(stundet_work.description), language:1 } uri = URI(url)