Merge remote-tracking branch 'origin/master'

dev_forum
杨树明 6 years ago
commit 0e1dce4c09

@ -97,13 +97,6 @@ class CommonWorkItem extends Component{
setupdate = () => { setupdate = () => {
} }
toCreateProject = () => {
if (window.location.port == 3007) {
window.location.href = '/testbdweb.educoder.net/projects/new'
} else {
window.location.href = '/projects/new'
}
}
render(){ render(){
let { mainList,workType }=this.props; let { mainList,workType }=this.props;
const { aModalVisible, fileList, revise_reason } = this.state const { aModalVisible, fileList, revise_reason } = this.state

@ -85,13 +85,6 @@ class ConnectProject extends Component{
console.log(error); console.log(error);
}) })
} }
toCreateProject = () => {
if (window.location.port == 3007) {
window.location.href = '/testbdweb.educoder.net/projects/new'
} else {
window.location.href = '/projects/new'
}
}
//关联项目 //关联项目
openConnectionProject=(work)=>{ openConnectionProject=(work)=>{
this.work = work; this.work = work;
@ -175,7 +168,7 @@ class ConnectProject extends Component{
{ {
(!haveProjects) && (!haveProjects) &&
<div className="edu-txt-center"> <div className="edu-txt-center">
您当前尚未管理任何项目请先<WordsBtn style="blue" className="" onClick={this.toCreateProject}>创建项目</WordsBtn> 您当前尚未管理任何项目请先<WordsBtn style="blue" className="" onClick={this.props.toCreateProject}>创建项目</WordsBtn>
</div> </div>
} }

@ -477,7 +477,7 @@ class NewWork extends Component{
<span className="ml15 mr15">~</span> <span className="ml15 mr15">~</span>
{/* min={has_commit ? init_max_num : (min_num == undefined ? 2 : min_num + 1) } */} {/* min={has_commit ? init_max_num : (min_num == undefined ? 2 : min_num + 1) } */}
<ConditionToolTip condition={has_commit} title={'已有提交作品,人数范围只能扩大'}> <ConditionToolTip condition={has_commit} title={'已有提交作品,人数范围只能扩大'}>
<InputNumber className="winput-240-40" placeholder="请填写每组最大人数" value={max_num} <InputNumber className="winput-240-40" placeholder="请填写每组最大人数" value={max_num} max={10}
onChange={this.max_num_change} style={{width:'180px'}} /> onChange={this.max_num_change} style={{width:'180px'}} />
</ConditionToolTip> </ConditionToolTip>
<label className="color-grey-9 ml20 font-14">项目管理员角色的成员都可以提交作品提交作品时需要关联同组成员组内成员作品共享</label> <label className="color-grey-9 ml20 font-14">项目管理员角色的成员都可以提交作品提交作品时需要关联同组成员组内成员作品共享</label>

@ -17,6 +17,13 @@ export function RouteHOC(options = {}) {
} }
} }
toCreateProject = () => {
if (window.location.port == 3007) {
window.location.href = '/testbdweb.educoder.net/projects/new'
} else {
window.location.href = '/projects/new'
}
}
// common_homework group_homework // common_homework group_homework
// 是否是分组作业 // 是否是分组作业
isGroup = () => { isGroup = () => {
@ -156,7 +163,7 @@ export function RouteHOC(options = {}) {
toWorkQuestionPage={this.toWorkQuestionPage} toWorkQuestionPage={this.toWorkQuestionPage}
toWorkSettingPage={this.toWorkSettingPage} toWorkSettingPage={this.toWorkSettingPage}
toCreateProject={this.toCreateProject}
isGroup={this.isGroup} isGroup={this.isGroup}
getModuleName={this.getModuleName} getModuleName={this.getModuleName}

@ -69,20 +69,23 @@ class ExerciseDisplay extends Component{
return( return(
<div className="edu-back-white"> <div className="edu-back-white">
<div className={"bor-bottom-greyE padding20-30"}> <div className={" padding20-30"}>
<style> <style>
{ {
` `
.center{ .center{
text-align: center; text-align: center;
}
.edu-back-white>.bor-bottom-greyE:last-child {
border-bottom: none !important;
} }
` `
} }
</style> </style>
<div className={"font-18 center"}>{exercise&&exercise.exercise_name}</div> <div className={"font-18 center"}>{exercise&&exercise.exercise_name}</div>
<div className={"font-14 center color-grey-9"}>{exercise&&exercise.exercise_description}</div> <div className={"font-14 color-grey-9"}>{exercise&&exercise.exercise_description}</div>
</div> </div>
<div className={"bor-bottom-greyE padding20-30 newContainer"}> <div className={" padding20-30 newContainer"}>
<p className=" clearfix"> <p className=" clearfix">
{ {
exercise_types && exercise_types.q_singles > 0 && exercise_types && exercise_types.q_singles > 0 &&

@ -342,6 +342,11 @@ class ExerciceNew extends Component{
this.editingId = null; this.editingId = null;
this.fetchExercise() this.fetchExercise()
} }
goToPreview = () => {
const exercise_id = this.props.match.params.Id
const courseId = this.props.match.params.coursesId
this.props.history.push(`/courses/${courseId}/exercises/${exercise_id}/student_exercise_list?tab=2`)
}
render() { render() {
let { exercise_name, exercise_description, course_id, exercise_types, let { exercise_name, exercise_description, course_id, exercise_types,
exercise_questions, left_banner_id } = this.state; exercise_questions, left_banner_id } = this.state;
@ -366,6 +371,8 @@ class ExerciceNew extends Component{
const isAdmin = this.props.isAdmin() const isAdmin = this.props.isAdmin()
const courseId=this.props.match.params.coursesId; const courseId=this.props.match.params.coursesId;
const exercise_id = this.props.match.params.Id
const isEdit = this.isEdit const isEdit = this.isEdit
const commonHandler = { const commonHandler = {
onQestionDelete: this.onQestionDelete, onQestionDelete: this.onQestionDelete,
@ -395,7 +402,7 @@ class ExerciceNew extends Component{
background: #fff; background: #fff;
} }
.exerciseNew .markdown-body { .exerciseNew .markdown-body {
max-width: 1088px; max-width: 1128px;
} }
`}</style> `}</style>
<div className="edu-class-container edu-position courseForm"> <div className="edu-class-container edu-position courseForm">
@ -546,6 +553,11 @@ class ExerciceNew extends Component{
<ActionBtn style="green" className="mr20" onClick={() => this.addShixun(null)}> <ActionBtn style="green" className="mr20" onClick={() => this.addShixun(null)}>
<i className="iconfont icon-tianjiafangda color-white font-14 mr5" style={{ marginTop: '-1px', display: 'inline-block'}}></i> <i className="iconfont icon-tianjiafangda color-white font-14 mr5" style={{ marginTop: '-1px', display: 'inline-block'}}></i>
</ActionBtn> </ActionBtn>
{exercise_id && <ActionBtn style="blue" className="fr" onClick={() => this.goToPreview()}>
{/* <i className="iconfont icon-tianjiafangda color-white font-14 mr5" style={{ marginTop: '-1px', display: 'inline-block'}}></i> */}
试卷预览
</ActionBtn>}
</div>} </div>}
</div> </div>

@ -39,14 +39,14 @@ class NullChildEditor extends Component{
let { question_title, question_score, question_type, question_choices, standard_answers } = this.state; let { question_title, question_score, question_type, question_choices, standard_answers } = this.state;
let { question_id, index, onAnswerChange, addChildAnswer, toMDMode, exerciseIsPublish, let { question_id, index, onAnswerChange, addChildAnswer, toMDMode, exerciseIsPublish,
answers } = this.props; answers } = this.props;
// marginTop: '18px'
return( return(
<div className="df" style={{ marginTop: '18px'}}> <div className="df" style={{ }}>
<div className="color-grey-6 mb5 mt6" style={{ flex: '0 0 90px'}}>答案(填空{index + 1}):</div> <div className="color-grey-6 mb5 mt6" style={{ flex: '0 0 90px'}}>答案(填空{index + 1}):</div>
<div className="df flex1" style={{flexDirection: 'column'}}> <div className="df flex1" style={{flexDirection: 'column'}}>
{ {
answers.map((item, itemIndex) => { answers.map((item, itemIndex) => {
return <div className="df mb20 flex1" > return <div className="df flex1" >
<div className="flex1" style={{ flex: '0 0 1000px'}}> <div className="flex1" style={{ flex: '0 0 1000px'}}>
<DMDEditor <DMDEditor
className={'nullChildEditor'} className={'nullChildEditor'}

@ -80,12 +80,14 @@ class NullDisplay extends Component{
.answers .answer { .answers .answer {
background: #EDEDED; background: #EDEDED;
color: #C5C5C5; color: #C5C5C5;
width: 100%;
display: inline-block; display: inline-block;
line-height: 16px; line-height: 16px;
padding:12px 10px; padding:12px 10px;
margin-bottom:10px; margin-bottom:10px;
border-radius:2px; border-radius:2px;
max-width: 1024px;
word-break: break-all;
} }
.answerRow { .answerRow {
padding: 1px 0; padding: 1px 0;

@ -282,7 +282,7 @@ class NullEditor extends Component{
display: inline-block; display: inline-block;
} }
.content_editorMd_show { .content_editorMd_show {
display: flex;
maxWidth: 1000px; maxWidth: 1000px;
} }
`}</style> `}</style>

@ -71,7 +71,7 @@ class SingleDisplay extends Component{
let length = 5; let length = 5;
const qName = qNameArray[question_type] const qName = qNameArray[question_type]
return( return(
<div className="bor-bottom-greyE padding20-30" id={qNumber} _id={question_id}> <div className="bor-bottom-greyE padding20-30 singleDisplay" id={qNumber} _id={question_id}>
<style>{` <style>{`
.optionMdEditor { .optionMdEditor {
flex: 0 0 800px flex: 0 0 800px

@ -219,9 +219,10 @@ class SingleEditor extends Component{
} }
.optionRow { .optionRow {
margin:0px!important; margin:0px!important;
margin-bottom: 20px!important; /* margin-bottom: 20px!important; */
} }
.signleEditor .content_editorMd_show{ .signleEditor .content_editorMd_show{
display: flex;
margin-top:0px!important; margin-top:0px!important;
border-radius:2px; border-radius:2px;
max-width: 1056px; max-width: 1056px;

@ -29,4 +29,8 @@
.nullChildEditor { .nullChildEditor {
width: 100%; width: 100%;
display: inline-block; display: inline-block;
}
.singleDisplay .options .markdown-body {
max-width: 1116px;
} }

@ -80,8 +80,15 @@ function md_elocalStorage(editor,mdu,id){
md_add_data("content",mdu,editor.getValue()); md_add_data("content",mdu,editor.getValue());
var id1 = "#e_tip_"+id; var id1 = "#e_tip_"+id;
var id2 = "#e_tips_"+id; var id2 = "#e_tips_"+id;
$(id2).html(" 数据已于 " + h + ':' + m + ':' + s +" 保存 "); var textStart = " 数据已于 "
var text = textStart + h + ':' + m + ':' + s +" 保存 ";
// 占位符
if ($(id2).html() && $(id2).html() != ' ' && $(id2).html().startWith(textStart) == false) {
$(id2).html( $(id2).html().split(' (')[0] + ` (${text})`);
} else {
$(id2).html(text);
}
// $(id2).html(""); // $(id2).html("");
} }
},10000); },10000);

Loading…
Cancel
Save