From 23d8e023dfe747a4e7ff1c790487ecd1fee597a6 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Tue, 28 May 2019 21:01:33 +0800 Subject: [PATCH] 1 --- 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 caba8ebb..34d97d6c 100644 --- a/app/services/cnmoocs_service.rb +++ b/app/services/cnmoocs_service.rb @@ -33,7 +33,7 @@ class CnmoocsService shixun_ids = StageShixun.where(:stage_id => params[:parentId]).pluck(:shixun_id) shixuns = Shixun.where(:id => shixun_ids).offset(offset).limit(limit) shixuns.each do |shixun| - resouces << {resouceId: shixun.identifier, parentId: params[:parentId], resouceName: shixun.name, accessType: 2, + resouces << {resouceId: shixun.id, parentId: params[:parentId], resouceName: shixun.name, accessType: 2, nodeType: 1, resouceType: 1} end totalCount = Shixun.where(:id => shixun_ids).count @@ -120,7 +120,7 @@ class CnmoocsService return { error: -1, messages: '资源不存在' } end - { error: 0, messages: '成功', accessUrl: "#{Redmine::Configuration['educoder_domain']}/shixuns/#{shixun.id}" } + { error: 0, messages: '成功', accessUrl: "#{Redmine::Configuration['educoder_domain']}/shixuns/#{shixun.identifier}" } end def get_students_data params