Merge branch 'dev_aliyun' into develop

chromesetting
daiao 5 years ago
commit 178d1aa072

@ -0,0 +1,14 @@
class Admins::ShixunFeedbackMessagesController < Admins::BaseController
def index
default_sort('created_at', 'desc')
@params_page = params[:page] || 1
if params[:keyword]
discusses = Discuss.find_by_sql("select * from discusses join shixuns on discusses.dis_id = shixuns.id where discusses.dis_type='Shixun' AND
shixuns.name like '%#{params[:keyword]}%'")
else
discusses = Discuss.where(:dis_type => 'Shixun').includes(:user, :dis)
end
@discusses = paginate discusses
end
end

@ -404,25 +404,6 @@ class ApplicationController < ActionController::Base
end
end
# 处理返回非0就报错的请求
def interface_post(uri, params, status, message)
begin
uid_logger_dubug("--uri_exec: params is #{params}, url is #{uri}")
uri = URI.parse(URI.encode(uri.strip))
res = Net::HTTP.post_form(uri, params).body
uid_logger_dubug("--uri_exec: .....res is #{res}")
res = JSON.parse(res)
if (res && res['code'] != 0)
tip_exception(status, message)
else
res
end
rescue Exception => e
uid_logger("--uri_exec: exception #{e.message}")
raise Educoder::TipException.new("实训平台繁忙繁忙等级84")
end
end
# json格式请求
def interface_json_post(uri, params, status, message)
begin

@ -29,7 +29,7 @@ module LoginHelper
Rails.logger.info("id: #{user&.id} Successful authentication start: '#{user.login}' from #{request.remote_ip} at #{Time.now.utc}")
# Valid user
self.logged_user = user
session[:"#{default_yun_session}"] = user.id
# generate a key and set cookie if autologin
set_autologin_cookie(user)

@ -610,7 +610,7 @@ class ExercisesController < ApplicationController
# 对未提交的用户进行调分
def adjust_score
exercise_user = @exercise.exercise_users.find_by!(user_id: params[:user_id])
tip_exception("已提交的作品请去评阅页进行调分") if exercise_user.commit_status == 1
tip_exception("已提交的作品请去评阅页进行调分") if exercise_user.commit_status == 1 && exercise_user.commit_method != 5
if @exercise.subjective_score > 0
tip_exception("主观题成绩不能为空") if params[:subjective_score].blank?
tip_exception("主观题成绩不能小于零") if params[:subjective_score].to_f < 0
@ -628,8 +628,13 @@ class ExercisesController < ApplicationController
subjective_score = @exercise.subjective_score > 0 ? params[:subjective_score].to_f.round(2) : 0
objective_score = @exercise.objective_score > 0 ? params[:objective_score].to_f.round(2) : 0
score = subjective_score + objective_score
exercise_user.update_attributes!(start_at: start_at_time, end_at: Time.now, status: 1, commit_status: 1, score: score,
subjective_score: subjective_score, objective_score: objective_score, commit_method: 5)
if exercise_user.commit_status == 1
exercise_user.update_attributes!(score: score, subjective_score: subjective_score, objective_score: objective_score)
else
exercise_user.update_attributes!(start_at: start_at_time, end_at: Time.now, status: 1, commit_status: 1, score: score,
subjective_score: subjective_score, objective_score: objective_score, commit_method: 5)
end
ExerciseUserScore.create!(exercise_id: @exercise.id, exercise_user_id: exercise_user.id,
subjective_score: subjective_score, objective_score: objective_score)
normal_status("操作成功")

@ -1,9 +1,9 @@
class HackUserLastestCodesController < ApplicationController
before_action :require_login, except: [:listen_result]
before_action :find_my_hack, only: [:show, :code_debug, :code_submit, :update_code,
:listen_result, :result, :submit_records]
:listen_result, :result, :submit_records, :restore_initial_code]
before_action :update_user_hack_status, only: [:code_debug, :code_submit]
before_action :require_auth_identity, only: [:update_code]
before_action :require_auth_identity, only: [:update_code, :restore_initial_code]
before_action :require_manager_identity, only: [:update_code]
def show
@ -14,6 +14,11 @@ class HackUserLastestCodesController < ApplicationController
@my_hack.update_attribute(:code, params[:code])
end
# 回复初始代码
def restore_initial_code
@my_hack.update_attribute(:code, @hack.code)
end
# 调试代码
def code_debug
exec_mode = "debug"
@ -35,7 +40,7 @@ class HackUserLastestCodesController < ApplicationController
# 提交结果显示
def result
if @my_hack.submit_status == 1
render json: {status:0, message: "正在评测中"}
render json: {status: 1, message: "正在评测中"}
else
@mode = params[:mode]
@result =
@ -105,7 +110,7 @@ class HackUserLastestCodesController < ApplicationController
else
[{input: params[:input]}]
end
testCases = Base64.urlsafe_encode64(test_sets.to_json)
testCases = Base64.encode64(test_sets.to_json)
#codeFileContent = Base64.urlsafe_encode64(@my_hack.code)
debug_params = {execMode: exec_mode,
tpiID: @my_hack.identifier,

@ -1,8 +1,9 @@
class HacksController < ApplicationController
before_action :require_login, except: [:index]
before_action :find_hack, only: [:edit, :update, :publish, :start, :update_set, :delete_set]
before_action :require_teacher_identity, only: [:create, :update_set]
before_action :require_auth_identity, only: [:update, :edit, :publish, :update_set, :delete_set]
before_action :find_hack, only: [:edit, :update, :publish, :start, :update_set, :delete_set]
# 开启编程,如果第一次开启,创建一条记录,如果已经开启过的话,直接返回标识即可
def start
@ -163,7 +164,7 @@ class HacksController < ApplicationController
hacks = Hack.select(select_sql).mine(current_user.id)
else
# 全部包括已经发布的,和我的未发布的
hacks = Hack.select(select_sql).published.opening.merge(Hack.select(select_sql).unpublish.mine(current_user.id))
hacks = Hack.select(select_sql).published.opening.or(Hack.select(select_sql).unpublish.mine(current_user.id))
end
# 搜索
if params[:search]
@ -181,9 +182,14 @@ class HacksController < ApplicationController
hacks = hacks.where.not(id: user_hacks.pluck(:hack_id))
end
else
hacks = hacks.joins(:hack_user_lastest_code).where(hack_user_lastest_code: {status: params[:status]})
hacks = hacks.joins(:hack_user_lastest_codes).where(hack_user_lastest_codes: {status: params[:status]})
end
end
# 分类
if params[:category]
hacks = hacks.where(category: params[:category])
end
# 排序
sort_by = params[:sort_by] || "hack_user_lastest_codes_count"
sort_direction = params[:sort_direction] || "desc"

@ -2,6 +2,7 @@ class Oauth::BaseController < ActionController::Base
include RenderHelper
include LoginHelper
include ControllerRescueHandler
include LaboratoryHelper
skip_before_action :verify_authenticity_token
@ -24,4 +25,9 @@ class Oauth::BaseController < ActionController::Base
Rails.logger.info("[OAuth2] omniauth.auth -> #{request.env['omniauth.auth'].inspect}")
request.env['omniauth.auth']
end
def default_yun_session
@_default_yun_session = "#{request.subdomain.split('.').first}_user_id"
# @_default_yun_session = "#{current_laboratory.try(:identifier).split('.').first}_user_id"
end
end

@ -198,14 +198,14 @@ class PollsController < ApplicationController
def common_header
ActiveRecord::Base.transaction do
begin
@poll_status = @poll.get_poll_status(current_user)
if @user_course_identity > Course::ASSISTANT_PROFESSOR
@is_teacher_or = 0
@user_poll_answer = @poll.check_user_votes_status(current_user)
@user_poll_answer = @poll.check_user_votes_status(current_user, @poll_status)
else
@is_teacher_or = 1
@user_poll_answer = 3 #教师页面
end
@poll_status = @poll.get_poll_status(current_user)
poll_id_array = [@poll.id]
@poll_publish_count = get_user_permission_course(poll_id_array,2).count #是否存在已发布的
@poll_unpublish_count = get_user_permission_course(poll_id_array,1).count #是否存在未发布的

@ -2,7 +2,7 @@ class SubjectsController < ApplicationController
before_action :require_login, :check_auth, except: [:index, :show, :right_banner]
# before_action :check_auth, except: [:index]
before_action :check_account, except: [:index, :show, :right_banner]
before_action :find_subject, except: [:index, :create, :new, :append_to_stage]
before_action :find_subject, except: [:index, :create, :new, :append_to_stage, :add_shixun_to_stage]
before_action :allowed, only: [:update, :edit, :destroy, :publish, :cancel_publish, :cancel_has_publish,
:search_members, :add_subject_members, :statistics, :shixun_report, :school_report,
:up_member_position, :down_member_position, :update_team_title]
@ -212,6 +212,16 @@ class SubjectsController < ApplicationController
@shixuns = Shixun.where(id: params[:shixun_id]).order("id desc")
end
# 添加实训项目
def add_shixun_to_stage
identifier = generate_identifier Shixun, 8
ActiveRecord::Base.transaction do
@shixun = Shixun.create!(name: params[:name], user_id: current_user.id, identifier: identifier)
# 添加合作者
@shixun.shixun_members.create!(user_id: current_user.id, role: 1)
end
end
def choose_course
course_ids = Course.find_by_sql("SELECT c.id FROM courses c, course_members m
WHERE m.course_id = c.id AND m.role in (1,2,3)

@ -6,6 +6,7 @@ class TidingsController < ApplicationController
def index
tidings = current_user.tidings
@onclick_time = current_user.click_time
tiding_types =
case params[:type]
@ -18,11 +19,13 @@ class TidingsController < ApplicationController
end
tidings = tidings.where(tiding_type: tiding_types) if tiding_types.present?
tidings = tidings.where(container_type: 'JoinCourse') if params[:type] == 'course_apply'
@course_apply_count = tidings.where("created_at > '#{@onclick_time}'").where(container_type: 'JoinCourse').count
tidings = tidings.where(container_type: 'ProjectPackage') if params[:type] == 'project_package'
@count = tidings.count
@tidings = paginate(tidings.order(created_at: :desc), per_page: 10)
@onclick_time = current_user.click_time
end
private

@ -15,6 +15,8 @@ class Weapps::CodeSessionsController < Weapps::BaseController
logged = true
else
# 根据 code没拿到 unionid
Rails.logger.info("[Weapp] session_key: #{result['session_key']}")
Rails.logger.info("[Weapp] code: #{params[:code]}")
user_info = Wechat::Weapp.decrypt(result['session_key'], params[:encrypted_data], params[:iv])
# 老用户,已绑定

@ -1,6 +1,6 @@
class Weapps::CoursesController < Weapps::BaseController
before_action :require_login
before_action :user_course_identity, except: [:create]
before_action :set_course, :user_course_identity, except: [:create]
before_action :teacher_allowed, only: [:edit, :update]
before_action :teacher_or_admin_allowed, only: [:change_member_roles, :delete_course_teachers]
@ -35,6 +35,9 @@ class Weapps::CoursesController < Weapps::BaseController
# 教师列表
def teachers
@course = current_course
@page = (params[:page] || 1).to_i
@limit = (params[:limit] || 20).to_i
search = params[:search].present? ? params[:search].strip : ""
if @course.try(:id) != 1309 || current_user.admin? || current_user.try(:id) == 15582
@teacher_list = @course.course_members.joins(:user).where("course_members.role in (1, 2, 3)")
else
@ -42,17 +45,26 @@ class Weapps::CoursesController < Weapps::BaseController
and course_members.role = 2))")
end
if search.present?
@teacher_list = @teacher_list.joins(:user).where("LOWER(CONCAT(users.lastname, users.firstname)) like ?", "%#{search}%")
end
@teacher_list_size = @teacher_list.size
@applications_size = CourseMessage.unhandled_join_course_requests_by_course(@course).size
@teacher_list = @teacher_list.preload(user: [user_extension: :school])
@teacher_list = @teacher_list.includes(user: [user_extension: :school])
# 中英文混合排序(忽略大小写)
@teacher_list = @teacher_list.sort {|x, y| Pinyin.t(x.user&.real_name, splitter: '').upcase <=> Pinyin.t(y.user&.real_name, splitter: '').upcase}
@teacher_list = @teacher_list[(@page-1)*@limit ... @page*@limit]
end
# 批量删除教师或助教
def delete_course_teachers
begin
@course = current_course
@page = (params[:page] || 1).to_i
@limit = (params[:limit] || 20).to_i
course_members = @course.course_members.where(id: params[:course_member_ids], role: %i[PROFESSOR ASSISTANT_PROFESSOR])
user_ids = course_members.pluck(:user_id)
course_members.destroy_all
@ -67,10 +79,18 @@ class Weapps::CoursesController < Weapps::BaseController
def students
@course = current_course
@page = (params[:page] || 1).to_i
@limit = (params[:limit] || 20).to_i
search = params[:search].present? ? params[:search].strip : nil
course_group_id = params[:course_group_id].present? ? params[:course_group_id].to_i : nil
@students = CourseMember.students(@course)
if search.present?
@students = @students.joins(user: :user_extension).where("LOWER(CONCAT(users.lastname, users.firstname)) like ? or
user_extensions.student_id like ?", "%#{search}%", "%#{search}%")
end
if course_group_id.present?
course_group = CourseGroup.find(course_group_id) if course_group_id != 0
@students = @students.where(course_group_id: course_group&.id.to_i)
@ -78,6 +98,9 @@ class Weapps::CoursesController < Weapps::BaseController
@students_count = @students.size
@students = @students.includes(user: :user_extension)
# 中英文混合排序(忽略大小写)
@students = @students.sort {|x, y| Pinyin.t(x.user&.real_name, splitter: '').upcase <=> Pinyin.t(y.user&.real_name, splitter: '').upcase}
@students = @students[(@page-1)*@limit ... @page*@limit]
end
# 批量修改角色
@ -167,4 +190,9 @@ class Weapps::CoursesController < Weapps::BaseController
tip_exception(403, "..")
end
end
def set_course
@course = Course.find_by!(id: params[:id])
tip_exception(404, "") if @course.is_delete == 1 && !current_user.admin?
end
end

@ -51,7 +51,7 @@ class Weapps::RegistersController < Weapps::BaseController
# session[:user_id] = @user.id
session[:"#{default_yun_session}"] = @user.id
render_ok
# render_ok(user_id: @user.id)
end
private

@ -77,7 +77,7 @@ module PollsHelper
ex_pb_time = poll.get_poll_times(user.id,false)
poll_publish_time = ex_pb_time[:publish_time]
poll_end_time = ex_pb_time[:end_time]
current_status = poll.check_user_votes_status(user)
current_status = poll.check_user_votes_status(user, poll_status)
lock_icon = 0 #不显示锁图标
else
poll_users_list = poll.get_poll_exercise_users

@ -20,10 +20,10 @@ module Weapps::CoursesHelper
end
end
end
data = data.sort do |a, b|
[a[:letter]] <=> [b[:letter]]
end
data.push(data.shift) if data.select{|a|a[:letter]=='#'}.first.present? # '#'排在最后
# data = data.sort do |a, b|
# [a[:letter]] <=> [b[:letter]]
# end
# data.push(data.shift) if data.select{|a|a[:letter]=='#'}.first.present? # '#'排在最后
return data
end
@ -47,10 +47,10 @@ module Weapps::CoursesHelper
end
end
end
data = data.sort do |a, b|
[a[:letter]] <=> [b[:letter]]
end
data.push(data.shift) if data.select{|a|a[:letter]=='#'}.first.present? # '#'排在最后
# data = data.sort do |a, b|
# [a[:letter]] <=> [b[:letter]]
# end
# data.push(data.shift) if data.select{|a|a[:letter]=='#'}.first.present? # '#'排在最后
return data
end

@ -26,9 +26,11 @@ class Hack < ApplicationRecord
def code
if hack_codes.count == 1
tran_base64_decode64(hack_codes.first.code)
#tran_base64_decode64(hack_codes.first.code)
hack_codes.first.code
else
tran_base64_decode64(hack_codes.pluck(:code))
#tran_base64_decode64(hack_codes.pluck(:code))
hack_codes.pluck(:code)
end
end

@ -128,7 +128,7 @@ class Poll < ApplicationRecord
en_time = end_time
else
poll_group_setting = poll_group_settings
user_group = course.course_members.where(user_id: user_id).select(:course_group_id)
user_group = course.students.where(user_id: user_id).select(:course_group_id)
if user_group.exists?
user_group_id = user_group.first&.course_group_id
user_p_group_setting = poll_group_setting.where(course_group_id: user_group_id).select(:publish_time,:end_time)
@ -146,12 +146,22 @@ class Poll < ApplicationRecord
end
#判断当前用户的答题状态
def check_user_votes_status(user)
def check_user_votes_status(user, poll_status)
poll_answer_user = poll_users.where(user_id: user.id).select(:start_at,:end_at,:commit_status)
user_status = 2
if poll_answer_user.exists? && (poll_answer_user.first&.start_at.present? || poll_answer_user.first&.end_at.present?) #学生有过答题的,或者立即截止,但学生未做试卷的
user_status = poll_answer_user.first.commit_status
end
# 问卷已截止时学生的答题状态需要考虑问卷的状态
if poll_status > 2
# 问卷如果还是继续答题状态则自动提交
if user_status == 0
poll_end_time = get_poll_times(user.id,false)[:end_time]
poll_answer_user.first.update_attributes!(:commit_status => 1, :end_at => poll_end_time)
user_status = 1
end
user_status = user_status == 1 ? 1 : 4
end
user_status
end

@ -65,6 +65,12 @@
<% end %>
</li>
<li>
<%= sidebar_item_group('#comments-submenu', '消息', icon: 'comments') do %>
<li><%= sidebar_item(admins_shixun_feedback_messages_path, '实训反馈', icon: 'comment', controller: 'admins-shixun_feedback_messages') %></li>
<% end %>
</li>
<li>
<%= sidebar_item_group('#major-identification-submenu', '工程认证', icon: 'anchor') do %>
<li><%= sidebar_item(admins_major_informations_path, '本科专业目录', icon: 'outdent', controller: 'admins-major_informations') %></li>

@ -0,0 +1,14 @@
<% define_admin_breadcrumbs do %>
<% add_admin_breadcrumb('实训反馈', admins_shixun_feedback_messages_path) %>
<% end %>
<div class="box search-form-container">
<%= form_tag(admins_shixun_feedback_messages_path, method: :get, class: 'form-inline search-form', remote: true) do %>
<%= text_field_tag(:keyword, params[:keyword], class: 'form-control col-md-4 ml-3', placeholder: '输入实训名称关键字进行搜索') %>
<%= submit_tag('搜索', class: 'btn btn-primary ml-3', 'data-disable-with': '搜索中...') %>
<% end %>
</div>
<div class="box admin-list-container shixun_feedback_messages-list-container">
<%= render(partial: 'admins/shixun_feedback_messages/shared/list', locals: {discusses: @discusses}) %>
</div>

@ -0,0 +1,2 @@
$(".shixun_feedback_messages-list-container")
.html("<%= j render partial: "admins/shixun_feedback_messages/shared/list", locals: {discusses: @discusses} %>")

@ -0,0 +1,29 @@
<table class="table table-hover text-center">
<thead class="thead-light">
<tr>
<th width="5%">序号</th>
<th width="25%" class="text-left">实训名称</th>
<th width="50%" class="text-left">评论内容</th>
<th width="10%">评论者</th>
<th width="10%">评论时间</th>
</tr>
</thead>
<tbody>
<% if discusses.present? %>
<% discusses.each_with_index do |discuss, index| %>
<tr>
<td><%= (@params_page.to_i - 1) * 20 + index + 1 %></td>
<% identifier = Game.find_by(challenge_id: discuss.challenge_id, user_id: discuss.user_id)&.identifier %>
<td class="text-left"><%= link_to discuss.dis.name, "/tasks/#{identifier}", target: '_blank'%></td>
<td class="text-left"><%= content_safe discuss.content %></td>
<td><%= discuss.user.show_real_name %></td>
<td><%= format_time discuss.created_at %></td>
</tr>
<% end %>
<% else %>
<%= render 'admins/shared/no_data_for_table' %>
<% end %>
</tbody>
</table>
<%= render partial: 'admins/shared/paginate', locals: { objects: discusses } %>

@ -1,7 +1,12 @@
json.(@result, :id, :status, :error_line, :error_msg,
:input, :output, :execute_time, :execute_memory)
json.status 0
json.message "评测成功"
json.data do
json.(@result, :id, :status, :error_line, :error_msg,
:input, :output, :execute_time, :execute_memory)
# 提交模式多了一个预计输出
if @mode == "submit"
json.expected_output @result.expected_output
if @mode == "submit"
json.expected_output @result.expected_output
end
end

@ -1,5 +1,5 @@
# 编程内容
json.(@hack, :name, :description, :language, :code)
json.(@hack, :name, :description, :language, :difficult, :category, :time_limit, :open_or_not)
# 代码
json.language @hack.language

@ -0,0 +1,3 @@
json.shixun_identifier @shixun.identifier
json.shixun_name @shixun.name
json.shixun_id @shixun.id

@ -1,2 +1,3 @@
json.count @count
json.tidings @tidings, partial: 'tidings/tiding', as: :tiding
json.course_apply_count @course_apply_count

@ -0,0 +1,4 @@
json.status 0
json.user do
json.partial! 'weapps/shared/user', locals: { user: @user }
end

@ -42,7 +42,6 @@ Rails.application.routes.draw do
member do
post :publish
get :start
get :result
post :update_set
delete :delete_set
end
@ -57,8 +56,16 @@ Rails.application.routes.draw do
get :code_debug
get :code_submit
match :listen_result, :via => [:get, :post]
get :result
get :submit_records
post :restore_initial_code
end
collection do
get :record_detail
end
end
@ -325,6 +332,7 @@ Rails.application.routes.draw do
get 'create_subject'
get 'new_subject'
post 'append_to_stage'
post :add_shixun_to_stage
get 'search'
end
end
@ -1039,6 +1047,7 @@ Rails.application.routes.draw do
end
resources :shixuns, only: [:index,:destroy]
resources :shixun_settings, only: [:index,:update]
resources :shixun_feedback_messages, only: [:index]
resources :department_applies,only: [:index,:destroy] do
collection do
post :merge

@ -80,6 +80,27 @@ em.vertical-line{display: inline-block;width: 2px;background: #999;height: 10px}
.inner-footernav li{float: left;height: 50px;width: 80px;text-align: center}
.inner-footernav li a{width: 100%;text-align: center;line-height: 50px;color: #888}
.inner-footer_con{ width: 1200px; margin: 0 auto;}
.inner-footernavysl{ display: flex;flex-direction:initial;}
.inner-footernavysl li a {
height: 40px;
line-height: 40px;
color:#878786;
font-size: 19px;
}
.inner-footernavysl li Link {
height: 40px;
line-height: 40px;
color:#878786;
}
.intermediatecenter{
width:100%;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.footer_con-p{ color: #888; margin-top:10px;}
/*banner图*/
.banner{width:100%;height:345px;position: relative;overflow: hidden;border-radius: 10px;}

@ -27,7 +27,6 @@ const Search = Input.Search;
const RadioGroup = Radio.Group;
const CheckboxGroup = Checkbox.Group;
const {Option} = Select;
//学生老师页面
class Studentshavecompletedthelist extends Component {
// http://localhost:3007/courses/1309/exercises/722/exercises/student_exercise_list?debug=s
@ -317,6 +316,26 @@ class Studentshavecompletedthelist extends Component {
</a>
</Tooltip>
:
record.commit_method===5?
<Tooltip placement="bottom" title={
<div>
<div>最终调整成绩{record.efficiencyscore}</div>
</div>}>
<span style={parseInt(record.efficiencyscore) > 90 ? {
color: '#DD1717',
textAlign: "center"
} : parseInt(record.efficiencyscore) <= 90 ? {
color: '#FF6800',
textAlign: "center"
} : parseInt(record.efficiencyscore) <= 60 ? {
color: '#747A7F',
textAlign: "center",
} : {
color: '#747A7F',
textAlign: "center"
}}>{record.efficiencyscore}</span>
</Tooltip>
:
<span style={parseInt(record.efficiencyscore) > 90 ? {
color: '#DD1717',
textAlign: "center"
@ -587,6 +606,30 @@ class Studentshavecompletedthelist extends Component {
}}>--</a>
</Tooltip>
:
record.commit_method===5?
<Tooltip placement="bottom" title={
<div>
<div>最终调整成绩{record.efficiencyscore}</div>
</div>}>
<span style={parseInt(record.efficiencyscore) > 90 ? {
color: '#DD1717',
textAlign: "center",
width:"199px"
} : parseInt(record.efficiencyscore) <= 90 ? {
color: '#FF6800',
textAlign: "center",
width:"199px"
} : parseInt(record.efficiencyscore) <= 60 ? {
color: '#747A7F',
textAlign: "center",
width:"199px"
} : {
color: '#747A7F',
textAlign: "center",
width:"199px"
}}>{record.efficiencyscore}</span>
</Tooltip>
:
<span style={parseInt(record.efficiencyscore) > 90 ? {
color: '#DD1717',
textAlign: "center",
@ -845,6 +888,26 @@ class Studentshavecompletedthelist extends Component {
}}>--</a>
</Tooltip>
:
record.commit_method===5?
<Tooltip placement="bottom" title={
<div>
<div>最终调整成绩{record.efficiencyscore}</div>
</div>}>
<span style={parseInt(record.efficiencyscore) > 90 ? {
color: '#DD1717',
textAlign: "center",
} : parseInt(record.efficiencyscore) <= 90 ? {
color: '#FF6800',
textAlign: "center",
} : parseInt(record.efficiencyscore) <= 60 ? {
color: '#747A7F',
textAlign: "center",
} : {
color: '#747A7F',
textAlign: "center",
}}>{record.efficiencyscore}</span>
</Tooltip>
:
<span style={parseInt(record.efficiencyscore) > 90 ? {
color: '#DD1717',
textAlign: "center",
@ -1048,6 +1111,26 @@ class Studentshavecompletedthelist extends Component {
textAlign: "center",}}>--</a>
</Tooltip>
:
record.commit_method===5?
<Tooltip placement="bottom" title={
<div>
<div>最终调整成绩{record.efficiencyscore}</div>
</div>}>
<span style={parseInt(record.efficiencyscore) > 90 ? {
color: '#DD1717',
textAlign: "center",
} : parseInt(record.efficiencyscore) <= 90 ? {
color: '#FF6800',
textAlign: "center",
} : parseInt(record.efficiencyscore) <= 60 ? {
color: '#747A7F',
textAlign: "center",
} : {
color: '#747A7F',
textAlign: "center",
}}>{record.efficiencyscore}</span>
</Tooltip>
:
<span style={parseInt(record.efficiencyscore) > 90 ? {
color: '#DD1717',
textAlign: "center",
@ -1246,6 +1329,26 @@ class Studentshavecompletedthelist extends Component {
textAlign: "center",}}>--</a>
</Tooltip>
:
record.commit_method===5?
<Tooltip placement="bottom" title={
<div>
<div>最终调整成绩{record.efficiencyscore}</div>
</div>}>
<span style={parseInt(record.efficiencyscore) > 90 ? {
color: '#DD1717',
textAlign: "center",
} : parseInt(record.efficiencyscore) <= 90 ? {
color: '#FF6800',
textAlign: "center",
} : parseInt(record.efficiencyscore) <= 60 ? {
color: '#747A7F',
textAlign: "center",
} : {
color: '#747A7F',
textAlign: "center",
}}>{record.efficiencyscore}</span>
</Tooltip>
:
<span style={parseInt(record.efficiencyscore) > 90 ? {
color: '#DD1717',
textAlign: "center",
@ -1401,7 +1504,9 @@ class Studentshavecompletedthelist extends Component {
// //console.log("试卷学生未截止");
this.Generatenewdatas(response.data.exercise_users);
if (response.data.exercise_types.subjective === 0) {
if (this.state.noclassroom === undefined || this.state.noclassroom === "" || this.state.noclassroom === null) {
console.log("4");
var arr =[];
for(var i=0;i<this.state.columnss.length;i++){
var item = this.state.columnss[i];
@ -1423,12 +1528,15 @@ class Studentshavecompletedthelist extends Component {
})
} else {
console.log("5");
debugger
var arr =[];
for(var i=0;i<this.state.columnss.length;i++){
var item = this.state.columnss[i];
if(item.title==="客观题得分"){
}
if(item.title==="主观题得分"){
else if(item.title==="主观题得分"){
}
else if(this.props.isNotMember()===true&&item.title==="学号") {
@ -1613,6 +1721,8 @@ class Studentshavecompletedthelist extends Component {
completion: current_answer_user.objective_score === undefined ? "--" : current_answer_user.objective_score === null ? "--" : current_answer_user.objective_score === "" ? "--" : current_answer_user.objective_score,
levelscore: current_answer_user.subjective_score === undefined ? "--" : current_answer_user.subjective_score === null ? "--" : current_answer_user.subjective_score === "" ? "--" : current_answer_user.subjective_score,
score_open:exercise_types.score_open,
commit_method:current_answer_user.commit_method
})
@ -2718,6 +2828,8 @@ class Studentshavecompletedthelist extends Component {
// //console.log("this.props.Commonheadofthetestpaper.exercise_status");
// //console.log(this.props.Commonheadofthetestpaper&&this.props.Commonheadofthetestpaper.exercise_status);
// //console.log(exercise_status);
console.log("Studentshavecompletedthelis123123t");
console.log(columnss);
return (
isAdmin === true ?
(

@ -460,7 +460,7 @@ class Testpapersettinghomepage extends Component{
/>
{
// 教师列表
parseInt(tab[0])==0 ? <Studentshavecompletedthelist {...this.props} {...this.state} triggerRef={this.bindRef} setcourse_groupysls={(value)=>this.setcourse_groupysls(value)} current_status = {this.state.current_status} Commonheadofthetestpaper={this.state.Commonheadofthetestpaper}></Studentshavecompletedthelist>:""
parseInt(tab[0])==0 ? <Studentshavecompletedthelist {...this.props} {...this.state} triggerRef={this.bindRef} setcourse_groupysls={(value)=>this.setcourse_groupysls(value)} current_status = {this.state.current_status} Commonheadofthetestpaper={this.state.Commonheadofthetestpaper} yslstustate={[`${polls_status[Commonheadofthetestpaper && Commonheadofthetestpaper.exercise_status]}`]}></Studentshavecompletedthelist>:""
}
{/*统计结果*/}

@ -84,6 +84,27 @@ em.vertical-line{display: inline-block;width: 2px;background: #999;height: 10px}
.inner-footernav li{float: left;height: 50px;width: 80px;text-align: center}
.inner-footernav li a{width: 100%;text-align: center;line-height: 50px;color: #888}
.inner-footer_con{ width: 1200px; margin: 0 auto;}
.inner-footernavysl{ display: flex;flex-direction:initial;}
.inner-footernavysl li a {
height: 40px;
line-height: 40px;
color:#878786;
font-size: 19px;
}
.inner-footernavysl li Link {
height: 40px;
line-height: 40px;
color:#878786;
}
.intermediatecenter{
width:100%;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.footer_con-p{ color: #888; margin-top:10px;}
/*banner图*/
.banner{width:100%;height:345px;position: relative;overflow: hidden;border-radius: 10px;}
@ -3773,4 +3794,4 @@ a.singlepublishtwo{
.fontweightbold{
font-weight: bold !important;
}
}

Loading…
Cancel
Save