pre_develop
daiao 6 years ago
parent 1fb7c35c30
commit 23d8e023df

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

Loading…
Cancel
Save