Merge remote-tracking branch 'origin/dev_aliyun' into dev_aliyun

chromesetting
杨树明 5 years ago
commit 73244bef05

@ -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

@ -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]

@ -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

@ -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

@ -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)

@ -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

@ -0,0 +1,5 @@
class ModifyTaskPassForShixuns < ActiveRecord::Migration[5.2]
def change
change_column :shixuns, :task_pass, :boolean, :default => true
end
end

@ -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控制避免用户通过双击等操作发出重复的请求

@ -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 ? "" :
<div>
<span className="fl">
{this.state.mysingles === 0 ? "" : <span
@ -2959,7 +2989,7 @@ class PollNew extends Component {
</span>
<span className="fr">合计 <span
className="color-blue">{this.state.mysingles === undefined ? "" : this.state.mydoubles === undefined ? "" : this.state.mymainsint === undefined ? "" : this.state.mysingles + this.state.mydoubles + this.state.mymainsint}</span> </span>
className="color-blue">{this.state.mysingles === undefined ? "" : this.state.mydoubles === undefined ? "" : this.state.mymainsint === undefined ? "" : hejiine}</span> </span>
</div>
}

@ -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,11 +278,13 @@ class Listofworksstudentone extends Component {
width: '98px',
render: (text, record) => (
<span style={{width: '98px',}}>
<span style={record.submitstate === "延时完成" ? {
<span style={record.submitstate === "迟交通关" ? {
color: '#DD1717',
textAlign: "center",
width: '98px',
} : record.submitstate === "按时完成" ? {color: '#29BD8B', textAlign: "center", width: '98px',} : {
} : record.submitstate === "按时通关" ? {color: '#29BD8B', textAlign: "center", width: '98px',}
: record.submitstate === "未通关" ? {color: '#F69707', textAlign: "center", width: '98px',}
: {
color: '#747A7F',
textAlign: "center",
width: '98px',
@ -340,7 +343,26 @@ class Listofworksstudentone extends Component {
// ),
// },
{
title: '完成情况',
title: '当前完成关卡',
dataIndex: 'curcomlevel',
key: 'curcomlevel',
align: "center",
className: 'font-14',
width: '99px',
render: (text, record) => (
<span style={{
width: '99px',
}}>
<span style={{
color: '#07111B',
textAlign: "center",
width: '99px'
}}>{record.Curcomlevel + "/" + this.state.challenges_count}</span>
</span>
),
},
{
title: '截止前完成关卡',
dataIndex: 'completion',
key: 'completion',
align: "center",
@ -359,7 +381,9 @@ class Listofworksstudentone extends Component {
),
},
{
title: '关卡得分',
title:<span>关卡得分<Tooltip placement="top" title={<pre>
截止前学员完成的关卡才有成绩<br/>
</pre>}><img src={getImageUrl("images/educoder/problem.png")} className={"ml2"}/></Tooltip></span>,
dataIndex: 'levelscore',
key: 'levelscore',
align: 'center',
@ -638,7 +662,7 @@ class Listofworksstudentone extends Component {
),
},
{
title: '提交状态',
title: '作品状态',
dataIndex: 'submitstate',
key: 'submitstate',
align: "center",
@ -646,11 +670,13 @@ class Listofworksstudentone extends Component {
width: '98px',
render: (text, record) => (
<span style={{width: '98px',}}>
<span style={record.submitstate === "延时完成" ? {
<span style={record.submitstate === "迟交通关" ? {
color: '#DD1717',
textAlign: "center",
width: '98px',
} : record.submitstate === "按时完成" ? {color: '#29BD8B', textAlign: "center", width: '98px',} : {
} : record.submitstate === "按时通关" ? {color: '#29BD8B', textAlign: "center", width: '98px',}
: record.submitstate === "未通关" ? {color: '#F69707', textAlign: "center", width: '98px',}
: {
color: '#747A7F',
textAlign: "center",
width: '98px',
@ -709,7 +735,26 @@ class Listofworksstudentone extends Component {
// ),
// },
{
title: '完成情况',
title: '当前完成关卡',
dataIndex: 'curcomlevel',
key: 'curcomlevel',
align: "center",
className: 'font-14',
width: '99px',
render: (text, record) => (
<span style={{
width: '99px',
}}>
<span style={{
color: '#07111B',
textAlign: "center",
width: '99px'
}}>{record.Curcomlevel + "/" + this.state.challenges_count}</span>
</span>
),
},
{
title: '截止前完成关卡',
dataIndex: 'completion',
key: 'completion',
align: "center",
@ -728,7 +773,9 @@ class Listofworksstudentone extends Component {
),
},
{
title: '关卡得分',
title:<span>关卡得分<Tooltip placement="top" title={<pre>
截止前学员完成的关卡才有成绩<br/>
</pre>}><img src={getImageUrl("images/educoder/problem.png")} className={"ml2"}/></Tooltip></span>,
dataIndex: 'levelscore',
key: 'levelscore',
align: 'center',
@ -967,16 +1014,18 @@ class Listofworksstudentone extends Component {
)
},
{
title: '提交状态',
title: '作品状态',
dataIndex: 'submitstate',
key: 'submitstate',
align: 'center',
className: 'font-14',
render: (text, record) => (
<span style={record.submitstate === "延时完成" ? {
<span style={record.submitstate === "迟交通关" ? {
color: '#DD1717',
textAlign: "center"
} : record.submitstate === "按时完成" ? {color: '#29BD8B', textAlign: "center"} : {
} : 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) => (
<span style={{
width: '99px',
}}>
<span style={{
color: '#07111B',
textAlign: "center",
width: '99px'
}}>{record.Curcomlevel + "/" + this.state.challenges_count}</span>
</span>
),
},
{
title: '截止前完成关卡',
dataIndex: 'completion',
key: 'completion',
align: 'center',
@ -1051,7 +1119,9 @@ class Listofworksstudentone extends Component {
)
},
{
title: '关卡得分',
title:<span>关卡得分<Tooltip placement="top" title={<pre>
截止前学员完成的关卡才有成绩<br/>
</pre>}><img src={getImageUrl("images/educoder/problem.png")} className={"ml2"}/></Tooltip></span>,
dataIndex: 'levelscore',
key: 'levelscore',
align: 'center',
@ -1315,16 +1385,18 @@ class Listofworksstudentone extends Component {
)
},
{
title: '提交状态',
title: '作品状态',
dataIndex: 'submitstate',
key: 'submitstate',
align: 'center',
className: 'font-14',
render: (text, record) => (
<span style={record.submitstate === "延时完成" ? {
<span style={record.submitstate === "迟交通关" ? {
color: '#DD1717',
textAlign: "center"
} : record.submitstate === "按时完成" ? {color: '#29BD8B', textAlign: "center"} : {
} : record.submitstate === "按时通关" ? {color: '#29BD8B', textAlign: "center"}
: record.submitstate === "未通关" ? {color: '#F69707', textAlign: "center", width: '98px'}
: {
color: '#747A7F',
textAlign: "center"
}}>{record.submitstate}
@ -1373,7 +1445,26 @@ class Listofworksstudentone extends Component {
)
},
{
title: '完成情况',
title: '当前完成关卡',
dataIndex: 'curcomlevel',
key: 'curcomlevel',
align: "center",
className: 'font-14',
width: '99px',
render: (text, record) => (
<span style={{
width: '99px',
}}>
<span style={{
color: '#07111B',
textAlign: "center",
width: '99px'
}}>{record.Curcomlevel + "/" + this.state.challenges_count}</span>
</span>
),
},
{
title: '截止前完成关卡',
dataIndex: 'completion',
key: 'completion',
align: 'center',
@ -1388,7 +1479,9 @@ class Listofworksstudentone extends Component {
)
},
{
title: '关卡得分',
title:<span>关卡得分<Tooltip placement="top" title={<pre>
截止前学员完成的关卡才有成绩<br/>
</pre>}><img src={getImageUrl("images/educoder/problem.png")} className={"ml2"}/></Tooltip></span>,
dataIndex: 'levelscore',
key: 'levelscore',
align: 'center',
@ -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 = <Icon type="loading" style={{fontSize: 24}} spin/>;
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<homework_status.length;i++){
if(homework_status[i]==="已截止"){
homewrok=true;
}
}
if(homewrok===false){
for(var i=0;i<columnsstu.length;i++){
if (columnsstu[i].title === "当前完成关卡"){//item.id==122
columnsstu.splice(i,1)
}
}
for(var i=0;i<columnsstu2.length;i++){
if (columnsstu2[i].title === "当前完成关卡"){//item.id==122
columnsstu2.splice(i,1)
}
}
for(var i=0;i<columns.length;i++){
if (columns[i].title === "当前完成关卡"){//item.id==122
columns.splice(i,1)
}
}
for(var i=0;i<columnss.length;i++){
if (columnss[i].title === "当前完成关卡"){//item.id==122
columnss.splice(i,1)
}
}
}
}
return (
this.props.isAdmin() === true ?
@ -3675,7 +3802,7 @@ class Listofworksstudentone extends Component {
height: 58px;
}
.ysltableo .ant-table-thead > tr > th, .ant-table-tbody > tr > td {
padding: 9px;
padding: 0px;
}
`}</style>
<div className="edu-table edu-back-white ant-tables ysltableo table1">
@ -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;
}
`}</style>
<div className="edu-table edu-back-white ysltableow table2">
@ -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;
}
`
}
@ -4134,7 +4261,7 @@ class Listofworksstudentone extends Component {
height: 58px;
}
.ysltableowss .ant-table-thead > tr > th, .ant-table-tbody > tr > td {
padding: 9px;
padding: 0px;
}
`}</style>
<div className="edu-table edu-back-white ysltableowss table4">

@ -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 course_is_endismy=this.props&&this.props.user&&this.props.user.course_is_end;
const operations = <React.Fragment>
{course_grouptype===false||this.state.course_groups.length===0?"":
this.state.activeKey==="1"?
this.props.isAdmin()===true?
<Dropdownbox
{...this.props}
{...this.state}
@ -408,11 +409,16 @@ class Statistics extends Component{
}
{
this.state.activeKey==="1"?
(
course_is_endismy===false?
<a className={"ml20 ant-btn-link"} onClick={()=>this.setComputeTimet(this.props.match.params.coursesId)}>获取最新成绩</a>
:
""
)
:""
}
{
this.state.activeKey==="1"?
this.props.isAdmin()===true?
<a className={"ml20 ant-btn-link"} onClick={()=>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`)}>导出</a>
:""
}
@ -592,7 +598,7 @@ class Statistics extends Component{
}
`
}</style>
<Tabs className="statisticsTabs" activeKey={this.state.activeKey} onChange={this.activeKey} tabBarExtraContent={this.props.isAdmin()===true?operations:""}>
<Tabs className="statisticsTabs" activeKey={this.state.activeKey} onChange={this.activeKey} tabBarExtraContent={operations}>
<TabPane tab="学习成绩" key="1" className={"statisticsTabs1"} >
{bomdata===undefined||bomdata===null?"":bomdata.length===0?<NoneData/>:<Table
columns={columns}

@ -53,14 +53,9 @@ class TPMNav extends Component {
{/*jupyter*/}
{
this.props.is_jupyter===true?
(
is_teacher===true?
<Link to={`/shixuns/${shixunId}/dataset`}
className={`${match.url.indexOf('dataset') != -1 ? 'active' : ''} fl mr40`}>数据集</Link>
:""
)
:""
}
{
@ -80,12 +75,8 @@ class TPMNav extends Component {
<Link to={`/shixuns/${shixunId}/audit_situation`}
className={`${match.url.indexOf('audit_situation') != -1 ? 'active' : ''} fl`}>审核情况</Link>
:
is_teacher===true?
<Link to={`/shixuns/${shixunId}/audit_situation`}
className={`${match.url.indexOf('audit_situation') != -1 ? 'active' : ''} fl`}>审核情况</Link>
:
""
)

@ -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;

Loading…
Cancel
Save