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