diff --git a/app/controllers/managements_controller.rb b/app/controllers/managements_controller.rb index d946c12b..cc896ef2 100644 --- a/app/controllers/managements_controller.rb +++ b/app/controllers/managements_controller.rb @@ -2360,6 +2360,14 @@ end end end + # 实践课程的金课设置 + def excellent_subject_setting + if params[:subject_id] + subject = Subject.find params[:subject_id] + subject.update_attributes(:excellent => !subject.excellent) + end + end + # 已发布实训路径首页显示 def subject_homepage_show if params[:subject_id] diff --git a/app/models/subject.rb b/app/models/subject.rb index 819d446c..77db603a 100644 --- a/app/models/subject.rb +++ b/app/models/subject.rb @@ -10,7 +10,7 @@ class Subject < ActiveRecord::Base belongs_to :major # score_count 只能适合在首页使用 attr_accessible :description, :name, :status, :visits, :user_id, :course_list_id, :major_id, :learning_notes, :introduction, - :homepage_show, :score_count, :publish_time, :updated_at + :homepage_show, :score_count, :publish_time, :updated_at, :excellent has_many :stages, :dependent => :destroy, :order => "stages.position ASC" has_many :stage_shixuns, :dependent => :destroy diff --git a/app/views/competitions/_gq_second_code_competition.html.erb b/app/views/competitions/_gq_second_code_competition.html.erb index bc54e485..1af1cf52 100644 --- a/app/views/competitions/_gq_second_code_competition.html.erb +++ b/app/views/competitions/_gq_second_code_competition.html.erb @@ -73,6 +73,21 @@ link_url: 'https://keras.io/layers/about-keras-layers/' }] ] + extra_data = [ + { + name: 'C++项目', + description: "本项目的paddle/fluid/operators/optimizers目录中包含了常见的优化器(如,Momentum,Adam等等)的c++实现。", + task: '标注../fluid/operators/optimizers/目录下的所有代码文件', + link_name: '官方,优化器', + link_url: 'https://www.paddlepaddle.org.cn/documentation/docs/zh/1.5/api_guides/low_level/optimizer.html' + },{ + name: 'Python项目', + description: "本项目的python/paddle/fluid/layers/nn.py中包含了神经网络中大量常见层和操作符的python实现,如fc、conv、gru等等。", + task: '标注../paddle/fluid/layers/nn.py代码文件', + link_name: '官方,nn', + link_url: 'https://www.paddlepaddle.org.cn/documentation/docs/zh/1.5/api_cn/layers_cn/nn_cn.html' + } + ] %> <% @competition.competition_stages.includes(:competition_stage_sections).each_with_index do |stage, i| %> @@ -97,9 +112,9 @@ 标注说明:每个小组选择一种编程语言的题目,针对标注任务中指定的标注模块,要求对代码模块、模块中的代码文件, 以及文件中的函数必须进行标注,关键代码块、代码行及关键变量等由参赛者自由选择进行标注。 正式赛第一阶段的比赛在标注阶段就开放查看所有人的标注,请大家根据个人理解,写出自己的风格。我们将综合考虑标注的原创性、准确性、 完整性和多样性等不同的维度对标注质量进行评分。<%= challenge_description_extra[i] %>

-