pre_develop
jingquan huang 6 years ago
parent b4d671be82
commit f1e83edd0b

@ -108,7 +108,7 @@ class CnmoocsService
if shixun.blank?
return { error: -1, messages: '资源不存在' }
end
{ error: 0, messages: '成功', accessUrl: "#{Redmine::Configuration['educoder_domain']}/shixuns/#{shixun.identifier}/challenges?authToken=#{token.value}" }
{ error: 0, messages: '成功', data: {accessUrl: "#{Redmine::Configuration['educoder_domain']}/shixuns/#{shixun.identifier}/challenges?authToken=#{token.value}" }}
end
def get_students_data params
@ -121,7 +121,7 @@ class CnmoocsService
myshixun.games.each do |game|
time += game.consumes_time_int
end
{error: 0, messages: '成功', data: {time: time, score: score * 10}}
{error: 0, messages: '成功', data: {experiment: {time: time, score: score * 10}}}
else
{error: -1, messages: '用户还未开始学习此资源'}
end

Loading…
Cancel
Save