Merge remote-tracking branch 'origin/master'

dev_forum
杨树明 5 years ago
commit e2b8c69f1e

@ -349,7 +349,7 @@ class Boards extends Component{
<React.Fragment> <React.Fragment>
{ isAdmin && !parent_id && <WordsBtn style="blue" className="mr30" onClick={()=>this.addDir()}>添加目录</WordsBtn> } { isAdmin && !parent_id && <WordsBtn style="blue" className="mr30" onClick={()=>this.addDir()}>添加目录</WordsBtn> }
{ isAdmin && !!parent_id && <WordsBtn style="blue" className="mr30" onClick={()=>this.renameDir()}>目录重命名</WordsBtn> } { isAdmin && !!parent_id && <WordsBtn style="blue" className="mr30" onClick={()=>this.renameDir()}>目录重命名</WordsBtn> }
{ isAdminOrStudent && <WordsBtn style="blue" className="" onClick={()=>this.onToBoardsNew()}>我要发</WordsBtn> } { isAdminOrStudent && <WordsBtn style="blue" className="" onClick={()=>this.onToBoardsNew()}>我要发</WordsBtn> }
</React.Fragment> </React.Fragment>
} }
secondRowLeft={ secondRowLeft={

@ -1246,43 +1246,43 @@ class Studentshavecompletedthelist extends Component {
this.Generatenewdatas(response.data.exercise_users); this.Generatenewdatas(response.data.exercise_users);
if (response.data.exercise_types.subjective === 0) { if (response.data.exercise_types.subjective === 0) {
if (this.state.noclassroom === undefined || this.state.noclassroom === "" || this.state.noclassroom === null) { if (this.state.noclassroom === undefined || this.state.noclassroom === "" || this.state.noclassroom === null) {
this.state.columnss.map((item,key)=>{ var arr =[];
for(var i=0;i<this.state.columnss.length;i++){
var item = this.state.columnss[i];
if(item.title==="分班"){ if(item.title==="分班"){
this.state.columnss.splice(key,1)
} }
if(item.title==="客观题得分"){ else if(item.title==="客观题得分"){
this.state.columnss.splice(key,1)
} }
if(item.title==="主观题得分"){ else if(item.title==="主观题得分"){
this.state.columnss.splice(key,1)
} }
if(this.props.isNotMember()===true) { else if(this.props.isNotMember()===true&&item.title==="学号") {
if(item.title==="学号"){
this.state.columnss.splice(key,1) }
else{
arr.push(item);
} }
} }
})
let columnss2=this.state.columnss;
this.setState({ this.setState({
columnss: columnss2, columnss: arr,
}) })
} else { } else {
this.state.columnss.map((item,key)=>{ var arr =[];
for(var i=0;i<this.state.columnss.length;i++){
var item = this.state.columnss[i];
if(item.title==="客观题得分"){ if(item.title==="客观题得分"){
this.state.columnss.splice(key,1)
} }
if(item.title==="主观题得分"){ if(item.title==="主观题得分"){
this.state.columnss.splice(key,1)
} }
if(this.props.isNotMember()===true) { else if(this.props.isNotMember()===true&&item.title==="学号") {
if(item.title==="学号"){
this.state.columnss.splice(key,1) }
else{
arr.push(item);
} }
} }
})
let columnss2=this.state.columnss;
this.setState({ this.setState({
columnss: columnss2 columnss: arr
}) })
} }
@ -1291,73 +1291,73 @@ class Studentshavecompletedthelist extends Component {
//学生已截止 //学生已截止
if (response.data.exercise_types.subjective === 0) { if (response.data.exercise_types.subjective === 0) {
if (this.state.loadingstate === false) { if (this.state.loadingstate === false) {
this.state.columnstwo.map((item,key)=>{ var arr =[];
for(var i=0;i<this.state.columnstwo.length;i++){
var item = this.state.columnstwo[i];
if(item.title==="客观题得分"){ if(item.title==="客观题得分"){
this.state.columnstwo.splice(key,1)
} }
if(item.title==="主观题得分"){ else if(item.title==="主观题得分"){
this.state.columnstwo.splice(key,1)
} }
if(this.props.isNotMember()===true) { else if(this.props.isNotMember()===true&&item.title==="学号") {
if(item.title==="学号"){
this.state.columnstwo.splice(key,1)
} }
else{
arr.push(item);
} }
}) }
let columnstwo2=this.state.columnstwo;
this.state.columns.map((item,key)=>{ var arr2 =[];
for(var i=0;i<this.state.columns.length;i++){
var item = this.state.columns[i];
if(item.title==="客观题得分"){ if(item.title==="客观题得分"){
this.state.columns.splice(key,1)
} }
if(item.title==="主观题得分"){ else if(item.title==="主观题得分"){
this.state.columns.splice(key,1)
} }
if(this.props.isNotMember()===true) { else if(this.props.isNotMember()===true&&item.title==="学号") {
if(item.title==="学号"){
this.state.columns.splice(key,1) }
else{
arr2.push(item);
} }
} }
})
let columns2=this.state.columns
thiss.setState({ thiss.setState({
columns: columns2, columns: arr2,
columnstwo: columnstwo2, columnstwo: arr,
loadingstate: true, loadingstate: true,
}) })
} else { } else {
this.state.columnstwo.map((item,key)=>{
var arr =[];
for(var i=0;i<this.state.columnstwo.length;i++){
var item = this.state.columnstwo[i];
if(item.title==="客观题得分"){ if(item.title==="客观题得分"){
this.state.columnstwo.splice(key,1)
} }
if(item.title==="主观题得分"){ else if(item.title==="主观题得分"){
this.state.columnstwo.splice(key,1)
} }
if(this.props.isNotMember()===true) { else if(this.props.isNotMember()===true&&item.title==="学号") {
if(item.title==="学号"){
this.state.columnstwo.splice(key,1)
} }
else{
arr.push(item);
} }
}) }
let columnstwo2=this.state.columnstwo; var arr2 =[];
this.state.columns.map((item,key)=>{ for(var i=0;i<this.state.columns.length;i++){
var item = this.state.columns[i];
if(item.title==="客观题得分"){ if(item.title==="客观题得分"){
this.state.columns.splice(key,1)
} }
if(item.title==="主观题得分"){ else if(item.title==="主观题得分"){
this.state.columns.splice(key,1)
} }
if(this.props.isNotMember()===true) { else if(this.props.isNotMember()===true&&item.title==="学号") {
if(item.title==="学号"){
this.state.columns.splice(key,1) }
else{
arr2.push(item);
} }
} }
})
let columns2=this.state.columns
thiss.setState({ thiss.setState({
columns: columns2, columns: arr2,
columnstwo:columnstwo2, columnstwo:arr,
}) })
} }
@ -1610,37 +1610,39 @@ class Studentshavecompletedthelist extends Component {
current_answer_user: response.data.current_answer_user, current_answer_user: response.data.current_answer_user,
}) })
if (response.data.exercise_types.subjective === 0) { if (response.data.exercise_types.subjective === 0) {
this.state.columnstwo.map((item,key)=>{
var arr =[];
for(var i=0;i<this.state.columnstwo.length;i++){
var item = this.state.columnstwo[i];
if(item.title==="客观题得分"){ if(item.title==="客观题得分"){
this.state.columnstwo.splice(key,1)
} }
if(item.title==="主观题得分"){ else if(item.title==="主观题得分"){
this.state.columnstwo.splice(key,1)
} }
if(this.props.isNotMember()===true) { else if(this.props.isNotMember()===true&&item.title==="学号") {
if(item.title==="学号"){
this.state.columnstwo.splice(key,1)
} }
else{
arr.push(item);
} }
}) }
let columnstwo2=this.state.columnstwo;
this.state.columns.map((item,key)=>{ var arr2 =[];
for(var i=0;i<this.state.columns.length;i++){
var item = this.state.columns[i];
if(item.title==="客观题得分"){ if(item.title==="客观题得分"){
this.state.columns.splice(key,1)
} }
if(item.title==="主观题得分"){ else if(item.title==="主观题得分"){
this.state.columns.splice(key,1)
} }
if(this.props.isNotMember()===true) { else if(this.props.isNotMember()===true&&item.title==="学号") {
if(item.title==="学号"){
this.state.columns.splice(key,1) }
else{
arr2.push(item);
} }
} }
})
let columns2=this.state.columns
this.setState({ this.setState({
columns: columns2, columns: arr2,
columnstwo: columnstwo2, columnstwo: arr,
loadingstate: false, loadingstate: false,
}) })
} }
@ -1706,7 +1708,6 @@ class Studentshavecompletedthelist extends Component {
// } // }
} }
if (response.data.exercise_types.subjective === 0) { if (response.data.exercise_types.subjective === 0) {
//===0 不包括主观题 //===0 不包括主观题
if (indexi === exercise_users.length) { if (indexi === exercise_users.length) {
@ -1715,20 +1716,25 @@ class Studentshavecompletedthelist extends Component {
// console.log("77771111111"); // console.log("77771111111");
//分班大于0显示分班 //分班大于0显示分班
//7ge //7ge
this.state.columnsys.map((item,key)=>{ // this.state.columnsys.map((item,key)=>{
//
// })
var arr =[];
for(var i=0;i<this.state.columnsys.length;i++){
var item = this.state.columnsys[i];
if(item.title==="客观题得分"){ if(item.title==="客观题得分"){
this.state.columnsys.splice(key,1)
} }
if(item.title==="主观题得分"){ else if(item.title==="主观题得分"){
this.state.columnsys.splice(key,1) }
else if(this.props.isNotMember()===true&&item.title==="学号") {
} }
if(this.props.isNotMember()===true) { else{
if(item.title==="学号"){ arr.push(item);
this.state.columnsys.splice(key,1)
} }
} }
})
thiss.setState({ this.setState({
data: datalist, data: datalist,
teacherlist: teacherlist, teacherlist: teacherlist,
Teacherliststudentlist: response.data, Teacherliststudentlist: response.data,
@ -1737,27 +1743,27 @@ class Studentshavecompletedthelist extends Component {
exercise_users: response.data.exercise_users, exercise_users: response.data.exercise_users,
course_groups: response.data.course_groups, course_groups: response.data.course_groups,
loadingstate: false, loadingstate: false,
columnsys: this.state.columnsys, columnsys: arr,
}) })
} else { } else {
//分班小于0不显示分班 //分班小于0不显示分班
//6ge //6ge
this.state.columnsys.map((item,key)=>{
var arr =[];
for(var i=0;i<this.state.columnsys.length;i++){
var item = this.state.columnsys[i];
if(item.title==="分班"){ if(item.title==="分班"){
this.state.columnsys.splice(key,1)
} }
if(item.title==="客观题得分"){ else if(item.title==="客观题得分"){
this.state.columnsys.splice(key,1)
} }
if(item.title==="主观题得分"){ else if(item.title==="主观题得分"){
this.state.columnsys.splice(key,1)
} }
if(this.props.isNotMember()===true) { else if(this.props.isNotMember()===true&&item.title==="学号") {
if(item.title==="学号"){ }
this.state.columnsys.splice(key,1) else{
arr.push(item);
} }
} }
})
thiss.setState({ thiss.setState({
data: datalist, data: datalist,
@ -1768,7 +1774,7 @@ class Studentshavecompletedthelist extends Component {
commit_status: response.data.commit_status, commit_status: response.data.commit_status,
exercise_users: response.data.exercise_users, exercise_users: response.data.exercise_users,
course_groups: response.data.course_groups, course_groups: response.data.course_groups,
columnsys: this.state.columnsys, columnsys: arr,
}) })
} }
@ -1778,19 +1784,23 @@ class Studentshavecompletedthelist extends Component {
if (response.data.exercise_types.groups_count > 0) { if (response.data.exercise_types.groups_count > 0) {
//显示分班 //显示分班
//8ge //8ge
this.state.columnsys.map((item,key)=>{
var arr =[];
for(var i=0;i<this.state.columnsys.length;i++){
var item = this.state.columnsys[i];
if(item.title==="客观题得分"){ if(item.title==="客观题得分"){
this.state.columnsys.splice(key,1)
} }
if(item.title==="主观题得分"){ else if(item.title==="主观题得分"){
this.state.columnsys.splice(key,1)
} }
if(this.props.isNotMember()===true) { else if(this.props.isNotMember()===true&&item.title==="学号") {
if(item.title==="学号"){
this.state.columnsys.splice(key,1) }else{
arr.push(item);
} }
} }
}) // console.log(thiss.state.columnsys);
// console.log(arr);
this.setState({ this.setState({
data: datalist, data: datalist,
teacherlist: teacherlist, teacherlist: teacherlist,
@ -1800,27 +1810,28 @@ class Studentshavecompletedthelist extends Component {
exercise_users: response.data.exercise_users, exercise_users: response.data.exercise_users,
course_groups: response.data.course_groups, course_groups: response.data.course_groups,
loadingstate: false, loadingstate: false,
columnsys: this.state.columnsys, columnsys: arr,
}) })
} else { } else {
//不显示分班 //不显示分班
//7ge //7ge
this.state.columnsys.map((item,key)=>{ var arr =[];
for(var i=0;i<this.state.columnsys.length;i++){
var item = this.state.columnsys[i];
if(item.title==="分班"){ if(item.title==="分班"){
this.state.columnsys.splice(key,1)
} }
if(item.title==="客观题得分"){ else if(item.title==="客观题得分"){
this.state.columnsys.splice(key,1)
} }
if(item.title==="主观题得分"){ else if(item.title==="主观题得分"){
this.state.columnsys.splice(key,1)
} }
if(this.props.isNotMember()===true) { else if(this.props.isNotMember()===true&&item.title==="学号") {
if(item.title==="学号"){
this.state.columnsys.splice(key,1) }else{
arr.push(item);
} }
} }
})
this.setState({ this.setState({
data: datalist, data: datalist,
teacherlist: teacherlist, teacherlist: teacherlist,
@ -1830,7 +1841,7 @@ class Studentshavecompletedthelist extends Component {
exercise_users: response.data.exercise_users, exercise_users: response.data.exercise_users,
course_groups: response.data.course_groups, course_groups: response.data.course_groups,
loadingstate: false, loadingstate: false,
columnsys: this.state.columnsys, columnsys: arr,
}) })
} }
@ -1842,13 +1853,16 @@ class Studentshavecompletedthelist extends Component {
console.log("2548包含主观题不包含分班"); console.log("2548包含主观题不包含分班");
if (response.data.exercise_types.groups_count > 0) { if (response.data.exercise_types.groups_count > 0) {
this.state.columnsys.map((item,key)=>{ var arr =[];
if(this.props.isNotMember()===true) { for(var i=0;i<this.state.columnsys.length;i++){
if(item.title==="学号"){ var item = this.state.columnsys[i];
this.state.columnsys.splice(key,1) if(this.props.isNotMember()===true&&item.title==="学号") {
}
else{
arr.push(item);
} }
} }
})
this.setState({ this.setState({
data: datalist, data: datalist,
teacherlist: teacherlist, teacherlist: teacherlist,
@ -1857,19 +1871,22 @@ class Studentshavecompletedthelist extends Component {
commit_status: response.data.commit_status, commit_status: response.data.commit_status,
exercise_users: response.data.exercise_users, exercise_users: response.data.exercise_users,
course_groups: response.data.course_groups, course_groups: response.data.course_groups,
columnsys: this.state.columnsys, columnsys: arr,
}) })
} else { } else {
this.state.columnsys.map((item,key)=>{ var arr =[];
for(var i=0;i<this.state.columnsys.length;i++){
var item = this.state.columnsys[i];
if(item.title==="分班"){ if(item.title==="分班"){
this.state.columnsys.splice(key,1)
} }
if(this.props.isNotMember()===true) { else if(this.props.isNotMember()===true&&item.title==="学号") {
if(item.title==="学号"){
this.state.columnsys.splice(key,1) }
else{
arr.push(item);
} }
} }
})
this.setState({ this.setState({
data: datalist, data: datalist,
teacherlist: teacherlist, teacherlist: teacherlist,
@ -1878,7 +1895,7 @@ class Studentshavecompletedthelist extends Component {
commit_status: response.data.commit_status, commit_status: response.data.commit_status,
exercise_users: response.data.exercise_users, exercise_users: response.data.exercise_users,
course_groups: response.data.course_groups, course_groups: response.data.course_groups,
columnsys: this.state.columnsys, columnsys:arr,
}) })
} }
} else { } else {
@ -1896,16 +1913,19 @@ class Studentshavecompletedthelist extends Component {
columnsys: this.state.columnsystwo, columnsys: this.state.columnsystwo,
}) })
} else { } else {
this.state.columnsys.map((item,key)=>{ var arr =[];
for(var i=0;i<this.state.columnsys.length;i++){
var item = this.state.columnsys[i];
if(item.title==="分班"){ if(item.title==="分班"){
this.state.columnsys.splice(key,1)
}
else if(this.props.isNotMember()===true&&item.title==="学号") {
} }
if(this.props.isNotMember()===true) { else{
if(item.title==="学号"){ arr.push(item);
this.state.columnsys.splice(key,1)
} }
} }
})
this.setState({ this.setState({
data: datalist, data: datalist,
teacherlist: teacherlist, teacherlist: teacherlist,
@ -1915,7 +1935,7 @@ class Studentshavecompletedthelist extends Component {
exercise_users: response.data.exercise_users, exercise_users: response.data.exercise_users,
course_groups: response.data.course_groups, course_groups: response.data.course_groups,
loadingstate: false, loadingstate: false,
columnsys: this.state.columnsys, columnsys: arr,
}) })
} }

@ -753,6 +753,7 @@ class Listofworks extends Component {
let {page, limit} = this.state; let {page, limit} = this.state;
let datalist = []; let datalist = [];
let columns = this.state.columns; let columns = this.state.columns;
// var columns2=[];
if (teacherdata !== undefined) { if (teacherdata !== undefined) {
for (var i = 0; i < student_works.length; i++) { for (var i = 0; i < student_works.length; i++) {
var timedata = moment(student_works[i].update_time).format('YYYY-MM-DD HH:mm'); var timedata = moment(student_works[i].update_time).format('YYYY-MM-DD HH:mm');
@ -768,7 +769,7 @@ class Listofworks extends Component {
updatetime: timedata === "Invalid date" ? "--" : timedata, updatetime: timedata === "Invalid date" ? "--" : timedata,
completion: student_works[i].complete_count === null ? "0" :student_works[i].complete_count === undefined ? "0": student_works[i].complete_count, completion: student_works[i].complete_count === null ? "0" :student_works[i].complete_count === undefined ? "0": student_works[i].complete_count,
levelscore: student_works[i].final_score, levelscore: student_works[i].final_score,
efficiencyscore: student_works[i].eff_score, efficiencyscore: student_works[i].eff_score==="0.0"?"--":student_works[i].eff_score==="0"?"--":student_works[i].eff_score,
finalscore: student_works[i].work_score, finalscore: student_works[i].work_score,
operating: "查看", operating: "查看",
late_penalty: student_works[i].late_penalty=== null?"0":student_works[i].late_penalty === undefined?"0":student_works[i].late_penalty, late_penalty: student_works[i].late_penalty=== null?"0":student_works[i].late_penalty === undefined?"0":student_works[i].late_penalty,
@ -787,84 +788,84 @@ class Listofworks extends Component {
if (work_efficiency === false) { if (work_efficiency === false) {
if(JSON.stringify(course_group_info) === "[]"|| course_group_info === undefined||course_group_info === null){ if(JSON.stringify(course_group_info) === "[]"|| course_group_info === undefined||course_group_info === null){
//这里没有分班 没有 关卡得分 没有效率分 //这里没有分班 没有 关卡得分 没有效率分
columns.map((item,key)=>{ for(var i=0;i< this.state.columns.length;i++){
var item = this.state.columns[i];
if(item.title==="分班"){ if(item.title==="分班"){
columns.splice(key,1)
} }
if(item.title==="关卡得分"){ else if(item.title==="关卡得分"){
columns.splice(key,1)
} }
if(item.title==="效率分"){ else if(item.title==="效率分"){
columns.splice(key,1)
} }
if(this.props.isNotMember()===true) { else if(this.props.isNotMember()===true&&item.title==="学号") {
if(item.title==="学号"){
this.state.columnss.splice(key,1) }else{
columns.push(item);
} }
} }
})
}else{ }else{
if(course_group_info.length < 2){ if(course_group_info.length < 2){
for(var i=0;i< this.state.columns.length;i++){
columns.map((item,key)=>{ var item = this.state.columns[i];
if(item.title==="分班"){ if(item.title==="分班"){
columns.splice(key,1)
} }
if(item.title==="关卡得分"){ else if(item.title==="关卡得分"){
columns.splice(key,1)
} }
if(item.title==="效率分"){ else if(item.title==="效率分"){
columns.splice(key,1)
} }
if(this.props.isNotMember()===true) { else if(this.props.isNotMember()===true&&item.title==="学号") {
if(item.title==="学号"){
this.state.columnss.splice(key,1) }else{
columns.push(item);
} }
} }
})
}else {
columns.map((item,key)=>{ }else {
for(var i=0;i< this.state.columns.length;i++){
var item = this.state.columns[i];
if(item.title==="关卡得分"){ if(item.title==="关卡得分"){
columns.splice(key,1)
} }
if(item.title==="效率分"){ else if(item.title==="效率分"){
columns.splice(key,1)
} }
if(this.props.isNotMember()===true) { else if(this.props.isNotMember()===true&&item.title==="学号") {
if(item.title==="学号"){
this.state.columnss.splice(key,1) }else{
columns.push(item);
} }
} }
})
} }
} }
}else { }else {
if(JSON.stringify(course_group_info) === "[]"|| course_group_info === undefined || course_group_info === null){ if(JSON.stringify(course_group_info) === "[]"|| course_group_info === undefined || course_group_info === null){
columns.map((item,key)=>{
for(var i=0;i< this.state.columns.length;i++){
var item = this.state.columns[i];
if(item.title==="分班"){ if(item.title==="分班"){
columns.splice(key,1)
} }
if(this.props.isNotMember()===true) { else if(this.props.isNotMember()===true&&item.title==="学号") {
if(item.title==="学号"){
this.state.columnss.splice(key,1) }else{
columns.push(item);
} }
} }
})
}else { }else {
if(course_group_info.length < 2) { if(course_group_info.length < 2) {
for(var i=0;i< this.state.columns.length;i++){
columns.map((item,key)=>{ var item = this.state.columns[i];
if(item.title==="分班"){ if(item.title==="分班"){
columns.splice(key,1)
} }
if(this.props.isNotMember()===true) { else if(this.props.isNotMember()===true&&item.title==="学号") {
if(item.title==="学号"){
this.state.columnss.splice(key,1) }else{
columns.push(item);
} }
} }
})
} }
columns=this.state.columnss; columns=this.state.columnss;
} }
@ -1326,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")
@ -1474,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() ?

@ -391,16 +391,16 @@ class Listofworksstudentone extends Component {
let datalist = []; let datalist = [];
let datalists = []; let datalists = [];
var styletable = {"display": "none"} var styletable = {"display": "none"}
var arr =[];
for(var i=0;i<this.state.columns.length;i++){
var item = this.state.columns[i];
if(this.props.isNotMember()===true&&item.title==="学号") {
this.state.columns.map((item,key)=>{ }else{
if(this.props.isNotMember()===true) { arr.push(item);
if(item.title==="学号"){
this.state.columns.splice(key,1)
} }
} }
}) let columns2= arr;
let columns2=this.state.columns;
var teacherlist = undefined; var teacherlist = undefined;
var teacherlists = undefined; var teacherlists = undefined;
if (teacherdata !== undefined) { if (teacherdata !== undefined) {
@ -509,14 +509,18 @@ class Listofworksstudentone extends Component {
// 设置数据 // 设置数据
seacthdata = (teacherdata) => { seacthdata = (teacherdata) => {
let datalist = []; let datalist = [];
this.state.columns.map((item,key)=>{
if(this.props.isNotMember()===true) {
if(item.title==="学号"){ var arr =[];
this.state.columns.splice(key,1) for(var i=0;i<this.state.columns.length;i++){
var item = this.state.columns[i];
if(this.props.isNotMember()===true&&item.title==="学号") {
}else{
arr.push(item);
} }
} }
}) let columns2= arr;
let columns2=this.state.columns;
if (teacherdata !== undefined) { if (teacherdata !== undefined) {
// console.log("seacthdata设置数据") // console.log("seacthdata设置数据")

@ -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,35 +440,63 @@ 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`}
>设置</Link> >设置</Link>
{/*<a className="fr color-blue font-16" href={`/api/homework_commons/${this.props.match.params.coursesId}/works_list.xls`}>导出成绩</a>*/} {/*<a className="fr color-blue font-16" href={`/api/homework_commons/${this.props.match.params.coursesId}/works_list.xls`}>导出成绩</a>*/}
{this.props.isAdmin() ? <a <style>{`
className="fr color-blue font-16" .drop_down_menu li a {
href={`/api/homework_commons/${this.props.match.params.coursesId}/works_list.xlsx`} padding: 0px;
>导出</a> : ""} font-size: 14px;
{this.props.isAdmin() ?jobsettingsdata&&jobsettingsdata.data.end_immediately===true? }
<a className="fr color-blue font-16" onClick={this.homeworkends}>立即截止</a>:"" : ""} .drop_down_menu {
{this.props.isAdmin() ?jobsettingsdata&&jobsettingsdata.data.publish_immediately===true? width: 93px;
<a className="fr color-blue font-16" onClick={this.homeworkstart}>立即发布</a> :"": ""} }
.drop_down_menu li {
overflow: visible;
{this.props.isAdmin()? width: 93px;
this.state.code_review===true? }
.drop_down_menu, .drop_down_normal {
padding-top: 10px;
padding-bottom: 8px;
}
a:hover {
color:#1A0B00 !important;
}
`}</style>
{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>
<ul className="drop_down_menu" style={{"right": "-0px", "left": "unset", "height": "auto"}}>
<li><a onClick={()=>this.internshipreport()}>实训报告</a>
</li>
<li><a onClick={()=>this.Classstudentachievement()}>学生成绩</a>
</li>
</ul>
</li> : ""}
{this.props.isAdmin() ? jobsettingsdata && jobsettingsdata.data.end_immediately === true ?
<a className="fr color-blue font-16" onClick={this.homeworkends}>立即截止</a> : "" : ""}
{this.props.isAdmin() ? jobsettingsdata && jobsettingsdata.data.publish_immediately === true ?
<a className="fr color-blue font-16" onClick={this.homeworkstart}>立即发布</a> : "" : ""}
{this.props.isAdmin() ?
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>
{ {
@ -440,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>*/}
@ -466,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>
@ -495,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> */}
@ -512,7 +585,7 @@ class Workquestionandanswer extends Component {
{/* </div>*/} {/* </div>*/}
{/* :""*/} {/* :""*/}
{/*}*/} {/*}*/}
{ homework_id && <CommonReply {homework_id && <CommonReply
memo={{ memo={{
id: homework_id, id: homework_id,
}} }}

@ -108,6 +108,17 @@ class VNCDisplay extends Component {
rfb.addEventListener("desktopname", updateDesktopName); rfb.addEventListener("desktopname", updateDesktopName);
// Set parameters that can be changed on an active connection // Set parameters that can be changed on an active connection
rfb.viewOnly = readQueryVariable('view_only', false); rfb.viewOnly = readQueryVariable('view_only', false);
// TODO scale
// https://github.com/novnc/noVNC/issues/1181
// http://localhost:3007/tasks/et8zqfkh9lsn
/**
https://www.shiyanlou.com/courses/?fee=free&page_size=20&category=Linux%E8%BF%90%E7%BB%B4&tag=%E5%85%A8%E9%83%A8&sort=default&preview=false
参考实验楼实现方式
div position: relative; width: 744.9px; height: 558.675px;
div position: relative; width: 1152px; height: 864px; transform-origin: 0px 0px; transform: scale(0.646615, 0.646615);
div width: 1152px; height: 864px; position: absolute; left: 0px; top: 0px; overflow: hidden;
canvas
*/
rfb.scaleViewport = readQueryVariable('scale', false); rfb.scaleViewport = readQueryVariable('scale', false);
} }

@ -198,7 +198,7 @@ class UpdateDrawer extends Component {
} }
</div> </div>
</DialogContent> </DialogContent>
<DialogActions id="dialog-actions" style={{ 'margin-bottom': '16px'}}> <DialogActions id="dialog-actions" >
{ needUpdateScript ? { needUpdateScript ?
<React.Fragment> <React.Fragment>
<Button <Button

@ -185,27 +185,44 @@ class LoginRegisterComponent extends Component {
}; };
loginInputonChange = (e) => { loginInputonChange = (e) => {
// console.log(e.target.value); // console.log(e.target.value);
var stirngt;
if(e.target.value.length>0){
var str= e.target.value.replace(/\s*/g,"")
stirngt=str;
}else{
stirngt= e.target.value;
}
this.setState({ this.setState({
login: e.target.value, login: stirngt,
}) })
} }
loginInputonChanges = (e) => { loginInputonChanges = (e) => {
// console.log(e.target.value); // console.log(e.target.value);
var stirngt;
if(e.target.value.length>0){
var str= e.target.value.replace(/\s*/g,"")
stirngt=str;
}else{
stirngt= e.target.value;
}
this.setState({ this.setState({
password: e.target.value, password: stirngt,
}) })
} }
loginInputonChangess = (e) => { loginInputonChangess = (e) => {
// console.log(e.target.value); // console.log(e.target.value);
var stirngt;
if(e.target.value.length>0){
var str= e.target.value.replace(/\s*/g,"")
stirngt=str;
}else{
stirngt= e.target.value;
}
this.setState({ this.setState({
passwords: e.target.value, passwords: stirngt,
}) })
} }
//获取code //获取code
codesonChange = (e) => { codesonChange = (e) => {
@ -380,12 +397,12 @@ class LoginRegisterComponent extends Component {
{ {
Phonenumberisnotco && Phonenumberisnotco != "" ? Phonenumberisnotco && Phonenumberisnotco != "" ?
<p className="color-red mt5 mb5" style={{width: " 100%", height: "20px"}}> <p className="color-red mt5 mb5" style={{width: " 100%", height: "20px"}}>
<span className="fl" style={{textAlign: "center", width: " 100%"}}>{Phonenumberisnotco}</span> <span className="fl" style={{textAlign: "left", width: " 100%"}}>{Phonenumberisnotco}</span>
</p> </p>
: <div style={{height: "25px"}}></div> : <div style={{height: "25px"}}></div>
} }
<DragValidator <DragValidator
height={38} successGreenColor="#45E15F" height={38} successGreenColor="#b0e811"
style={{height: "38px", width: "100%"}} style={{height: "38px", width: "100%"}}
dragOkCallback={this.dragOkCallback} dragOkCallback={this.dragOkCallback}
></DragValidator> ></DragValidator>

@ -468,11 +468,17 @@ class LoginRegisterComponent extends Component {
//获取登入 //获取登入
loginInputonChange = (e) => { loginInputonChange = (e) => {
// console.log(e.target.value); // console.log(e.target.value);
var stirngt;
if(e.target.value.length>0){
var str= e.target.value.replace(/\s*/g,"")
stirngt=str;
}else{
stirngt= e.target.value;
}
this.setState({ this.setState({
login: e.target.value, login: stirngt,
}) })
} }
//失去焦点判断 //失去焦点判断
inputOnBlur = (e, id) => { inputOnBlur = (e, id) => {
@ -482,23 +488,48 @@ class LoginRegisterComponent extends Component {
//获取登入密码 //获取登入密码
passwordonChange = (e) => { passwordonChange = (e) => {
// console.log(e.target.value); // console.log(e.target.value);
var stirngt;
if(e.target.value.length>0){
var str= e.target.value.replace(/\s*/g,"")
stirngt=str;
}else{
stirngt= e.target.value;
}
this.setState({ this.setState({
password: e.target.value password: stirngt,
}) })
// this.setState({
// password: e.target.value
// })
} }
//获取注册登入 //获取注册登入
loginInputonChanges = (e) => { loginInputonChanges = (e) => {
// console.log(e.target.value); // console.log(e.target.value);
var stirngt;
if(e.target.value.length>0){
var str= e.target.value.replace(/\s*/g,"")
stirngt=str;
}else{
stirngt= e.target.value;
}
this.setState({ this.setState({
logins: e.target.value, logins: stirngt,
}) })
} }
//获取注册密码 //获取注册密码
passwordonChanges = (e) => { passwordonChanges = (e) => {
// console.log(e.target.value); // console.log(e.target.value);
var stirngt;
if(e.target.value.length>0){
var str= e.target.value.replace(/\s*/g,"")
stirngt=str;
}else{
stirngt= e.target.value;
}
this.setState({ this.setState({
passwords: e.target.value passwords: stirngt,
}) })
} }
//获取code //获取code
@ -527,6 +558,12 @@ class LoginRegisterComponent extends Component {
// this.props.history.push(`/courses/${this.props.match.params.coursesId}/exercises/${this.props.match.params.Id}/student_exercise_list?tab=`+e.key) // this.props.history.push(`/courses/${this.props.match.params.coursesId}/exercises/${this.props.match.params.Id}/student_exercise_list?tab=`+e.key)
} }
loginonkeyup =(e)=>{
if(e.keyCode==32){
return false;
}
}
render() { render() {
const { const {
activeKey, activeKey,
@ -612,7 +649,7 @@ class LoginRegisterComponent extends Component {
{ {
Phonenumberisnotco && Phonenumberisnotco != "" ? Phonenumberisnotco && Phonenumberisnotco != "" ?
<p className="color-red mt5 mb5" style={{width: " 100%", height: "20px"}}> <p className="color-red mt5 mb5" style={{width: " 100%", height: "20px"}}>
<span className="fl" style={{textAlign:"center",width: " 100%"}}>{Phonenumberisnotco}</span> <span className="fl" style={{textAlign:"left",width: " 100%"}}>{Phonenumberisnotco}</span>
</p> </p>
: <div style={{height:"25px"}}></div> : <div style={{height:"25px"}}></div>
} }
@ -669,14 +706,14 @@ class LoginRegisterComponent extends Component {
{ {
Phonenumberisnotcos && Phonenumberisnotcos != "" ? Phonenumberisnotcos && Phonenumberisnotcos != "" ?
<p className="color-red mt5 mb5 " style={{width: " 100%", height: "20px"}}> <p className="color-red mt5 mb5 " style={{width: " 100%", height: "20px"}}>
<span className="fl" style={{textAlign:"center",width: " 100%"}}>{Phonenumberisnotcos}</span> <span className="fl" style={{textAlign:"left",width: " 100%"}}>{Phonenumberisnotcos}</span>
</p> </p>
: <div style={{height:"25px"}}></div> : <div style={{height:"25px"}}></div>
} }
<DragValidator <DragValidator
height={38} className="loginInput" successGreenColor="#45E15F" height={38} className="loginInput" successGreenColor="#b0e811"
style={{ height: '38px'}} style={{ height: '38px'}}
dragOkCallback={this.dragOkCallback} dragOkCallback={this.dragOkCallback}
></DragValidator> ></DragValidator>

Loading…
Cancel
Save