| @@ -18,6 +18,7 @@ | |||||
| class GlccMediumTermExamineMaterial < ActiveRecord::Base | class GlccMediumTermExamineMaterial < ActiveRecord::Base | ||||
| self.table_name = "glcc_medium_term_examine_material" | self.table_name = "glcc_medium_term_examine_material" | ||||
| belongs_to :glcc_student, :class_name => :GlccRegistrationStudent, :foreign_key => "student_reg_id" | 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 | def check_pr_url | ||||
| state = [] | state = [] | ||||
| @@ -68,7 +69,7 @@ class GlccMediumTermExamineMaterial < ActiveRecord::Base | |||||
| state = check_pr_url | state = check_pr_url | ||||
| return unless state.present? | return unless state.present? | ||||
| title = "2023年GitLink确实开源GLCC开源夏令营#{term == 1 ? "中期考核" : "结项考核"}提醒" | |||||
| title = "#{self.created_on.year}年GitLink确实开源GLCC开源夏令营#{term == 1 ? "中期考核" : "结项考核"}提醒" | |||||
| content = gennerate_content(state) | content = gennerate_content(state) | ||||
| UserMailer.glcc_pr_check_email(mail,title, gcs.student_name, content).deliver_now | UserMailer.glcc_pr_check_email(mail,title, gcs.student_name, content).deliver_now | ||||
| end | end | ||||
| @@ -76,7 +77,7 @@ class GlccMediumTermExamineMaterial < ActiveRecord::Base | |||||
| def state_to_html | def state_to_html | ||||
| gcs = glcc_student | gcs = glcc_student | ||||
| mail = gcs.mail | 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 | state = check_pr_url | ||||
| gennerate_content(state) | gennerate_content(state) | ||||
| end | end | ||||
| @@ -94,7 +95,7 @@ class GlccMediumTermExamineMaterial < ActiveRecord::Base | |||||
| when 1 | when 1 | ||||
| "<p> PR链接为非GitLink平台链接 </p>" | "<p> PR链接为非GitLink平台链接 </p>" | ||||
| when 2 | when 2 | ||||
| "<p> PR链接为GitLink平台非PR链接 </p>" | |||||
| "<p> PR链接为GitLink平台链接, 但非PR链接 </p>" | |||||
| when 3 | when 3 | ||||
| "<p> PR链接中的PR不存在 </p>" | "<p> PR链接中的PR不存在 </p>" | ||||
| end | end | ||||
| @@ -0,0 +1,23 @@ | |||||
| # == Schema Information | |||||
| # | |||||
| # Table name: ignores | |||||
| # user_id | |||||
| # student_name | |||||
| # school | |||||
| # profession | |||||
| # location | |||||
| # grade | |||||
| # phone | |||||
| # 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"> | <table class="table table-hover glcc_pr_check-list-table"> | ||||
| <thead class="thead-light"> | <thead class="thead-light"> | ||||
| <tr> | <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> | </tr> | ||||
| </thead> | </thead> | ||||
| <tbody> | <tbody> | ||||
| @@ -20,12 +21,13 @@ | |||||
| <td><%= list_index_no((params[:page] || 1).to_i, index) %></td> | <td><%= list_index_no((params[:page] || 1).to_i, index) %></td> | ||||
| <td><%= material.glcc_student.student_name %></td> | <td><%= material.glcc_student.student_name %></td> | ||||
| <td><%= material.task_id %></td> | <td><%= material.task_id %></td> | ||||
| <td><%= material.task.task_name %></td> | |||||
| <td><%= material.glcc_student.mail %></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.term == 1 ? "中期考核" : "结项考核"%></td> | ||||
| <td><%= material.white_list ? "是":"否" %></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> | <td><%= material.created_on.strftime("%Y-%m-%d %H:%M")%></td> | ||||
| </tr> | </tr> | ||||
| <% end %> | <% end %> | ||||