|
|
@ -33,7 +33,7 @@ class CnmoocsService
|
|
|
|
shixun_ids = StageShixun.where(:stage_id => params[:parentId]).pluck(:shixun_id)
|
|
|
|
shixun_ids = StageShixun.where(:stage_id => params[:parentId]).pluck(:shixun_id)
|
|
|
|
shixuns = Shixun.where(:id => shixun_ids).offset(offset).limit(limit)
|
|
|
|
shixuns = Shixun.where(:id => shixun_ids).offset(offset).limit(limit)
|
|
|
|
shixuns.each do |shixun|
|
|
|
|
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}
|
|
|
|
nodeType: 1, resouceType: 1}
|
|
|
|
end
|
|
|
|
end
|
|
|
|
totalCount = Shixun.where(:id => shixun_ids).count
|
|
|
|
totalCount = Shixun.where(:id => shixun_ids).count
|
|
|
@ -120,7 +120,7 @@ class CnmoocsService
|
|
|
|
return { error: -1, messages: '资源不存在' }
|
|
|
|
return { error: -1, messages: '资源不存在' }
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
{ error: 0, messages: '成功', accessUrl: "#{Redmine::Configuration['educoder_domain']}/shixuns/#{shixun.id}" }
|
|
|
|
{ error: 0, messages: '成功', accessUrl: "#{Redmine::Configuration['educoder_domain']}/shixuns/#{shixun.identifier}" }
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
def get_students_data params
|
|
|
|
def get_students_data params
|
|
|
|