You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

org_courses_controller.rb 622 B

​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
1234567891011121314151617181920
  1. class OrgCoursesController < ApplicationController
  2. def create
  3. org_ids = params[:orgNames]
  4. @course = Course.find(params[:course_id])
  5. org_ids.each do |org_id|
  6. if OrgCourse.where("organization_id =? and course_id =?", org_id.to_i, params[:course_id].to_i).count == 0
  7. OrgCourse.create(:organization_id => org_id.to_i, :course_id => params[:course_id].to_i, :created_at => Time.now)
  8. end
  9. end
  10. respond_to do |format|
  11. format.js
  12. end
  13. end
  14. def destroy
  15. @course = Course.find(params[:course_id])
  16. @org_course = OrgCourse.find(params[:id])
  17. @org_course.destroy
  18. end
  19. end

软件技术创新是当今国家整体创新能力的重要基础和发展引擎。近年来,大众参与的软件创新与创业活动已经成为网络时代软件开发和应用的新形态,正在快速改变着全球软件创新模式和软件产业格局。 ...