diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index bda4bcc6c..9630caaec 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -465,9 +465,9 @@ class ApplicationController < ActionController::Base # 实训主类别列表,自带描述 def shixun_main_type list = [] - mirrors = MirrorRepository.select([:id, :type_name, :description]).published_main_mirror + mirrors = MirrorRepository.select([:id, :type_name, :description, :name]).published_main_mirror mirrors.try(:each) do |mirror| - list << {id: mirror.id, type_name: mirror.type_name, description: mirror.try(:description)} + list << {id: mirror.id, type_name: mirror.type_name, description: mirror.try(:description), mirror_name: mirror.name} end list end @@ -475,9 +475,9 @@ class ApplicationController < ActionController::Base # 小类别列表 def shixun_small_type list = [] - mirrors = MirrorRepository.select([:id, :type_name, :description]).published_small_mirror + mirrors = MirrorRepository.select([:id, :type_name, :description, :name]).published_small_mirror mirrors.try(:each) do |mirror| - list << {id: mirror.id, type_name: mirror.type_name, description: mirror.description} + list << {id: mirror.id, type_name: mirror.type_name, description: mirror.description, mirror_name: mirror.name} end list end diff --git a/app/controllers/shixuns_controller.rb b/app/controllers/shixuns_controller.rb index f75dd7147..84ceacd26 100644 --- a/app/controllers/shixuns_controller.rb +++ b/app/controllers/shixuns_controller.rb @@ -400,13 +400,14 @@ class ShixunsController < ApplicationController @shixun.shixun_info.update_attributes(shixun_info_params) # 镜像变动 @shixun.shixun_mirror_repositories.where.not(mirror_repository_id: old_mirror_ids).destroy_all - @shixun.shixun_mirror_repositories.create!(new_mirror_id) + @shixun.shixun_mirror_repositories.create!(new_mirror_id) if new_mirror_id.present? # 镜像变动要更换服务配置 @shixun.shixun_service_configs.where.not(mirror_repository_id: old_mirror_ids).destroy_all - @shixun.shixun_service_configs.create!(service_create_params) + @shixun.shixun_service_configs.create!(service_create_params) if service_create_params.present? service_update_params&.map do |service| smr = @shixun.shixun_service_configs.find_by(mirror_repository_id: service[:mirror_repository_id]) - smr.update_attributes(service) + logger.info("########smr: #{smr}") + smr.update_attributes(service) if smr.present? end # 添加第二仓库(管理员权限) if params[:is_secret_repository] diff --git a/app/controllers/weapps/courses_controller.rb b/app/controllers/weapps/courses_controller.rb index a30fdfa4c..cd8300e1e 100644 --- a/app/controllers/weapps/courses_controller.rb +++ b/app/controllers/weapps/courses_controller.rb @@ -167,6 +167,15 @@ class Weapps::CoursesController < Weapps::BaseController normal_status(0, "修改成功") end + # 分班列表 + def course_groups + @course_groups = @course.course_groups + @course_groups = @course_groups.where("name like ?", "%#{params[:search]}%") unless params[:search].blank? + @all_group_count = @course_groups.size + @teachers = @course.teachers.includes(:user, :teacher_course_groups) if @user_course_identity < Course::NORMAL + @current_group_id = @course.students.where(user_id: current_user.id).take&.course_group_id if @user_course_identity == Course::STUDENT + end + private def course_params diff --git a/app/services/homeworks_service.rb b/app/services/homeworks_service.rb index 0dc814c89..1c57b7f12 100644 --- a/app/services/homeworks_service.rb +++ b/app/services/homeworks_service.rb @@ -346,7 +346,7 @@ class HomeworksService work.work_score = format("%.2f",(score < 0 ? 0 : score).to_f) unless work.ultimate_score #logger.info("#############work_score: #{score}") work.calculation_time = Time.now - work.save! + work.save(validate: false) end end end \ No newline at end of file diff --git a/app/views/homework_commons/index.json.jbuilder b/app/views/homework_commons/index.json.jbuilder index 35f321f45..db3603746 100644 --- a/app/views/homework_commons/index.json.jbuilder +++ b/app/views/homework_commons/index.json.jbuilder @@ -38,6 +38,7 @@ json.homeworks @homework_commons.each do |homework| current_myshixun = homework.user_work(@user.id).try(:myshixun) myshixun = current_myshixun ? current_myshixun : shixun.myshixuns.find_by(user_id: @user.id) # json.game_count current_myshixun ? current_myshixun.exec_count : 0 + json.shixun_status shixun.try(:status).to_i json.task_operation task_operation_url(myshixun, shixun) else work = homework.user_work(@user.id) diff --git a/app/views/weapps/courses/course_groups.json.jbuilder b/app/views/weapps/courses/course_groups.json.jbuilder new file mode 100644 index 000000000..746935f60 --- /dev/null +++ b/app/views/weapps/courses/course_groups.json.jbuilder @@ -0,0 +1,6 @@ +json.course_groups @course_groups.each do |group| + json.(group, :id, :course_members_count, :name) +end + +json.none_group_member_count @course.none_group_count +json.group_count @all_group_count \ No newline at end of file diff --git a/db/migrate/20191216071931_modify_task_pass_for_shixuns.rb b/db/migrate/20191216071931_modify_task_pass_for_shixuns.rb new file mode 100644 index 000000000..b1e4372ff --- /dev/null +++ b/db/migrate/20191216071931_modify_task_pass_for_shixuns.rb @@ -0,0 +1,5 @@ +class ModifyTaskPassForShixuns < ActiveRecord::Migration[5.2] + def change + change_column :shixuns, :task_pass, :boolean, :default => true + end +end diff --git a/public/react/src/AppConfig.js b/public/react/src/AppConfig.js index 0356f25f1..73f60ae37 100644 --- a/public/react/src/AppConfig.js +++ b/public/react/src/AppConfig.js @@ -52,7 +52,6 @@ export function initAxiosInterceptors(props) { //proxy="http://47.96.87.25:48080" proxy="https://pre-newweb.educoder.net" proxy="https://test-newweb.educoder.net" - proxy="https://test-jupyterweb.educoder.net" //proxy="http://192.168.2.63:3001" // 在这里使用requestMap控制,避免用户通过双击等操作发出重复的请求; diff --git a/public/react/src/modules/courses/poll/PollNew.js b/public/react/src/modules/courses/poll/PollNew.js index 7384c7f6e..8740a9bbf 100644 --- a/public/react/src/modules/courses/poll/PollNew.js +++ b/public/react/src/modules/courses/poll/PollNew.js @@ -893,7 +893,6 @@ class PollNew extends Component { //保存并继续 //保存并继续,即提交本题的新建并继续创建一个相同的题(该新题处于编辑模式,题目和选项不要清空) Deleteadddomtwo = (indexo, object,bool) => { - debugger var thiss = this; @@ -1038,7 +1037,7 @@ class PollNew extends Component { if(object.question.max_choices){ if(object.question.max_choices>0){ if (object.question.max_choices < object.question.min_choices) { - this.props.showNotification(`可选:最小和最大限制须同时为数值或者“--"`); + this.props.showNotification(`可选的最大限制不能小于最小限制`); return; } } @@ -1258,7 +1257,7 @@ class PollNew extends Component { if(object.question.max_choices){ if(object.question.max_choices>0){ if (object.question.max_choices < object.question.min_choices) { - this.props.showNotification(`可选:最小和最大限制须同时为数值或者“--"`); + this.props.showNotification(`可选的最大限制不能小于最小限制`); return; } } @@ -1449,9 +1448,7 @@ class PollNew extends Component { // indexo 第几个数组 //object 单个数组数据 Deleteadddomthree = (indexo, object,bool) => { - this.setState({ - newoption: false, - }) + // console.log("deleteadddom 349") var thiss = this; let arr = this.state.adddom; @@ -1477,9 +1474,14 @@ class PollNew extends Component { } if (newarr[indexo].question.question_title === "") { this.props.showNotification('题目不能为空!'); + return + } + if (newarr[indexo].question.question_title.match(/^[ ]*$/)) { + this.props.showNotification('题目不能为空!'); return } + if (max > 0) { if (object.question.question_type === 1) { this.props.showNotification('选项内容不能为空!'); @@ -1579,7 +1581,7 @@ class PollNew extends Component { if(object.question.max_choices){ if(object.question.max_choices>0){ if (object.question.max_choices < object.question.min_choices) { - this.props.showNotification(`可选:最小和最大限制须同时为数值或者“--"`); + this.props.showNotification(`可选的最大限制不能小于最小限制`); return; } } @@ -1790,7 +1792,7 @@ class PollNew extends Component { if(object.question.max_choices){ if(object.question.max_choices>0){ if (object.question.max_choices < object.question.min_choices) { - this.props.showNotification(`可选:最小和最大限制须同时为数值或者“--"`); + this.props.showNotification(`可选的最大限制不能小于最小限制`); return; } } @@ -1867,7 +1869,6 @@ class PollNew extends Component { }; question = {"question": questiontwo}; //插入多选题 - if (uuk !== -1) { // console.log("修改") this.edittotheserver(object, 2, arrc, null, object.question.max_choices, object.question.min_choices,object.question.answers.length); @@ -2016,10 +2017,11 @@ class PollNew extends Component { if (result !== undefined) { if (result.data.status === 0) { this.props.showNotification(`已完成`); - thiss.thisinitializationdatanew(); this.setState({ Newdisplay:false, + newoption: false, + }) // console.log("确认创建问题") // console.log(result) @@ -2032,11 +2034,24 @@ class PollNew extends Component { // // } } + }else{ + this.setState({ + Newdisplay:true, + newoption: false, + + }) } // } catch (e) { // // } + }).catch((error) => { + console.log(error) + this.setState({ + Newdisplay:true, + newoption: false, + + }) }) @@ -2096,11 +2111,24 @@ class PollNew extends Component { if (result.data.status === 0) { this.props.showNotification(`编辑题目成功`); thiss.thisinitializationdatanew(); + this.setState({ + Newdisplay:false, + newoption: false, + }) } } catch (e) { // console.log("调用了edittotheserver") - console.log(e) + this.setState({ + Newdisplay:true, + newoption: false, + }) } + }).catch((error) => { + console.log(error) + this.setState({ + Newdisplay:true, + newoption: false, + }) }) } @@ -2685,7 +2713,8 @@ class PollNew extends Component { // console.log("2301"); // console.log(newr); // window.history.pushState('','',newUrl+'?tab='+e); - window.location.href = `/courses/${coursesId}/polls/${result.data.data.id}/edit`; + + // window.location.href = `/courses/${coursesId}/polls/${result.data.data.id}/edit`; }) } else { @@ -2773,6 +2802,7 @@ class PollNew extends Component { height: '30px', lineHeight: '30px', }; + const hejiine=this.state.mysingles + this.state.mydoubles + this.state.mymainsint; // console.log(this.state.projects===undefined?"":this.state.projects.poll_questions) var displaymysave = (mysave === true) ? "" : "display:none;"; @@ -2942,7 +2972,7 @@ class PollNew extends Component { { - this.state.mysingles + this.state.mydoubles + this.state.mymainsint === 0 ? "" : + hejiine=== 0 ? "" :
{this.state.mysingles === 0 ? "" : 合计 {this.state.mysingles === undefined ? "" : this.state.mydoubles === undefined ? "" : this.state.mymainsint === undefined ? "" : this.state.mysingles + this.state.mydoubles + this.state.mymainsint} + className="color-blue">{this.state.mysingles === undefined ? "" : this.state.mydoubles === undefined ? "" : this.state.mymainsint === undefined ? "" : hejiine}
} diff --git a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js index ab75b6c89..435a9ca6e 100644 --- a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js +++ b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js @@ -46,6 +46,7 @@ const {Option} = Select; //作品列表(学生) let allow_lates=false; let answer_open_evaluation=false; +// Curcomlevel class Listofworksstudentone extends Component { //unifiedsetting 统一设置 //allowreplenishment 允许补交 @@ -269,7 +270,7 @@ class Listofworksstudentone extends Component { ), }, { - title: '提交状态', + title: '作品状态', dataIndex: 'submitstate', key: 'submitstate', align: "center", @@ -277,15 +278,17 @@ class Listofworksstudentone extends Component { width: '98px', render: (text, record) => ( - {record.submitstate === undefined ? "--" : record.submitstate === "" ? "--" : record.submitstate === null ? "--" : record.submitstate} + } : record.submitstate === "按时通关" ? {color: '#29BD8B', textAlign: "center", width: '98px',} + : record.submitstate === "未通关" ? {color: '#F69707', textAlign: "center", width: '98px',} + : { + color: '#747A7F', + textAlign: "center", + width: '98px', + }}>{record.submitstate === undefined ? "--" : record.submitstate === "" ? "--" : record.submitstate === null ? "--" : record.submitstate} ), @@ -310,14 +313,14 @@ class Listofworksstudentone extends Component { } }> {record.cost_time === null ? "--" : record.cost_time === undefined ? "--" : record.cost_time === "--" ? "--" : - {record.cost_time === null ? "--" : record.cost_time === undefined ? "--" : record.cost_time} + } + >{record.cost_time === null ? "--" : record.cost_time === undefined ? "--" : record.cost_time} } @@ -340,7 +343,26 @@ class Listofworksstudentone extends Component { // ), // }, { - title: '完成情况', + title: '当前完成关卡', + dataIndex: 'curcomlevel', + key: 'curcomlevel', + align: "center", + className: 'font-14', + width: '99px', + render: (text, record) => ( + + {record.Curcomlevel + "/" + this.state.challenges_count} + + ), + }, + { + title: '截止前完成关卡', dataIndex: 'completion', key: 'completion', align: "center", @@ -359,7 +381,9 @@ class Listofworksstudentone extends Component { ), }, { - title: '关卡得分', + title:关卡得分 + 截止前学员完成的关卡才有成绩
+ }>
, dataIndex: 'levelscore', key: 'levelscore', align: 'center', @@ -638,7 +662,7 @@ class Listofworksstudentone extends Component { ), }, { - title: '提交状态', + title: '作品状态', dataIndex: 'submitstate', key: 'submitstate', align: "center", @@ -646,15 +670,17 @@ class Listofworksstudentone extends Component { width: '98px', render: (text, record) => ( - {record.submitstate === undefined ? "--" : record.submitstate === "" ? "--" : record.submitstate === null ? "--" : record.submitstate} + } : record.submitstate === "按时通关" ? {color: '#29BD8B', textAlign: "center", width: '98px',} + : record.submitstate === "未通关" ? {color: '#F69707', textAlign: "center", width: '98px',} + : { + color: '#747A7F', + textAlign: "center", + width: '98px', + }}>{record.submitstate === undefined ? "--" : record.submitstate === "" ? "--" : record.submitstate === null ? "--" : record.submitstate} ), @@ -709,7 +735,26 @@ class Listofworksstudentone extends Component { // ), // }, { - title: '完成情况', + title: '当前完成关卡', + dataIndex: 'curcomlevel', + key: 'curcomlevel', + align: "center", + className: 'font-14', + width: '99px', + render: (text, record) => ( + + {record.Curcomlevel + "/" + this.state.challenges_count} + + ), + }, + { + title: '截止前完成关卡', dataIndex: 'completion', key: 'completion', align: "center", @@ -728,7 +773,9 @@ class Listofworksstudentone extends Component { ), }, { - title: '关卡得分', + title:关卡得分 + 截止前学员完成的关卡才有成绩
+ }>
, dataIndex: 'levelscore', key: 'levelscore', align: 'center', @@ -967,19 +1014,21 @@ class Listofworksstudentone extends Component { ) }, { - title: '提交状态', + title: '作品状态', dataIndex: 'submitstate', key: 'submitstate', align: 'center', className: 'font-14', render: (text, record) => ( - {record.submitstate} + } : record.submitstate === "按时通关" ? {color: '#29BD8B', textAlign: "center"} + : record.submitstate === "未通关" ? {color: '#F69707', textAlign: "center", width: '98px'} + : { + color: '#747A7F', + textAlign: "center" + }}>{record.submitstate} ) @@ -1036,7 +1085,26 @@ class Listofworksstudentone extends Component { // ), // }, { - title: '完成情况', + title: '当前完成关卡', + dataIndex: 'curcomlevel', + key: 'curcomlevel', + align: "center", + className: 'font-14', + width: '99px', + render: (text, record) => ( + + {record.Curcomlevel + "/" + this.state.challenges_count} + + ), + }, + { + title: '截止前完成关卡', dataIndex: 'completion', key: 'completion', align: 'center', @@ -1051,7 +1119,9 @@ class Listofworksstudentone extends Component { ) }, { - title: '关卡得分', + title:关卡得分 + 截止前学员完成的关卡才有成绩
+ }>
, dataIndex: 'levelscore', key: 'levelscore', align: 'center', @@ -1094,12 +1164,12 @@ class Listofworksstudentone extends Component { { record.efficiencyscore && record.efficiencyscore === "--" ? ( this.state.allow_late && this.state.allow_late === false ? - + -- : this.state.allow_late && this.state.allow_late === true ? - + -- : @@ -1315,19 +1385,21 @@ class Listofworksstudentone extends Component { ) }, { - title: '提交状态', + title: '作品状态', dataIndex: 'submitstate', key: 'submitstate', align: 'center', className: 'font-14', render: (text, record) => ( - {record.submitstate} + } : record.submitstate === "按时通关" ? {color: '#29BD8B', textAlign: "center"} + : record.submitstate === "未通关" ? {color: '#F69707', textAlign: "center", width: '98px'} + : { + color: '#747A7F', + textAlign: "center" + }}>{record.submitstate} ) @@ -1360,20 +1432,39 @@ class Listofworksstudentone extends Component { } }> {record.cost_time === null ? "--" : record.cost_time === undefined ? "--" : record.cost_time === "--" ? "--" : - {record.cost_time === null ? "--" : record.cost_time === undefined ? "--" : record.cost_time} - + } + >{record.cost_time === null ? "--" : record.cost_time === undefined ? "--" : record.cost_time} + } ) }, { - title: '完成情况', + title: '当前完成关卡', + dataIndex: 'curcomlevel', + key: 'curcomlevel', + align: "center", + className: 'font-14', + width: '99px', + render: (text, record) => ( + + {record.Curcomlevel + "/" + this.state.challenges_count} + + ), + }, + { + title: '截止前完成关卡', dataIndex: 'completion', key: 'completion', align: 'center', @@ -1388,7 +1479,9 @@ class Listofworksstudentone extends Component { ) }, { - title: '关卡得分', + title:关卡得分 + 截止前学员完成的关卡才有成绩
+ }>
, dataIndex: 'levelscore', key: 'levelscore', align: 'center', @@ -1431,12 +1524,12 @@ class Listofworksstudentone extends Component { { record.efficiencyscore && record.efficiencyscore === "--" ? ( this.state.allow_late && this.state.allow_late === false ? - + -- : this.state.allow_late && this.state.allow_late === true ? - + -- : @@ -1977,7 +2070,7 @@ class Listofworksstudentone extends Component { stduynumber: teacherdata.student_id, classroom: teacherdata.group_name, cost_time: teacherdata.cost_time, - submitstate: teacherdata.work_status === 0 ? "未提交" : teacherdata.work_status === 1 ? "按时完成" : teacherdata.work_status === 2 ? "延时完成" : "未提交", + submitstate: teacherdata.work_status === 0 ? "未提交" : teacherdata.work_status === 1 ? "未通关" : teacherdata.work_status === 2 ? "按时通关" : "迟交通关", // updatetime:this.state.teacherdata.student_works[i].update_time, // updatetime:"", updatetime: timedata === "Invalid date" ? "--" : timedata, @@ -1991,6 +2084,7 @@ class Listofworksstudentone extends Component { ultimate_score: teacherdata.ultimate_score, user_name: teacherdata.user_name, user_login: teacherdata.user_login, + Curcomlevel: teacherdata.current_complete_count===undefined||teacherdata.current_complete_count===null||teacherdata.current_complete_count===""?0:teacherdata.current_complete_count, }) // } @@ -2019,7 +2113,7 @@ class Listofworksstudentone extends Component { stduynumber: student_works[i].student_id, classroom: student_works[i].group_name, cost_time: student_works[i].cost_time, - submitstate: student_works[i].work_status === 0 ? "未提交" : student_works[i].work_status === 1 ? "按时完成" : student_works[i].work_status === 2 ? "延时完成" : "未提交", + submitstate: student_works[i].work_status === 0 ? "未提交" : student_works[i].work_status === 1 ? "未通关" : student_works[i].work_status === 2 ? "按时通关" : "迟交通关", // updatetime:this.state.teacherdata.student_works[i].update_time, // updatetime:"", updatetime: timedata === "Invalid date" ? "--" : timedata, @@ -2033,6 +2127,7 @@ class Listofworksstudentone extends Component { ultimate_score: student_works[i].ultimate_score, user_name: student_works[i].user_name, user_login: student_works[i].user_login, + Curcomlevel:student_works[i].current_complete_count===null||student_works[i].current_complete_count===null||student_works[i].current_complete_count===""?0:student_works[i].current_complete_count, }) } @@ -2178,7 +2273,7 @@ class Listofworksstudentone extends Component { stduynumber: teacherdata.student_id, classroom: teacherdata.group_name, cost_time: teacherdata.cost_time, - submitstate: teacherdata.work_status === 0 ? "未提交" : teacherdata.work_status === 1 ? "按时完成" : teacherdata.work_status === 2 ? "延时完成" : "未提交", + submitstate: teacherdata.work_status === 0 ? "未提交" : teacherdata.work_status === 1 ? "未通关" : teacherdata.work_status === 2 ? "按时通关" : "迟交通关", // updatetime:this.state.teacherdata.student_works[i].update_time, // updatetime:"", updatetime: timedata === "Invalid date" ? "--" : timedata, @@ -2192,6 +2287,8 @@ class Listofworksstudentone extends Component { ultimate_score: teacherdata.ultimate_score, user_name: teacherdata.user_name, user_login: teacherdata.user_login, + Curcomlevel: teacherdata.current_complete_count===null|| teacherdata.current_complete_count===undefined|| teacherdata.current_complete_count===""?0: teacherdata.current_complete_count, + }) // } @@ -2537,7 +2634,7 @@ class Listofworksstudentone extends Component { stduynumber: student_works[i].student_id, classroom: student_works[i].group_name, cost_time: student_works[i].cost_time, - submitstate: student_works[i].work_status === 0 ? "未提交" : student_works[i].work_status === 1 ? "按时完成" : student_works[i].work_status === 2 ? "延时完成" : "未提交", + submitstate: student_works[i].work_status === 0 ? "未提交" : student_works[i].work_status === 1 ? "未通关" : student_works[i].work_status === 2 ? "按时通关" : "迟交通关", // updatetime:this.state.teacherdata.student_works[i].update_time, // updatetime:"", updatetime: timedata === "Invalid date" ? "--" : timedata, @@ -2551,6 +2648,7 @@ class Listofworksstudentone extends Component { ultimate_score: student_works[i].ultimate_score, user_name: student_works[i].user_name, user_login: student_works[i].user_login, + Curcomlevel: student_works[i].current_complete_count===undefined||student_works[i].current_complete_count===null||student_works[i].current_complete_count===""?0:student_works[i].current_complete_count, }) } @@ -3356,13 +3454,42 @@ class Listofworksstudentone extends Component { } render() { - let {columns, course_groupysls, datajs, isAdmin, homework_status, course_groupyslstwo, unlimited, unlimitedtwo, course_group_info, orders, task_status, checkedValuesine, searchtext, teacherlist, visible, visibles, game_list, columnsstu, columnsstu2, limit, experience, boolgalist, viewtrainingdata, teacherdata, page, data, jobsettingsdata, styletable, datas, order, loadingstate, computeTimetype} = this.state; + let {columns,columnss, course_groupysls, datajs, isAdmin, homework_status, course_groupyslstwo, unlimited, unlimitedtwo, course_group_info, orders, task_status, checkedValuesine, searchtext, teacherlist, visible, visibles, game_list, columnsstu, columnsstu2, limit, experience, boolgalist, viewtrainingdata, teacherdata, page, data, jobsettingsdata, styletable, datas, order, loadingstate, computeTimetype} = this.state; const antIcon = ; let course_is_end = this.props.current_user && this.props.current_user.course_is_end; // console.log("Listofworksstudentone.js"); // console.log(orders); - + let homewrok=false; + if(homework_status && homework_status.length > 0){ + for(var i=0;i tr > th, .ant-table-tbody > tr > td { - padding: 9px; + padding: 0px; } `}
@@ -3846,10 +3973,10 @@ class Listofworksstudentone extends Component { {teacherdata === undefined ? "" : teacherdata.left_time === undefined ? "" : teacherdata.left_time === null ? "" : {teacherdata.left_time.status} } - {teacherdata === undefined ? "0" : teacherdata.left_time === undefined ? "0" : teacherdata.left_time === null ? "0" : - {teacherdata.left_time.time} - } + {teacherdata === undefined ? "0" : teacherdata.left_time === undefined ? "0" : teacherdata.left_time === null ? "0" : + {teacherdata.left_time.time} + } @@ -3901,7 +4028,7 @@ class Listofworksstudentone extends Component { height: 58px; } .ysltableow .ant-table-thead > tr > th, .ant-table-tbody > tr > td { - padding: 9px; + padding: 0px; } `}
@@ -4005,7 +4132,7 @@ class Listofworksstudentone extends Component { height: 58px; } .ysltableows .ant-table-thead > tr > th, .ant-table-tbody > tr > td { - padding: 9px; + padding: 0px; } ` } @@ -4043,9 +4170,9 @@ class Listofworksstudentone extends Component { {teacherdata === undefined ? "" : teacherdata.left_time === undefined ? "" : teacherdata.left_time === null ? "" : {teacherdata.left_time.status}} - {teacherdata === undefined ? "0" : teacherdata.left_time === undefined ? "0" : teacherdata.left_time === null ? "0" : - {teacherdata.left_time.time}} + {teacherdata === undefined ? "0" : teacherdata.left_time === undefined ? "0" : teacherdata.left_time === null ? "0" : + {teacherdata.left_time.time}}
diff --git a/public/react/src/modules/courses/statistics/Statistics.js b/public/react/src/modules/courses/statistics/Statistics.js index 21041a59c..d8647870e 100644 --- a/public/react/src/modules/courses/statistics/Statistics.js +++ b/public/react/src/modules/courses/statistics/Statistics.js @@ -392,12 +392,13 @@ class Statistics extends Component{ ) } - // console.log(this.props.isAdmin) + // console.log("Statistics"); + // console.log(this.props.user.course_is_end) - - const operations = + const course_is_endismy=this.props&&this.props.user&&this.props.user.course_is_end; + const operations = {course_grouptype===false||this.state.course_groups.length===0?"": - this.state.activeKey==="1"? + this.props.isAdmin()===true? this.setComputeTimet(this.props.match.params.coursesId)}>获取最新成绩 + ( + course_is_endismy===false? + this.setComputeTimet(this.props.match.params.coursesId)}>获取最新成绩 + : + "" + ) :"" } { - this.state.activeKey==="1"? - this.derivefun(this.state.activeKey==="1"?`/courses/${this.props.match.params.coursesId}/export_member_scores_excel.xlsx`:`/courses/${this.props.match.params.coursesId}/export_member_act_score.xlsx`)}>导出 + this.props.isAdmin()===true? + this.derivefun(this.state.activeKey==="1"?`/courses/${this.props.match.params.coursesId}/export_member_scores_excel.xlsx`:`/courses/${this.props.match.params.coursesId}/export_member_act_score.xlsx`)}>导出 :"" } ; @@ -592,7 +598,7 @@ class Statistics extends Component{ } ` } - + {bomdata===undefined||bomdata===null?"":bomdata.length===0?:数据集 - :"" - ) - :"" } @@ -80,12 +75,8 @@ class TPMNav extends Component { 审核情况 : - is_teacher===true? 审核情况 - : - "" - ) diff --git a/public/react/src/modules/tpm/shixunchild/Challenges/Challengesjupyter.js b/public/react/src/modules/tpm/shixunchild/Challenges/Challengesjupyter.js index 3bbc4bf8f..81959a30b 100644 --- a/public/react/src/modules/tpm/shixunchild/Challenges/Challengesjupyter.js +++ b/public/react/src/modules/tpm/shixunchild/Challenges/Challengesjupyter.js @@ -189,6 +189,7 @@ class Challengesjupyter extends Component { const business = this.props&&this.props.current_user&&this.props.current_user.business?this.props.current_user.business:false; //管理员 const admin = this.props&&this.props.current_user&&this.props.current_user.admin?this.props.current_user.admin:false; + let mysidentity =false; try { mysidentity =this.props.identity < 5 &&ChallengesDataList&& ChallengesDataList.shixun_status< 3?true:false;