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

dev_forum
cxt 6 years ago
commit b55d1514b0

@ -20,28 +20,29 @@ class MyshixunsController < ApplicationController
unless (current_user.admin? || current_user.id == @myshixun.user_id)
tip_exception("403", "")
end
begin
ActiveRecord::Base.transaction do
begin
@shixun = Shixun.select(:id, :identifier).find(@myshixun.shixun_id)
@myshixun.destroy
ActiveRecord::Base.transaction do
begin
@shixun = Shixun.select(:id, :identifier).find(@myshixun.shixun_id)
@myshixun.destroy
StudentWork.where(:myshixun_id => @myshixun.id).update_all(:myshixun_id => 0, :work_status => 0)
# 刪除版本庫
begin
GitService.delete_repository(repo_path: @repo_path)
# 实训在申请发布前,是否玩过实训,如果玩过需要更改记录,防止二次重置
shixun_mod = ShixunModify.where(:shixun_id => @shixun.id, :myshixun_id => @myshixun.id, :status => 1).take
shixun_mod.update_column(:status, 0) if shixun_mod
rescue Exception => e
uid_logger_error("版本库删除异常,详情:#{e.message}")
logger.error("######reset_my_game_failed:#{e.message}")
raise("ActiveRecord::RecordInvalid")
end
StudentWork.where(:myshixun_id => @myshixun.id).update_all(:myshixun_id => 0, :work_status => 0)
# 实训在申请发布前,是否玩过实训,如果玩过需要更改记录,防止二次重置
shixun_mod = ShixunModify.where(:shixun_id => @shixun.id, :myshixun_id => @myshixun.id, :status => 1).take
shixun_mod.update_column(:status, 0) if shixun_mod
rescue Exception => e
uid_logger_error("myshixun reset failed #{e}")
raise ActiveRecord::Rollback
end
# 删除版本库
GitService.delete_repository(repo_path: @repo_path)
rescue Exception => e
if e.message != "ActiveRecord::RecordInvalid"
logger.error("######delete_repository_error:#{e.message}")
end
raise ActiveRecord::Rollback
end
end

@ -513,6 +513,111 @@ class ShixunsController < ApplicationController
# 以前在开启挑战的时候检测实训是否更新更新则重置觉得应该放在TPI更好
# 中间需要一个过渡动画
# TODO: 第一次开启实训都会去判断是否是纯选择题类型,感觉做成在创建关卡的时候就判断该实训是否是纯选择题更加合适
# def shixun_exec
# if is_shixun_opening?
# tip_show_exception(-3, "#{@shixun.opening_time.strftime('%Y-%m-%d %H:%M:%S')}")
# end
# current_myshixun = @shixun.current_myshixun(current_user.id)
#
# min_challenges = @shixun.challenges.pluck(:id , :st)
#
# Rails.logger.info("11111111112#{current_myshixun.try(:id)}")
# Rails.logger.info("111111111102#{params[:reset] != 1}")
#
# # 因为读写分离有延迟所以如果是重置来的请求可以先跳过重置过来的params[:reset]为1
# if current_myshixun && params[:reset] != "1"
# games = current_myshixun.games
# # 如果TPM和TPI的管卡数不相等或者关卡顺序错了说明实训被极大的改动需要重置,实训发布前打过的实训都需要重置
# if is_shixun_reset?(games, min_challenges, current_myshixun)
# # 这里页面弹框要收到 当前用户myshixun的identifier.
# tip_show_exception("/myshixuns/#{current_myshixun.try(:identifier)}/reset_my_game")
# end
#
#
# if current_myshixun.repo_name.nil?
# g = Gitlab.client
# repo_name = g.project(current_myshixun.gpid).try(:path_with_namespace)
# current_myshixun.update_column(:repo_name, repo_name)
# end
#
#
# # 如果存在实训,则直接进入实训
# # 如果实训允许跳关传参params[:challenge_id]跳入具体的关卡
# @current_task =
# if params[:challenge_id]
# game = games.where(challenge_id: params[:challenge_id]).take
# if @shixun.task_pass || game.status != 3
# game
# else
# current_myshixun.current_task(games)
# end
# else
# current_myshixun.current_task(games)
# end
# else
# # 如果未创建关卡一定不能开启实训否则TPI没法找到当前的关卡
# if @shixun.challenges_count == 0
# tip_exception("开启实战前请先创建实训关卡")
# end
#
# # 判断实训是否全为选择题
# is_choice_type = (min_challenges.size == min_challenges.select{|challenge| challenge.last == 1}.count)
# if !is_choice_type
# commit = GitService.commits(repo_path: @repo_path).try(:first)
# uid_logger("First comit########{commit}")
# tip_exception("开启实战前请先在版本库中提交代码") if commit.blank?
# commit_id = commit["id"]
# end
#
# ActiveRecord::Base.transaction do
# begin
# cloud_bridge = edu_setting('cloud_bridge')
# myshixun_identifier = generate_identifier Myshixun, 10
# myshixun = @shixun.myshixuns.create!(user_id: current_user.id, identifier: myshixun_identifier,
# modify_time: @shixun.modify_time, reset_time: @shixun.reset_time,
# onclick_time: Time.now, commit_id: commit_id)
# uid_logger("myshixun_id is #{myshixun.id}")
#
#
# # 其它创建关卡等操作
# challenges = @shixun.challenges
# # 之所以增加user_id是为了方便统计查询性能
# game_attrs = %i[challenge_id myshixun_id status user_id open_time identifier modify_time created_at updated_at]
# Game.bulk_insert(*game_attrs) do |worker|
# base_attr = { myshixun_id: myshixun.id, user_id: myshixun.user_id }
# challenges.each_with_index do |challenge, index|
# status = (index == 0 ? 0 : 3)
# game_identifier = generate_identifier(Game, 12)
# worker.add(base_attr.merge(challenge_id: challenge.id, status: status, open_time: Time.now,
# identifier: game_identifier, modify_time: challenge.modify_time))
# end
# end
#
# # 如果实训是纯选择题则不需要去fork仓库以及中间层的相关操作了
# unless is_choice_type
# # fork仓库
# project_fork(myshixun, @repo_path, current_user.login)
#
# rep_url = Base64.urlsafe_encode64(repo_ip_url @repo_path )
# uid_logger("start openGameInstance")
# uri = "#{cloud_bridge}/bridge/game/openGameInstance"
# logger.info("end openGameInstance")
# params = {tpiID: "#{myshixun.id}", tpmGitURL:rep_url, tpiRepoName: myshixun.repo_name.split("/").last}
# uid_logger("openGameInstance params is #{params}")
# interface_post uri, params, 83, "实训云平台繁忙繁忙等级83"
# end
#
# @current_task = myshixun.current_task(myshixun.games)
# uid_logger("## shixun exec: myshixun id is #{myshixun.id}")
# rescue Exception => e
# uid_logger_error(e.message)
# tip_exception("实训云平台繁忙繁忙等级81")
# raise ActiveRecord::Rollback
# end
# end
# end
# end
def shixun_exec
if is_shixun_opening?
tip_show_exception(-3, "#{@shixun.opening_time.strftime('%Y-%m-%d %H:%M:%S')}")
@ -520,10 +625,6 @@ class ShixunsController < ApplicationController
current_myshixun = @shixun.current_myshixun(current_user.id)
min_challenges = @shixun.challenges.pluck(:id , :st)
Rails.logger.info("11111111112#{current_myshixun.try(:id)}")
Rails.logger.info("111111111102#{params[:reset] != 1}")
# 因为读写分离有延迟所以如果是重置来的请求可以先跳过重置过来的params[:reset]为1
if current_myshixun && params[:reset] != "1"
games = current_myshixun.games
@ -540,7 +641,6 @@ class ShixunsController < ApplicationController
current_myshixun.update_column(:repo_name, repo_name)
end
# 如果存在实训,则直接进入实训
# 如果实训允许跳关传参params[:challenge_id]跳入具体的关卡
@current_task =
@ -569,51 +669,54 @@ class ShixunsController < ApplicationController
commit_id = commit["id"]
end
ActiveRecord::Base.transaction do
begin
cloud_bridge = edu_setting('cloud_bridge')
myshixun_identifier = generate_identifier Myshixun, 10
myshixun = @shixun.myshixuns.create!(user_id: current_user.id, identifier: myshixun_identifier,
modify_time: @shixun.modify_time, reset_time: @shixun.reset_time,
onclick_time: Time.now, commit_id: commit_id)
uid_logger("myshixun_id is #{myshixun.id}")
# 其它创建关卡等操作
challenges = @shixun.challenges
# 之所以增加user_id是为了方便统计查询性能
game_attrs = %i[challenge_id myshixun_id status user_id open_time identifier modify_time created_at updated_at]
Game.bulk_insert(*game_attrs) do |worker|
base_attr = { myshixun_id: myshixun.id, user_id: myshixun.user_id }
challenges.each_with_index do |challenge, index|
status = (index == 0 ? 0 : 3)
game_identifier = generate_identifier(Game, 12)
worker.add(base_attr.merge(challenge_id: challenge.id, status: status, open_time: Time.now,
identifier: game_identifier, modify_time: challenge.modify_time))
begin
ActiveRecord::Base.transaction do
begin
myshixun_identifier = generate_identifier Myshixun, 10
myshixun_params = {user_id: current_user.id, identifier: myshixun_identifier,
modify_time: @shixun.modify_time, reset_time: @shixun.reset_time,
onclick_time: Time.now, commit_id: commit_id}
@myshixun = @shixun.myshixuns.create!(myshixun_params)
# 其它创建关卡等操作
challenges = @shixun.challenges
# 之所以增加user_id是为了方便统计查询性能
game_attrs = %i[challenge_id myshixun_id status user_id open_time identifier modify_time created_at updated_at]
Game.bulk_insert(*game_attrs) do |worker|
base_attr = {myshixun_id: @myshixun.id, user_id: @myshixun.user_id}
challenges.each_with_index do |challenge, index|
status = (index == 0 ? 0 : 3)
game_identifier = generate_identifier(Game, 12)
worker.add(base_attr.merge(challenge_id: challenge.id, status: status, open_time: Time.now,
identifier: game_identifier, modify_time: challenge.modify_time))
end
end
@current_task = @myshixun.current_task(@myshixun.games)
rescue Exception => e
logger.error("------ActiveRecord::RecordInvalid: #{e.message}")
raise("ActiveRecord::RecordInvalid")
end
# 如果实训是纯选择题则不需要去fork仓库以及中间层的相关操作了
end
# 如果实训是纯选择题则不需要去fork仓库以及中间层的相关操作了
ActiveRecord::Base.transaction do
unless is_choice_type
# fork仓库
project_fork(myshixun, @repo_path, current_user.login)
rep_url = Base64.urlsafe_encode64(repo_ip_url @repo_path )
cloud_bridge = edu_setting('cloud_bridge')
project_fork(@myshixun, @repo_path, current_user.login)
rep_url = Base64.urlsafe_encode64(repo_ip_url @repo_path)
uid_logger("start openGameInstance")
uri = "#{cloud_bridge}/bridge/game/openGameInstance"
logger.info("end openGameInstance")
params = {tpiID: "#{myshixun.id}", tpmGitURL:rep_url, tpiRepoName: myshixun.repo_name.split("/").last}
params = {tpiID: "#{@myshixun.id}", tpmGitURL: rep_url, tpiRepoName: @myshixun.repo_name.split("/").last}
uid_logger("openGameInstance params is #{params}")
interface_post uri, params, 83, "实训云平台繁忙繁忙等级83"
end
@current_task = myshixun.current_task(myshixun.games)
uid_logger("## shixun exec: myshixun id is #{myshixun.id}")
rescue Exception => e
uid_logger_error(e.message)
tip_exception("实训云平台繁忙繁忙等级81")
raise ActiveRecord::Rollback
end
rescue Exception => e
if e.message != "ActiveRecord::RecordInvalid"
logger.error("##########project_fork error #{e.message}")
@current_task.destroy!
end
raise ActiveRecord::Rollback
end
end
end

@ -289,7 +289,7 @@ label.infolabel{display: block;float: left;width: 56px;text-align: right;margin-
.shaiTitle{display: block;padding-right: 20px;}
.shaiContent li.shaiItem.active{background-color: #4CACFF!important;color:#fff!important;}
.shaiContent li.shaiItem{padding:3px 15px;float: left;border-radius: 4px;color: #4C4C4C;cursor: pointer;margin-right: 15px;display: block}
.shaiContent li.shaiItem:hover{background-color: #F5F5F5}
.shaiContent li.shaiItem:hover{background-color: #4CACFF!important;color:#fff!important;}
.shaiAllItem{max-width: 1138px;}
.subshaicontent{display: none;box-sizing: border-box;position: absolute;width: 100%;top: 33px;left: 0px;background-color: #fff;box-shadow:0px 1px 4px rgba(76,76,76,0.2);padding:0px 20px;z-index: 99999;border-radius: 4px;max-height: 800px;overflow-y: auto}
.subshaicontent-part{border-bottom: 1px solid #eee;}

@ -37,6 +37,7 @@ if (!$.drag) {
}
else if(lastX > maxWidth - 5 && lastX < maxWidth + 5 ){ //鼠标指针移动距离达到最大时清空事件
dragOk();
}
}
});
@ -91,7 +92,7 @@ class DragValidator extends Component {
const successGreenColor = this.props.successGreenColor || '#29bd8b'
// newMain clearfix
return (
<div id="reg-drag" className={`drag_slider ${className}`}>
<div id="reg-drag" style={{ width:"287px",}} className={`drag_slider ${className}`}>
<style>{`
.drag_slider .handler {
height: 100%;

@ -1,114 +0,0 @@
import React, { Component } from 'react';
const $ = window.jQuery
const jQuery = $;
if (!$.drag) {
(function($){
$.fn.dragValidator = function(options){
var x, drag = this, isMove = false, defaults = {
};
var options = $.extend(defaults, options);
//添加背景,文字,滑块
var html = '<div class="drag_bg"></div>'+
'<div class="drag_text" onselectstart="return false;" unselectable="on">拖动滑块验证</div>'+
'<div class="handler handler_bg"></div>';
this.append(html);
var handler = drag.find('.handler');
var drag_bg = drag.find('.drag_bg');
var text = drag.find('.drag_text');
var maxWidth = text.width() - handler.width(); //能滑动的最大间距
//鼠标按下时候的x轴的位置
handler.mousedown(function(e){
isMove = true;
x = e.pageX - parseInt(handler.css('left'), 10);
});
//鼠标指针在上下文移动时移动距离大于0小于最大间距滑块x轴位置等于鼠标移动距离
$(document).mousemove(function(e){
var _x = e.pageX - x;
var handler_offset = handler.offset();
var lastX = e.clientX -x;
lastX = Math.max(0,Math.min(maxWidth,lastX));
if(isMove){
if(_x > 0 && _x <= maxWidth){
handler.css({'left': lastX});
drag_bg.css({'width': lastX});
}
else if(lastX > maxWidth - 5 && lastX < maxWidth + 5 ){ //鼠标指针移动距离达到最大时清空事件
dragOk();
}
}
});
handler.mouseup(function(e){
isMove = false;
var _x = e.pageX - x;
if(text.text() != '验证通过' && _x < maxWidth){ //鼠标松开时,如果没有达到最大距离位置,滑块就返回初始位置
handler.animate({'left': 0});
drag_bg.animate({'width': 0});
}
});
//清空事件
function dragOk(){
options.dragOkCallback && options.dragOkCallback()
var kuaiwidth=drag.width() - handler.width() - 2;
handler.removeClass('handler_bg').addClass('handler_ok_bg');
handler.css({'left':kuaiwidth+'px'})
text.css({'width':kuaiwidth+'px'});
text.text('验证通过');
drag.css({'color': '#fff'});
drag_bg.css({'width':kuaiwidth+'px'})
handler.unbind('mousedown');
$(document).unbind('mousemove');
$(document).unbind('mouseup');
$("#user_verification_notice").html("");
$('#user_verification_notice').parent().hide();
}
};
})(jQuery);
}
class DragValidator extends Component {
componentDidMount () {
// if($("#reg-drag").length>0 && IsPC()){
$("#reg-drag").dragValidator({
height: this.props.height,
dragOkCallback: () => {
this.props.dragOkCallback && this.props.dragOkCallback()
}
});
// }else{
// $("#reg-drag").empty();
// }
}
empty() {
$("#reg-drag").empty();
}
render() {
const height = this.props.height || 45;
const className = this.props.className
const successGreenColor = this.props.successGreenColor || '#29bd8b'
// newMain clearfix
return (
<div id="reg-drag" className={`drag_slider ${className}`}>
<style>{`
.drag_slider .handler {
height: 100%;
}
.drag_slider {
height: ${height}px;
line-height: ${height}px;
}
.drag_slider .drag_bg {
height: ${height}px;
background-color: ${successGreenColor};
}
`}</style>
</div>
);
}
}
export default ( DragValidator );

@ -239,6 +239,7 @@ class BoardsNew extends Component{
render() {
let { addGroup, fileList, course_id, title_num } = this.state;
const { getFieldDecorator } = this.props.form;
const { current_user } = this.props
const formItemLayout = {
labelCol: {
@ -299,7 +300,7 @@ class BoardsNew extends Component{
`}</style>
<div className="edu-class-container edu-position courseForm">
<CBreadcrumb items={[
{ to: `/courses/${courseId}/students`, name: this.props.coursedata ? this.props.coursedata.name : ''},
{ to: current_user.first_category_url, name: this.props.coursedata ? this.props.coursedata.name : ''},
{ to: `/courses/${courseId}/boards/${boardId}`, name: this.state.board_name },
{ name: this.isEdit ? '帖子编辑' : '帖子新建'}
]}></CBreadcrumb>

@ -546,7 +546,7 @@ class TopicDetail extends Component {
}
`}</style>
<CBreadcrumb className={'independent'} items={[
{ to: `/courses/${courseId}`, name: this.props.coursedata.name},
{ to: current_user.first_category_url, name: this.props.coursedata.name},
{ to: `/courses/${courseId}/boards/${boardId}`, name: memo.board_name },
{ name: '帖子详情'}
]}></CBreadcrumb>

@ -145,6 +145,7 @@ class CommonWorkDetailIndex extends Component{
, end_immediately, publish_immediately, work_statuses, accessoryVisible
} =this.state;
const { current_user } = this.props
let courseId=this.props.match.params.coursesId;
let category_id= category && category.category_id;
@ -197,15 +198,15 @@ class CommonWorkDetailIndex extends Component{
background: #fff;
}
`}</style>
<CBreadcrumb items={[
{ to: `/courses/${courseId}`, name: course_name},
{current_user && <CBreadcrumb items={[
{ to: current_user.first_category_url , name: course_name},
{ to: `/courses/${courseId}/${moduleEngName}/${category_id}`, name: category_name },
window.location.pathname.indexOf('appraise') == -1 ? { } : { to: `/courses/${courseId}/${moduleEngName}/${workId}/list`, name: '作业详情' },
// 1. 与上一条联动当匿评他人作品时TA人作品的作者真实姓名切换为“匿名”
window.location.pathname.indexOf('appraise') == -1 ? { name: '作业详情' } : { name: author_name },
// window.location.pathname.indexOf('appraise') == -1 ? { } : { to: `/courses/${courseId}/${moduleEngName}/${workId}/list`, name: '作品列表' },
// { name: childModuleName }
]}></CBreadcrumb>
]}></CBreadcrumb>}
<div style={{ width:'100%',height:'52px'}} >
<span className=" fl color-black summaryname" title={`${homework_name && homework_name.length > 36 ? homework_name : ''}`}

@ -481,6 +481,7 @@ render(){
course_name, homework_name,
memberNumMax, memberNumMin
} =this.state;
const { current_user } = this.props
let courseId=this.props.match.params.coursesId;
let workId=this.props.match.params.workId;
@ -522,7 +523,6 @@ render(){
const moduleName = this.props.getModuleName()
const moduleCHName = this.props.getModuleName(true)
const isGroup = this.props.isGroup()
const { current_user } = this.props;
return(
<React.Fragment>
@ -540,7 +540,7 @@ render(){
<div className={"educontent mb20"}>
<p className="clearfix mt10">
<WordsBtn style="grey" className="fl"> <Link to={`/courses/${courseId}/${moduleName}/${category ? category.category_id : ''}`} className="color-grey-6">{course_name}</Link></WordsBtn>
<WordsBtn style="grey" className="fl"> <Link to={ current_user && current_user.first_category_url} className="color-grey-6">{course_name}</Link></WordsBtn>
<span className="color-grey-9 fl ml3 mr3">&gt;</span>
<WordsBtn style="grey" className="fl"> <Link to={`/courses/${courseId}/${moduleName}/${workId}`} className="color-grey-6">{moduleCHName}</Link></WordsBtn>
<span className="color-grey-9 fl ml3 mr3">&gt;</span>

@ -313,6 +313,7 @@ class NewWork extends Component{
init_max_num, init_min_num,
title_num, course_name, category, has_commit, has_project
}=this.state
const { current_user } = this.props
const courseId = this.state.course_id || this.props.match.params.coursesId ;
const isEdit = this.isEdit;
@ -369,7 +370,7 @@ class NewWork extends Component{
<span>{pageType==="new"?"新建":"编辑"}</span>
</p> */}
<CBreadcrumb items={[
{ to: `/courses/${courseId}`, name: this.state.course_name},
{ to: current_user.first_category_url, name: this.state.course_name},
{ to: `/courses/${courseId}/${moduleEngName}/${category && category.category_id ? category.category_id : ''}`
, name: category && category.category_name },
{ name: `${ this.isEdit ? '编辑' : '新建'}` }

@ -59,7 +59,7 @@ class WorkDetailPageHeader extends Component{
const dateFormat = 'YYYY-MM-DD HH:mm';
let {course_name, homework_name, search, page, loadingstate, homework_status, description, noTab
, view_answer, author_name, category, work_id
, view_answer, author_name, category, work_id, current_user
} =this.props;
let courseId=this.props.match.params.coursesId;
@ -89,7 +89,7 @@ class WorkDetailPageHeader extends Component{
}
`}</style>
<CBreadcrumb items={[
{ to: `/courses/${courseId}`, name: course_name},
{ to: current_user.first_category_url, name: course_name},
{ to: `/courses/${courseId}/${moduleEngName}/${category_id}`, name: category_name },
window.location.pathname.indexOf('appraise') == -1 ? { } : { to: `/courses/${courseId}/${moduleEngName}/${workId}/list`, name: '作业详情' },
// 1. 与上一条联动当匿评他人作品时TA人作品的作者真实姓名切换为“匿名”

@ -408,7 +408,7 @@ class Coursesleftnav extends Component{
this.setState({
Navmodalname:id===2?"新建分班":"添加目录",
Navtitles:id===2?"分班名称":"目录名称",
Navplaceholder:id===2?"示例分班最佳4个字符":"示例第一阶段最佳4个字符",
Navplaceholder:"请输入名称最大限制60个字符",
Navmodalnametype:true,
Navmodaltypename:id,
setnavid:setnavid,
@ -419,7 +419,7 @@ class Coursesleftnav extends Component{
this.setState({
Navmodalname:id===5?"分班重命名":"目录重命名",
Navtitles:id===5?"分班名称":"目录名称",
Navplaceholder:id===5?"示例分班最佳4个字符":"示例第一阶段最佳4个字符",
Navplaceholder:"请输入名称最大限制60个字符",
Navmodalnametype:true,
Navmodaltypename:id,
setnavid:setnavid,

@ -34,7 +34,7 @@ class AddcoursesNav extends Component{
{this.props.addnametab===2?
<div>
<div className={"fl mt5"}>目录名称</div>
<Input placeholder="示例:第一阶段"
<Input placeholder="请输入名称最大限制60个字符"
className={"inputNav greyInput fl mb40"}
maxLength="60"
style={{width:'450px'}}

@ -44,7 +44,7 @@ class ModalsRename extends Component{
className={"Navmodal"}
>
<div className={"fl mt5"}>{this.props.Navname}名称</div>
<Input placeholder={"示例:第一阶段"}
<Input placeholder={"请输入名称最大限制60个字符"}
className={"inputNav greyInput fl"}
maxLength="60"
style={{width:'450px'}}

@ -120,35 +120,35 @@ class ExerciseDisplay extends Component{
return <SingleDisplay {...this.props} {...item} index={index} {...commonHandler}
displayCount={exercise_questions.length} showActionButton={false}
displayCount={exercise_questions.length} showActionButton={false} key={index}
></SingleDisplay>
} else if (item.question_type == 2) {
return <JudgeDisplay
showActionButton={false}
showActionButton={false} key={index}
{...this.props} {...item} index={index} {...commonHandler} ></JudgeDisplay>
} else if (item.question_type == 3) {
return <NullDisplay
showActionButton={false}
showActionButton={false} key={index}
{...this.props} {...item} index={index} {...commonHandler} ></NullDisplay>
} else if (item.question_type == 4) {
return <MainDisplay
showActionButton={false}
showActionButton={false} key={index}
{...this.props} {...item} index={index} {...commonHandler} ></MainDisplay>
} else if (item.question_type == 5) {
return <ShixunDisplay Testpapersettinghomepage
showActionButton={false}
showActionButton={false} key={index}
{...this.props} {...item} index={index} {...commonHandler} ></ShixunDisplay>
}

@ -369,6 +369,7 @@ class ExerciceNew extends Component{
},
};
const { current_user } = this.props
const isAdmin = this.props.isAdmin()
const courseId=this.props.match.params.coursesId;
const exercise_id = this.props.match.params.Id
@ -406,11 +407,11 @@ class ExerciceNew extends Component{
}
`}</style>
<div className="edu-class-container edu-position courseForm">
<CBreadcrumb items={[
{ to: `/courses/${courseId}/students`, name: this.props.coursedata ? this.props.coursedata.name : ''},
{ current_user && <CBreadcrumb items={[
{ to: current_user.first_category_url, name: this.props.coursedata ? this.props.coursedata.name : ''},
{ to: `/courses/${courseId}/exercises/${left_banner_id}`, name: '试卷列表' },
{ name: this.isEdit ? '编辑试卷' : '新建试卷'}
]}></CBreadcrumb>
]}></CBreadcrumb> }
<p className="clearfix mt20 mb20">
<span className="fl font-24 color-grey-3">{this.isEdit ? "编辑" : "新建"}试卷</span>

@ -509,7 +509,7 @@ class ExerciseReviewAndAnswer extends Component{
}=this.state
let isAdmin = this.props.isAdmin();
let isStudent =this.props.isStudent();
const { current_user } = this.props
console.log(data&&data.exercise.user_name)
return(
<div className="newMain" style={{paddingTop:"0px"}}>
@ -537,7 +537,7 @@ class ExerciseReviewAndAnswer extends Component{
/>
<div className="educontent mt10 mb50">
<p className="clearfix mb20">
<WordsBtn style="grey" className="fl" to={`/courses/${coursesId}`}>{courseName}</WordsBtn>
<WordsBtn style="grey" className="fl" to={current_user.first_category_url}>{courseName}</WordsBtn>
<span className="color-grey-9 fl ml3 mr3">&gt;</span>
<WordsBtn style="grey" className="fl" to={`/courses/${coursesId}/exercises/${data && data.left_banner_id}`}>{data && data.left_banner_name}</WordsBtn>
<span className="color-grey-9 fl ml3 mr3">&gt;</span>

@ -96,6 +96,7 @@ class GraduateTopicDetail extends Component{
tablePageSize,
tab,
}=this.state
const { current_user } = this.props
let {course_id,graduation_topic_id}=this.props.match.params;
const isStudent =this.props.isStudent();
const isAdmin =this.props.isAdmin();
@ -104,7 +105,7 @@ class GraduateTopicDetail extends Component{
<div className="newMain">
<div className="educontent mt10 mb50">
<p className="clearfix mb15 lineh-20">
<WordsBtn style="grey" className="fl" to={`/courses/${tableData.course_id}`}>{tableData && tableData.course_name}</WordsBtn>
<WordsBtn style="grey" className="fl" to={current_user.first_category_url}>{tableData && tableData.course_name}</WordsBtn>
<span className="color-grey-9 fl ml3 mr3">&gt;</span>
<WordsBtn style="grey" className="fl" to={`/courses/${tableData.course_id}/graduation_topics/${tableData.graduation_id}`}>{tableData.graduation_name}</WordsBtn>
<span className="color-grey-9 fl ml3 mr3">&gt;</span>

@ -276,6 +276,7 @@ class GraduateTopicNew extends Component{
course_name,
left_banner_name
} = this.state;
const { current_user } = this.props
const { getFieldDecorator } = this.props.form;
let{ topicId,coursesId }=this.props.match.params
console.log(this.props);
@ -322,7 +323,7 @@ class GraduateTopicNew extends Component{
`}</style>
<div className="edu-class-container edu-position courseForm">
<p className="clearfix mb20 mt10">
<WordsBtn style="grey" className="fl" to={`/courses/${coursesId}`}>{course_name}</WordsBtn>
<WordsBtn style="grey" className="fl" to={current_user.first_category_url}>{course_name}</WordsBtn>
<span className="color-grey-9 fl ml3 mr3">&gt;</span>
<WordsBtn style="grey" className="fl" to={`/courses/${coursesId}/graduation_topics/${left_banner_id}`}>{left_banner_name}</WordsBtn>
<span className="color-grey-9 fl ml3 mr3">&gt;</span>

@ -301,7 +301,7 @@ class CoursesNew extends Component {
if(value!=""){
this.props.form.setFieldsValue({
classroom:value,
course:value
// course:value
});
this.Searchvalue(value)
}
@ -311,7 +311,7 @@ class CoursesNew extends Component {
handleChange=(value)=>{
this.props.form.setFieldsValue({
course:value,
// course:value,
classroom:value
})
};
@ -320,7 +320,7 @@ class CoursesNew extends Component {
if(value!="") {
this.props.form.setFieldsValue({
school: value,
// school: value,
fetching: true,
});
@ -331,7 +331,7 @@ class CoursesNew extends Component {
handleChangeschools=(value)=>{
this.props.form.setFieldsValue({
school: value,
// school: value,
fetching: true,
});
}
@ -347,9 +347,9 @@ class CoursesNew extends Component {
};
getschool=(value)=>{
this.props.form.setFieldsValue({
school: value
})
// this.props.form.setFieldsValue({
// school: value
// })
let url="/schools/school_list.json";
axios.get(url,{
params: {
@ -359,7 +359,7 @@ class CoursesNew extends Component {
if (result.data.status===0) {
this.setState({
searchlistscholl: result.data.school_names,
school: value
// school: value
})
}
@ -367,9 +367,9 @@ class CoursesNew extends Component {
console.log(error)
})
}
showApplyForAddOrgModal = () => {
this.applyForAddOrgForm.setVisible(true)
}
showApplyForAddOrgModal = () => {
this.applyForAddOrgForm.setVisible(true)
}
render() {
let {datatime,school,searchlistscholl} = this.state;
const {getFieldDecorator} = this.props.form;

@ -110,7 +110,7 @@ class PollDetailIndex extends Component{
}
render(){
let {tab,pollDetail,user_permission}=this.state;
const { current_user } = this.props;
const isAdmin =this.props.isAdmin();
const isStudent = this.props.isStudent();
return(
@ -123,7 +123,7 @@ class PollDetailIndex extends Component{
/>
<div className="educontent mt10 mb50">
<p className="clearfix mb20">
<WordsBtn style="grey" className="fl" to={`/courses/${this.props.match.params.coursesId}/students`}>{this.props.coursedata.name}</WordsBtn>
<WordsBtn style="grey" className="fl" to={current_user.first_category_url}>{this.props.coursedata.name}</WordsBtn>
<span className="color-grey-9 fl ml3 mr3">&gt;</span>
<WordsBtn style="grey" className="fl" to={`/courses/${this.props.match.params.coursesId}/polls/${user_permission && user_permission.left_banner_id}`}>问卷</WordsBtn>
<span className="color-grey-9 fl ml3 mr3">&gt;</span>

@ -299,6 +299,7 @@ class PollInfo extends Component{
modalSave,
questionPanelFixed
}=this.state;
const { current_user } = this.props
let isAdmin=this.props.isAdmin();
let isStudent=this.props.isStudent();
return(
@ -314,7 +315,7 @@ class PollInfo extends Component{
></Modals>
<div className="educontent mt10 mb50">
<p className="clearfix mb20">
<WordsBtn style="grey" className="fl" to={`/courses/${this.props.match.params.coursesId}/students`}>{courseName}</WordsBtn>
<WordsBtn style="grey" className="fl" to={current_user.first_category_url}>{courseName}</WordsBtn>
<span className="color-grey-9 fl ml3 mr3">&gt;</span>
<WordsBtn style="grey" className="fl" to={`/courses/${this.props.match.params.coursesId}/polls/${poll && poll.left_banner_id}`}>问卷</WordsBtn>
<span className="color-grey-9 fl ml3 mr3">&gt;</span>

@ -2320,12 +2320,17 @@ class PollNew extends Component {
}
gotohome=()=>{
let courseId=this.props.match.params.coursesId;
if(courseId===undefined){
this.props.history.push("/courses");
}else{
this.props.history.push(this.props.current_user.first_category_url);
}
const { current_user} = this.props
this.props.history.push(current_user.first_category_url);
// let courseId=this.props.match.params.coursesId;
// if(courseId===undefined){
// this.props.history.push("/courses");
// }else{
// this.props.history.push(this.props.current_user.first_category_url);
// }
}
//试图
render() {

@ -1482,6 +1482,7 @@ class Listofworksstudentone extends Component {
}
//计算成绩
setComputeTime=()=>{
let matchurl = this.props.match.url;
let {teacherdata}=this.state;
this.setState({
computeTimetype:false
@ -1494,6 +1495,7 @@ class Listofworksstudentone extends Component {
this.props.showNotification(`${response.data.message}`);
// var homeworkid = this.props.match.params.homeworkid;
this.Getalistofworks(homeworkid);
this.props.history.replace( matchurl );
// this.Getalistofworkstwo("", "", "", "", 1, 20);
}).catch((error) => {
console.log(error)
@ -2147,6 +2149,9 @@ class Listofworksstudentone extends Component {
}
setComputeTimet=()=>{
let matchurl = this.props.match.url;
this.setState({
computeTimetype:false
})
@ -2163,6 +2168,7 @@ class Listofworksstudentone extends Component {
})
this.Startsortingt(this.state.orders, this.state.course_groupyslstwo, this.state.checkedValuesineinfo, this.state.searchtext, 1, this.state.limit);
this.props.showNotification(`${response.data.message}`);
this.props.history.replace( matchurl );
}
}).catch((error) => {
console.log(error)

@ -123,9 +123,9 @@ class ShixunHomeworkPage extends Component {
let {tab, teacherdatapage, jobsettingsdatapage} = this.state;
const isAdmin = this.props.isAdmin();
console.log(119)
console.log(jobsettingsdatapage);
console.log(teacherdatapage);
// console.log(119)
// console.log(jobsettingsdatapage);
// console.log(teacherdatapage);
return (
<div className="newMain clearfix ">
<div className={"educontent mb20"} style={{width: "1200px"}}>

@ -36,13 +36,19 @@ class Index extends Component{
<div>
<Switch {...this.props}>
<Route path="/paths/:pathId/statistics" component = {Statistics} {...this.props} {...this.state}></Route>
<Route path="/paths/new" exact
render={(props)=>(<PathsNew {...this.props} {...this.state} {...props}/>)}
></Route>
<Route path="/paths/:pathId/edit" exact
render={(props)=>(<PathsNew {...this.props} {...this.state} {...props}/>)}
></Route>
<Route path="/paths/:pathId" exact component = {PathsDetail} {...this.props} {...this.state}></Route>
<Route path="/paths/:pathId" exact
render={(props)=>(<PathsDetail {...this.props} {...this.state} {...props}/>)}
></Route>
{/*<Route path="/paths/:pathId" exact component = {PathsDetail} {...this.props} {...this.state}></Route>*/}
<Route exact path="/paths" exact component={ShixunPaths} {...this.props} {...this.state}></Route>
</Switch>
</div>

@ -314,6 +314,7 @@ class DetailCards extends Component{
showparagraphindex
}=this.state;
const antIcon = <Icon type="loading" style={{ fontSize: 24 }} spin />;
return(
<div>
<Modals
@ -363,6 +364,19 @@ class DetailCards extends Component{
</div>
</Spin>
</Modal>
<style>
{
`
.lessonvalue{
max-width: 556px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
display: inline-block;
}
`
}
</style>
<div className="lesson-saved-list">
{
pathCardsList && pathCardsList.map((item,key)=>{
@ -374,7 +388,7 @@ class DetailCards extends Component{
<a className="fl ring-blue mr10 mt2">
<img src={getImageUrl("images/educoder/icon/charpter-white.svg")} className="fl ml3 mt3"/>
</a>
<span className="font-18 font-bd">{item.stage_name}</span>
<span className="font-18 font-bd lessonvalue" title={item.stage_name}>{item.stage_name}</span>
{
idsum===key&&pathCardsedittype===true?'':
@ -442,13 +456,13 @@ class DetailCards extends Component{
:<i className="iconfont icon-bofang progressRing-part font-18 mt10"></i>
}
</span>
<span className={line.shixun_status==="暂未公开"?"paragraph_name color204":"paragraph_name color-grey3"}>
<span className={this.props.current_user&&this.props.current_user.admin===false&&line.shixun_status==="暂未公开"?"paragraph_name color204":"paragraph_name color-grey3"}>
<span className="subject_stage_shixun_index">{key+1}</span>-{index+1}&nbsp;&nbsp;{line.shixun_name}
</span>
</li>
{
line.shixun_status==="暂未公开"?
this.props.current_user&&this.props.current_user.admin===false&&line.shixun_status==="暂未公开"?
<li className="fr status_li"><span className="fr color204">暂未公开</span></li>
:
<li className={showparagraph===false?"none":"fr status_li"}>

@ -402,7 +402,7 @@ class DetailCardsEditAndAdd extends Component{
<div className="df mb30">
<span className="mr30 color-orange pt10">*</span>
<div className="flex1 mr20">
<input maxLength="60" type="text" style={{width:'670px'}} className={stage_nametype===false?"input-100-45 greyInput":"input-100-45 greyInput bor-red"} name="stage_name" value={stage_names} onInput={this.updatastage_names} placeholder={"请输入第"+this.props.sum+"阶段名称"}/>
<input maxLength="60" type="text" style={{width:'670px'}} className={stage_nametype===false?"input-100-45 greyInput":"input-100-45 greyInput bor-red"} name="stage_name" value={stage_names} onInput={this.updatastage_names} placeholder={"请输入第"+this.props.sum+"阶段名称,最大限制60个字符"}/>
<div className={stage_nametype===true?"red":'none'}>名称不能为空</div>
</div>
<div style={{"width":"60px"}}><span className="color-orange fl mt8 none" id="stage_name_notice"><i className="iconfont icon-tishi font-14 mr3"></i></span></div>

@ -435,7 +435,7 @@ class DetailCardsEditAndEdit extends Component{
<div className="df mb30">
<span className="mr30 color-orange pt10">*</span>
<div className="flex1 mr20">
<input type="text" style={{width: '670px'}} className={stage_nametype===false?"input-100-45 greyInput":"input-100-45 greyInput bor-red"} name="stage_name" value={stage_name} onInput={this.updatastage_name} placeholder={"请输入第"+(this.props.keys+1)+"阶段名称"}/>
<input maxLength="60" type="text" style={{width: '670px'}} className={stage_nametype===false?"input-100-45 greyInput":"input-100-45 greyInput bor-red"} name="stage_name" value={stage_name} onInput={this.updatastage_name} placeholder={"请输入第"+(this.props.keys+1)+"阶段名称,最大限制60个字符"}/>
<div className={stage_nametype===true?"red":'none'}>名称不能为空</div>
</div>
<div style={{"width":"60px"}}><span className="color-orange fl mt8 none" id="stage_name_notice"><i className="iconfont icon-tishi font-14 mr3"></i></span></div>

@ -1,5 +1,6 @@
import React, { Component } from 'react';
import {getImageUrl} from 'educoder';
import { Tooltip } from 'antd';
import '../../paths/ShixunPaths.css';
import DetailCardsEditAndAdd from './DetailCardsEditAndAdd';
import axios from 'axios';
@ -85,16 +86,26 @@ class DetailCards extends Component{
<a className="fl ring-blue mr10 mt2">
<img src={getImageUrl("images/educoder/icon/charpter-white.svg")} className="fl ml3 mt3"/>
</a>
<span className="font-18 font-bd">{item.stage_name}</span>
<a className="fr mtf3">
<i className="iconfont icon-bianjidaibeijing font-22 color-green" data-tip-down="编辑"></i>
</a>
<a href="" className="fr ring-op-green mr20">
<img src={getImageUrl("images/educoder/icon/movedown.svg")} data-tip-down="向下移动" className="fl mt2 ml4"/>
</a>
<Tooltip placement="bottom" title={"编辑"}>
<a className="fr mtf3">
<i className="iconfont icon-bianjidaibeijing font-22 color-green"></i>
</a>
</Tooltip>
<Tooltip placement="bottom" title={"向下移动"}>
<a href="" className="fr ring-op-green mr20">
<img src={getImageUrl("images/educoder/icon/moveup.svg")} data-tip-down="向上移动" className="fl mt2 ml4"/>
<img src={getImageUrl("images/educoder/icon/movedown.svg")} className="fl mt2 ml4"/>
</a>
</Tooltip>
<Tooltip placement="bottom" title={"向上移动"}>
<a href="" className="fr ring-op-green mr20">
<img src={getImageUrl("images/educoder/icon/moveup.svg")} className="fl mt2 ml4"/>
</a>
</Tooltip>
</p>
<div className="detail_for_paragraph clearfix" id={"detail_for_paragraph_"+key}>
<p className="color-dark-grey mt20 mb25 ml20 mr20 pl28 justify font-15">{item.stage_description}</p>

@ -170,9 +170,12 @@ class DetailTop extends Component{
</span>
{detailInfoList===undefined?"":detailInfoList.allow_statistics===true?
<Link to={"/paths/"+this.props.match.params.pathId+"/edit"} className="ml10 ring-green fl mt10" data-tip-down="编辑">
<img src={getImageUrl("images/educoder/icon/edit.svg")} className="fl mt3 ml2" />
</Link>:""
<Tooltip placement="bottom" title={"编辑"}>
<Link to={"/paths/"+this.props.match.params.pathId+"/edit"} className="ml10 ring-green fl mt10" >
<img src={getImageUrl("images/educoder/icon/edit.svg")} className="fl mt3 ml2" />
</Link>
</Tooltip>
:""
}
{detailInfoList===undefined?"":detailInfoList.allow_statistics===true?

@ -140,10 +140,13 @@ class PathDetailIndex extends Component{
let url="/paths/"+pathid+".json";
axios.get(url).then((result)=>{
if (result.data.status === 407 || result.data.status === 401) {
debugger
return;
}
if (result.data.status === 403) {
debugger
window.location.href = "/403";
return;
}
@ -165,9 +168,12 @@ class PathDetailIndex extends Component{
axios.get(url).then((result)=>{
// TODO 403 让后台返回status 403 比较好
if (result.data.status == 407 || result.data.status == 401) {
debugger
return;
}
if (result.data.status === 403 ) {
debugger
window.location.href = "/403";
return;
}
@ -363,9 +369,11 @@ class PathDetailIndex extends Component{
<p className="clearfix mb30">
<span className="font-16">课程须知</span>
{detailInfoList===undefined?"":detailInfoList.allow_statistics===true?
<Tooltip placement="bottom" title={"编辑"}>
<Link to={"/paths/"+this.props.match.params.pathId+"/edit"} className="fr mtf5">
<i className="iconfont icon-bianjidaibeijing font-20 color-green" data-tip-down="编辑"></i>
<i className="iconfont icon-bianjidaibeijing font-20 color-green"></i>
</Link>
</Tooltip>
:""
}
</p>
@ -391,16 +399,18 @@ class PathDetailIndex extends Component{
</div>
</div>
<Tooltip placement="bottom" title={"显示全部"}>
<div className={detailInfoList.tags.length>15&&clickdetailInfoListtype===false?"newsubscript mb9 color-grey-9 fr":"newsubscript mb9 color-grey-9 none"}
data-tip-down="显示全部"
onClick={()=>this.clickNewsubscript(0)}
><span className="mr8">...</span><Icon type="caret-down" />
</div>
</Tooltip>
<Tooltip placement="bottom" title={"收起"}>
<div className={clickdetailInfoListtype===false?"newsubscript mb9 color-grey-9 none":"newsubscript mb9 color-grey-9 fr"}
data-tip-down="收起"
onClick={()=>this.clickNewsubscript(1)}><Icon type="caret-up" />
</div>
</Tooltip>
</div>
}

@ -31,6 +31,30 @@ const Option = Select.Option;
const RadioGroup = Radio.Group;
// 处理整点 半点
// 取传入时间往后的第一个半点
export function handleDateStrings(dateString) {
if (!dateString) return dateString;
const ar = dateString.split(':')
if (ar[1] == '00' || ar[1] == '30') {
return dateString
}
const miniute = parseInt(ar[1]);
if (miniute < 30 || miniute == 60) {
return [ar[0], '30'].join(':')
}
if (miniute < 60) {
// 加一个小时
const tempStr = [ar[0], '00'].join(':');
const format = "YYYY-MM-DD HH:mm";
const _moment = moment(tempStr, format)
_moment.add(1, 'hours')
return _moment.format(format)
}
return dateString
}
// 恢复数据
function md_rec_data(k,mdu,id, editor){
if(window.sessionStorage.getItem(k+mdu) !== null){
@ -1120,7 +1144,7 @@ export default class TPMsettings extends Component {
}
onChangeTimePicker =(value, dateString)=> {
this.setState({
opening_time:dateString
opening_time:moment(handleDateStrings(dateString))
})
}

@ -117,36 +117,6 @@ class TPMRightSection extends Component {
}
<div className="padding20 edu-back-white"
style={{
display:
TPMRightSectionData === undefined?"none":TPMRightSectionData.recommands===undefined?"none":TPMRightSectionData.recommands.length === 0 ? "none" : "block"
}}
>
<p className="mb20 font-16 clearfix">推荐实训</p>
<div className="recommend-list">
{
TPMRightSectionData===undefined?"":TPMRightSectionData.recommands===undefined?"":TPMRightSectionData.recommands.map((item,key)=>{
return(
<div className="recomments clearfix df" key={key}>
<a href={"/shixuns/"+item.identifier+"/challenges"} target="_blank">
<img alt="69?1526971094" height="96" src={"/"+item.pic} width="128"/>
</a>
<div className="ml10 flex1">
<Tooltip placement="bottom" title={item.name}>
<a href={"/shixuns/"+item.identifier+"/challenges"} target="_blank" className="color-grey-6 task-hide mb12 recomment-name">{item.name}</a>
</Tooltip>
<p className="clearfix mt8 font-12 color-grey-B4">
{item.stu_num} 人学习
</p>
<p className="edu-txt-right color-orange pr10">{item.level}</p>
</div>
</div>
)
})
}
</div>
</div>
<div className="padding20 edu-back-white mb10 mt10" style={{
display: TPMRightSectionData === undefined?"none":TPMRightSectionData.paths===undefined?"":TPMRightSectionData.paths.length === 0 ? "none" : "block"
@ -191,7 +161,36 @@ class TPMRightSection extends Component {
</div>
</div>
<div className="padding20 edu-back-white"
style={{
display:
TPMRightSectionData === undefined?"none":TPMRightSectionData.recommands===undefined?"none":TPMRightSectionData.recommands.length === 0 ? "none" : "block"
}}
>
<p className="mb20 font-16 clearfix">推荐实训</p>
<div className="recommend-list">
{
TPMRightSectionData===undefined?"":TPMRightSectionData.recommands===undefined?"":TPMRightSectionData.recommands.map((item,key)=>{
return(
<div className="recomments clearfix df" key={key}>
<a href={"/shixuns/"+item.identifier+"/challenges"} target="_blank">
<img alt="69?1526971094" height="96" src={"/"+item.pic} width="128"/>
</a>
<div className="ml10 flex1">
<Tooltip placement="bottom" title={item.name}>
<a href={"/shixuns/"+item.identifier+"/challenges"} target="_blank" className="color-grey-6 task-hide mb12 recomment-name">{item.name}</a>
</Tooltip>
<p className="clearfix mt8 font-12 color-grey-B4">
{item.stu_num} 人学习
</p>
<p className="edu-txt-right color-orange pr10">{item.level}</p>
</div>
</div>
)
})
}
</div>
</div>
</div>
}

@ -2,7 +2,7 @@ import React, {Component} from 'react';
import {TPMIndexHOC} from '../TPMIndexHOC';
import {SnackbarHOC,handleDateString} from 'educoder';
import {SnackbarHOC} from 'educoder';
import {Input, Select, Radio, Checkbox, Modal, Icon, DatePicker,Upload,Button,message,Form,notification} from 'antd';
@ -16,6 +16,8 @@ import './css/Newshixuns.css';
import {getUrl} from 'educoder'
import moment from 'moment';
let path = getUrl("/editormd/lib/")
const $ = window.$;
@ -28,6 +30,34 @@ const Option = Select.Option;
const RadioGroup = Radio.Group;
const confirm = Modal.confirm;
// 处理整点 半点
// 取传入时间往后的第一个半点
export function handleDateStrings(dateString) {
if (!dateString) return dateString;
const ar = dateString.split(':')
if (ar[1] == '00' || ar[1] == '30') {
return dateString
}
const miniute = parseInt(ar[1]);
if (miniute < 30 || miniute == 60) {
return [ar[0], '30'].join(':')
}
if (miniute < 60) {
// 加一个小时
const tempStr = [ar[0], '00'].join(':');
const format = "YYYY-MM-DD HH:mm";
const _moment = moment(tempStr, format)
_moment.add(1, 'hours')
return _moment.format(format)
}
return dateString
}
// 恢复数据
function md_rec_data(k, mdu, id, editor) {
if (window.sessionStorage.getItem(k + mdu) !== null) {
@ -713,7 +743,7 @@ class Newshixuns extends Component {
onChangeTimePicker = (value, dateString) => {
this.setState({
TimePickervalue: handleDateString(dateString)
TimePickervalue: handleDateStrings(dateString)
})
}
// 附件相关 START

@ -293,11 +293,12 @@ class Challenges extends Component {
<p className="clearfix mb30">
<span className="font-16 fl">简介</span>
<Tooltip placement="bottom" title={"编辑"}>
<a style={{ display: this.props.identity < 5 && ChallengesDataList&&ChallengesDataList.shixun_status < 3 ? "block" : 'none' }}
href={"/shixuns/" + id + "/settings?edit=1"} className="ring-green fr"
data-tip-down="编辑">
href={"/shixuns/" + id + "/settings?edit=1"} className="ring-green fr">
<img src={getImageUrl("images/educoder/icon/edit.svg")} className="fl mt3 ml2" />
</a>
</Tooltip>
</p>
<div className="justify break_full_word new_li markdown-body"
@ -378,11 +379,13 @@ class Challenges extends Component {
<div className="clearfix mb20">
<span className="fl ring-blue mr10 mt8">
{item.st === 0 ?
<img src={getImageUrl("images/educoder/icon/code.svg")} data-tip-down="实训任务"
className="fl mt2 ml2" />
<Tooltip placement="bottom" title={"实训任务"}>
<img src={getImageUrl("images/educoder/icon/code.svg")} className="fl mt2 ml2" />
</Tooltip>
:
<img src={getImageUrl("images/educoder/icon/choose.svg")} data-tip-down="选择题任务"
className="fl mt2 ml3" />
<Tooltip placement="bottom" title={"选择题任务"}>
<img src={getImageUrl("images/educoder/icon/choose.svg")} className="fl mt2 ml3" />
</Tooltip>
}
</span>
<span className="mr15 font-16 fl">{key+1}</span>

@ -10,6 +10,8 @@ import classNames from 'classnames';
import { getImageUrl, toPath } from 'educoder';
import { Tooltip } from 'antd';
import axios from 'axios';
import { CircularProgress } from 'material-ui/Progress';
@ -76,8 +78,10 @@ class Propaedeutics extends Component {
return (
<React.Fragment>
<p className="clearfix mb10 pl20 pr20" style={{display:this.props.identity<5&&this.props.status<3?"block":'none'}} >
<a href={"/shixuns/"+shixunId +"/update_propaedeutics"}className="ring-green fr mt8" id="edit_propaedeutics"
data-tip-down="编辑"><img src={getImageUrl("images/educoder/icon/edit.svg")} className="fl mt3 ml2" /></a>
<Tooltip placement="bottom" title={"编辑"}>
<a href={"/shixuns/"+shixunId +"/update_propaedeutics"}className="ring-green fr mt8" id="edit_propaedeutics">
<img src={getImageUrl("images/educoder/icon/edit.svg")} className="fl mt3 ml2" /></a>
</Tooltip>
</p>
{
loadingContent ?

@ -0,0 +1,104 @@
import React, { Component } from 'react';
import "./secureCode.css";
/**
* An TextInput with Icon and check
* 带图标检查的输入框
*/
class CheckInputysl extends Component {
constructor(){
super();
this.state = {
isMove:false,
start:0,
moveLength:0,
clear:false,
move:0,
width:0
};
this.onMouseUp = this.onMouseUp.bind(this);
this.onMouseDown = this.onMouseDown.bind(this);
this.onMouseMove = this.onMouseMove.bind(this);
}
componentDidMount() {
let dragHandler = document.getElementById("dragHandler");
dragHandler.addEventListener("mousedown", this.onMouseDown);
}
onMouseDown(e){
console.log("28");
document.addEventListener("mousemove", this.onMouseMove);
document.addEventListener("mouseup", this.onMouseUp);
let event=e||window.event;
this.setState({
isMove:true,
start:event.pageX
});
}
onMouseUp(e){
console.log("38");
let event=e||window.event;
this.setState({
isMove:false,
});
let drag = window.getComputedStyle(this.verifyDOM);
let handler = window.getComputedStyle(this.handlerDOM);
let moveLength = event.clientX-this.verifyDOM.offsetLeft - Number.parseInt(handler.width) / 2;
// console.log(drag.width);
let maxWidth = Number.parseInt(drag.width) - Number.parseInt(handler.width);
console.log("moveLength="+moveLength);
console.log("maxWidth="+maxWidth);
if(moveLength <= maxWidth){ //鼠标松开时,如果没有达到最大距离位置,滑块就返回初始位置
this.setState({
move:0,
width:0
});
document.removeEventListener("mousemove", this.onMouseMove);
document.removeEventListener("mouseup", this.onMouseUp);
}
if(this.props.onDrag){
this.props.onDrag(this.state.clear);
}
}
onMouseMove(e){
console.log("63");
let event=e||window.event;
let drag = window.getComputedStyle(this.verifyDOM);
let handler = window.getComputedStyle(this.handlerDOM);
let moveLength = event.clientX-this.verifyDOM.offsetLeft - Number.parseInt(handler.width) / 2;
let maxWidth = Number.parseInt(drag.width) - Number.parseInt(handler.width);
if(this.state.isMove){
if(moveLength<0){
moveLength=0
}else if(moveLength >= maxWidth){
moveLength=maxWidth;
this.removeMouseMove();
}
this.setState({
move:moveLength,
width:moveLength
});
}
}
//清空事件
removeMouseMove(){
this.setState({
clear:true
});
let dragHandler = document.getElementById("dragHandler");
dragHandler.removeEventListener("mousedown", this.onMouseDown);
document.removeEventListener("mousemove", this.onMouseMove);
document.removeEventListener("mouseup", this.onMouseUp);
this.props.dragOkCallback();
}
render(){
return (
<div id="drag" className="nl-drag-verify" ref={dom => {this.verifyDOM = dom}} style={{"color":this.state.clear ? "#fff" : "#252535"}}>
<div className="drag_bg" ref={dom => {this.bgDOM = dom}} style={{"width":this.state.width}}></div>
<div className="drag_text">{this.state.clear ? "验证通过" : "拖动滑块验证"}</div>
<div id="dragHandler" className={this.state.clear? "handler handler_ok_bg" : "handler handler_bg"} style={{"left":this.state.move}} ref={dom => {this.handlerDOM = dom}}></div>
</div>
);
}
}
export default ( CheckInputysl );

@ -2,11 +2,11 @@ import React, {Component} from 'react';
import {BrowserRouter as Router, Route, Link, Switch} from "react-router-dom";
import {getImageUrl, DragValidator} from 'educoder';
import {getImageUrl} from 'educoder';
import CheckInputysl1 from './CheckInputysl';
import CheckInputysl2 from './CheckInputysl';
import {Tabs, Input, Checkbox, Button, notification} from 'antd';
import DragValidatortwo from '../../../src/common/components/DragValidatortwo'
import ReadPassword from './ReadPassword';
@ -94,14 +94,14 @@ class LoginRegisterComponent extends Component {
}
//倒计时
getverificationcode = () => {
debugger
if(this.state.login === undefined || this.state.login.length===0){
this.openNotification("请输入手机号或邮箱");
return;
}
//这是判断是否手机正确
if(this.state.Phonenumberisnotcobool === true){
if(this.state.Phonenumberisnotcobool === false){
this.openNotification(this.state.Phonenumberisnotco);
this.setState({
Whethertoverify:this.state.Whethertoverify===true?false:true,
@ -109,7 +109,7 @@ class LoginRegisterComponent extends Component {
return;
}
//拖动滑动验证
if(this.state.dragOk===undefined||this.state.dragOk === false){
if(this.state.dragOk === false){
this.openNotification("拖动滑块验证");
return;
}
@ -180,12 +180,11 @@ class LoginRegisterComponent extends Component {
//找回密码
Retrievepassword = () => {
if (this.state.Phonenumberisnotcobool === false) {
if (this.state.login.length === 0) {
this.setState({
Phonenumberisnotco:"请输入正确的邮箱或手机号",
})
return
}
this.openNotification(this.state.Phonenumberisnotco);
this.setState({
Whethertoverify:this.state.Whethertoverify===true?false:true,
})
return;
}
if (this.state.login === undefined|| this.state.login.length ===0 || this.state.login === "") {
this.setState({
@ -365,7 +364,7 @@ class LoginRegisterComponent extends Component {
if (value.length === 0) {
this.setState({
Phonenumberisnotco: undefined,
Phonenumberisnotcobool: false,
Phonenumberisnotcobool: true,
})
return;
}
@ -418,20 +417,20 @@ class LoginRegisterComponent extends Component {
if(this.state.login===""||this.state.login.length===0){
this.setState({
Phonenumberisnotco: "账号不能为空",
Phonenumberisnotcobool: true,
Phonenumberisnotcobool: false,
dragOk:false,
Whethertoverify:this.state.Whethertoverify===true?false:true,
})
return
}
console.log(e.target.value.length);
if (e.target.value.length === 0) {
this.setState({
Phonenumberisnotco: undefined,
Phonenumberisnotcobool: false,
})
return;
}
// console.log(e.target.value.length);
// if (e.target.value.length === 0) {
// this.setState({
// Phonenumberisnotco: undefined,
// Phonenumberisnotcobool: false,
// })
// return;
// }
// var telephone = $("#telephoneAdd.tianjia_phone").val();
var regph = /^[1][3,4,5,6,7,8][0-9]{9}$/;
// var email = $("#add_email.tianjia_email").val();
@ -485,12 +484,63 @@ class LoginRegisterComponent extends Component {
if (this.state.login === "" || this.state.login.length === 0) {
this.setState({
Phonenumberisnotco: "账号不能为空",
Phonenumberisnotcobool: true,
Phonenumberisnotcobool: false,
dragOk: false,
Whethertoverify: this.state.Whethertoverify === true ? false : true,
})
return
}
// var telephone = $("#telephoneAdd.tianjia_phone").val();
var regph = /^[1][3,4,5,6,7,8][0-9]{9}$/;
// var email = $("#add_email.tianjia_email").val();
var regemail = /^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/;
// [1]手机号开头必须是1 [3,4,5,6,7,8] 第二位是3-8中的一个 [0-9]{9} 后边9位可以是0-9的任意数字。
var stringdata = undefined;
if (!regph.test(this.state.login)) {
stringdata = "手机号格式不正确";
this.setState({
Phonenumberisnotco: stringdata,
Phonenumberisnotcobool: false,
dragOk:false,
Whethertoverify: this.state.Whethertoverify === true ? false : true,
})
} else {
this.setState({
Phonenumberisnotco: undefined,
Phonenumberisnotcobool: true,
dragOk: true,
});
this.Emailphonenumberverification(this.state.login)
return
}
if (!regemail.test(this.state.login)) {
if ((this.state.login.indexOf("@") != -1) === true) {
stringdata = "邮箱格式不正确";
} else {
stringdata = "手机号格式不正确";
}
this.setState({
Phonenumberisnotco: stringdata,
Phonenumberisnotcobool: false,
dragOk:false,
Whethertoverify: this.state.Whethertoverify === true ? false : true,
})
return
} else {
this.setState({
Phonenumberisnotco: undefined,
Phonenumberisnotcobool: true,
dragOk: true,
})
this.Emailphonenumberverification(this.state.login)
return
}
this.setState({
Phonenumberisnotcosytdhk: undefined,
})
@ -513,7 +563,7 @@ class LoginRegisterComponent extends Component {
console.log(value.length);
this.setState({
Phonenumberisnotco: result.data.message,
Phonenumberisnotcobool: true,
Phonenumberisnotcobool: false,
dragOk:false,
Whethertoverify:this.state.Whethertoverify===true?false:true,
})
@ -521,7 +571,7 @@ class LoginRegisterComponent extends Component {
}else {
this.setState({
Phonenumberisnotco: undefined,
Phonenumberisnotcobool: false,
Phonenumberisnotcobool: true,
dragOk:true,
})
return;
@ -643,24 +693,20 @@ class LoginRegisterComponent extends Component {
{
Whethertoverify===false&&pciphone===true?
<DragValidator
height={38} successGreenColor="#29bd8b"
style={{height: "38px", width: "100%"}}
dragOkCallback={()=>this.dragOkCallback()}
className="ysllw100"
></DragValidator>
<CheckInputysl1
dragOkCallback={this.dragOkCallback}
>
</CheckInputysl1>
:
""
}
{
Whethertoverify===true&&pciphone===true?
<DragValidatortwo
height={38} successGreenColor="#29bd8b"
style={{height: "38px", width: "100%"}}
dragOkCallback={()=>this.dragOkCallback()}
className="ysllw100"
></DragValidatortwo>
<CheckInputysl2
dragOkCallback={this.dragOkCallback}
>
</CheckInputysl2>
:
""
}

@ -2,12 +2,13 @@ import React, {Component} from 'react';
import {BrowserRouter as Router, Route, Link, Switch} from "react-router-dom";
import {getImageUrl, DragValidator,broadcastChannelPostMessage} from 'educoder';
import {getImageUrl,broadcastChannelPostMessage} from 'educoder';
import {Tabs, Input, Checkbox, Button, notification,Menu} from 'antd';
import passopen from '../../../src/images/login/passopen.png';
import passoff from '../../../src/images/login/passoff.png';
import axios from 'axios';
import DragValidatortwo from '../../../src/common/components/DragValidatortwo'
import CheckInputysl1 from './CheckInputysl';
import CheckInputysl2 from './CheckInputysl';
import './common.css'
import './commontwo.css'
const { TabPane } = Tabs;
@ -205,7 +206,65 @@ class LoginRegisterComponent extends Component {
}
//是否验证通过
dragOkCallback = () => {
console.log(this.state.logins);
debugger
if (this.state.logins.length === 0) {
this.setState({
Phonenumberisnotcos: undefined,
Phonenumberisnotcobool: false,
dragOk:true,
})
return;
}
// var telephone = $("#telephoneAdd.tianjia_phone").val();
var regph = /^[1][3,4,5,6,7,8][0-9]{9}$/;
// var email = $("#add_email.tianjia_email").val();
var regemail = /^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/;
// [1]手机号开头必须是1 [3,4,5,6,7,8] 第二位是3-8中的一个 [0-9]{9} 后边9位可以是0-9的任意数字。
var stringdata = undefined;
if (!regph.test(this.state.logins)) {
stringdata = "手机号格式不正确";
this.setState({
Phonenumberisnotcos: stringdata,
Phonenumberisnotcobool: true,
dragOk:false,
Whethertoverify:this.state.Whethertoverify===true?false:true,
})
} else {
this.setState({
Phonenumberisnotcos: undefined,
Phonenumberisnotcobool: false,
dragOk:true,
});
this.Emailphonenumberverification(this.state.logins, 2);
return
}
if (!regemail.test(this.state.logins)) {
if ((this.state.logins.indexOf("@") != -1) === true) {
stringdata = "邮箱格式不正确";
} else {
stringdata = "手机号格式不正确";
}
this.setState({
Phonenumberisnotcos: stringdata,
Phonenumberisnotcobool: true,
dragOk:false,
Whethertoverify:this.state.Whethertoverify===true?false:true,
})
return
} else {
this.setState({
Phonenumberisnotcos: undefined,
Phonenumberisnotcobool: false,
dragOk:true,
})
this.Emailphonenumberverification(this.state.logins, 2);
return
}
this.setState({
Phonenumberisnotcosytdhk:undefined,
})
@ -402,7 +461,7 @@ class LoginRegisterComponent extends Component {
type: 1,
}
}).then((result) => {
debugger
//验证有问题{"status":1,"message":"success"}
// console.log(result);
// this.setState({dragOk: true})
@ -415,7 +474,6 @@ class LoginRegisterComponent extends Component {
Phonenumberisnotco: undefined,
Phonenumberisnotcobool: false,
dragOk:true,
})
}else {
this.setState({
@ -425,7 +483,7 @@ class LoginRegisterComponent extends Component {
Whethertoverify:this.state.Whethertoverify===true?false:true,
})
}
return;
return;
} else if (id === 2) {
this.setState({
Phonenumberisnotcos: result.data.message,
@ -498,8 +556,9 @@ class LoginRegisterComponent extends Component {
//倒计时
getverificationcode = () => {
console.log(this.state.Phonenumberisnotcobool);
console.log(this.state.dragOk);
debugger
// console.log(this.state.Phonenumberisnotcobool);
// console.log(this.state.dragOk);
if(this.state.logins === undefined || this.state.logins.length===0){
this.openNotification("请输入手机号或邮箱");
return;
@ -512,7 +571,7 @@ class LoginRegisterComponent extends Component {
})
return;
}
if(this.state.dragOk===undefined||this.state.dragOk === false){
if(this.state.dragOk === false){
this.openNotification("拖动滑块验证");
return;
}
@ -668,6 +727,7 @@ class LoginRegisterComponent extends Component {
this.setState({
Phonenumberisnotcos: undefined,
Phonenumberisnotcobool: false,
})
return
}
@ -690,6 +750,7 @@ class LoginRegisterComponent extends Component {
this.setState({
Phonenumberisnotcos: undefined,
Phonenumberisnotcobool: false,
})
this.Emailphonenumberverification(e.target.value, id);
return
@ -941,27 +1002,24 @@ class LoginRegisterComponent extends Component {
}
{
Whethertoverify===false&&pciphone===true?
<DragValidator
height={38} successGreenColor="#29bd8b"
style={{ height: '38px',width: "100%"}}
<CheckInputysl1
dragOkCallback={this.dragOkCallback}
className="ysllw100"
></DragValidator>
>
</CheckInputysl1>
:
""
}
{
Whethertoverify===true&&pciphone===true?
<DragValidatortwo
height={38} successGreenColor="#29bd8b"
style={{ height: '38px',width: "100%"}}
dragOkCallback={this.dragOkCallback}
className="ysllw100"
></DragValidatortwo>
<CheckInputysl2
dragOkCallback={this.dragOkCallback}
>
</CheckInputysl2>
:
""
}
<div>
{
pciphone===true?

@ -274,6 +274,11 @@ class AccountBasic extends Component {
return item.name == e;
});
if (!arr[0]) {
if (!e) {
this.setState({
filterSchoolList: []
})
}
// 没找到学校,清空部门
this.setState({
departments: [],

@ -0,0 +1,42 @@
#drag{
position: relative;
background-color: #e8e8e8;
min-width: 300px;
height: 38px;
line-height: 38px;
text-align: center;
}
#drag .handler{
position: absolute;
top: 0px;
left: 0px;
width: 40px;
height: 38px;
border: 1px solid #ccc;
cursor: move;
}
.handler_bg{ background: #fff url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA3hpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2t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M0CAAQDGx279Jf50AAAAAABJRU5ErkJggg==") no-repeat center;}
#drag .drag_bg{
background-color: #7ac23c;
height: 38px;
width: 0px;
}
#drag .drag_text{
position: absolute;
top: 0px;
font-size: 14px;
width: 100%;
-moz-user-select: none;
-webkit-user-select: none;
color: #fff;
user-select: none;
-o-user-select:none;
-ms-user-select:none;
}
/* }*/
/*//.handler_bg{ background: #fff url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA3hpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNS1jMDIxIDc5LjE1NTc3MiwgMjAxNC8wMS8xMy0xOTo0NDowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDo0ZDhlNWY5My05NmI0LTRlNWQtOGFjYi03ZTY4OGYyMTU2ZTYiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6NTEyNTVEMURGMkVFMTFFNEI5ND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uZw+kUoDYEYgloMIvgHg/EM/ptHx0EFk9I8wAoEZ+IDUPiIMY8IN1QJwENOgj3ACo5gNAbMBAHLgAxA4gQ5igAnNJ0MwAVTsX7IKyY7L2UNuJAf+AmAmJ78AEDTBiwGYg5gbifCSxFCZoaBMCy4A4GOjnH0D6DpK4IxNSVIHAfSDOAeLraJrjgJp/AwPbHMhejiQnwYRmUzNQ4VQgDQqXK0ia/0I17wJiPmQNTNBEAgMlQIWiQA2vgWw7QppBekGxsAjIiEUSBNnsBDWEAY9mEFgMMgBk00E0iZtA7AHEctDQ58MRuA6wlLgGFMoMpIG1QFeGwAIxGZo8GUhIysmwQGSAZgwHaEZhICIzOaBkJkqyM0CAAQDGx279Jf50AAAAAABJRU5ErkJggg==") no-repeat center;}*/

@ -291,7 +291,7 @@ label.infolabel{display: block;float: left;width: 56px;text-align: right;margin-
.shaiTitle{display: block;padding-right: 20px;}
.shaiContent li.shaiItem.active{background-color: #4CACFF!important;color:#fff!important;}
.shaiContent li.shaiItem{padding:3px 15px;float: left;border-radius: 4px;color: #4C4C4C;cursor: pointer;margin-right: 15px;display: block}
.shaiContent li.shaiItem:hover{background-color: #F5F5F5}
.shaiContent li.shaiItem:hover{background-color: #4CACFF!important;color:#fff!important;}
.shaiAllItem{max-width: 1138px;}
.subshaicontent{display: none;box-sizing: border-box;position: absolute;width: 100%;top: 33px;left: 0px;background-color: #fff;box-shadow:0px 1px 4px rgba(76,76,76,0.2);padding:0px 20px;z-index: 99999;border-radius: 4px;max-height: 800px;overflow-y: auto}
.subshaicontent-part{border-bottom: 1px solid #eee;}

Loading…
Cancel
Save