update pr detection
This commit is contained in:
parent
2784405847
commit
c811ded37f
|
@ -16,6 +16,7 @@
|
|||
class GlccMediumTermExamineMaterial < ActiveRecord::Base
|
||||
self.table_name = "glcc_medium_term_examine_material"
|
||||
belongs_to :glcc_student, :class_name => :GlccRegistrationStudent, :foreign_key => "student_reg_id"
|
||||
belongs_to :task, :class_name => :GlccRegistrationTask, :foreign_key => "task_id"
|
||||
|
||||
def check_pr_url
|
||||
state = []
|
||||
|
@ -66,7 +67,7 @@ class GlccMediumTermExamineMaterial < ActiveRecord::Base
|
|||
|
||||
state = check_pr_url
|
||||
return unless state.present?
|
||||
title = "2023年GitLink确实开源GLCC开源夏令营#{term == 1 ? "中期考核" : "结项考核"}提醒"
|
||||
title = "#{self.created_on.year}年GitLink确实开源GLCC开源夏令营#{term == 1 ? "中期考核" : "结项考核"}提醒"
|
||||
content = gennerate_content(state)
|
||||
UserMailer.glcc_pr_check_email(mail,title, gcs.student_name, content).deliver_now
|
||||
end
|
||||
|
@ -74,7 +75,7 @@ class GlccMediumTermExamineMaterial < ActiveRecord::Base
|
|||
def state_to_html
|
||||
gcs = glcc_student
|
||||
mail = gcs.mail
|
||||
return "数据异常PR连接为空" if mail.nil? || code_or_pr_url.nil?
|
||||
return "数据异常,PR链接为空" if mail.nil? || code_or_pr_url.nil?
|
||||
state = check_pr_url
|
||||
gennerate_content(state)
|
||||
end
|
||||
|
@ -92,7 +93,7 @@ class GlccMediumTermExamineMaterial < ActiveRecord::Base
|
|||
when 1
|
||||
"<p> PR链接为非GitLink平台链接 </p>"
|
||||
when 2
|
||||
"<p> PR链接为GitLink平台非PR链接 </p>"
|
||||
"<p> PR链接为GitLink平台链接, 但非PR链接 </p>"
|
||||
when 3
|
||||
"<p> PR链接中的PR不存在 </p>"
|
||||
end
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
|
||||
# == Schema Information
|
||||
#
|
||||
# Table name: ignores
|
||||
# user_id
|
||||
# student_name
|
||||
# school
|
||||
# profession
|
||||
# location
|
||||
# grade
|
||||
# phone
|
||||
# mail
|
||||
# created_on
|
||||
# is_delete
|
||||
# prove_attachment_id
|
||||
# cancel_count
|
||||
# round
|
||||
#
|
||||
|
||||
class GlccRegistrationTask < ActiveRecord::Base
|
||||
self.table_name = "glcc_registration_task"
|
||||
has_many :examines, :class_name => :GlccMediumTermExamineMaterial, :foreign_key => "task_id"
|
||||
end
|
|
@ -1,16 +1,17 @@
|
|||
<table class="table table-hover glcc_pr_check-list-table">
|
||||
<thead class="thead-light">
|
||||
<tr>
|
||||
<th width="3%">序号</th>
|
||||
<th width="5%" class="text-left">昵称</th>
|
||||
<th width="5%" class="text-left">课题ID</th>
|
||||
<th width="13%">邮件地址</th>
|
||||
<th width="6%">视频地址</th>
|
||||
<th width="6%">PR地址</th>
|
||||
<th width="5%">考核阶段</th>
|
||||
<th width="5%">白名单</th>
|
||||
<th width="14%">检测状态</th>
|
||||
<th width="14%">提交时间</th></th>
|
||||
<th width="2%">序号</th>
|
||||
<th width="3%" class="text-left">学生姓名</th>
|
||||
<th width="2%" class="text-left">课题ID</th>
|
||||
<th width="8%" class="text-left">课题名称</th>
|
||||
<th width="10%">邮件地址</th>
|
||||
<th width="15%">视频地址</th>
|
||||
<th width="15%">PR地址</th>
|
||||
<th width="3%">考核阶段</th>
|
||||
<th width="2%">白名单</th>
|
||||
<th width="10%">检测状态</th>
|
||||
<th width="6%">提交时间</th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
@ -20,12 +21,13 @@
|
|||
<td><%= list_index_no((params[:page] || 1).to_i, index) %></td>
|
||||
<td><%= material.glcc_student.student_name %></td>
|
||||
<td><%= material.task_id %></td>
|
||||
<td><%= material.task.task_name %></td>
|
||||
<td><%= material.glcc_student.mail %></td>
|
||||
<td><a target="_blank" href="<%= material.defence_video_url %>"> 查看视频 </a></></td>
|
||||
<td><a target="_blank" href="<%= material.code_or_pr_url %>"> 查看PR </a></></td>
|
||||
<td><a target="_blank" href="<%= material.defence_video_url %>"> <p><%= material.defence_video_url.to_s %></p> </a></td>
|
||||
<td><a target="_blank" href="<%= material.code_or_pr_url %>"> <p><%= material.code_or_pr_url.to_s %></p> </a></td>
|
||||
<td><%= material.term == 1 ? "中期考核" : "结项考核"%></td>
|
||||
<td><%= material.white_list ? "是":"否" %></td>
|
||||
<td><%= material.state_to_html.html_safe %></td>
|
||||
<td><%= material.state_to_html.blank? ? "通过" : material.state_to_html.html_safe %></td>
|
||||
<td><%= material.created_on.strftime("%Y-%m-%d %H:%M")%></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
|
|
Loading…
Reference in New Issue