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

dev_hs
cxt 5 years ago
commit c3b17d08fb

@ -33,7 +33,7 @@ class AccountsController < ApplicationController
uid_logger("start register: verifi_code is #{verifi_code}, code is #{code}, time is #{Time.now.to_i - verifi_code.try(:created_at).to_i}")
# check_code = (verifi_code.try(:code) == code.strip && (Time.now.to_i - verifi_code.created_at.to_i) <= 10*60)
# todo 上线前请删除万能验证码"513231"
unless code == "513231" && request.host == "47.96.87.25"
unless code == "513231" && request.subdomain == "pre-newweb"
return normal_status(-2, "验证码不正确") if verifi_code.try(:code) != code.strip
return normal_status(-2, "验证码已失效") if !verifi_code&.effective?
end

@ -245,7 +245,8 @@ class ApplicationController < ActionController::Base
# 测试版前端需求
if request.host == "47.96.87.25"
logger.info("subdomain:#{request.subdomain}")
if request.subdomain == "pre-newweb"
if params[:debug] == 'teacher' #todo 为了测试,记得讲debug删除
User.current = User.find 81403
elsif params[:debug] == 'student'

@ -779,4 +779,7 @@ html>body #ajax-indicator { position: fixed; }
border-top-right-radius: 4px;
border-bottom-right-radius: 4px;
border-bottom-left-radius: 4px;
}
.yslminHeigth{
min-height: 400px;
}

@ -350,7 +350,7 @@ class BoardsNew extends Component{
}],
})(
<Input placeholder={`请输入帖子标题,最大限制${MAX_TITLE_LENGTH}个字符 `}className="searchViewAfter" maxLength={MAX_TITLE_LENGTH}
onInput={this.changeTitle} addonAfter={`${title_num}/${MAX_TITLE_LENGTH}`} />
onInput={this.changeTitle} suffix={`${title_num}/${MAX_TITLE_LENGTH}`} />
)}
</Form.Item>

@ -399,7 +399,7 @@ class NewWork extends Component{
required: true, message: '请输入标题'
}],
})(
<Input placeholder="请输入作业标题最大限制60个字符" onInput={this.changeTitle} className="searchView searchViewAfter" style={{"width":"100%"}} maxLength={MAX_TITLE_LENGTH} addonAfter={`${String(title_num)}/${MAX_TITLE_LENGTH}`}/>
<Input placeholder="请输入作业标题最大限制60个字符" onInput={this.changeTitle} className="searchView searchViewAfter" style={{"width":"100%"}} maxLength={MAX_TITLE_LENGTH} suffix={`${String(title_num)}/${MAX_TITLE_LENGTH}`}/>
)}
</Form.Item>
<style>{`

@ -451,7 +451,7 @@ class ExerciceNew extends Component{
}],
})( */}
<Input placeholder={`请输入试卷标题,最大限制${TITLE_MAX_LENGTH}个字符`} maxLength={TITLE_MAX_LENGTH} className="input-100-40 mt5" value={exercise_name}
onChange={this.exercise_name_change} addonAfter={`${exercise_name ? exercise_name.length : 0}/${TITLE_MAX_LENGTH}`}
onChange={this.exercise_name_change} suffix={`${exercise_name ? exercise_name.length : 0}/${TITLE_MAX_LENGTH}`}
/>
{/* )} */}
</Form.Item>

@ -479,6 +479,12 @@ class ExerciseReviewAndAnswer extends Component{
})
}
// 返回
returnBtn = () =>{
let coursesId=this.props.match.params.coursesId;
let eId=this.props.match.params.Id;
this.props.history.push(`/courses/${coursesId}/exercises/${eId}/student_exercise_list?tab=0`)
}
render(){
let coursesId=this.props.match.params.coursesId;
@ -561,7 +567,7 @@ class ExerciseReviewAndAnswer extends Component{
</span>
{
(isAdmin || ( isStudent && exercise && user_exercise_status == 1)) ?
<WordsBtn className="fr font-16 lineh-40" style="grey" onClick={()=>this.props.history.goBack()}>返回</WordsBtn>
<WordsBtn className="fr font-16 lineh-40" style="grey" onClick={this.returnBtn}>返回</WordsBtn>
:
time && time != 0 ?
<div className="fr remainingTime">

@ -316,7 +316,7 @@ class shixunAnswer extends Component{
</span>
<span className="fl mt3 font-16">
<span className="font-bd mr15">{item[0].position}</span>
<Link to={ "/tasks/" + item[0].game_identifier }>
<Link to={ "/tasks/" + item[0].game_identifier } style={{"cursor":"pointer"}}>
<span className={"font-16"}>{item[0].name}</span>
</Link>
</span>

@ -149,7 +149,7 @@ class Eduinforms extends Component{
</div>
:
<div className="edu-back-white ">
<div id="MakedownHTML" className={"markdown-body fonttext yslmtopcg"} style={{minHeight:"400px"}} dangerouslySetInnerHTML={{__html: markdownToHTML(description).replace(/▁/g, "▁▁▁")}}>
<div id="MakedownHTML" className={"markdown-body fonttext yslmtopcg yslminHeigth"} style={{minHeight:"400px"}} dangerouslySetInnerHTML={{__html: markdownToHTML(description).replace(/▁/g, "▁▁▁")}}>
</div>

@ -379,7 +379,7 @@ class GraduationTasksedit extends Component{
<Form.Item label="任务标题" >
{getFieldDecorator('name', {
rules: [{ required: true, message: "请输入标题" }],
})(<Input placeholder="请输入任务名称最大限制60个字符" value={name} onInput={this.changeTitle} className="searchView searchViewAfter" style={{"width":"100%"}} maxLength="60" addonAfter={String(title_num)}/>)}
})(<Input placeholder="请输入任务名称最大限制60个字符" value={name} onInput={this.changeTitle} className="searchView searchViewAfter" style={{"width":"100%"}} maxLength="60" suffix={String(title_num)}/>)}
</Form.Item>
<input type="hidden" id='nametypes' />
</div>

@ -384,7 +384,7 @@ class GraduationTasksnew extends Component {
rules: [{required: true, message: "不能为空"}],
})(<Input placeholder="请输入任务名称最大限制60个字符" value={title_value} onInput={this.changeTitle}
className="searchView searchViewAfter h40" style={{"width": "100%"}} maxLength="60"
addonAfter={String(title_num)}/>)}
suffix={String(title_num)}/>)}
</Form.Item>
<input type="hidden" id='nametypes' />
</div>

@ -114,7 +114,7 @@ class GraduateTopicDetail extends Component{
<p className="clearfix mb20 lineh-25">
<span className="color-grey-3 font-24 fl task-hide" style={{lineHeight:"25px",maxWidth:"900px"}}>{tableData && tableData.graduation_topic_name}</span>
<span className="fl mt1" style={{height:"25px"}}><CoursesListType typelist={[`${tableData && tableData.status_name}`]} typesylename={""} /></span>
<WordsBtn className="fr font-16 mt1" style="grey" onClick={()=>this.props.history.goBack()}>返回</WordsBtn>
<WordsBtn className="fr font-16 mt1" style="grey" to={`/courses/${tableData.course_id}/graduation_topics/${tableData.graduation_id}`}>返回</WordsBtn>
</p>
<div>
<div className="clearfix edu-back-white bor-bottom-greyE" >

@ -12,6 +12,8 @@ import "../../common/formCommon.css"
import '../style.css'
import '../../css/Courses.css'
import { WordsBtn, City } from 'educoder'
import {Link} from 'react-router-dom'
// import City from './City'
// import './board.css'
@ -20,6 +22,7 @@ import { WordsBtn, City } from 'educoder'
const confirm = Modal.confirm;
const $ = window.$
const { Option } = Select;
const NAME_COUNT=60;
// 新建毕设选题
// https://lanhuapp.com/web/#/item/project/board/detail?pid=a3bcd4b1-99ce-4e43-8ead-5b8b0a410807&project_id=a3bcd4b1-99ce-4e43-8ead-5b8b0a410807&image_id=c6d9b36f-7701-4035-afdb-62404681108c
class GraduateTopicNew extends Component{
@ -38,7 +41,7 @@ class GraduateTopicNew extends Component{
topic_source:[],
topic_type:[],
attachments:undefined,
addonAfter:60,
addonAfter:0,
left_banner_id:undefined,
course_name:undefined
}
@ -99,7 +102,7 @@ class GraduateTopicNew extends Component{
topic_source:result.data.topic_source,
topic_type:result.data.topic_type,
attachments:result.data.attachments,
addonAfter:20-parseInt(result.data.selected_data.name.length)
addonAfter:parseInt(result.data.selected_data.name.length)
})
this.props.form.setFieldsValue({
tea_id:result.data.selected_data.tea_id,
@ -257,9 +260,9 @@ class GraduateTopicNew extends Component{
// 附件相关 ------------ END
changeTopicName=(e)=>{
let num= 60 - parseInt(e.target.value.length);
// let num= 60 - parseInt(e.target.value.length);
this.setState({
addonAfter:num < 0 ? 0 : num
addonAfter:e.target.value.length
})
}
render() {
@ -331,7 +334,7 @@ class GraduateTopicNew extends Component{
</p>
<div className="clearfix mb20 lineh-25">
<p className="fl color-black summaryname">{topicId==undefined?"新建":"编辑"}毕设选题</p>
<a onClick={()=>this.props.history.goBack()} className="color-grey-6 fr font-16">返回</a>
<Link to={`/courses/${coursesId}/graduation_topics/${left_banner_id}`} className="color-grey-6 fr font-16">返回</Link>
</div>
<Form {...formItemLayout} onSubmit={this.handleSubmit}>
@ -366,7 +369,7 @@ class GraduateTopicNew extends Component{
max: 60, message: '最大限制为60个字符',
}],
})(
<Input placeholder="请输入帖子选题名称最大限制60个字符" maxLength="60" onInput={this.changeTopicName} autoComplete="off" addonAfter={String(addonAfter)} className="searchViewAfter" />
<Input placeholder="请输入帖子选题名称最大限制60个字符" maxLength="60" onInput={this.changeTopicName} autoComplete="off" suffix={`${String(addonAfter)}/${NAME_COUNT}`} className="searchViewAfter" />
)}
</Form.Item>
</div>

@ -136,7 +136,7 @@ class PollDetailIndex extends Component{
<span className="mt3 fl" style={{height:"25px"}}>
<CoursesListType typelist={[`${map[pollDetail && pollDetail.polls_status]}`]} typesylename={""} />
</span>
<WordsBtn className="fr font-16 mt2" style="grey" onClick={()=>this.props.history.goBack()}>返回</WordsBtn>
<WordsBtn className="fr font-16 mt2" style="grey" to={`/courses/${this.props.match.params.coursesId}/polls/${user_permission && user_permission.left_banner_id}`}>返回</WordsBtn>
</p>
<div>
<div className="clearfix edu-back-white pl30 pr30 bor-bottom-greyE">

@ -327,7 +327,7 @@ class PollInfo extends Component{
<span className="color-grey-3 font-24 fl task-hide break-word" style={{maxWidth:"900px",lineHeight:"30px"}}>{poll && poll.polls_name}</span>
<CoursesListType typelist={[`${statudmap[poll && poll.poll_status]}`]} typesylename={""} />
{
isAdmin || (poll && poll.user_poll_status == 1) ? <WordsBtn className="fr font-16 mt5" style="grey" onClick={()=>this.props.history.goBack()}>返回</WordsBtn> :''
isAdmin || (poll && poll.user_poll_status == 1) ? <WordsBtn className="fr font-16 mt5" style="grey" to={`/courses/${coursesId}/polls/${this.props.match.params.pollId}/detail`}>返回</WordsBtn> :''
}
</p>

@ -1,6 +1,9 @@
import React, {Component} from "react";
import {Form, Input, Tooltip, Checkbox, Radio, Select, message, Modal, Button} from 'antd'
import {WordsBtn, ActionBtn} from 'educoder'
import {Link} from 'react-router-dom'
import '../css/members.css'
import "../common/formCommon.css"
@ -2467,15 +2470,14 @@ class PollNew extends Component {
<div className="clearfix mb30">
<p
className="fl color-black summaryname mt5">{this.props.match.params.news === undefined ? "新建问卷" : this.props.match.params.news === "new" ? "新建问卷" : "编辑问卷"}</p>
{
this.props.match.params.news === "new" ?
<a href={`/courses/${this.props.match.params.coursesId}/polls/${this.props.match.params.pollid}`}
className=" fr font-16">返回</a>
:
<a href={`/courses/${this.props.match.params.coursesId}/polls/${left_banner_id}`}
className=" fr font-16">返回</a>
}
{
this.props.match.params.news === "new" ?
<a href={`/courses/${this.props.match.params.coursesId}/polls/${this.props.match.params.pollid}`}
className=" fr font-16">返回</a>
:
<a href={`/courses/${this.props.match.params.coursesId}/polls/${left_banner_id}`}
className=" fr font-16">返回</a>
}
</div>
{/*<Form {...formItemLayout} onSubmit={this.handleSubmit}>*/}
@ -2523,7 +2525,7 @@ class PollNew extends Component {
}
</div>
{/*addonAfter={String(addonAfter)}*/}
{/*suffix={String(addonAfter)}*/}
<Input placeholder="请输入问卷标题最大限制60个字符" maxLength="60"
style={{"margin-top": "15px", "text-align": "left"}}
onInput={this.changeTopicName}
@ -2554,7 +2556,7 @@ class PollNew extends Component {
readOnly={readOnlys}
onInput={this.changeTopicNametwo}
value={this.state.polls_descriptiontest}
autoComplete="off" addonAfter={"100"}></TextArea>
autoComplete="off" suffix={"100"}></TextArea>
{
this.state.Newedit === true || this.state.mysave === true ?
<div>

@ -77,7 +77,7 @@ function EditVideoModal (props) {
}],
})(
<Input placeholder="" className="titleInput" maxLength={MAX_LENGTH}
addonAfter={String(_title ? `${String(_title.length)}/${MAX_LENGTH}` : 0)} />
suffix={String(_title ? `${String(_title.length)}/${MAX_LENGTH}` : 0)} />
)}
</Form.Item>
</ModalWrapper>

Loading…
Cancel
Save