x学生作品代码先 base64编码在传递

This commit is contained in:
sw 2015-07-16 18:13:43 +08:00
parent 421b377785
commit f9cf47804a
1 changed files with 2 additions and 1 deletions

View File

@ -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)