commit
26fcb248a0
@ -0,0 +1,73 @@
|
||||
$(document).on('turbolinks:load', function() {
|
||||
if ($('body.admins-competitions-index-page').length > 0) {
|
||||
$('.modal.admin-upload-file-modal').on('upload:success', function(e, data){
|
||||
var $imageElement = $('.competition-image-' + data.source_id);
|
||||
$imageElement.attr('src', data.url);
|
||||
$imageElement.show();
|
||||
$imageElement.next().html('重新上传');
|
||||
});
|
||||
}
|
||||
|
||||
$(".admin-competition-list-form").on("change", '.competitions-hot-select', function () {
|
||||
var s_value = $(this).get(0).checked ? 1 : 0;
|
||||
var json = {};
|
||||
json["hot"] = s_value;
|
||||
$.ajax({
|
||||
url: "/admins/competitions/hot_setting",
|
||||
type: "POST",
|
||||
dataType:'json',
|
||||
data: json,
|
||||
success: function(){
|
||||
$.notify({ message: '操作成功' });
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// ============== 新增竞赛 ===============
|
||||
var $modal = $('.modal.admin-create-competition-modal');
|
||||
var $form = $modal.find('form.admin-create-competition-form');
|
||||
var $competitionNameInput = $form.find('input[name="competition_name"]');
|
||||
|
||||
$form.validate({
|
||||
errorElement: 'span',
|
||||
errorClass: 'danger text-danger',
|
||||
rules: {
|
||||
competition_name: {
|
||||
required: true
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// modal ready fire
|
||||
$modal.on('show.bs.modal', function () {
|
||||
$competitionNameInput.val('');
|
||||
});
|
||||
|
||||
$modal.on('click', '.submit-btn', function(){
|
||||
$form.find('.error').html('');
|
||||
|
||||
if ($form.valid()) {
|
||||
var url = $form.data('url');
|
||||
|
||||
$.ajax({
|
||||
method: 'POST',
|
||||
dataType: 'json',
|
||||
url: url,
|
||||
data: $form.serialize(),
|
||||
success: function(){
|
||||
$.notify({ message: '创建成功' });
|
||||
$modal.modal('hide');
|
||||
|
||||
setTimeout(function(){
|
||||
window.location.reload();
|
||||
}, 500);
|
||||
},
|
||||
error: function(res){
|
||||
var data = res.responseJSON;
|
||||
$form.find('.error').html(data.message);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
|
@ -0,0 +1,9 @@
|
||||
$(document).on('turbolinks:load', function() {
|
||||
if($('body.admins-enroll-lists-index-page').length > 0){
|
||||
let search_form = $(".search-form");
|
||||
//导出
|
||||
$(".competition-enroll-list-form").on("click","#enroll-lists-export",function () {
|
||||
window.location.href = "/admins/competitions/"+$(this).attr("data-competition-id")+"/enroll_lists.xls?" + search_form.serialize();
|
||||
});
|
||||
}
|
||||
});
|
@ -0,0 +1,73 @@
|
||||
$(document).on('turbolinks:load', function() {
|
||||
if ($('body.admins-user-statistics-index-page').length > 0) {
|
||||
var $form = $('.user-statistic-list-form');
|
||||
|
||||
// ************** 学校选择 *************
|
||||
var matcherFunc = function(params, data){
|
||||
if ($.trim(params.term) === '') {
|
||||
return data;
|
||||
}
|
||||
if (typeof data.text === 'undefined') {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (data.name && data.name.indexOf(params.term) > -1) {
|
||||
var modifiedData = $.extend({}, data, true);
|
||||
return modifiedData;
|
||||
}
|
||||
|
||||
// Return `null` if the term should not be displayed
|
||||
return null;
|
||||
}
|
||||
|
||||
var defineSchoolSelect = function (schools) {
|
||||
$form.find('.school-select').select2({
|
||||
theme: 'bootstrap4',
|
||||
placeholder: '选择学校/单位',
|
||||
minimumInputLength: 1,
|
||||
data: schools,
|
||||
templateResult: function (item) {
|
||||
if(!item.id || item.id === '') return item.text;
|
||||
return item.name;
|
||||
},
|
||||
templateSelection: function(item){
|
||||
if (item.id) {
|
||||
$form.find('#school_id').val(item.id);
|
||||
}
|
||||
return item.name || item.text;
|
||||
},
|
||||
matcher: matcherFunc
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
// 初始化学校选择器
|
||||
$.ajax({
|
||||
url: '/api/schools/for_option.json',
|
||||
dataType: 'json',
|
||||
type: 'GET',
|
||||
success: function(data) {
|
||||
defineSchoolSelect(data.schools);
|
||||
}
|
||||
});
|
||||
|
||||
// 清空
|
||||
$form.on('click', '.clear-btn', function(){
|
||||
$form.find('select[name="date"]').val('');
|
||||
$form.find('.school-select').val('').trigger('change');
|
||||
$form.find('input[type="submit"]').trigger('click');
|
||||
})
|
||||
|
||||
|
||||
// 导出
|
||||
$('.export-action').on('click', function(){
|
||||
var form = $(".user-statistic-list-form .search-form")
|
||||
var exportLink = $(this);
|
||||
var date = form.find("select[name='date']").val();
|
||||
var schoolId = form.find('input[name="school_id"]').val();
|
||||
|
||||
var url = exportLink.data("url").split('?')[0] + "?date=" + date + "&school_id=" + schoolId;
|
||||
window.open(url);
|
||||
});
|
||||
}
|
||||
});
|
@ -0,0 +1,25 @@
|
||||
class Admins::EnrollListsController < Admins::BaseController
|
||||
|
||||
def index
|
||||
@competition = current_competition
|
||||
params[:sort_by] = params[:sort_by].presence || 'created_at'
|
||||
params[:sort_direction] = params[:sort_direction].presence || 'desc'
|
||||
enroll_lists = Admins::CompetitionEnrollListQuery.call(@competition, params)
|
||||
|
||||
@params_page = params[:page] || 1
|
||||
@enroll_lists = paginate enroll_lists.preload(competition_team: [:user, :teachers], user: { user_extension: :school })
|
||||
@personal = @competition.personal?
|
||||
|
||||
respond_to do |format|
|
||||
format.js
|
||||
format.html
|
||||
format.xls
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
def current_competition
|
||||
@_current_competition ||= Competition.find(params[:competition_id])
|
||||
end
|
||||
|
||||
end
|
@ -0,0 +1,19 @@
|
||||
class Admins::UserStatisticsController < Admins::BaseController
|
||||
def index
|
||||
default_sort('finish_shixun_count', 'desc')
|
||||
|
||||
total_count, users = Admins::UserStatisticQuery.call(params)
|
||||
|
||||
@users = paginate users, total_count: total_count
|
||||
end
|
||||
|
||||
def export
|
||||
default_sort('finish_shixun_count', 'desc')
|
||||
|
||||
params[:per_page] = 10000
|
||||
_count, @users = Admins::UserStatisticQuery.call(params)
|
||||
|
||||
filename = ['用户实训情况', Time.zone.now.strftime('%Y%m%d%H%M%S')].join('-') << '.xlsx'
|
||||
render xlsx: 'export', filename: filename
|
||||
end
|
||||
end
|
@ -0,0 +1,7 @@
|
||||
class HotKeywordsController < ApplicationController
|
||||
def index
|
||||
keywords = []
|
||||
keywords = HotSearchKeyword.hot(8) if HotSearchKeyword.available?
|
||||
render_ok(keywords: keywords)
|
||||
end
|
||||
end
|
@ -1,9 +1,12 @@
|
||||
class SearchsController < ApplicationController
|
||||
after_action :record_search_keyword, only: [:index]
|
||||
|
||||
def index
|
||||
@results = SearchService.call(search_params)
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def search_params
|
||||
params.permit(:keyword, :type, :page, :per_page)
|
||||
end
|
||||
|
@ -0,0 +1,13 @@
|
||||
class Weapps::SearchsController < Weapps::BaseController
|
||||
after_action :record_search_keyword, only: [:index]
|
||||
|
||||
def index
|
||||
@results = Weapps::SearchQuery.call(search_params)
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def search_params
|
||||
params.permit(:keyword, :type, :page, :per_page)
|
||||
end
|
||||
end
|
@ -0,0 +1,54 @@
|
||||
module CompetitionsHelper
|
||||
def chart_school_str user_ids
|
||||
chart_school_name = ""
|
||||
chart_school_name = School.where(id: UserExtension.where(user_id: user_ids).pluck(:school_id).uniq).pluck(:name).join("、")
|
||||
end
|
||||
|
||||
# 耗时:小时、分、秒 00:00:00
|
||||
# 小于1秒钟则不显示
|
||||
def com_spend_time time
|
||||
hour = time / (60*60)
|
||||
min = time % (60*60) / 60
|
||||
sec = time % (60*60) % 60
|
||||
hour_str = "00"
|
||||
min_str = "00"
|
||||
sec_str = "00"
|
||||
if hour >= 1 && hour < 10
|
||||
hour_str = "0#{hour}"
|
||||
elsif hour >= 10
|
||||
hour_str = "#{hour}"
|
||||
end
|
||||
|
||||
if min >= 1 && min < 10
|
||||
min_str = "0#{min}"
|
||||
elsif min >= 10
|
||||
min_str = "#{min}"
|
||||
end
|
||||
|
||||
if sec >= 1 && sec < 10
|
||||
sec_str = "0#{sec}"
|
||||
elsif sec >= 10
|
||||
sec_str = "#{sec}"
|
||||
end
|
||||
|
||||
time = "#{hour_str} : #{min_str} : #{sec_str}"
|
||||
return time
|
||||
end
|
||||
|
||||
def chart_stages competition
|
||||
stages = []
|
||||
statistic_stages = competition.competition_stages.where("rate > 0")
|
||||
if competition.end_time && competition.end_time < Time.now && statistic_stages.size > 1
|
||||
stages << {id: nil, name: "总排行榜", rate: 1.0, start_time: competition.start_time, end_time: competition.end_time}
|
||||
end
|
||||
|
||||
statistic_stages.each do |stage|
|
||||
if stage.max_end_time && stage.max_end_time < Time.now
|
||||
stages << {id: stage.id, name: "#{stage.name}排行榜", rate: stage.score_rate, start_time: stage.min_start_time, end_time: stage.max_end_time}
|
||||
end
|
||||
end
|
||||
|
||||
stages = stages.sort { |a, b| b[:end_time] <=> a[:end_time] } if stages.size > 0
|
||||
return stages
|
||||
end
|
||||
end
|
@ -1,9 +1,15 @@
|
||||
class ApplicationRecord < ActiveRecord::Base
|
||||
include NumberDisplayHelper
|
||||
|
||||
attr_accessor :_extra_data
|
||||
|
||||
self.abstract_class = true
|
||||
|
||||
def format_time(time)
|
||||
time.present? ? time.strftime('%Y-%m-%d %H:%M') : ''
|
||||
end
|
||||
|
||||
def display_extra_data(key)
|
||||
_extra_data&.[](key)
|
||||
end
|
||||
end
|
||||
|
@ -0,0 +1,6 @@
|
||||
class ChartRule < ApplicationRecord
|
||||
belongs_to :competition
|
||||
belongs_to :competition_stage, optional: true
|
||||
|
||||
validates :content, length: { maximum: 1000 }
|
||||
end
|
@ -0,0 +1,3 @@
|
||||
class CompetitionAward < ApplicationRecord
|
||||
belongs_to :competition
|
||||
end
|
@ -1,3 +1,4 @@
|
||||
class CompetitionModeSetting < ApplicationRecord
|
||||
belongs_to :course
|
||||
belongs_to :course, optional: true
|
||||
belongs_to :competition
|
||||
end
|
||||
|
@ -0,0 +1,6 @@
|
||||
class CompetitionScore < ApplicationRecord
|
||||
belongs_to :user
|
||||
belongs_to :competition
|
||||
belongs_to :competition_stage, optional: true
|
||||
belongs_to :competition_team, optional: true
|
||||
end
|
@ -0,0 +1,2 @@
|
||||
class ModuleSetting < ApplicationRecord
|
||||
end
|
@ -0,0 +1,40 @@
|
||||
class Admins::CompetitionEnrollListQuery < ApplicationQuery
|
||||
include CustomSortable
|
||||
|
||||
attr_reader :competition, :params
|
||||
|
||||
sort_columns :created_at, :competition_team_id, default_by: :created_at, default_direction: :desc
|
||||
|
||||
def initialize(competition, params)
|
||||
@competition = competition
|
||||
@params = params
|
||||
end
|
||||
|
||||
def call
|
||||
members = competition.team_members
|
||||
only_teacher = competition.competition_staffs.count == 1 && competition.competition_staffs.first.category == 'teacher'
|
||||
members = members.where("team_members.is_teacher = 0") unless only_teacher # 只有老师报名时才显示老师,此时老师作为队员
|
||||
|
||||
|
||||
school = params[:school].to_s.strip
|
||||
if school.present?
|
||||
school_ids = School.where("schools.name like ?", "%#{school}%").pluck(:id)
|
||||
school_ids = school_ids.size == 0 ? "(-1)" : "(" + school_ids.join(",") + ")"
|
||||
members = members.joins(user: :user_extension).where("user_extensions.school_id in #{school_ids}")
|
||||
end
|
||||
|
||||
location = params[:location].to_s.strip
|
||||
if location.present?
|
||||
members = members.joins(user: { user_extension: :school }).where("schools.province like ?", "%#{location}%")
|
||||
end
|
||||
|
||||
# 关键字模糊查询
|
||||
keyword = params[:keyword].to_s.strip
|
||||
if keyword.present?
|
||||
members = members.joins(:competition_team)
|
||||
.where('competition_teams.name LIKE :keyword', keyword: "%#{keyword}%")
|
||||
end
|
||||
|
||||
custom_sort(members, params[:sort_by], params[:sort_direction])
|
||||
end
|
||||
end
|
@ -0,0 +1,138 @@
|
||||
class Admins::UserStatisticQuery < ApplicationQuery
|
||||
include CustomSortable
|
||||
|
||||
attr_reader :params
|
||||
|
||||
sort_columns :study_challenge_count, :finish_challenge_count, :study_shixun_count, :finish_shixun_count,
|
||||
default_by: :finish_shixun_count, default_direction: :desc
|
||||
|
||||
def initialize(params)
|
||||
@params = params
|
||||
end
|
||||
|
||||
def call
|
||||
users = User.where(type: 'User').group(:id)
|
||||
|
||||
users = users.joins(:user_extension).where(user_extensions: { school_id: params[:school_id] }) if params[:school_id].present?
|
||||
|
||||
total = users.count.count
|
||||
|
||||
# 根据排序字段进行查询
|
||||
users = query_by_sort_column(users, params[:sort_by])
|
||||
users = custom_sort(users, params[:sort_by], params[:sort_direction])
|
||||
|
||||
users = users.includes(user_extension: [:school, :department])
|
||||
users = users.limit(page_size).offset(offset).to_a
|
||||
# 查询并组装其它数据
|
||||
users = package_other_data(users)
|
||||
|
||||
[total, users]
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def package_other_data(users)
|
||||
ids = users.map(&:id)
|
||||
|
||||
study_myshixun = Myshixun.where(user_id: ids)
|
||||
finish_myshixun = Myshixun.where(user_id: ids, status: 1)
|
||||
study_challenge = Game.joins(:myshixun).where(myshixuns: { user_id: ids }).where(status: [0, 1, 2])
|
||||
finish_challenge = Game.joins(:myshixun).where(myshixuns: { user_id: ids }).where(status: 2)
|
||||
|
||||
if time_range.present?
|
||||
study_myshixun = study_myshixun.where(updated_at: time_range)
|
||||
finish_myshixun = finish_myshixun.where(updated_at: time_range)
|
||||
study_challenge = study_challenge.where(updated_at: time_range)
|
||||
finish_challenge = finish_challenge.where(updated_at: time_range)
|
||||
end
|
||||
|
||||
study_myshixun_map = study_myshixun.group(:user_id).count
|
||||
finish_myshixun_map = finish_myshixun.group(:user_id).count
|
||||
study_challenge_map = study_challenge.group(:user_id).count
|
||||
finish_challenge_map = finish_challenge.group(:user_id).count
|
||||
|
||||
users.each do |user|
|
||||
user._extra_data = {
|
||||
study_shixun_count: study_myshixun_map.fetch(user.id, 0),
|
||||
finish_shixun_count: finish_myshixun_map.fetch(user.id, 0),
|
||||
study_challenge_count: study_challenge_map.fetch(user.id, 0),
|
||||
finish_challenge_count: finish_challenge_map.fetch(user.id, 0),
|
||||
}
|
||||
end
|
||||
|
||||
users
|
||||
end
|
||||
|
||||
def query_by_sort_column(users, sort_by_column)
|
||||
base_query_column = 'users.*'
|
||||
|
||||
case sort_by_column.to_s
|
||||
when 'study_shixun_count' then
|
||||
users =
|
||||
if time_range.present?
|
||||
users.joins("LEFT JOIN myshixuns ON myshixuns.user_id = users.id "\
|
||||
"AND myshixuns.updated_at BETWEEN '#{time_range.min}' AND '#{time_range.max}'")
|
||||
else
|
||||
users.left_joins(:myshixuns)
|
||||
end
|
||||
|
||||
users.select("#{base_query_column}, COUNT(*) study_shixun_count")
|
||||
when 'finish_shixun_count' then
|
||||
users =
|
||||
if time_range.present?
|
||||
users.joins("LEFT JOIN myshixuns ON myshixuns.user_id = users.id AND myshixuns.status = 1 AND "\
|
||||
"myshixuns.updated_at BETWEEN '#{time_range.min}' AND '#{time_range.max}'")
|
||||
else
|
||||
users.joins('LEFT JOIN myshixuns ON myshixuns.user_id = users.id AND myshixuns.status = 1')
|
||||
end
|
||||
|
||||
users.select("#{base_query_column}, COUNT(*) finish_shixun_count")
|
||||
when 'study_challenge_count' then
|
||||
users =
|
||||
if time_range.present?
|
||||
users.joins('LEFT JOIN myshixuns ON myshixuns.user_id = users.id')
|
||||
.joins("LEFT JOIN games ON games.myshixun_id = myshixuns.id "\
|
||||
"AND games.status IN (0,1,2) AND games.updated_at BETWEEN '#{time_range.min}' AND '#{time_range.max}'")
|
||||
else
|
||||
users.joins('LEFT JOIN myshixuns ON myshixuns.user_id = users.id')
|
||||
.joins("LEFT JOIN games ON games.myshixun_id = myshixuns.id AND games.status IN (0,1,2)")
|
||||
end
|
||||
|
||||
users.select("#{base_query_column}, COUNT(*) study_challenge_count")
|
||||
when 'finish_challenge_count' then
|
||||
users =
|
||||
if time_range.present?
|
||||
users.joins('LEFT JOIN myshixuns ON myshixuns.user_id = users.id')
|
||||
.joins("LEFT JOIN games ON games.myshixun_id = myshixuns.id "\
|
||||
"AND games.status = 2 AND games.updated_at BETWEEN '#{time_range.min}' AND '#{time_range.max}'")
|
||||
else
|
||||
users.joins('LEFT JOIN myshixuns ON myshixuns.user_id = users.id')
|
||||
.joins("LEFT JOIN games ON games.myshixun_id = myshixuns.id AND games.status = 2")
|
||||
end
|
||||
|
||||
users.select("#{base_query_column}, COUNT(*) finish_challenge_count")
|
||||
else
|
||||
users
|
||||
end
|
||||
end
|
||||
|
||||
def time_range
|
||||
@_time_range ||= begin
|
||||
case params[:date]
|
||||
when 'weekly' then 1.weeks.ago..Time.now
|
||||
when 'monthly' then 1.months.ago..Time.now
|
||||
when 'quarterly' then 3.months.ago..Time.now
|
||||
when 'yearly' then 1.years.ago..Time.now
|
||||
else ''
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def page_size
|
||||
params[:per_page].to_i.zero? ? 20 : params[:per_page].to_i
|
||||
end
|
||||
|
||||
def offset
|
||||
(params[:page].to_i.zero? ? 0 : params[:page].to_i - 1) * page_size
|
||||
end
|
||||
end
|
@ -0,0 +1,37 @@
|
||||
class Weapps::SearchQuery < ApplicationQuery
|
||||
include ElasticsearchAble
|
||||
|
||||
attr_reader :params
|
||||
|
||||
def initialize(params)
|
||||
@params = params
|
||||
end
|
||||
|
||||
def call
|
||||
modal_name.search(keyword, search_options)
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def search_options
|
||||
hash = {
|
||||
fields: [:name],
|
||||
page: page,
|
||||
per_page: per_page
|
||||
}
|
||||
hash.merge(where: { status: 2 }) if modal_name == Shixun
|
||||
|
||||
hash
|
||||
end
|
||||
|
||||
def modal_name
|
||||
@_modal_name ||= begin
|
||||
case params[:type].to_s
|
||||
when 'subject' then Subject
|
||||
when 'shixun' then Shixun
|
||||
when 'course' then Course
|
||||
else Subject
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
@ -0,0 +1,16 @@
|
||||
<%
|
||||
define_admin_breadcrumbs do
|
||||
add_admin_breadcrumb('竞赛列表', admins_competitions_path)
|
||||
add_admin_breadcrumb(@competition.name)
|
||||
end
|
||||
%>
|
||||
|
||||
<div class="card mb-5">
|
||||
<div class="card-header d-flex justify-content-between align-items-center">
|
||||
<span class="flex-1">基础设置</span>
|
||||
</div>
|
||||
<div class="card-body row">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -0,0 +1 @@
|
||||
$('.competitions-list-container').html("<%= j( render partial: 'admins/competitions/shared/list', locals: { competitions: @competitions } ) %>");
|
@ -0,0 +1,4 @@
|
||||
var page_no = $("#competition-item-<%= @competition.id %>").children(":first").html();
|
||||
$("#competition-item-<%= @competition.id %>").html("<%= j render partial: "admins/competitions/shared/td", locals: {competition: @competition, page_no: 1} %>");
|
||||
$("#competition-item-<%= @competition.id %>").children(":first").html(page_no);
|
||||
show_success_flash();
|
@ -0,0 +1,4 @@
|
||||
var page_no = $("#competition-item-<%= @competition.id %>").children(":first").html();
|
||||
$("#competition-item-<%= @competition.id %>").html("<%= j render partial: "admins/competitions/shared/td", locals: {competition: @competition, page_no: 1} %>");
|
||||
$("#competition-item-<%= @competition.id %>").children(":first").html(page_no);
|
||||
show_success_flash();
|
@ -0,0 +1,28 @@
|
||||
<div class="modal fade admin-create-competition-modal" tabindex="-1" role="dialog" aria-hidden="true">
|
||||
<div class="modal-dialog modal-dialog-centered" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">新增竞赛</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form class="admin-create-competition-form" data-url="<%= admins_competitions_path %>">
|
||||
<div class="form-group d-flex">
|
||||
<label for="new_mirror_id" class="col-form-label">竞赛名称:</label>
|
||||
<div class="w-75 d-flex flex-column">
|
||||
<%= text_field_tag(:competition_name, nil, class: 'form-control', placeholder: '请输入竞赛名称') %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="error text-danger"></div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">取消</button>
|
||||
<button type="button" class="btn btn-primary submit-btn">确认</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@ -0,0 +1,4 @@
|
||||
var page_no = $("#competition-item-<%= @competition.id %>").children(":first").html();
|
||||
$("#competition-item-<%= @competition.id %>").html("<%= j render partial: "admins/competitions/shared/td", locals: {competition: @competition, page_no: 1} %>");
|
||||
$("#competition-item-<%= @competition.id %>").children(":first").html(page_no);
|
||||
show_success_flash();
|
@ -0,0 +1,42 @@
|
||||
<table class="table text-center shixun-settings-list-table">
|
||||
<thead class="thead-light">
|
||||
<tr>
|
||||
<th width="4%" class="text-left">序号</th>
|
||||
<th width="6%"><%= sort_tag('战队ID', name: 'competition_team_id', path: admins_competition_enroll_lists_path(@competition)) %></th>
|
||||
<th width="12%">战队名称</th>
|
||||
<th width="10%">创建者</th>
|
||||
<th width="10%">队员姓名</th>
|
||||
<th width="6%">职业</th>
|
||||
<th width="12%">学号</th>
|
||||
<th width="10%">队员学校</th>
|
||||
<th width="6%">地区</th>
|
||||
<th width="16%">指导老师</th>
|
||||
<th width="8%"><%= sort_tag('报名时间', name: 'created_at', path: admins_competition_enroll_lists_path(@competition)) %></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% if enroll_lists.present? %>
|
||||
<% enroll_lists.each_with_index do |member, index| %>
|
||||
<tr id="competition-team-member-<%= member.id %>">
|
||||
<% team = member.competition_team %>
|
||||
<% page_no = list_index_no(@params_page.to_i, index) %>
|
||||
<td><%= page_no %></td>
|
||||
<td><%= member.competition_team_id %></td>
|
||||
<td><%= @personal ? "--" : team.name %></td>
|
||||
<td><%= team.user.real_name %></td>
|
||||
<td><%= member.user.real_name %></td>
|
||||
<td><%= member.user.identity %></td>
|
||||
<td><%= member.user.student_id %></td>
|
||||
<td><%= member.user.school_name %></td>
|
||||
<td><%= member.user.school_province %></td>
|
||||
<td><%= @personal ? "--" : team.teachers_info %></td>
|
||||
<td><%= member.created_at.strftime('%Y-%m-%d %H:%M') %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<%= render 'admins/shared/no_data_for_table' %>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<%= render partial: 'admins/shared/paginate', locals: { objects: enroll_lists } %>
|
@ -0,0 +1,33 @@
|
||||
<%
|
||||
define_admin_breadcrumbs do
|
||||
add_admin_breadcrumb('竞赛列表', admins_competitions_path)
|
||||
add_admin_breadcrumb(@competition.name)
|
||||
end
|
||||
%>
|
||||
|
||||
<div class="box search-form-container flex-column mb-0 pb-0 competition-enroll-list-form">
|
||||
<ul class="nav nav-tabs w-100 search-form-tabs">
|
||||
<li class="nav-item">
|
||||
<%= link_to '报名列表', admins_competition_enroll_lists_path(@competition), class: "nav-link search-form-tab active" %>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<%= link_to '获奖证书审批', admins_competition_enroll_lists_path(@competition), class: "nav-link search-form-tab" %>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div class="d-flex">
|
||||
<%= form_tag(admins_competition_enroll_lists_path(unsafe_params), method: :get, class: 'form-inline search-form mt-3 flex-1 d-flex', remote: true) do %>
|
||||
<%= text_field_tag(:keyword, params[:keyword], class: 'form-control col-sm-2 ml-3', placeholder: '战队名称检索') %>
|
||||
<%= text_field_tag(:school, params[:school], class: 'form-control col-sm-2 ml-3', placeholder: '队员学校名称检索') %>
|
||||
<%= text_field_tag(:location, params[:location], class: 'form-control col-sm-2 ml-3', placeholder: '队员地区检索') %>
|
||||
<%= submit_tag('搜索', class: 'btn btn-primary ml-3', 'data-disable-with': '搜索中...') %>
|
||||
<%= link_to "清除", admins_competition_enroll_lists_path(@competition), class: "btn btn-default",'data-disable-with': '清除中...' %>
|
||||
<% end %>
|
||||
|
||||
<a href="javascript:void(0)" class="btn btn-primary mt-3" id="enroll-lists-export" data-competition-id="<%= @competition.id %>" data-disable-with = '导出中...'>导出</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="box competition-enroll-list-container">
|
||||
<%= render(partial: 'admins/enroll_lists/list', locals: { enroll_lists: @enroll_lists }) %>
|
||||
</div>
|
@ -0,0 +1 @@
|
||||
$('.competition-enroll-list-container').html("<%= j( render(partial: 'admins/enroll_lists/list', locals: { enroll_lists: @enroll_lists }) ) %>");
|
@ -0,0 +1,16 @@
|
||||
wb = xlsx_package.workbook
|
||||
wb.add_worksheet(name: '用户实训情况') do |sheet|
|
||||
sheet.add_row %w(姓名 单位部门 学习关卡数 完成关卡数 学习实训数 完成实训数)
|
||||
|
||||
@users.each do |user|
|
||||
data = [
|
||||
user.real_name,
|
||||
[user.school_name.presence, user.department_name.presence].compact.join(' - '),
|
||||
user.display_extra_data(:study_challenge_count),
|
||||
user.display_extra_data(:finish_challenge_count),
|
||||
user.display_extra_data(:study_shixun_count),
|
||||
user.display_extra_data(:finish_shixun_count)
|
||||
]
|
||||
sheet.add_row(data)
|
||||
end
|
||||
end
|
@ -0,0 +1,27 @@
|
||||
<% define_admin_breadcrumbs do %>
|
||||
<% add_admin_breadcrumb('用户实训情况') %>
|
||||
<% end %>
|
||||
|
||||
<div class="box search-form-container user-statistic-list-form">
|
||||
<%= form_tag(admins_user_statistics_path, method: :get, class: 'form-inline search-form flex-1', remote: true) do %>
|
||||
<div class="form-group col-12 col-md-auto">
|
||||
<label for="status">时间范围:</label>
|
||||
<% data_arrs = [['不限', ''], ['最近一周', 'weekly'], ['最近一个月', 'monthly'], ['最近三个月', 'quarterly'], ['最近一年', 'yearly']] %>
|
||||
<%= select_tag(:date, options_for_select(data_arrs, params[:date]), class: 'form-control') %>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-12 col-md-3">
|
||||
<label for="school_name">所属单位:</label>
|
||||
<%= hidden_field_tag(:school_id, params[:school_id]) %>
|
||||
<%= select_tag :school_name, options_for_select([''], params[:school_id]), class: 'form-control school-select flex-1' %>
|
||||
</div>
|
||||
|
||||
<%= submit_tag('搜索', class: 'btn btn-primary ml-3', 'data-disable-with': '搜索中...') %>
|
||||
<input type="reset" class="btn btn-secondary clear-btn" value="清空"/>
|
||||
<% end %>
|
||||
<%= javascript_void_link '导出', class: 'btn btn-outline-primary export-action', 'data-url': export_admins_user_statistics_path(format: :xlsx) %>
|
||||
</div>
|
||||
|
||||
<div class="box user-statistic-list-container">
|
||||
<%= render partial: 'admins/user_statistics/shared/list', locals: { users: @users } %>
|
||||
</div>
|
@ -0,0 +1 @@
|
||||
$('.user-statistic-list-container').html("<%= j( render partial: 'admins/user_statistics/shared/list', locals: { users: @users } ) %>");
|
@ -0,0 +1,34 @@
|
||||
<table class="table table-hover text-center user-statistic-list-table">
|
||||
<thead class="thead-light">
|
||||
<tr>
|
||||
<th width="14%" class="text-left">姓名</th>
|
||||
<th width="38%" class="text-left">单位部门</th>
|
||||
<th width="12%"><%= sort_tag('学习关卡数', name: 'study_challenge_count', path: admins_user_statistics_path) %></th>
|
||||
<th width="12%"><%= sort_tag('完成关卡数', name: 'finish_challenge_count', path: admins_user_statistics_path) %></th>
|
||||
<th width="12%"><%= sort_tag('学习实训数', name: 'study_shixun_count', path: admins_user_statistics_path) %></th>
|
||||
<th width="12%"><%= sort_tag('完成实训数', name: 'finish_shixun_count', path: admins_user_statistics_path) %></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% if users.present? %>
|
||||
<% users.each do |user| %>
|
||||
<tr class="user-statistic-item-<%= user.id %>">
|
||||
<td class="text-left">
|
||||
<%= link_to "/users/#{user.login}", target: '_blank' do %>
|
||||
<%= overflow_hidden_span user.real_name, width: 100 %>
|
||||
<% end %>
|
||||
</td>
|
||||
<td class="text-left"><%= display_text [user.school_name.presence, user.department_name.presence].compact.join(' - ') %></td>
|
||||
<td><%= user.display_extra_data(:study_challenge_count) %></td>
|
||||
<td><%= user.display_extra_data(:finish_challenge_count) %></td>
|
||||
<td><%= user.display_extra_data(:study_shixun_count) %></td>
|
||||
<td><%= user.display_extra_data(:finish_shixun_count) %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<%= render 'admins/shared/no_data_for_table' %>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<%= render partial: 'admins/shared/paginate', locals: { objects: users } %>
|
@ -0,0 +1,28 @@
|
||||
total_students_count = 0
|
||||
total_shixun_homework_count = 0
|
||||
total_course_score = 0
|
||||
|
||||
json.courses @courses.each do |course|
|
||||
students_count = course.students.count
|
||||
total_students_count += students_count
|
||||
total_shixun_homework_count += course['shixun_homework_count'].to_i
|
||||
|
||||
score = 500 + 5 * @course_shixun_count_map.fetch(course.id, 0) * @course_myshixun_map.fetch(course.id, 0)
|
||||
total_course_score += score
|
||||
|
||||
teacher = course.teachers.where(user_id: @team_user_ids).first.user
|
||||
json.creator teacher&.real_name
|
||||
json.creator_login teacher&.login
|
||||
json.course_name course.name
|
||||
json.course_id course.id
|
||||
json.students_count students_count
|
||||
json.shixun_homework_count course['shixun_homework_count']
|
||||
json.valid_count @course_myshixun_map.fetch(course.id, 0)
|
||||
json.score score
|
||||
end
|
||||
|
||||
json.total_course_count @courses.size
|
||||
json.total_students_count total_students_count
|
||||
json.total_shixun_homework_count total_shixun_homework_count
|
||||
json.total_valid_count @course_myshixun_map.values.reduce(:+)
|
||||
json.total_course_score total_course_score
|
@ -0,0 +1,41 @@
|
||||
total_myshixun_count = 0
|
||||
total_forked_myshixun_count = 0
|
||||
total_shixun_score = 0
|
||||
|
||||
json.shixuns @shixuns.each do |shixun|
|
||||
total_myshixun_count += shixun.myshixuns_count
|
||||
total_forked_myshixun_count += shixun['forked_myshixun_count'].to_i
|
||||
|
||||
valid_course_count = @course_count_map.fetch(shixun.id, 0)
|
||||
valid_student_count = @original_myshixun_count_map.fetch(shixun.id, 0)
|
||||
score =
|
||||
if shixun.fork_from.blank?
|
||||
500 + 50 * valid_course_count + 10 * valid_student_count
|
||||
else
|
||||
100 + 10 * valid_course_count + 5 * valid_student_count
|
||||
end
|
||||
|
||||
@forked_shixun_map.each do |shixun_id, fork_from_id|
|
||||
next if fork_from_id != shixun.id
|
||||
|
||||
score += 100 + 10 * @forked_map.fetch(shixun_id, 0) + 5 * @forked_myshixun_count_map.fetch(shixun_id, 0)
|
||||
end
|
||||
|
||||
total_shixun_score += score
|
||||
|
||||
json.creator shixun.user.real_name
|
||||
json.creator_login shixun.user.login
|
||||
json.shixun_name shixun.name
|
||||
json.shixun_identifier shixun.identifier
|
||||
json.forked shixun.fork_from.present?
|
||||
json.myshixuns_count shixun.myshixuns_count
|
||||
json.forked_myshixun_count shixun['forked_myshixun_count'].to_i
|
||||
json.valid_count @myshixun_count_map.fetch(shixun.id, 0)
|
||||
json.score score
|
||||
end
|
||||
|
||||
json.shixun_count @shixuns.size
|
||||
json.total_myshixun_count total_myshixun_count
|
||||
json.total_forked_myshixun_count total_forked_myshixun_count
|
||||
json.total_valid_count @myshixun_count_map.values.reduce(:+)
|
||||
json.total_shixun_score total_shixun_score
|
@ -0,0 +1,18 @@
|
||||
|
||||
wb = xlsx_package.workbook
|
||||
# wb.use_autowidth = false
|
||||
wb.styles do |s|
|
||||
sz_all = s.add_style :border => { :style => :thin, :color =>"000000" },:alignment => {:horizontal => :center}
|
||||
blue_cell = s.add_style :bg_color => "FAEBDC", :sz => 10,:height => 20,:b => true, :border => { :style => :thin, :color =>"000000" },:alignment => {:horizontal => :center}
|
||||
wb.add_worksheet(:name => "比赛成绩") do |sheet|
|
||||
sheet.sheet_view.show_grid_lines = false
|
||||
sheet.add_row table_columns, :style => blue_cell
|
||||
if chart_lists.count > 0
|
||||
chart_lists.each do |user|
|
||||
sheet.add_row user, :height => 20,:style => sz_all
|
||||
end #each_widh_index
|
||||
end
|
||||
sheet.column_widths *([20]*sheet.column_info.count)
|
||||
sheet.column_info.first.width = 12
|
||||
end #add_worksheet
|
||||
end
|
@ -0,0 +1,5 @@
|
||||
json.rule_contents @rule_contents.each do |rule|
|
||||
json.(rule, :id, :content, :competition_stage_id)
|
||||
end
|
||||
|
||||
json.stages chart_stages @competition
|
@ -0,0 +1,21 @@
|
||||
json.user_ranks @user_ranks.each do |user_rank|
|
||||
rank = @records.map(&:id).index(user_rank.id)
|
||||
rank = rank.present? ? (rank+1) : 0
|
||||
json.rank rank == 0 ? "--" : user_rank.rank
|
||||
json.team_name user_rank.name
|
||||
json.user_name user_rank.user.real_name
|
||||
json.cost_time rank == 0 && user_rank.cost_time ? "--" : com_spend_time(user_rank.cost_time)
|
||||
json.score rank == 0 ? "--" : user_rank.score.round(2)
|
||||
end
|
||||
|
||||
json.teams @records.each do |record|
|
||||
record_user = record.user
|
||||
json.team_name record.name
|
||||
json.record_user_name record_user.real_name
|
||||
json.user_image url_to_avatar(record_user)
|
||||
json.user_login record_user.login
|
||||
school_name = chart_school_str record.team_members.select{|member| !member.is_teacher}.pluck(:user_id)
|
||||
json.school_name school_name
|
||||
json.score record&.score&.round(2)
|
||||
json.spend_time record.cost_time ? com_spend_time(record.cost_time) : "--"
|
||||
end
|
@ -0,0 +1,24 @@
|
||||
json.extract! @competition, :id, :name, :sub_title, :identifier, :bonus, :mode
|
||||
json.visits_count @competition.visits
|
||||
member_count = @competition.team_members.count
|
||||
json.member_count member_count.zero? ? 268 : member_count
|
||||
|
||||
json.start_time @competition.start_time&.strftime("%Y-%m-%d")
|
||||
json.end_time @competition.end_time&.strftime("%Y-%m-%d")
|
||||
json.enroll_end_time @competition.enroll_end_time&.strftime("%Y-%m-%d %H:%M:%S")
|
||||
|
||||
json.published @competition.published?
|
||||
json.nearly_published @competition.published_at.present?
|
||||
|
||||
json.competition_modules @competition_modules do |com_module|
|
||||
json.(com_module, :name, :position)
|
||||
json.module_url com_module.module_url
|
||||
end
|
||||
|
||||
json.stages
|
||||
|
||||
if @competition.mode == 1
|
||||
json.course_id @competition.competition_mode_setting&.course_id
|
||||
json.member_of_course @user.member_of_course?(@competition.competition_mode_setting&.course)
|
||||
end
|
||||
|
@ -0,0 +1,6 @@
|
||||
json.informs @informs.each do |inform|
|
||||
json.(inform, :id, :name, :description)
|
||||
json.attachments inform.attachments do |atta|
|
||||
json.partial! "attachments/attachment_simple", locals: {attachment: atta}
|
||||
end
|
||||
end
|
@ -0,0 +1,4 @@
|
||||
json.(@md_content, :id, :name, :content)
|
||||
json.attachments @md_content.attachments do |atta|
|
||||
json.partial! "attachments/attachment_simple", locals: {attachment: atta}
|
||||
end
|
@ -1,36 +1,2 @@
|
||||
competition = current_competition
|
||||
json.extract! competition, :id, :name, :sub_title, :identifier
|
||||
|
||||
json.start_time competition.display_start_time
|
||||
json.end_time competition.display_end_time
|
||||
json.enroll_end_time competition.display_enroll_end_time
|
||||
|
||||
json.images do
|
||||
json.array! competition.attachments, partial: 'attachments/attachment_simple', as: :attachment
|
||||
end
|
||||
|
||||
json.competition_stages do
|
||||
stages = competition.competition_stages.includes(competition_stage_sections: :competition_entries)
|
||||
json.array! stages.each do |stage|
|
||||
json.extract! stage, :id, :name
|
||||
|
||||
json.sections do
|
||||
json.array! stage.competition_stage_sections.each do |section|
|
||||
json.extract! section, :id, :name
|
||||
|
||||
decorator_section = ActiveDecorator::Decorator.instance.decorate(section)
|
||||
json.start_time decorator_section.display_start_time
|
||||
json.end_time decorator_section.display_end_time
|
||||
|
||||
is_start = section.start_time > Time.now
|
||||
json.entries do
|
||||
json.array! section.competition_entries.each do |entry|
|
||||
json.extract! entry, :id, :name
|
||||
|
||||
json.url is_start ? entry.url : ''
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
json.extract! @competition, :id, :introduction
|
||||
json.image_url url_to_avatar(@competition)
|
@ -0,0 +1,9 @@
|
||||
json.count @results.total_count
|
||||
json.results do
|
||||
json.array! @results.with_highlights(multiple: true) do |obj, highlights|
|
||||
json.merge! obj.to_searchable_json
|
||||
json.type obj.class.name.downcase
|
||||
|
||||
json.title highlights.delete(:name)&.join('...') || obj.searchable_title
|
||||
end
|
||||
end
|
@ -1,3 +1,4 @@
|
||||
admins-mirror_scripts: 'admins-mirror_repositories'
|
||||
admins-laboratory_settings: 'admins-laboratories'
|
||||
admins-carousels: 'admins-laboratories'
|
||||
admins-carousels: 'admins-laboratories'
|
||||
admins-competition_settings: 'admins-competitions'
|
@ -0,0 +1,7 @@
|
||||
class AddCompetitionIdToModeSetting < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
add_column :competition_mode_settings, :competition_id, :integer
|
||||
|
||||
add_index :competition_mode_settings, :competition_id
|
||||
end
|
||||
end
|
@ -0,0 +1,29 @@
|
||||
class MigrateCompetitionScore < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
CompetitionModule.where(name: "排行榜", hidden: 0).each do |com_module|
|
||||
competition = com_module.competition
|
||||
if competition.present?
|
||||
puts competition.id
|
||||
if competition.identifier == 'hn' || competition.identifier == 'gcc-task-2019'
|
||||
p_rate = 0.2
|
||||
f_rate = 0.8
|
||||
else
|
||||
p_rate = 0.15
|
||||
f_rate = 0.85
|
||||
end
|
||||
pre_stage = competition.competition_stages.where(:name => "预赛").first
|
||||
final_stage = competition.competition_stages.where(:name => "决赛").first
|
||||
|
||||
competition.competition_teams.each do |team|
|
||||
f_score = team.competition_scores.where(:competition_stage_id => final_stage.try(:id)).first
|
||||
# 预赛记录
|
||||
p_score = team.competition_scores.where(:competition_stage_id => pre_stage.try(:id)).first
|
||||
s_score = (f_score.try(:score).to_f * f_rate + p_score.try(:score).to_f * p_rate).try(:round, 2)
|
||||
s_spend_time = f_score.try(:cost_time).to_i + p_score.try(:cost_time).to_i
|
||||
CompetitionScore.create(:user_id => team.user_id, :competition_team_id => team.id, :competition_id => competition.id,
|
||||
:competition_stage_id => 0, :score => s_score, :cost_time => s_spend_time)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
@ -0,0 +1,12 @@
|
||||
class CreateCompetitionAwards < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
create_table :competition_awards do |t|
|
||||
t.references :competition, index: true
|
||||
t.string :name
|
||||
t.integer :num, default: 0
|
||||
t.integer :award_type, default: 0
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
@ -0,0 +1,5 @@
|
||||
class AddRateToCompetitionStage < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
add_column :competition_stages, :rate, :float, default: 1.0
|
||||
end
|
||||
end
|
@ -0,0 +1,12 @@
|
||||
class CreateModuleSettings < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
create_table :module_settings do |t|
|
||||
t.string :module_type
|
||||
t.string :property
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
|
||||
add_index :module_settings, :module_type
|
||||
end
|
||||
end
|
@ -0,0 +1,5 @@
|
||||
class ChangeColumnCompetitionStage < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
rename_column :competition_stages, :rate, :score_rate
|
||||
end
|
||||
end
|
@ -0,0 +1,25 @@
|
||||
class MigrateExerciseChallengeScore < ActiveRecord::Migration[5.2]
|
||||
include ExercisesHelper
|
||||
def change
|
||||
exercise = Exercise.find_by(id: 2734)
|
||||
if exercise
|
||||
exercise.exercise_users.where("start_at is not null").each do |exercise_user|
|
||||
if exercise_user.end_at.nil?
|
||||
calculate_score = calculate_student_score(exercise, exercise_user.user)[:total_score]
|
||||
subjective_score = exercise_user.subjective_score
|
||||
total_score_subjective_score = subjective_score < 0.0 ? 0.0 : subjective_score
|
||||
total_score = calculate_score + total_score_subjective_score
|
||||
exercise_user.update_attributes!(score:total_score,objective_score:calculate_score,end_at:exercise.end_time,commit_status:1,status:1,commit_method:3)
|
||||
puts exercise_user.id
|
||||
else
|
||||
calculate_score = ExerciseShixunAnswer.where(user_id: exercise_user.user_id, exercise_question_id: exercise.exercise_questions.pluck(:id)).pluck(:score).sum
|
||||
subjective_score = exercise_user.subjective_score
|
||||
total_score_subjective_score = subjective_score < 0.0 ? 0.0 : subjective_score
|
||||
total_score = calculate_score + total_score_subjective_score
|
||||
exercise_user.update_attributes!(score:total_score,objective_score:calculate_score) if total_score > exercise_user.score
|
||||
puts exercise_user.id
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
File diff suppressed because one or more lines are too long
Binary file not shown.
@ -0,0 +1,5 @@
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe ChartRule, type: :model do
|
||||
pending "add some examples to (or delete) #{__FILE__}"
|
||||
end
|
@ -0,0 +1,5 @@
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe CompetitionAward, type: :model do
|
||||
pending "add some examples to (or delete) #{__FILE__}"
|
||||
end
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue