dev_forum
杨树林 5 years ago
parent d3cd34b2c1
commit 5af29371bf

@ -1327,6 +1327,47 @@ class Listofworks extends Component {
}); });
} }
// 导出实习报告批量
internshipreport = ()=>{
console.log("internshipreport");
let url = "/zip/shixun_report";
let homeworkid = this.props.match.params.homeworkid;
axios.get((url),{
params: {
homework_common_id: homeworkid,
work_status: this.state.course_groupyslstwo,
course_group: this.state.checkedValuesineinfo,
search: this.state.searchtext,
}
}).then((response) => {
console.log("1342");
console.log(response);
}).catch((error) => {
console.log(error)
});
}
// 课堂学生成绩的导出下载
Classstudentachievement=()=>{
console.log("Classstudentachievement");
const course_id = this.props.match.params.coursesId;
let url = "/courses/"+course_id+"/export_member_scores_excel.xlsx";
axios.get((url),{
params: {
group_id: this.state.checkedValuesineinfo,
search: this.state.searchtext,
}
}).then((response) => {
console.log("1306");
console.log(response);
}).catch((error) => {
console.log(error)
});
}
render() { render() {
// console.log("Listofworks.js000") // console.log("Listofworks.js000")
@ -1475,8 +1516,8 @@ class Listofworks extends Component {
{this.props.isAdmin()? <li className="li_line drop_down fr color-blue font-16 mr8 mt20" style={{"padding":"0 20px"}}> {this.props.isAdmin()? <li className="li_line drop_down fr color-blue font-16 mr8 mt20" style={{"padding":"0 20px"}}>
导出<i className="iconfont icon-xiajiantou font-12 ml2"></i> 导出<i className="iconfont icon-xiajiantou font-12 ml2"></i>
<ul className="drop_down_menu" style={{"right":"-0px","left":"unset","height":"auto"}}> <ul className="drop_down_menu" style={{"right":"-0px","left":"unset","height":"auto"}}>
<li><a href={`/api/student_works/${jobsettingsdata === undefined ? "" :jobsettingsdata.data.category.category_id}/export_shixun_work_report.pdf`} >实训报告</a></li> <li><a onClick={()=>this.internshipreport()}>实训报告</a></li>
<li><a href={`/api/homework_commons/${jobsettingsdata === undefined ? "" :jobsettingsdata.data.category.category_id}/works_list.xlsx`} >学生成绩</a></li> <li><a onClick={()=>this.Classstudentachievement()} >学生成绩</a></li>
</ul> </ul>
</li>:""} </li>:""}
{this.props.isAdmin() ? {this.props.isAdmin() ?

@ -1,6 +1,6 @@
import React, {Component} from "react"; import React, {Component} from "react";
import CoursesListType from '../coursesPublic/CoursesListType'; import CoursesListType from '../coursesPublic/CoursesListType';
import {WordsBtn,ActionBtn,markdownToHTML} from 'educoder'; import {WordsBtn, ActionBtn, markdownToHTML} from 'educoder';
import GraduateTopicReply from '../graduation/topics/GraduateTopicReply' import GraduateTopicReply from '../graduation/topics/GraduateTopicReply'
import MemoDetailMDEditortwo from '../../forums/MemoDetailMDEditortwo' import MemoDetailMDEditortwo from '../../forums/MemoDetailMDEditortwo'
import { import {
@ -55,7 +55,7 @@ class Workquestionandanswer extends Component {
// radiogroup:1, // radiogroup:1,
// //
// }); // });
this.state ={ this.state = {
// namestring:"JFinal是基于Java语言的极速web开发框架其核心设计目标是开发迅速、代码量少、学习简单、功能强大、轻量级、易扩展、`Restful`。在拥有Java语言所有优势的同时再拥有`ruby`、`python`等动态语言的开发效率。\r\n\r\n在本实训中我们将基于JFinal框架搭建一个在线商城。我们会学习到如何合理设计`Model`来进行数据表映射和数据操作、如何设计`Controller`对请求进行合理的处理…… 通过本实训,您不仅能收获到具体框架和技术的使用经验,也能对项目架构设计等知识有所了解或巩固。\r\n\r\n<div align=\"center\">\r\n\t<img src=\"/attachments/download/170838\" />\r\n</div>\r\n\r\n本实训聚焦一个在线商城项目的核心业务逻辑实现。你将在这一过程中收获Java Web项目设计的基本思想也能得到编程能力的一次跃升。", // namestring:"JFinal是基于Java语言的极速web开发框架其核心设计目标是开发迅速、代码量少、学习简单、功能强大、轻量级、易扩展、`Restful`。在拥有Java语言所有优势的同时再拥有`ruby`、`python`等动态语言的开发效率。\r\n\r\n在本实训中我们将基于JFinal框架搭建一个在线商城。我们会学习到如何合理设计`Model`来进行数据表映射和数据操作、如何设计`Controller`对请求进行合理的处理…… 通过本实训,您不仅能收获到具体框架和技术的使用经验,也能对项目架构设计等知识有所了解或巩固。\r\n\r\n<div align=\"center\">\r\n\t<img src=\"/attachments/download/170838\" />\r\n</div>\r\n\r\n本实训聚焦一个在线商城项目的核心业务逻辑实现。你将在这一过程中收获Java Web项目设计的基本思想也能得到编程能力的一次跃升。",
props: props, props: props,
starttimetype: false, starttimetype: false,
@ -71,7 +71,7 @@ class Workquestionandanswer extends Component {
ealuation: false, ealuation: false,
latededuction: undefined, latededuction: undefined,
latedeductiontwo: undefined, latedeductiontwo: undefined,
Showupdateinstructions:false, Showupdateinstructions: false,
database: false, database: false,
datasheet: false, datasheet: false,
databasetwo: undefined, databasetwo: undefined,
@ -79,9 +79,9 @@ class Workquestionandanswer extends Component {
publicwork: undefined, publicwork: undefined,
memo: {id: "94", user_id: 1}, memo: {id: "94", user_id: 1},
polls_descriptiontest: "作业说明...", polls_descriptiontest: "作业说明...",
jobdescriptiondisplay:"none", jobdescriptiondisplay: "none",
score_open:false, score_open: false,
code_review:false code_review: false
} }
} }
@ -92,11 +92,11 @@ class Workquestionandanswer extends Component {
let query = this.props.location.pathname; let query = this.props.location.pathname;
const type = query.split('/'); const type = query.split('/');
this.setState({ this.setState({
shixuntypes:type[3] shixuntypes: type[3]
}) })
} }
isupdatas=()=>{ isupdatas = () => {
var homeworkid = this.props.match.params.homeworkid; var homeworkid = this.props.match.params.homeworkid;
this.Gettitleinformation(homeworkid) this.Gettitleinformation(homeworkid)
} }
@ -110,7 +110,7 @@ class Workquestionandanswer extends Component {
// console.log("设置页") // console.log("设置页")
// console.log(JSON.stringify(result)) // console.log(JSON.stringify(result))
this.setState({ this.setState({
jobsettingsdata:result, jobsettingsdata: result,
...result.data ...result.data
}) })
} }
@ -118,9 +118,9 @@ class Workquestionandanswer extends Component {
console.log(error) console.log(error)
}) })
} }
jobdescriptiondisplaybj =()=>{ jobdescriptiondisplaybj = () => {
this.setState({ this.setState({
Showupdateinstructions:true, Showupdateinstructions: true,
}) })
} }
@ -134,8 +134,8 @@ class Workquestionandanswer extends Component {
//立即发布 //立即发布
homeworkstart = () => { homeworkstart = () => {
let homeworkid=this.props.match.params.homeworkid; let homeworkid = this.props.match.params.homeworkid;
let url="/homework_commons/"+homeworkid+"/publish_groups.json"; let url = "/homework_commons/" + homeworkid + "/publish_groups.json";
axios.get(url).then((response) => { axios.get(url).then((response) => {
@ -146,9 +146,9 @@ class Workquestionandanswer extends Component {
modalname: "立即发布", modalname: "立即发布",
modaltype: response.data.course_groups === null || response.data.course_groups.length === 0 ? 2 : 1, modaltype: response.data.course_groups === null || response.data.course_groups.length === 0 ? 2 : 1,
visible: true, visible: true,
Topval:"学生将立即收到作业", Topval: "学生将立即收到作业",
// Botvalleft:"暂不发布", // Botvalleft:"暂不发布",
Botval:`本操作只对"未发布"的分班有效`, Botval: `本操作只对"未发布"的分班有效`,
starttime: "发布时间:" + moment(moment(new Date())).format("YYYY-MM-DD HH:mm"), starttime: "发布时间:" + moment(moment(new Date())).format("YYYY-MM-DD HH:mm"),
endtime: "截止时间:" + endtime, endtime: "截止时间:" + endtime,
Cancelname: "暂不发布", Cancelname: "暂不发布",
@ -156,8 +156,8 @@ class Workquestionandanswer extends Component {
Cancel: this.homeworkhide, Cancel: this.homeworkhide,
Saves: this.homeworkstartend, Saves: this.homeworkstartend,
course_groups: response.data.course_groups, course_groups: response.data.course_groups,
starttimes:starttime, starttimes: starttime,
typs:"start", typs: "start",
}) })
} }
}).catch((error) => { }).catch((error) => {
@ -167,8 +167,8 @@ class Workquestionandanswer extends Component {
} }
//立即截止 //立即截止
homeworkends = () => { homeworkends = () => {
let homeworkid=this.props.match.params.homeworkid; let homeworkid = this.props.match.params.homeworkid;
let url="/homework_commons/"+homeworkid+"/end_groups.json"; let url = "/homework_commons/" + homeworkid + "/end_groups.json";
axios.get(url).then((response) => { axios.get(url).then((response) => {
@ -178,9 +178,9 @@ class Workquestionandanswer extends Component {
modalname: "立即截止", modalname: "立即截止",
modaltype: response.data.course_groups === null || response.data.course_groups.length === 0 ? 2 : 1, modaltype: response.data.course_groups === null || response.data.course_groups.length === 0 ? 2 : 1,
visible: true, visible: true,
Topval:"学生将不能再提交作业", Topval: "学生将不能再提交作业",
// Botvalleft:"暂不截止", // Botvalleft:"暂不截止",
Botval:`本操作只对"提交中"的分班有效`, Botval: `本操作只对"提交中"的分班有效`,
Cancelname: "暂不截止", Cancelname: "暂不截止",
Savesname: "立即截止", Savesname: "立即截止",
Cancel: this.homeworkhide, Cancel: this.homeworkhide,
@ -188,7 +188,7 @@ class Workquestionandanswer extends Component {
starttime: undefined, starttime: undefined,
endtime: undefined, endtime: undefined,
course_groups: response.data.course_groups, course_groups: response.data.course_groups,
typs:"end", typs: "end",
}) })
} }
}).catch((error) => { }).catch((error) => {
@ -198,7 +198,7 @@ class Workquestionandanswer extends Component {
} }
// 立即发布 // 立即发布
homeworkstartend = (ds,endtime) => { homeworkstartend = (ds, endtime) => {
var homeworkid = this.props.match.params.homeworkid; var homeworkid = this.props.match.params.homeworkid;
let {course_groupslist} = this.state; let {course_groupslist} = this.state;
@ -207,13 +207,13 @@ class Workquestionandanswer extends Component {
axios.post(url, { axios.post(url, {
homework_ids: [homeworkid], homework_ids: [homeworkid],
group_ids: course_groupslist, group_ids: course_groupslist,
end_time:endtime, end_time: endtime,
}).then((result) => { }).then((result) => {
if (result.status === 200) { if (result.status === 200) {
if (result.data.status === 0) { if (result.data.status === 0) {
notification.open({ notification.open({
message:"提示", message: "提示",
description:result.data.message description: result.data.message
}); });
this.homeworkhide(); this.homeworkhide();
} }
@ -239,8 +239,8 @@ class Workquestionandanswer extends Component {
.then((response) => { .then((response) => {
if (response.data.status == 0) { if (response.data.status == 0) {
notification.open({ notification.open({
message:"提示", message: "提示",
description:response.data.message description: response.data.message
}); });
this.homeworkhide() this.homeworkhide()
} }
@ -249,77 +249,113 @@ class Workquestionandanswer extends Component {
console.log(error); console.log(error);
}); });
} }
ReleaseNotes=(explanations)=>{ ReleaseNotes = (explanations) => {
var homeworkid = this.props.match.params.homeworkid; var homeworkid = this.props.match.params.homeworkid;
let url=`/homework_commons/${homeworkid}/update_explanation.json`; let url = `/homework_commons/${homeworkid}/update_explanation.json`;
axios.post((url), { axios.post((url), {
explanation: explanations explanation: explanations
}) })
.then((result)=>{ .then((result) => {
if(result){ if (result) {
this.props.showNotification(`${result.data.message}`); this.props.showNotification(`${result.data.message}`);
this.setState({ this.setState({
Showupdateinstructions:false Showupdateinstructions: false
}) })
var homeworkid = this.props.match.params.homeworkid; var homeworkid = this.props.match.params.homeworkid;
// console.log(homeworkid) // console.log(homeworkid)
this.Gettitleinformation(homeworkid) this.Gettitleinformation(homeworkid)
} }
}).catch((error)=>{ }).catch((error) => {
console.log(error); console.log(error);
}) })
} }
NOReleaseNotes=()=>{ NOReleaseNotes = () => {
this.setState({ this.setState({
Showupdateinstructions:false, Showupdateinstructions: false,
}) })
} }
workshowmodel=()=>{ workshowmodel = () => {
this.setState({ this.setState({
showmodel:true showmodel: true
}) })
} }
hideshowmodel=()=>{ hideshowmodel = () => {
this.setState({ this.setState({
showmodel:false showmodel: false
}) })
} }
homeworkhide=()=>{ homeworkhide = () => {
this.isupdatas() this.isupdatas()
this.setState({ this.setState({
modalname:undefined, modalname: undefined,
modaltype:undefined, modaltype: undefined,
visible:false, visible: false,
Topval:undefined, Topval: undefined,
Topvalright:undefined, Topvalright: undefined,
Botvalleft:undefined, Botvalleft: undefined,
Botval:undefined, Botval: undefined,
starttime:undefined, starttime: undefined,
endtime:undefined, endtime: undefined,
Cancelname:undefined, Cancelname: undefined,
Savesname:undefined, Savesname: undefined,
Cancel:undefined, Cancel: undefined,
Saves:undefined, Saves: undefined,
StudentList_value:undefined, StudentList_value: undefined,
addname:undefined, addname: undefined,
addnametype:false, addnametype: false,
addnametab:undefined, addnametab: undefined,
typs:undefined, typs: undefined,
starttimes:undefined, starttimes: undefined,
}) })
} }
getcourse_groupslist=(id)=>{ getcourse_groupslist = (id) => {
this.setState({ this.setState({
course_groupslist:id course_groupslist: id
}) })
} }
// 导出实习报告批量
internshipreport = () => {
console.log("internshipreport");
var homeworkid = this.props.match.params.homeworkid;
let url = "/zip/shixun_report";
axios.get((url),{
params: {
homework_common_id: homeworkid,
}
}).then((response) => {
console.log("326");
console.log(response);
}).catch((error) => {
console.log(error)
});
}
// 课堂学生成绩的导出下载
Classstudentachievement = () => {
console.log("Classstudentachievement");
const course_id = this.props.match.params.coursesId;
let url = "/courses/" + course_id + "/export_member_scores_excel.xlsx";
axios.get(url).then((response) => {
console.log("339");
console.log(response);
}).catch((error) => {
console.log(error)
});
}
render() { render() {
const dateFormat = 'YYYY-MM-DD HH:mm:ss'; const dateFormat = 'YYYY-MM-DD HH:mm:ss';
let {starttimetype, endtimetype, latetimetype, allowlate, latepenaltytype, jobsettingsdata,score_open,Showupdateinstructions let {
, homework_id} = this.state; starttimetype, endtimetype, latetimetype, allowlate, latepenaltytype, jobsettingsdata, score_open, Showupdateinstructions
, homework_id
} = this.state;
const radioStyle = { const radioStyle = {
display: 'block', display: 'block',
height: '30px', height: '30px',
@ -334,14 +370,14 @@ class Workquestionandanswer extends Component {
return ( return (
<div className="newMain clearfix "> <div className="newMain clearfix ">
{this.state.showmodel===true?<ShixunWorkModal {this.state.showmodel === true ? <ShixunWorkModal
{...this.props} {...this.props}
visible={this.state.showmodel} visible={this.state.showmodel}
modalname={"代码查重"} modalname={"代码查重"}
data={[]} data={[]}
issCancel={()=>this.hideshowmodel()} issCancel={() => this.hideshowmodel()}
updatas={()=>this.isupdatas()} updatas={() => this.isupdatas()}
/>:""} /> : ""}
{/*立即发布*/} {/*立即发布*/}
<HomeworkModal <HomeworkModal
modaltype={this.state.modaltype} modaltype={this.state.modaltype}
@ -358,7 +394,7 @@ class Workquestionandanswer extends Component {
Cancel={this.state.Cancel} Cancel={this.state.Cancel}
Saves={this.state.Saves} Saves={this.state.Saves}
course_groups={this.state.course_groups} course_groups={this.state.course_groups}
getcourse_groupslist={(id)=>this.getcourse_groupslist(id)} getcourse_groupslist={(id) => this.getcourse_groupslist(id)}
starttimes={this.state.starttimes} starttimes={this.state.starttimes}
typs={this.state.typs} typs={this.state.typs}
/> />
@ -366,11 +402,11 @@ class Workquestionandanswer extends Component {
<div className="educontent mb30"> <div className="educontent mb30">
<p className="clearfix mb20 mt10"> <p className="clearfix mb20 mt10">
<ActionBtn className=" btn colorgrey fl hovercolorblue " <ActionBtn className=" btn colorgrey fl hovercolorblue "
to={"/courses/"+this.props.match.params.coursesId+"/students"}>{jobsettingsdata === undefined ? "" : jobsettingsdata.data.course_name}</ActionBtn> to={"/courses/" + this.props.match.params.coursesId + "/students"}>{jobsettingsdata === undefined ? "" : jobsettingsdata.data.course_name}</ActionBtn>
<span className="color-grey-9 fl ml3 mr3">&gt;</span> <span className="color-grey-9 fl ml3 mr3">&gt;</span>
<ActionBtn <ActionBtn
className=" btn colorgrey fl hovercolorblue " className=" btn colorgrey fl hovercolorblue "
to={`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${jobsettingsdata===undefined?"":jobsettingsdata.data.category.category_id}`}>{jobsettingsdata === undefined ? "" : jobsettingsdata.data.category.category_name}</ActionBtn> to={`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${jobsettingsdata === undefined ? "" : jobsettingsdata.data.category.category_id}`}>{jobsettingsdata === undefined ? "" : jobsettingsdata.data.category.category_name}</ActionBtn>
<span className="color-grey-9 fl ml3 mr3">&gt;</span> <span className="color-grey-9 fl ml3 mr3">&gt;</span>
<WordsBtn className="fl">作业详情</WordsBtn> <WordsBtn className="fl">作业详情</WordsBtn>
</p> </p>
@ -382,17 +418,21 @@ class Workquestionandanswer extends Component {
<CoursesListType <CoursesListType
typelist={jobsettingsdata === undefined ? [""] : jobsettingsdata.data.homework_status} typelist={jobsettingsdata === undefined ? [""] : jobsettingsdata.data.homework_status}
/> />
<a className="color-grey-9 fr font-16 summaryname ml20 mr20" href={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${jobsettingsdata === undefined ? "" :jobsettingsdata.data.category.category_id}`}>返回</a> <a className="color-grey-9 fr font-16 summaryname ml20 mr20"
<a className="color-grey-9 fr font-16 mr20" href={`/shixuns/${jobsettingsdata===undefined?"":jobsettingsdata.data.shixun_identifier}/challenges`} target={"_blank"}>实训详情</a> href={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${jobsettingsdata === undefined ? "" : jobsettingsdata.data.category.category_id}`}>返回</a>
<a className="color-grey-9 fr font-16 mr20"
href={`/shixuns/${jobsettingsdata === undefined ? "" : jobsettingsdata.data.shixun_identifier}/challenges`}
target={"_blank"}>实训详情</a>
</div> </div>
<div className="edu-back-white"> <div className="edu-back-white">
<div className="stud-class-set bor-bottom-greyE "> <div className="stud-class-set bor-bottom-greyE ">
<div className=" clearfix edu-back-white poll_list"> <div className=" clearfix edu-back-white poll_list">
{this.props.isAdmin() === true? <Link {this.props.isAdmin() === true ? <Link
to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/list`}>作品列表</Link>: to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/list`}>作品列表</Link> :
<Link to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/openlist`}>作品列表</Link> <Link
to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/openlist`}>作品列表</Link>
// :<Link // :<Link
// to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/noopenlist`}>作品列表(学生完成)</Link> // to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/noopenlist`}>作品列表(学生完成)</Link>
} }
@ -400,11 +440,12 @@ class Workquestionandanswer extends Component {
<Link <Link
className="active" className="active"
to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/questions`}>作业问答</Link> to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/questions`}>作业问答</Link>
{this.props.isAdmin()? {this.props.isAdmin() ?
this.state.code_review===true||jobsettingsdata === undefined ? [""] : jobsettingsdata.data.homework_status[0]==="未发布"?"":<Link this.state.code_review === true || jobsettingsdata === undefined ? [""] : jobsettingsdata.data.homework_status[0] === "未发布" ? "" :
<Link
// to={`/courses/${this.state.props.match.params.coursesId}/${this.state.props.match.params.homeworkid}/student_work`} // to={`/courses/${this.state.props.match.params.coursesId}/${this.state.props.match.params.homeworkid}/student_work`}
to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/student_work`}> to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/student_work`}>
代码查重</Link>:""} 代码查重</Link> : ""}
<Link <Link
to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/settings`} to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/settings`}
@ -430,28 +471,32 @@ class Workquestionandanswer extends Component {
color:#1A0B00 !important; color:#1A0B00 !important;
} }
`}</style> `}</style>
{this.props.isAdmin() ? <li className="li_line drop_down fr color-blue font-16 mr8 mt20" style={{"padding":"0 20px"}}> {this.props.isAdmin() ?
<li className="li_line drop_down fr color-blue font-16 mr8 mt20" style={{"padding": "0 20px"}}>
导出<i className="iconfont icon-xiajiantou font-12 ml2"></i> 导出<i className="iconfont icon-xiajiantou font-12 ml2"></i>
<ul className="drop_down_menu" style={{"right":"-0px","left":"unset","height":"auto"}}> <ul className="drop_down_menu" style={{"right": "-0px", "left": "unset", "height": "auto"}}>
<li><a href={`/api/student_works/${jobsettingsdata === undefined ? "" :jobsettingsdata.data.category.category_id}/export_shixun_work_report.pdf`} >实训报告</a></li> <li><a onClick={()=>this.internshipreport()}>实训报告</a>
<li><a href={`/api/homework_commons/${jobsettingsdata === undefined ? "" :jobsettingsdata.data.category.category_id}/works_list.xlsx`} >学生成绩</a></li> </li>
<li><a onClick={()=>this.Classstudentachievement()}>学生成绩</a>
</li>
</ul> </ul>
</li> : ""} </li> : ""}
{this.props.isAdmin() ?jobsettingsdata&&jobsettingsdata.data.end_immediately===true? {this.props.isAdmin() ? jobsettingsdata && jobsettingsdata.data.end_immediately === true ?
<a className="fr color-blue font-16" onClick={this.homeworkends}>立即截止</a>:"" : ""} <a className="fr color-blue font-16" onClick={this.homeworkends}>立即截止</a> : "" : ""}
{this.props.isAdmin() ?jobsettingsdata&&jobsettingsdata.data.publish_immediately===true? {this.props.isAdmin() ? jobsettingsdata && jobsettingsdata.data.publish_immediately === true ?
<a className="fr color-blue font-16" onClick={this.homeworkstart}>立即发布</a> :"": ""} <a className="fr color-blue font-16" onClick={this.homeworkstart}>立即发布</a> : "" : ""}
{this.props.isAdmin()? {this.props.isAdmin() ?
this.state.code_review===true? this.state.code_review === true ?
<a className="fr color-blue font-16" onClick={this.workshowmodel}>代码查重</a> <a className="fr color-blue font-16" onClick={this.workshowmodel}>代码查重</a>
:"":""} : "" : ""}
</div> </div>
</div> </div>
{jobsettingsdata === undefined|| jobsettingsdata.data.description===null? "无" : <div className=" clearfix edu-back-white poll_list mt20 mr20 "> {jobsettingsdata === undefined || jobsettingsdata.data.description === null ? "无" :
<div className=" clearfix edu-back-white poll_list mt20 mr20 ">
<span> <span>
<style> <style>
{ {
@ -463,7 +508,8 @@ class Workquestionandanswer extends Component {
} }
</style> </style>
<div className={"font-16 color-dark fl pl20 "}> <div className={"font-16 color-dark fl pl20 "}>
<div dangerouslySetInnerHTML={{__html: markdownToHTML(jobsettingsdata.data.description).replace(/▁/g,"▁▁▁")}}></div> <div
dangerouslySetInnerHTML={{__html: markdownToHTML(jobsettingsdata.data.description).replace(/▁/g, "▁▁▁")}}></div>
{/* /!*{}}></div> {/* /!*{}}></div>
{/* /!*{jobsettingsdata.data.description}*!/*/} {/* /!*{jobsettingsdata.data.description}*!/*/}
{/* <textarea>*/} {/* <textarea>*/}
@ -489,27 +535,31 @@ class Workquestionandanswer extends Component {
<div className=" clearfix edu-back-white poll_list pd10"> <div className=" clearfix edu-back-white poll_list pd10">
<div className="font-16 color-green fl pl20 mt10">作业说明:</div> <div className="font-16 color-green fl pl20 mt10">作业说明:</div>
{ {
this.props.isAdmin()&&this.props.isAdmin()===true ? this.props.isAdmin() && this.props.isAdmin() === true ?
(Showupdateinstructions&& Showupdateinstructions === true?"": (Showupdateinstructions && Showupdateinstructions === true ? "" :
<Tooltip placement="top" title="编辑"><i <Tooltip placement="top" title="编辑"><i
className="color-green font-18 iconfont icon-bianjidaibeijing fr pr20 " onClick={()=>this.jobdescriptiondisplaybj()} ></i></Tooltip> className="color-green font-18 iconfont icon-bianjidaibeijing fr pr20 "
):"" onClick={() => this.jobdescriptiondisplaybj()}></i></Tooltip>
) : ""
} }
</div> </div>
<span> <span>
<div className="font-16 color-dark break_word flex1 " > <div className="font-16 color-dark break_word flex1 ">
{ Showupdateinstructions&& Showupdateinstructions === true? {Showupdateinstructions && Showupdateinstructions === true ?
<div > <div>
<Homeworddescription {...this.props} ReleaseNotes={this.ReleaseNotes} NOReleaseNotes ={this.NOReleaseNotes} description={jobsettingsdata === undefined ?"":jobsettingsdata === null ?"":jobsettingsdata === "null"?"": jobsettingsdata.data.explanation=== undefined?"":jobsettingsdata.data.explanation=== null?"":jobsettingsdata.data.explanation} ></Homeworddescription> <Homeworddescription {...this.props} ReleaseNotes={this.ReleaseNotes}
NOReleaseNotes={this.NOReleaseNotes}
description={jobsettingsdata === undefined ? "" : jobsettingsdata === null ? "" : jobsettingsdata === "null" ? "" : jobsettingsdata.data.explanation === undefined ? "" : jobsettingsdata.data.explanation === null ? "" : jobsettingsdata.data.explanation}></Homeworddescription>
</div> </div>
: :
<div className="pl20 " style={{"padding":"10px 10px 10px 20px"}}> <div className="pl20 " style={{"padding": "10px 10px 10px 20px"}}>
{jobsettingsdata === undefined ? "无" : jobsettingsdata === null ? "无" : jobsettingsdata === "null" ? "无" : {jobsettingsdata === undefined ? "无" : jobsettingsdata === null ? "无" : jobsettingsdata === "null" ? "无" :
jobsettingsdata.data.explanation=== undefined?"无" :jobsettingsdata.data.explanation=== null?"无": jobsettingsdata.data.explanation === undefined ? "无" : jobsettingsdata.data.explanation === null ? "无" :
<div dangerouslySetInnerHTML={{__html:markdownToHTML(jobsettingsdata.data.explanation).replace(/▁/g,"▁▁▁")}}></div> <div
dangerouslySetInnerHTML={{__html: markdownToHTML(jobsettingsdata.data.explanation).replace(/▁/g, "▁▁▁")}}></div>
} }
</div> </div>
@ -518,14 +568,14 @@ class Workquestionandanswer extends Component {
</div> </div>
</span> </span>
</div> </div>
{/* <style>*/} {/* <style>*/}
{/* {*/} {/* {*/}
{/* `.mockInputWrapper {*/} {/* `.mockInputWrapper {*/}
{/* display: flex;*/} {/* display: flex;*/}
{/* padding: 30px 20px 30px 20px;*/} {/* padding: 30px 20px 30px 20px;*/}
{/*}`*/} {/*}`*/}
{/* }*/} {/* }*/}
{/* </style>*/} {/* </style>*/}
{/* <div className="edu-back-white mb20 graduateTopic course-message"> */} {/* <div className="edu-back-white mb20 graduateTopic course-message"> */}
{/*<GraduateTopicReply memo={{id: graduation_topic_id, user_id: topicInfo && topicInfo.user_id}} course_id={course_id} {...this.props}></GraduateTopicReply>*/} {/*<GraduateTopicReply memo={{id: graduation_topic_id, user_id: topicInfo && topicInfo.user_id}} course_id={course_id} {...this.props}></GraduateTopicReply>*/}
{/* </div> */} {/* </div> */}
@ -535,7 +585,7 @@ class Workquestionandanswer extends Component {
{/* </div>*/} {/* </div>*/}
{/* :""*/} {/* :""*/}
{/*}*/} {/*}*/}
{ homework_id && <CommonReply {homework_id && <CommonReply
memo={{ memo={{
id: homework_id, id: homework_id,
}} }}

Loading…
Cancel
Save