From f1e83edd0b77db8bc3bb420a6a5e1f0fbc689d01 Mon Sep 17 00:00:00 2001 From: jingquan huang Date: Sat, 1 Jun 2019 08:01:51 +0800 Subject: [PATCH] =?UTF-8?q?mooc=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/services/cnmoocs_service.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/services/cnmoocs_service.rb b/app/services/cnmoocs_service.rb index bce54650..3f28a0ef 100644 --- a/app/services/cnmoocs_service.rb +++ b/app/services/cnmoocs_service.rb @@ -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