Merge branch 'dev_aliyun' of https://bdgit.educoder.net/Hjqreturn/educoder into dev_aliyun

issues25489
hjm 5 years ago
commit ade2739ae5

@ -1512,7 +1512,7 @@ class HomeworkCommonsController < ApplicationController
end_time = game.end_time
# 用户关卡的得分
all_score = homework_challenge_settings.find_by(challenge_id: challenge.id).try(:score).to_f
final_score = @student_work.work_challenge_score game, all_score
final_score = @student_work.work_challenge_score game, all_score, challenge.id
# 抄袭用户
copy_user = User.find_by_id(game_codes[0].try(:target_user_id))
copy_end_time = copy_user.games.find_by(challenge_id: challenge.id).try(:end_time) if copy_user.present?

@ -464,6 +464,7 @@ class StudentWorksController < ApplicationController
@shixun = @homework.shixuns.take
# 提示: 这里如果includes outputs表的话 sum(:evaluate_count)会出现错误
@games = @work.myshixun.games.joins(:challenge).reorder("challenges.position asc") if @work.myshixun
@challenges = @shixun.challenges if @shixun
@comment = @work.shixun_work_comments.find_by(challenge_id: 0)
# 用户最大评测次数
@ -475,7 +476,7 @@ class StudentWorksController < ApplicationController
end
# 图形效率图的数据
@echart_data = student_efficiency(@homework, @work)
@echart_data = student_efficiency(@homework, @work) if @work.myshixun
end
# 实训作品的评阅
@ -517,6 +518,7 @@ class StudentWorksController < ApplicationController
@user = @work.user
@shixun = @homework.shixuns.take
@games = @work.myshixun.games.includes(:challenge, :game_codes, :outputs) if @work.myshixun
@challenges = @shixun.challenges if @shixun
# 用户最大评测次数
@user_evaluate_count = @games.pluck(:evaluate_count).sum if @games
@ -717,27 +719,35 @@ class StudentWorksController < ApplicationController
tip_exception("参数错误score和challenge_id不能为空")
end
challenge_setting = @homework.homework_challenge_settings.find_by(challenge_id: params[:challenge_id])
challenge = challenge_setting&.challenge
tip_exception("不能小于零") if params[:score].to_i < 0
tip_exception("不能大于关卡分值:#{challenge_setting.score}") if challenge_setting.score < params[:score].to_i
if challenge_setting
challenge = challenge_setting&.challenge
tip_exception("不能小于零") if params[:score].to_i < 0
tip_exception("不能大于关卡分值:#{challenge_setting.score}") if challenge_setting && challenge_setting.score < params[:score].to_i
ActiveRecord::Base.transaction do
begin
if params[:type] == "review"
copy_user = User.find params[:copy_user_id]
comment = "代码查重结果显示与#{copy_user.try(:show_real_name)}的代码相似度#{params[:code_rate]}%"
else
comment = "根据实训报告中最终提交的代码调整第#{challenge.position}关分数"
ActiveRecord::Base.transaction do
begin
if params[:type] == "review"
copy_user = User.find params[:copy_user_id]
comment = "代码查重结果显示与#{copy_user.try(:show_real_name)}的代码相似度#{params[:code_rate]}%"
else
comment = "根据实训报告中最终提交的代码调整第#{challenge.position}关分数"
end
challenge_score = @work.challenge_work_scores.create(challenge_id: params[:challenge_id], user_id: current_user.id, score: params[:score],
comment: comment)
challenge_score.create_tiding current_user.id
if @work.work_status != 0 && @work.myshixun
HomeworksService.new.update_myshixun_work_score @work, @work.myshixun, @work.myshixun&.games, @homework, @homework.homework_challenge_settings
else
update_none_commit_work @work, @homework
end
rescue Exception => e
uid_logger(e.message)
tip_exception("调分失败")
raise ActiveRecord::Rollback
end
challenge_score = @work.challenge_work_scores.create(challenge_id: params[:challenge_id], user_id: current_user.id, score: params[:score],
comment: comment)
challenge_score.create_tiding current_user.id
HomeworksService.new.update_myshixun_work_score @work, @work&.myshixun, @work&.myshixun&.games, @homework, @homework.homework_challenge_settings
rescue Exception => e
uid_logger(e.message)
tip_exception(e.message)
raise ActiveRecord::Rollback
end
else
tip_exception("该关卡不记分")
end
end
@ -860,4 +870,20 @@ class StudentWorksController < ApplicationController
end
end
end
def update_none_commit_work work, homework
if work.work_status == 0
work.work_status = 1
work.commit_time = homework.end_time
work.update_time = Time.now
end
final_score = 0
homework.homework_challenge_settings.each do |cha_setting|
adjust_score = work.challenge_work_scores.select{|work_score| work_score.challenge_id == cha_setting.challenge_id}.last
final_score += adjust_score.score if adjust_score.present?
end
work.final_score = final_score
work.work_score = final_score
work.save!
end
end

@ -1,5 +1,5 @@
class TrustieHacksController < ApplicationController
before_action :require_admin, :except => [:index]
before_action :require_admin, :except => [:index, :entry]
before_action :require_login, :except => [:index]
before_action :find_hackathon
before_action :find_hack, :except => [:create, :index, :edit_hackathon, :update_hackathon]
@ -15,7 +15,7 @@ class TrustieHacksController < ApplicationController
hacks = hacks.where("name like ?", "%#{search}%")
end
@hackathon_users_count = hacks ? 0 : hacks.sum(:hack_users_count)
@hackathon_users_count = hacks.blank? ? 0 : hacks.sum(:hack_users_count)
@hacks_count = hacks.count
@hacks = hacks.page(page).per(limit)
@ -49,10 +49,10 @@ class TrustieHacksController < ApplicationController
# 报名入口
def entry
if @hack.hack_users.exists?(user_id: current_user)
if @hack.hack_users.exists?(user_id: current_user.id)
render_error('已经报名,请勿重复操作')
else
@hack.hack_users.create(user_id: current_user)
@hack.hack_users.create(user_id: current_user.id)
render_ok
end
end

@ -19,7 +19,7 @@ module StudentWorksHelper
# 作业的开启时间
def myshixun_open_time game
game.open_time ? (format_time game.open_time) : "--"
game&.open_time ? (format_time game.open_time) : "--"
end
# 作业完成时间
@ -29,7 +29,7 @@ module StudentWorksHelper
# 作业耗时
def time_consuming game
game.end_time.blank? ? "--" : (game_spend_time game.cost_time)
game&.end_time.blank? ? "--" : (game_spend_time game.cost_time)
end
# 用户个人实训总得分user_total_score

@ -196,12 +196,12 @@ class StudentWork < ApplicationRecord
student_works_scores.where.not(reviewer_role: 3, score: nil).exists?
end
def work_challenge_score game, score
def work_challenge_score game, score, challenge_id
game_score = 0
adjust_score = challenge_work_scores.where(challenge_id: game.challenge_id).last
adjust_score = challenge_work_scores.where(challenge_id: challenge_id).last
if adjust_score.present?
game_score = adjust_score.score
else
elsif game.present?
setting = homework_common.homework_group_setting game.user_id
if game.status == 2 && ((game.end_time && game.end_time < setting.end_time) || (homework_common.allow_late && game.end_time && game.end_time < homework_common.late_time))
answer_open_evaluation = homework_common.homework_detail_manual.answer_open_evaluation

@ -1,4 +1,5 @@
class TrustieHack < ApplicationRecord
validates_length_of :description, maximum: 500
has_many :hack_users, :dependent => :destroy
belongs_to :trustie_hackathon, counter_cache: true

@ -1,5 +1,5 @@
class TrustieHackathon < ApplicationRecord
validates_length_of :description, maximum: 500
has_many :trustie_hacks, :dependent => :destroy
end

@ -76,22 +76,23 @@
<th>调分</th>
</thead>
<tbody>
<% @games.each_with_index do |game, index| %>
<% challenge_score = @homework.challenge_score game.challenge_id %>
<% game_score = @work.work_challenge_score game, challenge_score %>
<% @challenges.each_with_index do |challenge, index| %>
<% challenge_score = @homework.challenge_score challenge.id %>
<% game = @games.select{|game| game.challenge_id == challenge.id}.first if @games %>
<% game_score = @work.work_challenge_score game, challenge_score, challenge.id %>
<tr>
<td><%= index + 1 %></td>
<td style="text-align: left;">
<span class="task-hide edu-info-dark fl"><%= game.challenge.subject %></span>
<% if ((Time.now > @homework.end_time) && game.end_time.blank?) || (game.end_time.present? && game.end_time > @homework.end_time) %>
<span class="task-hide edu-info-dark fl"><%= challenge.subject %></span>
<% if game && (((Time.now > @homework.end_time) && game.end_time.blank?) || (game.end_time.present? && game.end_time > @homework.end_time)) %>
<span class="delay ml10">延时</span>
<% end %>
</td>
<td><%= myshixun_open_time(game) %></td>
<td><%= game.evaluate_count %></td>
<td><%= finished_time game.end_time %></td>
<td><%= game ? game&.evaluate_count : 0 %></td>
<td><%= game ? finished_time(game.end_time) : "--" %></td>
<td><%= ApplicationController.helpers.time_consuming game %></td>
<td><%= game.final_score %> / <%= game.challenge.all_score %></td>
<td><%= game ? game.final_score : 0 %> / <%= challenge.all_score %></td>
<td><span class="color-orange"><%= game_score %></span> / <%= challenge_score %></td>
<td><%= game_score %></td>
</tr>

@ -3,44 +3,46 @@ json.category @homework.category_info
json.course_name @course.name
json.work_id @work.id
json.work_efficiency @homework.work_efficiency
json.has_commit @work.myshixun.present?
if @shixun
json.shixun_name @shixun.name
# 总体评价
json.overall_appraisal @work.overall_appraisal
json.myself_experience @work.myshixun.try(:total_score)
json.myself_experience @work.myshixun.try(:total_score).to_i
json.total_experience @shixun.all_score
json.work_score number_with_precision @work.work_score, precision: 1
json.work_score number_with_precision @work.work_score.to_f.round(2), precision: 1
json.all_work_score number_with_precision 100, precision: 1
json.time_consuming @work.myshixun_consume
json.evaluate_count @user_evaluate_count.to_i
if @homework.work_efficiency
json.eff_score_full number_with_precision @homework.eff_score, precision: 1
json.eff_score number_with_precision @work.eff_score, precision: 1
json.eff_score number_with_precision @work.eff_score.to_f.round(2), precision: 1
json.challenge_score_full number_with_precision (100 - @homework.eff_score), precision: 1
json.challenge_score number_with_precision @work.final_score, precision: 1
json.challenge_score number_with_precision @work.final_score.to_f.round(2), precision: 1
end
# 阶段成绩
json.stage_list do
json.array! @games do |game|
json.name game.challenge.subject
json.is_delay student_work_is_delay?(@homework, game)
json.array! @challenges do |challenge|
json.name challenge.subject
game = @games.select{|game| game.challenge_id == challenge.id}.first if @games
json.is_delay game ? student_work_is_delay?(@homework, game) : false
json.open_time myshixun_open_time game
json.evaluate_count game.evaluate_count
json.finished_time finished_time game.end_time
json.evaluate_count game ? game&.evaluate_count : 0
json.finished_time game ? finished_time(game.end_time) : "--"
json.time_consuming time_consuming game
json.myself_experience game.final_score
json.experience game.challenge.all_score
json.complete_status game_status(game, @homework)
json.challenge_id game.challenge_id
challenge_score = @homework.challenge_score game.challenge_id
json.myself_experience game ? game&.final_score : 0
json.experience challenge.all_score
json.complete_status game ? game_status(game, @homework) : 0
json.challenge_id challenge.id
challenge_score = @homework.challenge_score challenge.id
json.game_score_full challenge_score
json.game_score @work.work_challenge_score game, challenge_score
challenge_comment = @work.shixun_work_comments.find_by(challenge_id: game.challenge_id)
json.game_score @work.work_challenge_score game, challenge_score, challenge.id
challenge_comment = @work.shixun_work_comments.find_by(challenge_id: challenge.id)
json.challenge_comment challenge_comment&.comment
json.challenge_comment_hidden @user_course_identity < Course::STUDENT ? challenge_comment&.hidden_comment : nil
json.comment_id challenge_comment&.id
json.view_answer game.answer_open != 0
json.view_answer game ? game.answer_open != 0 : 0
end
end
@ -52,7 +54,7 @@ if @shixun
json.username @user.real_name
json.student_id @user.student_id
json.image_url url_to_avatar(@user)
json.complete_count @work.myshixun&.passed_count
json.complete_count @work.myshixun&.passed_count.to_i
json.challenges_count @shixun.challenges_count
json.efficiency @homework.work_efficiency ? number_with_precision(@work.efficiency, precision: 2) : nil
json.max_efficiency @homework.work_efficiency ? number_with_precision(@homework.max_efficiency, precision: 2) : nil

@ -4,4 +4,5 @@
:queues:
- [default, 3]
- [searchkick, 10]
- [notify, 100]
- [notify, 100]
- [mailers, 101]

@ -0,0 +1,6 @@
class ModifyDescriotionLimitForHacks < ActiveRecord::Migration[5.2]
def change
change_column :trustie_hackathons, :description, :text
change_column :trustie_hacks, :description, :text
end
end

@ -32,7 +32,7 @@ module.exports = {
// See the discussion in https://github.com/facebookincubator/create-react-app/issues/343.s
// devtool: "cheap-module-eval-source-map",
// 开启调试
// devtool: "source-map", // 开启调试
devtool: "source-map", // 开启调试
// These are the "entry points" to our application.
// This means they will be the "root" imports that are included in JS bundle.
// The first two entry points enable "hot" CSS and auto-refreshes for JS.

@ -1,5 +1,5 @@
import React,{ Component } from "react";
import {Modal, Checkbox, Upload, Button, Icon, message, Input, Form} from "antd";
import {Modal, Checkbox, Upload, Button, Icon, message, Input, Form, InputNumber} from "antd";
import { WordNumberTextarea } from 'educoder';
import './Newshixunmodel.css'
@ -17,6 +17,7 @@ class ModulationModal extends Component{
Saves=()=>{
console.log("Saves=()");
let {textareaval,Inputsval}=this.state;
// if(textareaval===""||textareaval===undefined){
// this.setState({
@ -32,7 +33,7 @@ class ModulationModal extends Component{
this.setState({
Inputsval: "",
Inputsvaltype: true,
Inputsvaltest: "请输入分数",
Inputsvaltest: "请填写分数",
})
return
}
@ -40,10 +41,51 @@ class ModulationModal extends Component{
if (this.state.Inputsvaltype === true) {
return;
}
if (Inputsval === undefined || Inputsval === null || Inputsval === "") {
this.setState({
borredszf: "ml10 color-grey-9 bor-reds ",
Inputsval: "",
Inputsvaltype: true,
Inputsvaltest: "成绩不能为空",
})
return
}
var re = /^[0-9]+.?[0-9]*$/; //判断字符串是否为数字 //判断正整数 /^[1-9]+[0-9]*]*$/
var nubmer = Inputsval;
if (!re.test(nubmer)) {
this.setState({
borredszf: "ml10 color-grey-9 bor-reds ",
Inputsval: Inputsval,
Inputsvaltype: true,
Inputsvaltest: "请输入0-100的分数",
})
return;
}
if (0 > parseFloat(Inputsval)) {
this.setState({
borredszf: "ml10 color-grey-9 bor-reds ",
Inputsval: Inputsval,
Inputsvaltype: true,
Inputsvaltest: "成绩不能小于零",
})
return;
} else if (parseFloat(Inputsval) > 100) {
this.setState({
borredszf: "ml10 color-grey-9 bor-reds ",
Inputsval: Inputsval,
Inputsvaltype: true,
Inputsvaltest: "成绩不能大于100",
})
return;
}
this.setState({
Inputsvaltype: false,
Inputsvaltest: "",
})
console.log(Inputsval);
this.props.Saves(textareaval,Inputsval)
}
@ -55,31 +97,13 @@ class ModulationModal extends Component{
}
setInputs=(e)=>{
debugger
var value=parseInt(e.target.value)
console.log("setInputs");
console.log(e);
if(isNaN(value)){
value = 0;
this.setState({
Inputsval: value,
Inputsvaltype: true,
Inputsvaltest: "请输入分数",
})
}else{
if(value<0||value>100){
value = 0;
this.setState({
Inputsval: value,
Inputsvaltype: true,
Inputsvaltest: "请输入0-100的分数",
})
}
}
this.setState({
Inputsval: value,
this.setState({
Inputsval: e,
Inputsvaltype: false,
})
})
}
render(){
let {textareaval, Inputsval, textareavaltype, Inputsvaltype, Inputsvaltest} = this.state;
@ -100,65 +124,90 @@ class ModulationModal extends Component{
alignItems: "center",
}}>
<div style={{
marginTop: " 27px",
display: "flex",
flexDirection: "initial",
}}>
}}>
<p className=" mt3 font-14 " style={{color: "#666666"}}>该学生的最终成绩将不会按照评分规则进行计算</p>
</div>
<div style={{
marginTop: " 27px",
display: "flex",
flexDirection: "initial",
width: "100%",
}}>
<span style={{
width: "70px",
textAlign: "center",
lineHeight: " 40px",
lineHeight: "40px",
marginLeft: "16px",
}}><span style={{
textAlign: "center",
lineHeight: " 40px",
color: " #f5222d",
}}>*</span></span>
<Input
className={Inputsvaltype === true ? "borerinput" : ""}
}}>*</span></span>
<style>
{
`
.myinputnumbers .ant-input-number-input{
line-height: 40px;
height: 35px;
}
`
}
</style>
{Inputsvaltype === true ?
<style>
{
`
.ant-input:hover {
border: 1px solid #DD1717!important;
}
.ant-input:focus {
border: 1px solid #DD1717!important;
}
}
`
}
</style>
:
""
} <InputNumber
className={Inputsvaltype === true ? "borerinput myinputnumbers bor-reds" : "myinputnumbers"}
style={{
width: "120px",
height: "40px",
}}
placeholder="请填写分数"
onChange={(e) => this.setInputs(e)}
value={Inputsval === undefined || Inputsval === null ? "" : Inputsval}/>
<span
style={{
width: "335px",
height: "40px",
}}
placeholder="请填写分数"
value={Inputsval}
onInput={this.setInputs}
suffix={
<span
style={{
textAlign: "center",
lineHeight: " 40px",
}}
></span>
}
/>
textAlign: "center",
lineHeight: " 40px",
marginLeft: "10px",
}}
></span>
</div>
{
Inputsvaltype === true ?
<p style={{color: "#DD1717", width: "268px"}}>{Inputsvaltest}</p>
<p style={{color: "#DD1717", width: "77%", marginLeft: "1px", marginTop: "10px",}}>{Inputsvaltest}</p>
: ""
}
<div style={{
display: "flex",
flexDirection: "initial",
}}>
<span style={{width: "70px"}}></span>
<p className=" mt3 font-14 " style={{color: "#666666"}}>调分后该学生的最终成绩将不会按照评分规则进行计算</p>
</div>
<div style={{
display: "flex",
flexDirection: "initial",
marginTop: "10px;",
}}>
<span style={{width: "70px", marginTop: "24px"}}>调分原因</span>
<WordNumberTextarea
style={{width: "335px"}}
placeholder={"请输入调分原因(选填)"}
style={{width: "100%"}}
placeholder={"请填写您对作品调分的原因(选填)"}
onInput={(e) => this.settextarea(e)}
value={textareaval}
maxlength={100}
@ -166,16 +215,19 @@ class ModulationModal extends Component{
</div>
<div style={{
marginTop: "27px",
width: " 336px",
marginTop: "15px",
width: "82%",
marginLeft: "70px",
marginBottom: "29px",
display: "flex",
flexDirection: "row-reverse",
}}>
<a className="task-btn color-white mr30" style={{width: "72px",}}
<a className="task-btn task-btn-orange " style={{width: "72px", borderRadius: "5px"}}
onClick={this.Saves}>{this.props.Savesname || '确认'}</a>
<a className="task-btn color-white mr30" style={{width: "72px", borderRadius: "5px"}}
onClick={this.props.Cancel}>{this.props.Cancelname || '取消'}</a>
<a className="task-btn task-btn-orange" style={{width: "72px",}}
onClick={this.Saves}>{this.props.Savesname || '保存'}</a>
</div>
</div>
</div>

@ -0,0 +1,176 @@
import React, {Component} from "react";
import {Modal, Checkbox, Upload, Button, Icon, message, Input, Form} from "antd";
import {WordNumberTextarea} from 'educoder';
import './Newshixunmodel.css'
//调分
class ModulationModal_exercise extends Component {
constructor(props) {
super(props);
this.state = {
score: 0,
subjective_questions: 0,
objective_questions: 0,
}
//因为主观题加客观题的和是总分
}
componentDidMount = () => {
}
Saves = () => {
let {textareaval, subjective_questions, objective_questions, score} = this.state;
// this.props.Saves(textareaval, Inputsval)
}
settextarea = (e) => {
this.setState({
textareaval: e.target.value
})
}
setInputs = (e) => {
}
render() {
let {Inputsvaltype, subjective_questions, objective_questions, score} = this.state;
return (
<div>
<Modal
keyboard={false}
className={"HomeworkModal"}
title={this.props.modalname || '评阅'}
visible={this.props.visible}
closable={false}
footer={null}
destroyOnClose={true}
>
<div className="clearfix" style={{
display: "-webkit-flex",
flexDirection: "column",
alignItems: "center",
}}>
<div className="mexertwo">
<p className="mexeheigth2">主观题成绩:</p>
<Input
className={Inputsvaltype === true ? "borerinput myinputnumbers bor-reds" : "myinputnumbers"}
style={{
width: "120px",
height: "40px",
}}
placeholder="请填写主观题成绩"
onChange={(e) => this.setInputs(e)}
value={subjective_questions === undefined || subjective_questions === null ? "" : subjective_questions}/>
<p className="mexeheigth"> ,</p>
<p className="mexeheigth"><span>总分</span><span>45.0 </span><span></span></p>
</div>
<div className="mexertwo">
<p className="mexeheigth2">客观题成绩:</p>
<Input
className={Inputsvaltype === true ? "borerinput myinputnumbers bor-reds" : "myinputnumbers"}
style={{
width: "120px",
height: "40px",
}}
placeholder="请填写客观题成绩"
onChange={(e) => this.setInputs(e)}
value={objective_questions === undefined || objective_questions === null ? "" : objective_questions}/>
<p className="mexeheigth"> ,</p>
<p className="mexeheigth"><span>总分</span><span>45.0 </span><span></span></p>
</div>
<div className="mexertwo">
<p className="mexeheigth2">最终成绩:</p>
<Input
className={Inputsvaltype === true ? "borerinput myinputnumbers bor-reds" : "myinputnumbers"}
style={{
width: "120px",
height: "40px",
}}
placeholder="请填写最终成绩"
onChange={(e) => this.setInputs(e)}
value={score === undefined || score === null ? "" : score}/>
<p className="mexeheigth"> ,</p>
<p className="mexeheigth"><span>总分</span><span>45.0 </span><span></span></p>
</div>
<div className="minbuttionte">
<a className="task-btn color-white mr30" style={{width: "72px",}}
onClick={this.props.Cancel}>{this.props.Cancelname || '取消'}</a>
<a className="task-btn task-btn-orange" style={{width: "72px",}}
onClick={this.Saves}>{this.props.Savesname || '保存'}</a>
</div>
</div>
</Modal>
</div>
)
}
}
export default ModulationModal_exercise;
// <div className="task-popup-content">
// <p className="task-popup-text-center font-16 mb20">
//
// <span className={"color-dark-21"}>该学生的最终成绩将不会按照评分规则进行计算</span>
//
// </p>
//
//
// <div className="clearfix">
// {/*<textarea*/}
// {/*className="winput-100-150"*/}
// {/*placeholder="请填写您对作品调分的原因"*/}
// {/*value={textareaval}*/}
// {/*onInput={this.settextarea}*/}
// {/*></textarea>*/}
//
// <WordNumberTextarea
// placeholder={"请填写您对作品调分的原因"}
// onInput={(e)=>this.settextarea(e)}
// value={textareaval}
// maxlength={100}
// />
//
// {/*<li style={{height:"20px",lineHeight:"20px"}}><span className={textareavaltype===true?"color-red":"none"}>原因不能为空</span></li>*/}
// <div style={{height:"20px",lineHeight:"20px"}}></div>
// </div>
//
// <style>
// {
//
// `
// .pdl10{
// padding-left:10px;
// }
// `
// }
// </style>
//
// <li className={"pdl10"}>
//
// </li>
// <li style={{height:"20px",lineHeight:"20px"}}><span className={Inputsvaltype===true?"color-red":"none"}>分数不能为空</span></li>
// <div className="clearfix edu-txt-center">
// <a className="task-btn color-white mr30" onClick={this.props.Cancel}>{this.props.Cancelname || '取消'}</a>
// <a className="task-btn task-btn-orange" onClick={this.Saves}>{this.props.Savesname || '保存'}</a>
{/* </div>*/
}
{/*</div>*/
}

@ -305,8 +305,27 @@
margin: 10px 10px 0px 10px;
padding: 10px 10px 5px 10px;
backgroud: rgba(234, 234, 234, 1);
width: 335px;
width: 530px;
margin-left: 10px;
margin-top: 25px;
height: 214px !important;
}
.WordNumbernote .WordNumberTextarea {
outline: none;
appearance: none;
-webkit-appearance: none;
-moz-appearance: none;
background-color: white;
text-shadow: none;
-webkit-writing-mode: horizontal-tb !important;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
resize: none;
border: none;
width: 100%;
height: 169px !important;
border: none;
display: block;
}
.WordNumberTextarea-count {
@ -325,3 +344,30 @@
border: 1px solid #eee !important;
}
.mexertwo {
display: flex;
flex-direction: initial;
}
.mexeheigth {
line-height: 40px;
}
.mexeheigth2 {
line-height: 40px;
width: 74px;
}
.minbuttionte {
/* display: flex; */
margin-top: 27px;
width: 100%;
/* align-items: center; */
margin-bottom: 17px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
flex-direction: initial;
}

@ -237,7 +237,7 @@ class OneSelfOrderModal extends Component{
})
return
}
arr.push(items.end_time)
arr.push(handleDateString(items.end_time))
}
}
})
@ -273,7 +273,7 @@ class OneSelfOrderModal extends Component{
render(){
let {group_ids,endtime,course_groups}=this.state;
console.log(this.props.modaltype)
// console.log(this.props.modaltype)
let course_groupstype=course_groups===undefined||course_groups.length===0;
// TODO course_groups为空时的处理
return(

@ -24,6 +24,7 @@ import {getImageUrl, toPath, sortDirections} from 'educoder';
import CheckBoxGroup from "../../page/component/CheckBoxGroup";
import NoneData from '../../../modules/courses/coursesPublic/NoneData'
import ModulationModal from "../coursesPublic/ModulationModal";
import ModulationModal_exercise from "../coursesPublic/ModulationModal_exercise";
const Search = Input.Search;
const RadioGroup = Radio.Group;
const CheckboxGroup = Checkbox.Group;
@ -346,7 +347,7 @@ class Studentshavecompletedthelist extends Component {
render: (text, record) => (
<span>
{
<span style={{color: '#999999', textAlign: "center",width:'100px'}}></span>
<span style={{color: '#999999', textAlign: "center",width:'100px'}}></span>
}
</span>
)
@ -1030,13 +1031,14 @@ class Studentshavecompletedthelist extends Component {
render: (text, record) => (
<span>
{record.finalscore==="--"?
<span style={{color: "#9A9A9A"}}>
--
</span>
<span style={{textAlign: "center", color: '#999999'}}
>--</span>
:
<a style={{textAlign: "center"}} className="color-blue"
target="_blank"
href={`/courses/${this.props.match.params.coursesId}/exercises/${this.props.match.params.Id}/users/${record.myid}`}>{record.finalscore}</a>
<a style={{textAlign: "center"}} className="color-blue"
target="_blank"
href={`/courses/${this.props.match.params.coursesId}/exercises/${this.props.match.params.Id}/users/${record.myid}`}>{record.finalscore}</a>
}
</span>
@ -1227,13 +1229,12 @@ class Studentshavecompletedthelist extends Component {
render: (text, record) => (
<span>
{record.finalscore==="--"?
<span style={{color: "#9A9A9A"}}>
--
</span>
:
<a style={{textAlign: "center"}} className="color-blue"
target="_blank"
href={`/courses/${this.props.match.params.coursesId}/exercises/${this.props.match.params.Id}/users/${record.myid}`}>{record.finalscore}</a>
<span style={{textAlign: "center", color: '#999999'}}
>--</span>
:
<a style={{textAlign: "center"}} className="color-blue"
target="_blank"
href={`/courses/${this.props.match.params.coursesId}/exercises/${this.props.match.params.Id}/users/${record.myid}`}>{record.finalscore}</a>
}
</span>
@ -1243,14 +1244,15 @@ class Studentshavecompletedthelist extends Component {
exercise_status:0,
order_type: "desc",
exeuserid: 0,
subjective: 0,
objective_score: 0,
subjective_score: 0,
}
{/*<span className="color-blue" style={{textAlign: "center", cursor: "pointer"}}*/
{/*<a style={{textAlign: "center"}} className="color-blue"*/
}
{/* onClick={() => this.Adjustment(record)}*/
{/* target="_blank"*/
}
{/*>调分</span>*/
{/* onClick={() => this.Adjustment(record.user_id)}>评阅</a>*/
}
// //console.log("Studentshavecompletedthelist");
// //console.log(props.current_status);
@ -1807,6 +1809,9 @@ class Studentshavecompletedthelist extends Component {
course_groups: response.data.course_groups,
mylistansum:response.data.exercise_types.answer_users+response.data.exercise_types.unanswer_users,
loadingstate: false,
subjective: response.data.exercise_types.subjective,
objective_score: response.data.exercise_types.objective_score,
subjective_score: response.data.exercise_types.subjective_score,
columnsys: arr,
})
} else {
@ -1839,6 +1844,9 @@ class Studentshavecompletedthelist extends Component {
exercise_users: response.data.exercise_users,
course_groups: response.data.course_groups,
mylistansum:response.data.exercise_types.answer_users+response.data.exercise_types.unanswer_users,
subjective: response.data.exercise_types.subjective,
objective_score: response.data.exercise_types.objective_score,
subjective_score: response.data.exercise_types.subjective_score,
columnsys: arr,
})
}
@ -1876,6 +1884,9 @@ class Studentshavecompletedthelist extends Component {
course_groups: response.data.course_groups,
mylistansum:response.data.exercise_types.answer_users+response.data.exercise_types.unanswer_users,
loadingstate: false,
subjective: response.data.exercise_types.subjective,
objective_score: response.data.exercise_types.objective_score,
subjective_score: response.data.exercise_types.subjective_score,
columnsys: arr,
})
} else {
@ -1908,6 +1919,9 @@ class Studentshavecompletedthelist extends Component {
course_groups: response.data.course_groups,
mylistansum:response.data.exercise_types.answer_users+response.data.exercise_types.unanswer_users,
loadingstate: false,
subjective: response.data.exercise_types.subjective,
objective_score: response.data.exercise_types.objective_score,
subjective_score: response.data.exercise_types.subjective_score,
columnsys: arr,
})
}
@ -1940,6 +1954,9 @@ class Studentshavecompletedthelist extends Component {
course_groups: response.data.course_groups,
mylistansum:response.data.exercise_types.answer_users+response.data.exercise_types.unanswer_users,
columnsys: arr,
subjective: response.data.exercise_types.subjective,
objective_score: response.data.exercise_types.objective_score,
subjective_score: response.data.exercise_types.subjective_score,
})
} else {
var arr =[];
@ -1965,6 +1982,9 @@ class Studentshavecompletedthelist extends Component {
course_groups: response.data.course_groups,
mylistansum:response.data.exercise_types.answer_users+response.data.exercise_types.unanswer_users,
columnsys:arr,
subjective: response.data.exercise_types.subjective,
objective_score: response.data.exercise_types.objective_score,
subjective_score: response.data.exercise_types.subjective_score,
})
}
} else {
@ -1981,6 +2001,9 @@ class Studentshavecompletedthelist extends Component {
mylistansum:response.data.exercise_types.answer_users+response.data.exercise_types.unanswer_users,
loadingstate: false,
columnsys: this.state.columnsystwo,
subjective: response.data.exercise_types.subjective,
objective_score: response.data.exercise_types.objective_score,
subjective_score: response.data.exercise_types.subjective_score,
})
} else {
var arr =[];
@ -2007,6 +2030,9 @@ class Studentshavecompletedthelist extends Component {
mylistansum:response.data.exercise_types.answer_users+response.data.exercise_types.unanswer_users,
loadingstate: false,
columnsys: arr,
subjective: response.data.exercise_types.subjective,
objective_score: response.data.exercise_types.objective_score,
subjective_score: response.data.exercise_types.subjective_score,
})
}
@ -2594,9 +2620,9 @@ class Studentshavecompletedthelist extends Component {
var exercise_id = this.props.match.params.Id;
let url = `/exercises/${exercise_id}/adjust_score.json`;
axios.post(url, {
score: n,
user_id: this.state.exeuserid,
comment: v,
subjective_score: n,
objective_score: v,
})
.then((response) => {
if (response.data.status == '0') {
@ -2638,7 +2664,7 @@ class Studentshavecompletedthelist extends Component {
{
this.props.Commonheadofthetestpaper&&this.props.Commonheadofthetestpaper.exercise_status===0 || this.props.Commonheadofthetestpaper&&this.props.Commonheadofthetestpaper.exercise_status===1 ?
<div className="edu-back-white">
<NoneData></NoneData>
<NoneData></NoneData>
</div>
:
<div>
@ -2647,6 +2673,13 @@ class Studentshavecompletedthelist extends Component {
Cancel={() => this.Adjustments()}
Saves={(value, num) => this.Testpapergrading(value, num)}
/> : ""}
{/*{*/}
{/* testpapergradingboll === true ? <ModulationModal_exercise*/}
{/* visible={testpapergradingboll}*/}
{/* Cancel={() => this.Adjustments()}*/}
{/* Saves={(value, num) => this.Testpapergrading(value, num)}*/}
{/* /> : ""*/}
{/*}*/}
<div className="edu-back-white" >
<ul className="clearfix" style={{padding: '10px 30px 10px 30px'}}>
@ -2850,7 +2883,7 @@ class Studentshavecompletedthelist extends Component {
{
this.props.Commonheadofthetestpaper&&this.props.Commonheadofthetestpaper.exercise_status === 0 || this.props.Commonheadofthetestpaper&&this.props.Commonheadofthetestpaper.exercise_status === 1 ?
<div className="edu-back-white">
<NoneData></NoneData>
<NoneData></NoneData>
</div>
:
<div className={"educontent mb20"}>
@ -2937,7 +2970,7 @@ class Studentshavecompletedthelist extends Component {
{
this.props.Commonheadofthetestpaper&&this.props.Commonheadofthetestpaper.exercise_status === 0 || this.props.Commonheadofthetestpaper&&this.props.Commonheadofthetestpaper.exercise_status === 1 ?
<div className="edu-back-white">
<NoneData></NoneData>
<NoneData></NoneData>
</div>
:
<div>

@ -46,4 +46,4 @@
text-overflow:ellipsis;
white-space:nowrap;
cursor: default;
}
}

@ -211,6 +211,59 @@ class Bullsubdirectory extends Component{
});
}
//上移
Moveupward = (id) => {
let url = `/courses/${this.props.match.params.coursesId}/inform_up.json`;
axios.post(url, {
inform_id: id
}).then((response) => {
if (response) {
if (response.data) {
if (response.data.status === 0) {
this.props.showNotification(`上移成功`);
this.props.getinputdata();
} else {
this.props.showNotification(`上移失败`);
}
} else {
this.props.showNotification(`上移失败`);
}
} else {
this.props.showNotification(`上移失败`);
}
}).catch((error) => {
console.log(error)
});
}
//下移
Movedown = (id) => {
let url = `/courses/${this.props.match.params.coursesId}/inform_down.json`;
axios.post(url, {
inform_id: id
}).then((response) => {
if (response) {
if (response.data) {
if (response.data.status === 0) {
this.props.showNotification(`下移成功`);
this.props.getinputdata();
} else {
this.props.showNotification(`下移失败`);
}
} else {
this.props.showNotification(`下移失败`);
}
} else {
this.props.showNotification(`下移失败`);
}
}).catch((error) => {
console.log(error)
});
}
render(){
let{description,whethertoeditysl,addonAfter,eduintits,informs,isSpinysl} =this.state;
@ -269,6 +322,42 @@ class Bullsubdirectory extends Component{
:""
}
</span>
{
this.props.length - 1 === this.props.index ? "" :
this.props.isAdmin() === true ?
(this.props.yslbool === false ?
<a className="fr yslbianji mr30"
style={{
lineHeight: "31px",
}}
onClick={() => this.Movedown(this.props.id)}
><Tooltip
title="下移"><i
style={{color: "#4CACFF"}}
className=" font-18 iconfont icon-xiangxiayi"></i></Tooltip></a>
:
""
)
: ""
}
{
this.props.index === 0 ? "" :
this.props.isAdmin() === true ?
(this.props.yslbool === false ?
<a className="fr yslbianji mr30"
style={{
lineHeight: "31px",
}}
onClick={() => this.Moveupward(this.props.id)}
><Tooltip
title="上移"><i
style={{color: "#4CACFF"}}
className=" font-18 iconfont icon-xiangshangyi"></i></Tooltip></a>
:
""
)
: ""
}
</div>
<div className="yslclear"></div>
</div>

@ -491,9 +491,12 @@ class Eduinforms extends Component{
:
<div className="edu-back-white ">
{/*公告栏底部*/}
{ informs&&informs.map((item, index) => {
return (
<Bullsubdirectory {...this.state} {...this.props} key={index} index={index} yslbool={yslbool} id={item.id} myname={item.name} mydescription={item.description}
<Bullsubdirectory {...this.state} {...this.props} key={index} index={index}
length={informs.length} yslbool={yslbool} id={item.id}
myname={item.name} mydescription={item.description}
getyslbooltrue={()=>this.getyslbooltrue()}
getyslboolfalse={()=>this.getyslboolfalse()}
getinputdata={()=>this.getinputdata()} ></Bullsubdirectory>
@ -524,4 +527,4 @@ export default Eduinformss;
{/*<div key={index} className="bor-bottom-greyE" >*/}
{/* {item.name===""?"":item.name===undefined?"":item.name===null?"":<div className="ysltitbt"><span >{item.name}</span></div>}*/}
{/* <div id="MakedownHTML" key={index} className={"markdown-body fonttext yslmtopcg yslminHeigth markdownysltext"} dangerouslySetInnerHTML={{__html: markdownToHTML(item.description).replace(/▁/g, "▁▁▁")}}/>*/}
{/*</div>*/}
{/*</div>*/}

@ -62,7 +62,7 @@ class PollDetailTabForthRules extends Component{
this.unitChoose(this.props.rules);
}
if(this.props.flagPageEdit != prevProps.flagPageEdit){
this.setState({flagPageEdit:this.props.flagPageEdit})
this.setState({flagPageEdit: this.props.flagPageEdit})
}
}
componentDidMount=()=>{
@ -107,7 +107,7 @@ class PollDetailTabForthRules extends Component{
//修改发布规则里面的结束时间
changeRuleEndTime=(e,date,index)=>{
let arr=Object.assign({}, this.state.rules[parseInt(index)]);
arr.end_time=handleDateString(date);
if(date!="" && date!=undefined && moment(date,dataformat)>moment() && moment(date,dataformat)>moment(arr.publish_time,dataformat)){
arr.end_flag=""
@ -139,7 +139,7 @@ class PollDetailTabForthRules extends Component{
})
this.props.rulesCheckInfo && this.props.rulesCheckInfo(rules)
}
// changeOpen=(e,index)=>{
// let arr=Object.assign({}, this.state.rules[parseInt(index)]);
// arr.open= true;
@ -168,9 +168,9 @@ class PollDetailTabForthRules extends Component{
rules[index]=arr;
//修改选择分班下拉选项(是否被选中)
//let course_group = this.state.course_group;
this.unitChoose(rules);
this.setState({
rules:rules,
@ -194,8 +194,8 @@ class PollDetailTabForthRules extends Component{
}
});
}
let course_group =this.state.course_group;
let course_group =this.state.course_group;
course_group.forEach(ele=>{
if(arr.indexOf(ele.course_group_id) != -1){
ele.course_choosed = 1
@ -356,10 +356,10 @@ class PollDetailTabForthRules extends Component{
max-width:280px;
}
`}</style>
{
{
rules && rules.length > 0 && rules.map((rule,r)=>{
const courseGroup = rule.course_search !="" ?
const courseGroup = rule.course_search != "" ?
course_group.filter( item => item.course_group_name.indexOf(rule.course_search) != -1)
:course_group
@ -451,19 +451,19 @@ class PollDetailTabForthRules extends Component{
<Tooltip placement="bottom" title={rule.e_timeflag ? this.props.isAdmin()?"截止时间已过,不能再修改":"":""}>
<span>
<DatePicker
showToday={false}
dropdownClassName="hideDisable"
placeholder="请选择截止时间"
locale={locale}
className={rule.end_flag && rule.end_flag !="" ? "noticeTip winput-240-40":"winput-240-40" }
value={rule.end_time && moment(rule.end_time,dataformat)}
onChange={(e, date)=>this.changeRuleEndTime(e, date,r)}
showTime={{ format: 'HH:mm' }}
format="YYYY-MM-DD HH:mm"
disabledTime={disabledDateTime}
showToday={false}
dropdownClassName="hideDisable"
placeholder="请选择截止时间"
locale={locale}
className={rule.end_flag && rule.end_flag !="" ? "noticeTip winput-240-40":"winput-240-40" }
value={rule.end_time && moment(rule.end_time,dataformat)}
onChange={(e, date)=>this.changeRuleEndTime(e, date,r)}
showTime={{ format: 'HH:mm' }}
format="YYYY-MM-DD HH:mm"
disabledTime={disabledDateTime}
disabledDate={disabledDate}
disabled={ rule.e_timeflag ===undefined?rule.publish_time===null?false:!flagPageEdit:rule.e_timeflag == true ? true : !flagPageEdit}
style={{"height":"42px"}}
disabled={rule.e_timeflag === undefined ? rule.publish_time === null ? false : moment(rule.end_time, dataformat) <= moment() ? true : !flagPageEdit : rule.e_timeflag == true ? true : !flagPageEdit}
style={{"height":"42px"}}
></DatePicker>
</span>
</Tooltip>
@ -480,7 +480,7 @@ class PollDetailTabForthRules extends Component{
<a className="mr20" onClick={()=>this.removeRules(`${r}`)}><i className="iconfont icon-shanchu color-grey-9 font-18"></i></a>
</Tooltip>
:"":
r > 0 && rule.p_timeflag == false ?
r > 0 && rule.p_timeflag == false ?
<Tooltip title="删除">
<a className="mr20" onClick={()=>this.removeRules(`${r}`)}><i className="iconfont icon-shanchu color-grey-9 font-18"></i></a>
</Tooltip>
@ -490,13 +490,13 @@ class PollDetailTabForthRules extends Component{
</li>
:""
}
</div>
</div>
)
})
})
}
</div>
)
}
}
export default PollDetailTabForthRules;
export default PollDetailTabForthRules;

@ -26,6 +26,7 @@ import '../css/members.css';
import '../css/busyWork.css';
import '../poll/pollStyle.css';
import './Challenges.css';
import {getImageUrl} from 'educoder';
import TraineetraininginformationModal from "./TraineetraininginformationModal";
import DownloadMessageysl from '../../modals/DownloadMessageysl';
@ -189,21 +190,21 @@ class Listofworksstudentone extends Component {
}}>
{record.stduynumber === undefined ?
<span style={{
color: '#9A9A9A',
color: '#000',
textAlign: "center",
width: '145px',
}}>--
</span>
: record.stduynumber === null ?
<span style={{
color: '#9A9A9A',
color: '#000',
textAlign: "center",
width: '145px',
}}>--
</span>
: record.stduynumber === "" ?
<span style={{
color: '#9A9A9A',
color: '#000',
textAlign: "center",
width: '145px',
}}>--
@ -213,7 +214,7 @@ class Listofworksstudentone extends Component {
title={record.stduynumber}
className="maxnamewidth145"
style={{
color: '#9A9A9A',
color: '#000',
textAlign: "center",
width: '145px',
}}>{
@ -293,7 +294,7 @@ class Listofworksstudentone extends Component {
计算规则:<br/>
学员离开实训学习界面停止计时<br/>
评测首次通过之后停止计时<br/>
</pre>}><img src={getImageUrl("images/educoder/problem.png")}/></Tooltip></span>,
</pre>}><img src={getImageUrl("images/educoder/problem.png")} className={"ml2"}/></Tooltip></span>,
dataIndex: 'cost_time',
key: 'cost_time',
align: 'center',
@ -308,9 +309,6 @@ class Listofworksstudentone extends Component {
}
}>
{record.cost_time === null ? "--" : record.cost_time === undefined ? "--" : record.cost_time === "--" ? "--" :
<Tooltip placement="bottom" title={<div>
学员在EduCoder做实训花费的时间
</div>}>
<span style={
{
color: '#747A7F',
@ -320,7 +318,6 @@ class Listofworksstudentone extends Component {
}
>{record.cost_time === null ? "--" : record.cost_time === undefined ? "--" : record.cost_time}
</span>
</Tooltip>
}
</span>
)
@ -400,7 +397,7 @@ class Listofworksstudentone extends Component {
学生工作效率= log(实训总得分/实训总耗时)<br/>
学生效率分 = 学生工作效率 / 课堂学生最高<br/>
工作效率 * 分值<br/>
</pre>}><img src={getImageUrl("images/educoder/problem.png")}/></Tooltip></span>,
</pre>}><img src={getImageUrl("images/educoder/problem.png")} className={"ml2"}/></Tooltip></span>,
dataIndex: 'efficiencyscore',
key: 'efficiencyscore',
align: 'center',
@ -562,21 +559,21 @@ class Listofworksstudentone extends Component {
}}>
{record.stduynumber === undefined ?
<span style={{
color: '#9A9A9A',
color: '#000',
textAlign: "center",
width: '145px',
}}>--
</span>
: record.stduynumber === null ?
<span style={{
color: '#9A9A9A',
color: '#000',
textAlign: "center",
width: '145px',
}}>--
</span>
: record.stduynumber === "" ?
<span style={{
color: '#9A9A9A',
color: '#000',
textAlign: "center",
width: '145px',
}}>--
@ -586,7 +583,7 @@ class Listofworksstudentone extends Component {
title={record.stduynumber}
className="maxnamewidth145"
style={{
color: '#9A9A9A',
color: '#000',
textAlign: "center",
width: '145px',
}}>{
@ -666,7 +663,7 @@ class Listofworksstudentone extends Component {
计算规则:<br/>
学员离开实训学习界面停止计时<br/>
评测首次通过之后停止计时<br/>
</pre>}><img src={getImageUrl("images/educoder/problem.png")}/></Tooltip></span>,
</pre>}><img src={getImageUrl("images/educoder/problem.png")} className={"ml2"}/></Tooltip></span>,
dataIndex: 'cost_time',
key: 'cost_time',
align: 'center',
@ -769,7 +766,7 @@ class Listofworksstudentone extends Component {
学生工作效率= log(实训总得分/实训总耗时)<br/>
学生效率分 = 学生工作效率 / 课堂学生最高<br/>
工作效率 * 分值<br/>
</pre>}><img src={getImageUrl("images/educoder/problem.png")}/></Tooltip></span>,
</pre>}><img src={getImageUrl("images/educoder/problem.png")} className={"ml2"}/></Tooltip></span>,
dataIndex: 'efficiencyscore',
key: 'efficiencyscore',
align: 'center',
@ -914,19 +911,19 @@ class Listofworksstudentone extends Component {
<span className="maxnamewidth110">
{record.stduynumber === undefined ?
<span style={{
color: '#9A9A9A',
color: '#000',
textAlign: "center"
}}>--
</span>
: record.stduynumber === null ?
<span style={{
color: '#9A9A9A',
color: '#000',
textAlign: "center"
}}>--
</span>
: record.stduynumber === "" ?
<span style={{
color: '#9A9A9A',
color: '#000',
textAlign: "center"
}}>--
</span>
@ -935,7 +932,7 @@ class Listofworksstudentone extends Component {
title={record.stduynumber}
className="maxnamewidth110"
style={{
color: '#9A9A9A',
color: '#000',
textAlign: "center"
}}>{
record.stduynumber
@ -952,9 +949,9 @@ class Listofworksstudentone extends Component {
key: 'classroom',
dataIndex: 'classroom',
align: 'center',
className: 'font-14',
className: 'font-14 maxnamewidth120',
render: (text, record) => (
<span>
<span className="maxnamewidth120">
{record.classroom === undefined ? <span className="ysltable" style={{
color: '#07111B',
textAlign: "center"
@ -963,7 +960,8 @@ class Listofworksstudentone extends Component {
textAlign: "center"
}}>--</span> : record.classroom === null ?
<span className="ysltable" style={{color: '#07111B', textAlign: "center"}}>--</span> :
<span className="ysltable" style={{color: '#07111B', textAlign: "center"}}>{record.classroom}</span>}
<a className="ysltable maxnamewidth120" title={record.classroom}
style={{color: '#07111B', textAlign: "center"}}>{record.classroom}</a>}
</span>
)
},
@ -990,7 +988,7 @@ class Listofworksstudentone extends Component {
计算规则:<br/>
学员离开实训学习界面停止计时<br/>
评测首次通过之后停止计时<br/>
</pre>}><img src={getImageUrl("images/educoder/problem.png")}/></Tooltip></span>,
</pre>}><img src={getImageUrl("images/educoder/problem.png")} className={"ml2"}/></Tooltip></span>,
dataIndex: 'cost_time',
key: 'cost_time',
align: 'center',
@ -1085,7 +1083,7 @@ class Listofworksstudentone extends Component {
学生工作效率= log(实训总得分/实训总耗时)<br/>
学生效率分 = 学生工作效率 / 课堂学生最高<br/>
工作效率 * 分值<br/>
</pre>}><img src={getImageUrl("images/educoder/problem.png")}/></Tooltip></span>,
</pre>}><img src={getImageUrl("images/educoder/problem.png")} className={"ml2"}/></Tooltip></span>,
dataIndex: 'efficiencyscore',
key: 'efficiencyscore',
align: 'center',
@ -1214,13 +1212,13 @@ class Listofworksstudentone extends Component {
className: 'font-14',
render: (text, record) => (
record.submitstate === "未提交" ?
<span style={{color: "#9A9A9A"}}>
--
</span> :
<a style={{textAlign: "center"}} className="color-blue"
onMouseDown={(e) => this.Viewstudenttraininginformationtysl2(e, record)}
onClick={() => this.Viewstudenttraininginformationt(record)}>评阅</a> :
<span>
<a style={{textAlign: "center"}} className="color-blue"
<a style={{textAlign: "center"}} className="color-blue maxnamewidth120"
onMouseDown={(e) => this.Viewstudenttraininginformationtysl2(e, record)}
onClick={() => this.Viewstudenttraininginformationt(record)}>查看</a>
onClick={() => this.Viewstudenttraininginformationt(record)}>评阅</a>
</span>
)
},
@ -1261,19 +1259,19 @@ class Listofworksstudentone extends Component {
<span className="maxnamewidth110">
{record.stduynumber === undefined ?
<span style={{
color: '#9A9A9A',
color: '#000',
"text-align": "center"
}}>--
</span>
: record.stduynumber === null ?
<span style={{
color: '#9A9A9A',
color: '#000',
"text-align": "center"
}}>--
</span>
: record.stduynumber === "" ?
<span style={{
color: '#9A9A9A',
color: '#000',
"text-align": "center"
}}>--
</span>
@ -1282,7 +1280,7 @@ class Listofworksstudentone extends Component {
title={record.stduynumber}
className="maxnamewidth110"
style={{
color: '#9A9A9A',
color: '#000',
textAlign: "center"
}}>{
record.stduynumber
@ -1299,9 +1297,9 @@ class Listofworksstudentone extends Component {
key: 'classroom',
dataIndex: 'classroom',
align: 'center',
className: 'font-14',
className: 'font-14 maxnamewidth120',
render: (text, record) => (
<span>
<span className="maxnamewidth120">
{record.classroom === undefined ? <span className="ysltable" style={{
color: '#07111B',
textAlign: "center"
@ -1309,8 +1307,9 @@ class Listofworksstudentone extends Component {
color: '#07111B',
textAlign: "center"
}}>--</span> : record.classroom === null ?
<span className="ysltable" style={{color: '#07111B', textAlign: "center"}}>--</span> :
<span className="ysltable" style={{color: '#07111B', textAlign: "center"}}>{record.classroom}</span>}
<span className="ysltable " style={{color: '#07111B', textAlign: "center"}}>--</span> :
<a className="ysltable maxnamewidth120" title={record.classroom}
style={{color: '#07111B', textAlign: "center"}}>{record.classroom}</a>}
</span>
)
},
@ -1347,7 +1346,7 @@ class Listofworksstudentone extends Component {
计算规则:<br/>
学员离开实训学习界面停止计时<br/>
评测首次通过之后停止计时<br/>
</pre>}><img src={getImageUrl("images/educoder/problem.png")}/></Tooltip></span>,
</pre>}><img src={getImageUrl("images/educoder/problem.png")} className={"ml2"}/></Tooltip></span>,
dataIndex: 'cost_time',
key: 'cost_time',
align: 'center',
@ -1360,9 +1359,6 @@ class Listofworksstudentone extends Component {
}
}>
{record.cost_time === null ? "--" : record.cost_time === undefined ? "--" : record.cost_time === "--" ? "--" :
<Tooltip placement="bottom" title={<div>
学员在EduCoder做实训花费的时间
</div>}>
<a style={
{
color: '#747A7F',
@ -1371,7 +1367,6 @@ class Listofworksstudentone extends Component {
}
>{record.cost_time === null ? "--" : record.cost_time === undefined ? "--" : record.cost_time}
</a>
</Tooltip>
}
</span>
)
@ -1425,7 +1420,7 @@ class Listofworksstudentone extends Component {
学生工作效率= log(实训总得分/实训总耗时)<br/>
学生效率分 = 学生工作效率 / 课堂学生最高<br/>
工作效率 * 分值<br/>
</pre>}><img src={getImageUrl("images/educoder/problem.png")}/></Tooltip></span>,
</pre>}><img src={getImageUrl("images/educoder/problem.png")} className={"ml2"}/></Tooltip></span>,
dataIndex: 'efficiencyscore',
key: 'efficiencyscore',
align: 'center',
@ -1554,13 +1549,13 @@ class Listofworksstudentone extends Component {
className: 'font-14',
render: (text, record) => (
record.submitstate === "未提交" ?
<span style={{color: "#9A9A9A"}}>
--
</span> :
<a style={{textAlign: "center"}} className="color-blue"
onMouseDown={(e) => this.Viewstudenttraininginformationtysl2(e, record)}
onClick={() => this.Viewstudenttraininginformationt(record)}>评阅</a> :
<span>
<a style={{textAlign: "center"}} className="color-blue"
onMouseDown={(e) => this.Viewstudenttraininginformationtysl2(e, record)}
onClick={() => this.Viewstudenttraininginformationt(record)}>{record.operating}</a>
onClick={() => this.Viewstudenttraininginformationt(record)}>评阅</a>
</span>
)
},
@ -1873,6 +1868,10 @@ class Listofworksstudentone extends Component {
if (item.title === "关卡得分") {
continue
}
if (item.key === "efficiencyscore") {
continue
}
if (item.title === "效率分") {
continue
}
@ -1886,6 +1885,10 @@ class Listofworksstudentone extends Component {
}
} else {
if (work_efficiency === false) {
if (item.key === "efficiencyscore") {
continue
}
if (item.title === "关卡得分") {
continue
} else if (item.title === "效率分") {
@ -1907,6 +1910,10 @@ class Listofworksstudentone extends Component {
if (item.title === "关卡得分") {
continue
}
if (item.key === "efficiencyscore") {
continue
}
if (item.title === "效率分") {
continue
}
@ -1920,6 +1927,10 @@ class Listofworksstudentone extends Component {
}
} else {
if (work_efficiency === false) {
if (item.key === "efficiencyscore") {
continue
}
if (item.title === "关卡得分") {
continue
} else if (item.title === "效率分") {
@ -2057,6 +2068,10 @@ class Listofworksstudentone extends Component {
if (item.title === "关卡得分") {
continue
}
if (item.key === "efficiencyscore") {
continue
}
if (item.title === "效率分") {
continue
}
@ -2070,6 +2085,10 @@ class Listofworksstudentone extends Component {
}
} else {
if (this.state.work_efficiency === false) {
if (item.key === "efficiencyscore") {
continue
}
if (item.title === "关卡得分") {
continue
} else if (item.title === "效率分") {
@ -2092,6 +2111,10 @@ class Listofworksstudentone extends Component {
if (item.title === "关卡得分") {
continue
}
if (item.key === "efficiencyscore") {
continue
}
if (item.title === "效率分") {
continue
}
@ -2105,6 +2128,10 @@ class Listofworksstudentone extends Component {
}
} else {
if (this.state.work_efficiency === false) {
if (item.key === "efficiencyscore") {
continue
}
if (item.title === "关卡得分") {
continue
} else if (item.title === "效率分") {
@ -2481,7 +2508,7 @@ class Listofworksstudentone extends Component {
}
// 设置数据
// 设置数据 老师列表数据处理
seacthdatat = (teacherdata, student_works, work_efficiency, course_group_info) => {
let {page, limit} = this.state;
@ -2527,6 +2554,7 @@ class Listofworksstudentone extends Component {
// pageSize: 20, //一页显示几条
// current: page,
// }
if (work_efficiency === false) {
if (JSON.stringify(course_group_info) === "[]" || course_group_info === undefined || course_group_info === null) {
//这里没有分班 没有 关卡得分 没有效率分
@ -2539,9 +2567,15 @@ class Listofworksstudentone extends Component {
if (item.title === "关卡得分") {
continue
}
if (item.title === "效率分") {
continue
}
if (item.key === "efficiencyscore") {
continue
}
if (item.title === "当前成绩") {
continue
}
@ -2557,6 +2591,10 @@ class Listofworksstudentone extends Component {
if (item.title === "关卡得分") {
continue
}
if (item.key === "efficiencyscore") {
continue
}
if (item.title === "效率分") {
continue
} else {
@ -2580,6 +2618,10 @@ class Listofworksstudentone extends Component {
if (item.title === "效率分") {
continue
}
if (item.key === "efficiencyscore") {
continue
}
if (item.title === "当前成绩") {
continue
}
@ -2595,6 +2637,10 @@ class Listofworksstudentone extends Component {
if (item.title === "关卡得分") {
continue
}
if (item.key === "efficiencyscore") {
continue
}
if (item.title === "效率分") {
continue
} else {
@ -2613,6 +2659,10 @@ class Listofworksstudentone extends Component {
if (item.title === "关卡得分") {
continue
}
if (item.key === "efficiencyscore") {
continue
}
if (item.title === "效率分") {
continue
}
@ -2628,6 +2678,10 @@ class Listofworksstudentone extends Component {
if (item.title === "关卡得分") {
continue
}
if (item.key === "efficiencyscore") {
continue
}
if (item.title === "效率分") {
continue
} else {
@ -2650,6 +2704,10 @@ class Listofworksstudentone extends Component {
if (item.title === "关卡得分") {
continue
}
if (item.key === "efficiencyscore") {
continue
}
if (item.title === "效率分") {
continue
}
@ -2682,6 +2740,10 @@ class Listofworksstudentone extends Component {
if (item.title === "关卡得分") {
continue
}
if (item.key === "efficiencyscore") {
continue
}
if (item.title === "效率分") {
continue
}

@ -37,6 +37,7 @@ class ShixunWorkReport extends Component {
showAppraiseModaltype:false,
work_comment_hidden:undefined,
work_comment:undefined,
has_commit: false,
}
}
@ -111,7 +112,8 @@ class ShixunWorkReport extends Component {
data:result.data,
work_comment_hidden:result.data.work_comment_hidden,
work_comment:result.data.work_comment,
spinning:false
spinning: false,
has_commit: result.data.has_commit
})
}
@ -303,7 +305,7 @@ class ShixunWorkReport extends Component {
}
render() {
let{data,showAppraiseModaltype,work_comment_hidden,work_comment} =this.state;
let {data, showAppraiseModaltype, work_comment_hidden, work_comment, has_commit} = this.state;
let category_id=data===undefined?"":data.category===null?"":data.category.category_id;
let homework_common_id=data===undefined?"":data.homework_common_id;
@ -557,22 +559,24 @@ class ShixunWorkReport extends Component {
showAppraiseModal={(type,id,show,hidden)=>this.showAppraiseModal(type,id,show,hidden)}
/>
{
has_commit === false ? "" :
<div>
<div className="stud-class-set bor-bottom-greyE mt17">
<div className="clearfix edu-back-white poll_list">
<div className="font-16 color-dark-21 shixunreporttitle ml20 pd20">图形统计</div>
<Shixunechart
data={data}
/>
</div>
</div>
<div className="stud-class-set bor-bottom-greyE mt17">
<div className="clearfix edu-back-white poll_list">
<div className="font-16 color-dark-21 shixunreporttitle ml20 pd20">图形统计</div>
<Shixunechart
data={data}
/>
</div>
</div>
<div className="stud-class-set bor-bottom-greyE">
<div className="stud-class-set bor-bottom-greyE">
<div className="clearfix edu-back-white poll_list pad40px">
<div className="font-16 color-dark-21 shixunreporttitle ml20 pd20">实训详情</div>
<style>
{`
<div className="clearfix edu-back-white poll_list pad40px">
<div className="font-16 color-dark-21 shixunreporttitle ml20 pd20">实训详情</div>
<style>
{`
.poll_list a{
padding:0px !important;
}
@ -580,63 +584,67 @@ class ShixunWorkReport extends Component {
background: #4CACFF;
}
`}
</style>
{
data&&data.shixun_detail===undefined?"":data.shixun_detail.map((item,key)=>{
return(
<div id={"id"+item.position} key={key} className={"mb20"}>
<div className="font-16 color-dark-21 ml20 mr20">
<p className="clearfix mb20">
</style>
{
data && data.shixun_detail === undefined ? "" : data.shixun_detail.map((item, key) => {
return (
<div id={"id" + item.position} key={key} className={"mb20"}>
<div className="font-16 color-dark-21 ml20 mr20">
<p className="clearfix mb20">
<span className="panel-inner-icon mr15 fl mt3 backgroud4CACFF">
<i className="fa fa-code font-16 color_white"></i>
</span>
<span className="fl mt3 font-14">
<span className="fl mt3 font-14">
<span className="font-bd mr15">{item.position}</span>
<Link to={/tasks/+item.game_identifier} >
<span className={"font-14"}>{item.subject}</span>
</Link>
</span>
</p>
<Coursesshixundetails
data={item.outputs}
/>
</div>
{item.st===0?item.passed_code===null?"":<div className="font-16 color-dark-21 ml20 mr20">
<div className="bor-grey-e mt15">
<p className="clearfix pt5 pb5 pl15 pr15 back-f6-grey codebox">
<span className="fl">最近通过的代码</span>
<span className="fr codeboxright">{item.path}</span>
</p>
<div className="test-code bor-top-greyE">
<li className="clearfix">
<CodeMirror
value={item.passed_code}
options={{
// mode: 'xml',
theme: 'default',
lineNumbers: true,
// extraKeys: {"Ctrl-Q": "autocomplete"}, // 快捷键
indentUnit: 4, //代码缩进为一个tab的距离
matchBrackets: true,
autoRefresh: true,
smartIndent: true,//智能换行
styleActiveLine: true,
lint: true,
readOnly: "nocursor"
}}
</p>
<Coursesshixundetails
data={item.outputs}
/>
</li>
</div>
{item.st === 0 ? item.passed_code === null ? "" :
<div className="font-16 color-dark-21 ml20 mr20">
<div className="bor-grey-e mt15">
<p className="clearfix pt5 pb5 pl15 pr15 back-f6-grey codebox">
<span className="fl">最近通过的代码</span>
<span className="fr codeboxright">{item.path}</span>
</p>
<div className="test-code bor-top-greyE">
<li className="clearfix">
<CodeMirror
value={item.passed_code}
options={{
// mode: 'xml',
theme: 'default',
lineNumbers: true,
// extraKeys: {"Ctrl-Q": "autocomplete"}, // 快捷键
indentUnit: 4, //代码缩进为一个tab的距离
matchBrackets: true,
autoRefresh: true,
smartIndent: true,//智能换行
styleActiveLine: true,
lint: true,
readOnly: "nocursor"
}}
/>
</li>
</div>
</div>
</div> : ""}
</div>
</div>
</div>:""}
</div>
)
})
}
</div>
</div>
)
})
}
</div>
</div>
</div>
}
</div>
</div>

@ -87,7 +87,7 @@ function startechart(data){
{
name:'',
type:'scatter',
data:data.echart_data===undefined?"":data.echart_data.efficiency_list,
data: data.echart_data === undefined || data.echart_data === null ? "" : data.echart_data.efficiency_list,
itemStyle:{
normal:{color:'#2e65ad'}
},
@ -113,9 +113,9 @@ function startechart(data){
data : [
{
name: data===undefined?"":data.username,
xAxis:data.echart_data===undefined?"":data.echart_data.myself_eff[0],
yAxis:data.echart_data===undefined?"":data.echart_data.myself_eff[1],
value:data.echart_data===undefined?"":data.echart_data.myself_eff[1],
xAxis: data.echart_data === undefined || data.echart_data === null ? "" : data.echart_data.myself_eff[0],
yAxis: data.echart_data === undefined || data.echart_data === null ? "" : data.echart_data.myself_eff[1],
value: data.echart_data === undefined || data.echart_data === null ? "" : data.echart_data.myself_eff[1],
}
],
itemStyle: {
@ -148,7 +148,7 @@ function startechart(data){
var ablChart = echarts.init(document.getElementById('shixun_overall_ablility_chart'));
var dataBJ = data.echart_data===undefined?"":data.echart_data.consume_list;
var dataBJ = data.echart_data === undefined || data.echart_data === null ? "" : data.echart_data.consume_list;
var itemStyle = {
@ -196,7 +196,7 @@ function startechart(data){
formatter: function (obj) {
var value = obj.value;
if(obj.name ===data.username){
return "姓名:"+data.username + "<br/>"+'学号: '+data.user_id + "<br/>"+'得分:'+ data.echart_data===undefined?"":data.echart_data.myself_object[1];
return "姓名:" + data.username + "<br/>" + '学号: ' + data.user_id + "<br/>" + '得分:' + data.echart_data === undefined || data.echart_data === null ? "" : data.echart_data.myself_object[1];
}
}
@ -249,9 +249,9 @@ function startechart(data){
data : [
{
name: data===undefined?"":data.username,
xAxis: data.echart_data===undefined?"":data.echart_data.myself_object[0],
yAxis:data.echart_data===undefined?"":data.echart_data.myself_object[1],
value:data.echart_data===undefined?"":data.echart_data.myself_object[1]
xAxis: data.echart_data === undefined || data.echart_data === null ? "" : data.echart_data.myself_object[0],
yAxis: data.echart_data === undefined || data.echart_data === null ? "" : data.echart_data.myself_object[1],
value: data.echart_data === undefined || data.echart_data === null ? "" : data.echart_data.myself_object[1]
}
],
itemStyle: {
@ -375,8 +375,12 @@ class Shixunechart extends Component {
<div className="fl with65" style={{paddingLeft: "5%"}}>
<li className="mt5 mb5">{data&&data.username}</li>
<li className="mt5 mb5">{data===undefined?"--":data.student_id===undefined?"--":data.student_id===null?"--":data.student_id}</li>
<li className="mt5 mb5 color-orange03"><span className="color-orange03">{data&&data.echart_data===undefined?"":data&&data.echart_data.myself_eff[1]}</span></li>
<li className="mt5 mb5 color-orange03"><span className="color-orange03">{data&&data.echart_data===undefined?"":data&&data.echart_data.myself_eff[0]}</span></li>
<li className="mt5 mb5 color-orange03"><span
className="color-orange03">{data && data.echart_data === undefined || data.echart_data === null ? "" : data && data.echart_data.myself_eff[1]}</span>
</li>
<li className="mt5 mb5 color-orange03"><span
className="color-orange03">{data && data.echart_data === undefined || data.echart_data === null ? "" : data && data.echart_data.myself_eff[0]}</span>
</li>
</div>
</div>
<div className="pr mt20 with100">
@ -401,7 +405,9 @@ class Shixunechart extends Component {
<div className="fl with65" style={{paddingLeft: "5%"}}>
<li className="mt5 mb5">{data&&data.username}</li>
<li className="mt5 mb5">{data===undefined?"--":data.student_id===undefined?"--":data.student_id===null?"--":data.student_id}</li>
<li className="mt5 mb5 color-orange03"><span className="color-orange03">{data&&data.echart_data===undefined?"":data&&data.echart_data.myself_object[1]}</span></li>
<li className="mt5 mb5 color-orange03"><span
className="color-orange03">{data && data.echart_data === undefined || data.echart_data === null ? "" : data && data.echart_data.myself_object[1]}</span>
</li>
</div>
</div>
<div className="popup_tip_box fontGrey2 with100 disc mt20"
@ -425,4 +431,4 @@ class Shixunechart extends Component {
}
}
export default Shixunechart;
export default Shixunechart;

@ -51,6 +51,14 @@
white-space:nowrap;
cursor: default;
}
.maxnamewidth120 {
max-width: 120px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
cursor: default;
}
.maxnamewidth200{
max-width: 200px;
overflow:hidden;

@ -151,3 +151,11 @@
.textcenter{
text-align: center;
}
.zindextest {
z-index: 1000 !important;
}
.MuiModal-root-15 {
z-index: 1000 !important;
}

@ -476,10 +476,28 @@ class LoginDialog extends Component {
if (response.data.status === 402) {
// window.location.href = response.data.url;
}else if (response.data.status === -2) {
notification.open({
message: '提示',
description:response.data.message,
});
if (response.data.message === "登录密码出错已达上限,账号已被锁定, 请10分钟后重新登录或找回密码") {
const messge = (
<div>
<p>
登录密码出错已达上限账号已被锁定
</p>
<p className="mt10">
请10分钟后重新登录或<a href={'/changepassword'} style={{
textDecoration: "underline",
color: "#4CACFF",
}}>找回密码</a>
</p>
</div>
)
this.openNotifications(messge);
} else {
notification.open({
message: '提示',
description: response.data.message,
duration: 5,
});
}
}else{
@ -529,6 +547,17 @@ class LoginDialog extends Component {
weixinlogin:true
})
}
openNotifications = (btn) => {
// type 1 成功提示绿色 2提醒颜色黄色 3错误提示红色
notification.open({
message: "提示",
description: btn,
duration: 5,
onClick: () => {
},
});
}
openqqlogin=()=>{
this.setState({
qqlogin:true
@ -543,13 +572,17 @@ class LoginDialog extends Component {
`https://xui.ptlogin2.qq.com/cgi-bin/xlogin?appid=716027609&pt_3rd_aid=101508858&daid=383&pt_skey_valid=0&style=35&s_url=http%3A%2F%2Fconnect.qq.com&refer_cgi=authorize&which=&client_id=101508858&response_type=code&scope=get_user_info&redirect_uri=https%3a%2f%2ftest-newweb.educoder.net%2fotherloginqq&response_type=code`
)
}
getTContainer = () => {
return document.body;
}
hideweixinlogin=()=>{
this.setState({
weixinlogin:false,
qqlogin:false
})
}
render() {
let{qqlogin,login,isGoing,isGoingValue,disabled,bottonclass,Phonenumberisnotco,
dialogBox, isRender,weixinlogin}=this.state;
@ -560,9 +593,10 @@ class LoginDialog extends Component {
// console.log(this.props)
return (
<Dialog open={true} id="DialogID"
className="zindextest"
style={{ display: isRender==false? 'none' : ''}}
disableEscapeKeyDown={true}
disableBackdropClick={true}
disableEscapeKeyDown={true}
disableBackdropClick={true}
onClose={() => this.handleDialogClose()}
>
<Notcompletedysl
@ -605,27 +639,37 @@ class LoginDialog extends Component {
<input name="back_url" type="hidden" value={this.back_url}></input>
<input
type="text"
className="input-100-45 mt20"
id="name_loggin_input"
ref="loginPassText"
onInput={this.loginChange}
onBlur={(e) => this.inputOnBlur(e, 1)}
value={this.state.loginValue}
name="username"
placeholder="请输入有效的手机号/邮箱号" ></input>
type="text"
className="input-100-45 mt20"
id="name_loggin_input"
ref="loginPassText"
onInput={this.loginChange}
onBlur={(e) => this.inputOnBlur(e, 1)}
onPressEnter={disabled === false ?
this.loginEDU : () => {
}
// console.log(1)
}
value={this.state.loginValue}
name="username"
placeholder="请输入有效的手机号/邮箱号" ></input>
<div style={{height: '25px'}}><p className="color-orange edu-txt-left none" id="username_error_notice"
style={{display: Phonenumberisnotco===undefined?'none':'block'}}>{Phonenumberisnotco}</p></div>
<div>
<input type="password" id="password_loggin_input"
name="password"
ref="passwordText"
onInput={this.passwordChange}
onKeyDown={this.onKeydowns}
className="input-100-45 mt5"
placeholder="密码" >
name="password"
ref="passwordText"
onInput={this.passwordChange}
onKeyDown={this.onKeydowns}
className="input-100-45 mt5"
onPressEnter={disabled === false ?
this.loginEDU : () => {
}
// console.log(1)
}
placeholder="密码" >
</input>
<div style={{height: '25px'}}>
<p className="color-orange edu-txt-left none" id="password_error_notice">
@ -662,7 +706,8 @@ class LoginDialog extends Component {
</span>
<span className="fr">
<a onClick={(url)=>this.getloginurl("/changepassword")} className="mr3 color-grey-9">忘记密码</a><em className="vertical-line"></em>
<a onClick={(url) => this.getloginurl("/changepassword")}
className="mr3 color-grey-9">找回密码</a><em className="vertical-line"></em>
<a onClick={(url)=>this.getloginurl("/register")} className="color-grey-9">注册</a>
</span>
@ -700,7 +745,7 @@ class LoginDialog extends Component {
frameBorder="0"
sandbox="allow-scripts allow-same-origin allow-top-navigation"
scrolling="no"
src={`https://open.weixin.qq.com/connect/qrconnect?appid=wx6b119e2d829c13fa&redirect_uri=https%3a%2f%2f${window.location.host}%2fotherloginstart&response_type=code&scope=snsapi_login#wechat_redirect`}></iframe>:""}
src={`https://open.weixin.qq.com/connect/qrconnect?appid=wx6b119e2d829c13fa&redirect_uri=https%3a%2f%2fwww.educoder.net%2fotherloginstart&response_type=code&scope=snsapi_login&state=null,${window.location.host}#wechat_redirect`}></iframe>:""}
{weixinlogin===true?<p className="clearfix ">

@ -8,10 +8,12 @@ class Otherloginstart extends Component {
componentDidMount() {
let query=this.props.location.search;
debugger
if(query!= ""){
const type = query.split('?code=');
const types = type[1].split('&state=');
const typeshref = types[1].split(',');
let codeurl = `/auth/wechat/callback.json`
axios.get(codeurl,{params:{
code:types[0]
@ -19,13 +21,13 @@ class Otherloginstart extends Component {
if(result){
if(result.data.status===0){
if(result.data.new_user===true){
window.location.href="/otherlogin?type=wechat"
window.location.href=`https://${typeshref[1]}/otherlogin?type=wechat`;
}else{
// this.getinfo()
if(types[1]==="account"){
window.location.href="/account/binding"
if(typeshref[1]==="account"){
window.location.href=`https://${typeshref[1]}/account/binding`;
}else{
window.location.href="/"
window.location.href=`https://${typeshref[1]}`;
}
}

@ -42,6 +42,9 @@
font-weight:400;
color:rgba(5,16,26,1);
line-height:24px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.ant-input::-webkit-input-placeholder{

@ -39,14 +39,16 @@ class Osshackathon extends Component {
search:search,
}}).then((result)=>{
if(result.status==200){
console.log(result)
this.setState({
data:result.data,
spinning:false
})
}else{
this.setState({
spinning:false
})
}
}).catch((error)=>{
console.log(error);
this.setState({
spinning:true
})
@ -70,11 +72,16 @@ class Osshackathon extends Component {
}
PaginationTask=(pageNumber)=>{
this.setState({
page:pageNumber
})
let {page,limit,search}=this.state;
this.getosshackathon(pageNumber,limit,search)
let {hackathonedit}=this.state;
if(hackathonedit===true){
this.props.showNotification(`请先保存或者关闭编辑状态`);
}else {
this.setState({
page: pageNumber
})
let {page, limit, search} = this.state;
this.getosshackathon(pageNumber, limit, search)
}
}
hackathonedit=(id)=>{
@ -92,6 +99,15 @@ class Osshackathon extends Component {
Signupentry=(id)=>{
// 用户报名
if(this.props.checkIfLogin()===false){
this.props.showLoginDialog()
return
}
if(this.props.checkIfProfileCompleted()===false){
this.props.showProfileCompleteDialog()
return
}
this.props.confirm({
content: `是否确认报名?`,
onOk: () => {
@ -115,23 +131,29 @@ class Osshackathon extends Component {
}
editSignupentry=(id,name,description)=>{
// 管理员编辑项目
this.setState({
Osshackathonmodeltype:true
})
if(id===undefined){
this.setState({
modelid:undefined,
modelname:undefined,
modeldescription:undefined
})
let {hackathonedit}=this.state;
if(hackathonedit===true){
this.props.showNotification(`请先保存或者关闭编辑状态`);
}else{
this.setState({
modelid:id,
modelname:name,
modeldescription:description
})
// 管理员编辑项目
this.setState({
Osshackathonmodeltype:true
})
if(id===undefined){
this.setState({
modelid:undefined,
modelname:undefined,
modeldescription:undefined
})
}else{
this.setState({
modelid:id,
modelname:name,
modeldescription:description
})
}
}
}
hideeditSignupentry=(id)=>{
@ -144,12 +166,17 @@ class Osshackathon extends Component {
delSignupentry=(id)=>{
// 管理员删除项目
this.props.confirm({
content: `是否确认删除该项目?`,
onOk: () => {
this.delSignupentrys(id)
}
})
let {hackathonedit}=this.state;
if(hackathonedit===true){
this.props.showNotification(`请先保存或者关闭编辑状态`);
}else {
this.props.confirm({
content: `是否确认删除该项目?`,
onOk: () => {
this.delSignupentrys(id)
}
})
}
}
delSignupentrys=(id)=>{
let url=`/osshackathon/${id}.json`;
@ -157,7 +184,7 @@ class Osshackathon extends Component {
.then((response) => {
if (response.data.status == 0) {
// {"status":1,"message":"删除成功"}
this.getosshackathonlist()
this.getosshackathonlist();
this.props.showNotification(`删除成功`);
}
})
@ -169,11 +196,20 @@ class Osshackathon extends Component {
onsearchvalue=(value)=>{
this.setState({
search:value
})
let {page,limit,search}=this.state;
this.getosshackathon(page,limit,value)
let {hackathonedit}=this.state;
if(hackathonedit===true){
this.props.showNotification(`请先保存或者关闭编辑状态`);
}else {
this.setState({
search:value
})
if(value.length>300){
this.props.showNotification(`搜索字数大于300个字`);
}
let {page,limit,search}=this.state;
this.getosshackathon(page,limit,value)
}
}
onsetsearchvalue=(e)=>{
@ -226,7 +262,7 @@ class Osshackathon extends Component {
<Col span={3} className={"fr textright"}>
<div>
报名整<span className={"color-red"}>{data&&data.hackathon.hackathon_users_count}</span>
报名总<span className={"color-red"}>{data&&data.hackathon.hackathon_users_count}</span>
</div>
</Col>
@ -280,7 +316,7 @@ class Osshackathon extends Component {
return(
<Card className={"OsshackathonCard mb20"} key={key}>
<Row>
<Col span={6} className={"OsshackathonCardtitle"}>
<Col span={20} className={"OsshackathonCardtitle"}>
{item.name}
</Col>
@ -319,7 +355,7 @@ class Osshackathon extends Component {
return(
<Card className={"OsshackathonCard mb20"}>
<Row>
<Col span={6} className={"OsshackathonCardtitle"}>
<Col span={20} className={"OsshackathonCardtitle"}>
{item.name}
</Col>
<Col span={4} className={"fr textcenter width14bai"}>
@ -346,7 +382,7 @@ class Osshackathon extends Component {
</Row>
</div>
</Col>
<Col span={18} pull={6} className={"minheight50px "}>
<Col span={18} pull={6} className={"minheight50px ml5"}>
{item.description}
</Col>
</Row>

@ -100,7 +100,7 @@ class Osshackathonmodel extends Component{
render() {
let {textareavaltype}=this.state;
// console.log(this.props.tabkey)
console.log(this.props.Osshackathonmodeltype)
// console.log(this.props.Osshackathonmodeltype)
return (
<div>
@ -139,7 +139,7 @@ class Osshackathonmodel extends Component{
<Modal
keyboard={false}
className={"HomeworkModal"}
title={"新建项目"}
title={this.props.modelid===undefined?"新建项目":"编辑项目"}
visible={this.props.Osshackathonmodeltype}
closable={false}
footer={null}
@ -197,7 +197,7 @@ class Osshackathonmodel extends Component{
placeholder={"请输入项目描述"}
onInput={(e)=>this.Textarea_comment(e)}
value={this.state.Textarea_comment}
maxlength={500}
maxlength={250}
/>
<li style={{height:"20px",lineHeight:"20px"}} className={textareavaltype===true?"color-red mt20 mb10":"none"}><span>评阅内容至少有一个不为空</span></li>

@ -1227,8 +1227,10 @@ submittojoinclass=(value)=>{
<li><a href="/admins">后台管理</a></li>
}
<li><a href={`/account/profile`}>账号管理</a></li>
<li><a href={`/account/profile`}>账号管理</a></li>
{/*<li><a onClick={()=>this.educoderlogin()} >登入测试接口</a></li>*/}
{/*<li><a onClick={()=>this.trialapplications()} >试用申请</a> </li>*/}
{/*<li><Link to={`/interest`}>兴趣页</Link></li>*/}
<li className="bor-top-greyE">

@ -184,7 +184,17 @@ class LoginRegisterComponent extends Component {
message: "提示",
description: messge,
onClick: () => {
console.log('Notification Clicked!');
console.log('Notification Clicked12312313123!');
},
});
}
openNotifications = (btn) => {
// type 1 成功提示绿色 2提醒颜色黄色 3错误提示红色
notification.open({
message: "提示",
description: btn,
onClick: () => {
},
});
}
@ -369,8 +379,23 @@ class LoginRegisterComponent extends Component {
})
return;
}
else {
} else if (response.data.message === "登录密码出错已达上限,账号已被锁定, 请10分钟后重新登录或找回密码") {
const messge = (
<div>
<p>
登录密码出错已达上限账号已被锁定
</p>
<p className="mt10">
请10分钟后重新登录或<a href={'/changepassword'} style={{
textDecoration: "underline",
color: "#4CACFF",
}}>找回密码</a>
</p>
</div>
)
this.openNotifications(messge);
return;
} else {
this.openNotification(response.data.message);
return;
}
@ -1012,7 +1037,9 @@ class LoginRegisterComponent extends Component {
name="username"
className={Phonenumberisnotco && Phonenumberisnotco !== "" ?" color-grey-9 loginInputzhucheyslass bor-reds":" color-grey-9 loginInputzhuche"}
onBlur={(e) => this.inputOnBlur(e, 1)}
style={{marginTop: '30px', height: '38px'}}></Input>
style={{marginTop: '30px', height: '38px'}}
onPressEnter={() => this.postLogin()}
></Input>
{
Phonenumberisnotco && Phonenumberisnotco != "" ?
@ -1022,8 +1049,9 @@ class LoginRegisterComponent extends Component {
: <div style={{height:"25px"}}></div>
}
<Input type="password" name="password" id="password" value={this.state.password}
<Input type="password" name="password" id="password" value={this.state.password}
onChange={this.passwordonChange}
onPressEnter={() => this.postLogin()}
className={Phonenumberisnotcodmm && Phonenumberisnotcodmm !== "" ?" color-grey-9 loginInputzhucheyslass bor-reds":" color-grey-9 loginInputzhuche"}
placeholder="密码"></Input>
{
@ -1265,7 +1293,7 @@ class LoginRegisterComponent extends Component {
frameBorder="0"
sandbox="allow-scripts allow-same-origin allow-top-navigation"
scrolling="no"
src={`https://open.weixin.qq.com/connect/qrconnect?appid=wx6b119e2d829c13fa&redirect_uri=https%3a%2f%2f${window.location.host}%2fotherloginstart&response_type=code&scope=snsapi_login#wechat_redirect`}></iframe>:""}
src={`https://open.weixin.qq.com/connect/qrconnect?appid=wx6b119e2d829c13fa&redirect_uri=https%3a%2f%2fwww.educoder.net%2fotherloginstart&response_type=code&scope=snsapi_login&state=null,${window.location.host}#wechat_redirect`}></iframe>:""}
{weixinlogin===true?<p className="clearfix mb20 textcenter">
<a className={"startlogin color-blue"} onClick={()=>this.hideweixinlogin()}>返回登录注册</a>
</p>:""}

@ -242,7 +242,7 @@ class AccountSecure extends Component {
<Form>
{list.map((item,key)=>{
if(item.en_type!="qq"){
return(
<div className="flexTable" key={key}>
<div className="flexTable">
@ -258,9 +258,9 @@ class AccountSecure extends Component {
<div className="status pt19">
{item.en_type!="qq"?<WordsBtn style={ item.id===null?"blue":"colorgrey9"} className={item.id===null?"borderBottom":""}
onClick={
item.id===null?() => this.showModal("wechat"):() => this.undologin("wechat",item.id)
}
onClick={
item.id===null?() => this.showModal("wechat"):() => this.undologin("wechat",item.id)
}
>{item.id===null?"绑定":"解绑"}</WordsBtn>:<WordsBtn style={ item.id===null?"blue":"colorgrey9"} className={item.id===null?"borderBottom":""}
onClick={
item.id===null?flag===true?() => this.openqqlogin():() => this.openphoneqqlogin():() => this.undologin("qq",item.id)
@ -271,6 +271,7 @@ class AccountSecure extends Component {
</div>
</div>
)
}
})
}
@ -297,7 +298,7 @@ class AccountSecure extends Component {
frameBorder="0"
sandbox="allow-scripts allow-same-origin allow-top-navigation"
scrolling="no"
src={`https://open.weixin.qq.com/connect/qrconnect?appid=wx6b119e2d829c13fa&redirect_uri=https%3a%2f%2f${window.location.host}%2fotherloginstart&response_type=code&scope=snsapi_login&state=account#wechat_redirect`}></iframe>
src={`https://open.weixin.qq.com/connect/qrconnect?appid=wx6b119e2d829c13fa&redirect_uri=https%3a%2f%2fwww.educoder.net%2fotherloginstart&response_type=code&scope=snsapi_login&state=account,${window.location.host}#wechat_redirect`}></iframe>
<p className="clearfix pagemancenter">
<a className={"startlogin color-blue"} onClick={()=>this.handleCancel()}>取消</a>
</p>

@ -200,7 +200,7 @@ class InfosCourse extends Component{
.white-panel li.active {
border-radius: 24px;
border: 0px solid #4CACFF;
border: none !important;
color: #4CACFF;
}

@ -190,7 +190,7 @@ class InfosPackage extends Component{
}
.white-panel li.active {
border-radius: 24px;
border: 0px solid #4CACFF;
border: none !important;
color: #4CACFF;
}

@ -202,7 +202,7 @@ class InfosPath extends Component{
.white-panel li.active {
border-radius: 24px;
border: 0px solid #4CACFF;
border: none !important;
color: #4CACFF;
}

@ -203,7 +203,7 @@ class InfosProject extends Component{
.white-panel li.active {
border-radius: 24px;
border: 0px solid #4CACFF;
border: none !important;
color: #4CACFF;
}

@ -203,7 +203,7 @@ class InfosShixun extends Component{
.white-panel li.active {
border-radius: 24px;
border: 0px solid #4CACFF;
border: none !important;
color: #4CACFF;
}

@ -282,7 +282,7 @@ function InfoVideo (props) {
}
.white-panel li.active {
border-radius: 24px;
border: 0px solid #4CACFF;
border: none !important;
color: #4CACFF;
}
.whitepanelysllisyt {

Loading…
Cancel
Save