Merge remote-tracking branch 'origin/master'

dev_forum
杨树明 5 years ago
commit e2b8c69f1e

@ -349,7 +349,7 @@ class Boards extends Component{
<React.Fragment>
{ isAdmin && !parent_id && <WordsBtn style="blue" className="mr30" onClick={()=>this.addDir()}>添加目录</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>
}
secondRowLeft={

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

@ -753,6 +753,7 @@ class Listofworks extends Component {
let {page, limit} = this.state;
let datalist = [];
let columns = this.state.columns;
// var columns2=[];
if (teacherdata !== undefined) {
for (var i = 0; i < student_works.length; i++) {
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,
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,
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,
operating: "查看",
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(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==="分班"){
columns.splice(key,1)
}
if(item.title==="关卡得分"){
columns.splice(key,1)
else if(item.title==="关卡得分"){
}
if(item.title==="效率分"){
columns.splice(key,1)
else if(item.title==="效率分"){
}
if(this.props.isNotMember()===true) {
if(item.title==="学号"){
this.state.columnss.splice(key,1)
else if(this.props.isNotMember()===true&&item.title==="学号") {
}else{
columns.push(item);
}
}
})
}else{
if(course_group_info.length < 2){
columns.map((item,key)=>{
for(var i=0;i< this.state.columns.length;i++){
var item = this.state.columns[i];
if(item.title==="分班"){
columns.splice(key,1)
}
if(item.title==="关卡得分"){
columns.splice(key,1)
else if(item.title==="关卡得分"){
}
if(item.title==="效率分"){
columns.splice(key,1)
else if(item.title==="效率分"){
}
if(this.props.isNotMember()===true) {
if(item.title==="学号"){
this.state.columnss.splice(key,1)
else if(this.props.isNotMember()===true&&item.title==="学号") {
}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==="关卡得分"){
columns.splice(key,1)
}
if(item.title==="效率分"){
columns.splice(key,1)
else if(item.title==="效率分"){
}
if(this.props.isNotMember()===true) {
if(item.title==="学号"){
this.state.columnss.splice(key,1)
else if(this.props.isNotMember()===true&&item.title==="学号") {
}else{
columns.push(item);
}
}
})
}
}
}else {
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==="分班"){
columns.splice(key,1)
}
if(this.props.isNotMember()===true) {
if(item.title==="学号"){
this.state.columnss.splice(key,1)
else if(this.props.isNotMember()===true&&item.title==="学号") {
}else{
columns.push(item);
}
}
})
}else {
if(course_group_info.length < 2) {
columns.map((item,key)=>{
for(var i=0;i< this.state.columns.length;i++){
var item = this.state.columns[i];
if(item.title==="分班"){
columns.splice(key,1)
}
if(this.props.isNotMember()===true) {
if(item.title==="学号"){
this.state.columnss.splice(key,1)
else if(this.props.isNotMember()===true&&item.title==="学号") {
}else{
columns.push(item);
}
}
})
}
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() {
// 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"}}>
导出<i className="iconfont icon-xiajiantou font-12 ml2"></i>
<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 href={`/api/homework_commons/${jobsettingsdata === undefined ? "" :jobsettingsdata.data.category.category_id}/works_list.xlsx`} >学生成绩</a></li>
<li><a onClick={()=>this.internshipreport()}>实训报告</a></li>
<li><a onClick={()=>this.Classstudentachievement()} >学生成绩</a></li>
</ul>
</li>:""}
{this.props.isAdmin() ?

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

@ -316,10 +316,46 @@ class Workquestionandanswer extends Component {
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() {
const dateFormat = 'YYYY-MM-DD HH:mm:ss';
let {starttimetype, endtimetype, latetimetype, allowlate, latepenaltytype, jobsettingsdata,score_open,Showupdateinstructions
, homework_id} = this.state;
let {
starttimetype, endtimetype, latetimetype, allowlate, latepenaltytype, jobsettingsdata, score_open, Showupdateinstructions
, homework_id
} = this.state;
const radioStyle = {
display: 'block',
height: '30px',
@ -382,8 +418,11 @@ class Workquestionandanswer extends Component {
<CoursesListType
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 mr20" href={`/shixuns/${jobsettingsdata===undefined?"":jobsettingsdata.data.shixun_identifier}/challenges`} target={"_blank"}>实训详情</a>
<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 mr20"
href={`/shixuns/${jobsettingsdata === undefined ? "" : jobsettingsdata.data.shixun_identifier}/challenges`}
target={"_blank"}>实训详情</a>
</div>
@ -392,7 +431,8 @@ class Workquestionandanswer extends Component {
<div className=" clearfix edu-back-white poll_list">
{this.props.isAdmin() === true ? <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
// to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/noopenlist`}>作品列表(学生完成)</Link>
}
@ -401,7 +441,8 @@ class Workquestionandanswer extends Component {
className="active"
to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/questions`}>作业问答</Link>
{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.shixuntypes}/${this.state.props.match.params.homeworkid}/student_work`}>
代码查重</Link> : ""}
@ -410,10 +451,36 @@ class Workquestionandanswer extends Component {
to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/settings`}
>设置</Link>
{/*<a className="fr color-blue font-16" href={`/api/homework_commons/${this.props.match.params.coursesId}/works_list.xls`}>导出成绩</a>*/}
{this.props.isAdmin() ? <a
className="fr color-blue font-16"
href={`/api/homework_commons/${this.props.match.params.coursesId}/works_list.xlsx`}
>导出</a> : ""}
<style>{`
.drop_down_menu li a {
padding: 0px;
font-size: 14px;
}
.drop_down_menu {
width: 93px;
}
.drop_down_menu li {
overflow: visible;
width: 93px;
}
.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 ?
@ -428,7 +495,8 @@ class Workquestionandanswer extends Component {
</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>
<style>
{
@ -440,7 +508,8 @@ class Workquestionandanswer extends Component {
}
</style>
<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>
{/* /!*{jobsettingsdata.data.description}*!/*/}
{/* <textarea>*/}
@ -470,7 +539,8 @@ class Workquestionandanswer extends Component {
(Showupdateinstructions && Showupdateinstructions === true ? "" :
<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>
) : ""
}
@ -480,13 +550,16 @@ class Workquestionandanswer extends Component {
<div className="font-16 color-dark break_word flex1 ">
{Showupdateinstructions && Showupdateinstructions === true ?
<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 className="pl20 " style={{"padding": "10px 10px 10px 20px"}}>
{jobsettingsdata === undefined ? "无" : jobsettingsdata === null ? "无" : jobsettingsdata === "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>

@ -108,6 +108,17 @@ class VNCDisplay extends Component {
rfb.addEventListener("desktopname", updateDesktopName);
// Set parameters that can be changed on an active connection
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);
}

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

@ -185,27 +185,44 @@ class LoginRegisterComponent extends Component {
};
loginInputonChange = (e) => {
// 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({
login: e.target.value,
login: stirngt,
})
}
loginInputonChanges = (e) => {
// 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({
password: e.target.value,
password: stirngt,
})
}
loginInputonChangess = (e) => {
// 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({
passwords: e.target.value,
passwords: stirngt,
})
}
//获取code
codesonChange = (e) => {
@ -380,12 +397,12 @@ class LoginRegisterComponent extends Component {
{
Phonenumberisnotco && Phonenumberisnotco != "" ?
<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>
: <div style={{height: "25px"}}></div>
}
<DragValidator
height={38} successGreenColor="#45E15F"
height={38} successGreenColor="#b0e811"
style={{height: "38px", width: "100%"}}
dragOkCallback={this.dragOkCallback}
></DragValidator>

@ -468,11 +468,17 @@ class LoginRegisterComponent extends Component {
//获取登入
loginInputonChange = (e) => {
// 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({
login: e.target.value,
login: stirngt,
})
}
//失去焦点判断
inputOnBlur = (e, id) => {
@ -482,23 +488,48 @@ class LoginRegisterComponent extends Component {
//获取登入密码
passwordonChange = (e) => {
// 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({
password: e.target.value
password: stirngt,
})
// this.setState({
// password: e.target.value
// })
}
//获取注册登入
loginInputonChanges = (e) => {
// 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({
logins: e.target.value,
logins: stirngt,
})
}
//获取注册密码
passwordonChanges = (e) => {
// 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({
passwords: e.target.value
passwords: stirngt,
})
}
//获取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)
}
loginonkeyup =(e)=>{
if(e.keyCode==32){
return false;
}
}
render() {
const {
activeKey,
@ -612,7 +649,7 @@ class LoginRegisterComponent extends Component {
{
Phonenumberisnotco && Phonenumberisnotco != "" ?
<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>
: <div style={{height:"25px"}}></div>
}
@ -669,14 +706,14 @@ class LoginRegisterComponent extends Component {
{
Phonenumberisnotcos && Phonenumberisnotcos != "" ?
<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>
: <div style={{height:"25px"}}></div>
}
<DragValidator
height={38} className="loginInput" successGreenColor="#45E15F"
height={38} className="loginInput" successGreenColor="#b0e811"
style={{ height: '38px'}}
dragOkCallback={this.dragOkCallback}
></DragValidator>

Loading…
Cancel
Save