Merge branch 'dev_aliyun' of https://bdgit.educoder.net/Hjqreturn/educoder into dev_aliyun

dev_static
daiao 5 years ago
commit 0fa9d8745b

@ -62,8 +62,8 @@ class MessagesController < ApplicationController
end end
def reply def reply
return normal_status(2, "回复内容不能为空") if params[:content].blank? return normal_status(-1, "回复内容不能为空") if params[:content].blank?
return normal_status(2, "回复内容不能超过2000字符") if params[:content].length > 2000 return normal_status(-1, "回复内容不能超过2000字符") if params[:content].length > 2000
@reply = Message.create!(board: @message.board, root_id: @message.root_id || @message.id, @reply = Message.create!(board: @message.board, root_id: @message.root_id || @message.id,
author: current_user, parent: @message, author: current_user, parent: @message,
message_detail_attributes: { message_detail_attributes: {

@ -530,7 +530,7 @@ module ExercisesHelper
exercise_cha_score = 0.0 exercise_cha_score = 0.0
answer_status = 0 answer_status = 0
# if game.status == 2 && game.final_score >= 0 # if game.status == 2 && game.final_score >= 0
if game.final_score > 0 && game.end_time && game.end_time < exercise_end_time if game.final_score > 0 && (game.end_time.nil? || game.end_time < exercise_end_time)
exercise_cha_score = game.real_score(exercise_cha.question_score) exercise_cha_score = game.real_score(exercise_cha.question_score)
# exercise_cha_score = exercise_cha.question_score #每一关卡的得分 # exercise_cha_score = exercise_cha.question_score #每一关卡的得分
answer_status = 1 answer_status = 1

@ -0,0 +1,50 @@
class Migrate3176ExerciseScore < ActiveRecord::Migration[5.2]
def calculate_student_score(exercise,user)
score5 = 0.0 #实训题
exercise_end_time = exercise.end_time
exercise_questions = exercise.exercise_questions.includes(:exercise_standard_answers,:exercise_shixun_challenges)
exercise_questions.each do |q|
if q.question_type == 5
q.exercise_shixun_challenges.each do |exercise_cha|
game = Game.user_games(user.id,exercise_cha.challenge_id)&.first #当前用户的关卡
if game.present?
exercise_cha_score = 0.0
answer_status = 0
# if game.status == 2 && game.final_score >= 0
if game.final_score > 0 && (game.end_time.nil? || game.end_time < exercise_end_time)
exercise_cha_score = game.real_score(exercise_cha.question_score)
# exercise_cha_score = exercise_cha.question_score #每一关卡的得分
answer_status = 1
end
ex_shixun_answer_content = exercise_cha.exercise_shixun_answers.find_by(user_id:user.id,exercise_question_id:q.id)
if ex_shixun_answer_content.present? && !ex_shixun_answer_content.score >0 #把关卡的答案存入试卷的实训里
ex_shixun_answer_content.update_attributes!(score:exercise_cha_score.round(1),status:answer_status)
end
score5 += exercise_cha_score
else
score5 += 0.0
end
end
end
end
score5
end
def change
exercise = Exercise.find_by(id: 3176)
if exercise
exercise_users = exercise.exercise_users.where("start_at is not null")
exercise_users.each do |exercise_user|
calculate_score = calculate_student_score(exercise, exercise_user.user)
subjective_score = exercise_user.subjective_score
total_score_subjective_score = subjective_score < 0.0 ? 0.0 : subjective_score
total_score = calculate_score + total_score_subjective_score
if exercise_user.end_at.present?
exercise_user.update_attributes!(score:total_score,objective_score:calculate_score)
end
puts exercise_user.id
end
end
end
end

@ -42,14 +42,14 @@ if (isDev) {
// 老师 // 老师
//debugType="teacher"; //debugType="teacher";
// 学生 // 学生
debugType="student"; //debugType="student";
function railsgettimes(proxy) { function railsgettimes(proxy) {
if(timestamp&&checkSubmitFlg===false){ if(timestamp&&checkSubmitFlg===false){
$.ajax({url:proxy,async:false,success:function(data){ $.ajax({url:proxy,async:false,success:function(data){
if(data.status===0){ if(data.status===0){
timestamp=data.data.t; timestamp=data.message;
} }
}}) }})
checkSubmitFlg=true checkSubmitFlg=true
@ -59,7 +59,7 @@ debugType="student";
}else if(checkSubmitFlg===false){ }else if(checkSubmitFlg===false){
$.ajax({url:proxy,async:false,success:function(data){ $.ajax({url:proxy,async:false,success:function(data){
if(data.status===0){ if(data.status===0){
timestamp=data.data.t; timestamp=data.message;
} }
}}) }})
checkSubmitFlg=true checkSubmitFlg=true
@ -127,7 +127,8 @@ export function initAxiosInterceptors(props) {
if (window.location.port === "3007") { if (window.location.port === "3007") {
// let timestamp=railsgettimes(proxy); // let timestamp=railsgettimes(proxy);
// console.log(timestamp) // console.log(timestamp)
railsgettimes(`http://api.m.taobao.com/rest/api3.do?api=mtop.common.getTimestamp`); // `https://api.m.taobao.com/rest/api3.do?api=mtop.common.getTimestamp`
railsgettimes( `${proxy}/api/main/first_stamp.json`);
let newopens=md5(opens+timestamp) let newopens=md5(opens+timestamp)
config.url = `${proxy}${url}`; config.url = `${proxy}${url}`;
if (config.url.indexOf('?') == -1) { if (config.url.indexOf('?') == -1) {
@ -137,7 +138,9 @@ export function initAxiosInterceptors(props) {
} }
} else { } else {
// 加api前缀 // 加api前缀
railsgettimes(`http://api.m.taobao.com/rest/api3.do?api=mtop.common.getTimestamp`); // railsgettimes(`http://api.m.taobao.com/rest/api3.do?api=mtop.common.getTimestamp`);
railsgettimes( `/api/main/first_stamp.json`);
let newopens=md5(opens+timestamp) let newopens=md5(opens+timestamp)
config.url = url; config.url = url;
if (config.url.indexOf('?') == -1) { if (config.url.indexOf('?') == -1) {

@ -79,20 +79,26 @@ let newtimestamp;
let checkSubmitFlgs = false; let checkSubmitFlgs = false;
function railsgettimess(proxy) { function railsgettimess(proxy) {
if(checkSubmitFlgs===false){ if(checkSubmitFlgs===false){
$.ajax({url:proxy,async:false,success:function(data){ $.ajax({url:proxy,
async:false,success:function(data){
if(data.status===0){ if(data.status===0){
newtimestamp=data.data.t; newtimestamp=data.message;
checkSubmitFlgs = true;
} }
}}) }})
checkSubmitFlgs=true
window.setTimeout(function () { window.setTimeout(function () {
checkSubmitFlgs=false; checkSubmitFlgs=false;
}, 2500); }, 2500);
} }
} }
export function Railsgettimes() { export function Railsgettimes() {
railsgettimess(`http://api.m.taobao.com/rest/api3.do?api=mtop.common.getTimestamp`); railsgettimess(`${getUrl()}/api/main/first_stamp.json`);
// railsgettimess(`https://api.m.taobao.com/rest/api3.do?api=mtop.common.getTimestamp`);
} }
export function getUploadActionUrl(path, goTest) { export function getUploadActionUrl(path, goTest) {

@ -1,5 +1,5 @@
import React,{ Component } from "react"; import React,{ Component } from "react";
import { ConditionToolTip } from 'educoder' import { ConditionToolTip,getRandomNumber } from 'educoder'
class AttachmentsList extends Component{ class AttachmentsList extends Component{
constructor(props){ constructor(props){
@ -17,7 +17,7 @@ class AttachmentsList extends Component{
<i className="font-14 color-green iconfont icon-fujian mr8"></i> <i className="font-14 color-green iconfont icon-fujian mr8"></i>
</a> </a>
<ConditionToolTip title={item.title} condition={item.title && item.title.length > 30 }> <ConditionToolTip title={item.title} condition={item.title && item.title.length > 30 }>
<a href={item.url} className="mr12 fl task-hide" length="58" target={ item.is_pdf && item.is_pdf == true ? "_blank" : "_self" } style={{"maxWidth":"432px"}}>{item.title}</a> <a href={item.url+getRandomNumber()} className="mr12 fl task-hide" length="58" target={ item.is_pdf && item.is_pdf == true ? "_blank" : "_self" } style={{"maxWidth":"432px"}}>{item.title}</a>
</ConditionToolTip> </ConditionToolTip>
<span className="color-grey mt2 color-grey-6 font-12">{item.filesize}</span> <span className="color-grey mt2 color-grey-6 font-12">{item.filesize}</span>
</p> </p>

@ -32,7 +32,7 @@ import _ from 'lodash'
import TPIContext from './TPIContext' import TPIContext from './TPIContext'
import { EDU_ADMIN, EDU_SHIXUN_MANAGER, EDU_SHIXUN_MEMBER, EDU_CERTIFICATION_TEACHER import { EDU_ADMIN, EDU_SHIXUN_MANAGER, EDU_SHIXUN_MEMBER, EDU_CERTIFICATION_TEACHER
, EDU_GAME_MANAGER, EDU_TEACHER, EDU_NORMAL, EDU_BUSINESS, CNotificationHOC } from 'educoder' , EDU_GAME_MANAGER, EDU_TEACHER, EDU_NORMAL, EDU_BUSINESS, CNotificationHOC ,getRandomNumber} from 'educoder'
import { MuiThemeProvider, createMuiTheme, withStyles } from 'material-ui/styles'; import { MuiThemeProvider, createMuiTheme, withStyles } from 'material-ui/styles';
import MUIDialogStyleUtil from '../modules/page/component/MUIDialogStyleUtil' import MUIDialogStyleUtil from '../modules/page/component/MUIDialogStyleUtil'
@ -176,7 +176,7 @@ class TPIContextProvider extends Component {
testPath = 'http://test-newweb.educoder.net' testPath = 'http://test-newweb.educoder.net'
} }
// var url = `${testPath}/api/v1/games/${ game.identifier }/cost_time` // var url = `${testPath}/api/v1/games/${ game.identifier }/cost_time`
var url = `${testPath}/api/tasks/${ game.identifier }/cost_time` var url = `${testPath}/api/tasks/${ game.identifier }/cost_time${getRandomNumber()}`
window.$.ajax({ window.$.ajax({
type: 'get', type: 'get',
url: url, url: url,

@ -1,6 +1,6 @@
import React, { Component } from 'react'; import React, { Component } from 'react';
import {Button,Layout,Tabs,Icon, Card, Avatar, Row, Col ,Table,Badge} from 'antd'; import {Button,Layout,Tabs,Icon, Card, Avatar, Row, Col ,Table,Badge} from 'antd';
import {markdownToHTML,getImageUrl} from 'educoder'; import {markdownToHTML,getImageUrl,getRandomNumber} from 'educoder';
import axios from 'axios'; import axios from 'axios';
const { Content } = Layout; const { Content } = Layout;
@ -69,7 +69,7 @@ class CompetitionContents extends Component{
const operations = <div> const operations = <div>
<Button className={"fr"} type="primary" ghost onClick={()=>this.props.Competitionedit()}>编辑</Button> <Button className={"fr"} type="primary" ghost onClick={()=>this.props.Competitionedit()}>编辑</Button>
<Button className={"fr mr20"} type="primary" ghost> <Button className={"fr mr20"} type="primary" ghost>
<a onClick={()=>this.derivefun(`/competitions/${this.props.match.params.identifier}/charts.xlsx`)}>导出</a> <a onClick={()=>this.derivefun(`/competitions/${this.props.match.params.identifier}/charts.xlsx?${getRandomNumber(true)}`)}>导出</a>
</Button> </Button>
</div> </div>
const columns = [ const columns = [

@ -1,10 +1,10 @@
import React, { Component } from 'react'; import React, { Component } from 'react';
import { SnackbarHOC } from 'educoder'; import { getRandomNumber } from 'educoder';
import {Link} from 'react-router-dom'; import {Link} from 'react-router-dom';
import {BrowserRouter as Router,Route,Switch} from 'react-router-dom'; import {BrowserRouter as Router,Route,Switch} from 'react-router-dom';
import Loadable from 'react-loadable'; import Loadable from 'react-loadable';
import Loading from '../../../Loading'; import Loading from '../../../Loading';
import { WordsBtn, MarkdownToHtml, trigger, queryString, downloadFile } from 'educoder'; import { WordsBtn, MarkdownToHtml, trigger, queryString, getRandomcode } from 'educoder';
import axios from 'axios'; import axios from 'axios';
import CoursesListType from '../coursesPublic/CoursesListType'; import CoursesListType from '../coursesPublic/CoursesListType';
import AccessoryModal from "../coursesPublic/AccessoryModal"; import AccessoryModal from "../coursesPublic/AccessoryModal";
@ -125,7 +125,7 @@ class CommonWorkDetailIndex extends Component{
}) })
} }
}else { }else {
this.props.slowDownload(url) this.props.slowDownload(getRandomcode(url))
// this.props.showNotification(`正在下载中`); // this.props.showNotification(`正在下载中`);
// this.setState({ donwloading: true }) // this.setState({ donwloading: true })

@ -978,10 +978,8 @@ class CommonWorkSetting extends Component{
let exportUrl = `/api/homework_commons/${workId}/works_list.zip` let exportUrl = `/api/homework_commons/${workId}/works_list.zip`
const exportResultUrl = `/api/homework_commons/${workId}/works_list.xlsx` const exportResultUrl = `/api/homework_commons/${workId}/works_list.xlsx`
const noAuth = !isAdmin || !startEditFlag; const noAuth = !isAdmin || !startEditFlag;
return(
return(
<React.Fragment> <React.Fragment>
<Modals <Modals
modalsType={Modalstype} modalsType={Modalstype}
@ -1222,7 +1220,7 @@ class CommonWorkSetting extends Component{
<Checkbox className="ml30" checked={anonymous_comment} onChange={this.anonymous_comment_change} <Checkbox className="ml30" checked={anonymous_comment} onChange={this.anonymous_comment_change}
disabled={noAuth || moment(init_evaluation_start) < moment()} disabled={noAuth || moment(init_evaluation_start) < moment()}
>启用匿评</Checkbox> >启用匿评</Checkbox>
<span className={"font-14 color-grey-9"}>作品数量2可以开启匿评</span> <span className={"font-14 color-grey-9"}>{this.state.category&&this.state.category.category_name==="普通作业"?"作品数量≥2个可以开启匿评":"提交作品的分组数量≥2个可以开启匿评"}</span>
</div> </div>
{/* 开启时间 */} {/* 开启时间 */}
<div className={"h20 mb30 ml60"}> <div className={"h20 mb30 ml60"}>

@ -1,7 +1,7 @@
import React,{Component} from "react"; import React,{Component} from "react";
import { Form, Select, Input, Button,Checkbox,Icon,message,Modal, Table, Divider, Tag,DatePicker,Radio,Tooltip} from "antd"; import { Form, Select, Input, Button,Checkbox,Icon,message,Modal, Table, Divider, Tag,DatePicker,Radio,Tooltip} from "antd";
import {Link} from 'react-router-dom'; import {Link} from 'react-router-dom';
import { WordsBtn, MarkdownToHtml } from 'educoder'; import { WordsBtn, getRandomcode } from 'educoder';
import axios from 'axios'; import axios from 'axios';
import PublishRightnow from '../PublishRightnow' import PublishRightnow from '../PublishRightnow'
import AccessoryModal from "../../coursesPublic/AccessoryModal"; import AccessoryModal from "../../coursesPublic/AccessoryModal";
@ -44,7 +44,7 @@ class TabRightComponents extends Component{
} }
/// 确认是否下载 /// 确认是否下载
confirmysl(url){ confirmysl(url){
axios.get(url + '?export=true' ).then((response) => { axios.get(url + '&export=true' ).then((response) => {
if(response.data.status&&response.data.status===-1){ if(response.data.status&&response.data.status===-1){
}else if(response.data.status&&response.data.status===-2){ }else if(response.data.status&&response.data.status===-2){
@ -63,7 +63,7 @@ class TabRightComponents extends Component{
}) })
} }
}else { }else {
this.props.slowDownload(url); this.props.slowDownload(getRandomcode(url));
// this.props.showNotification(`正在下载中`); // this.props.showNotification(`正在下载中`);
// window.open("/api"+url, '_blank'); // window.open("/api"+url, '_blank');
} }
@ -108,9 +108,8 @@ class TabRightComponents extends Component{
const isAdmin = this.props.isAdmin() const isAdmin = this.props.isAdmin()
const isSuperAdmin = this.props.isSuperAdmin() const isSuperAdmin = this.props.isSuperAdmin()
let exportUrl = `/api/homework_commons/${workId}/works_list.zip` let exportUrls = `/api/homework_commons/${workId}/works_list.zip`
const exportResultUrl = `/api/homework_commons/${workId}/works_list.xlsx` const exportResultUrls = `/api/homework_commons/${workId}/works_list.xlsx`
return( return(
<React.Fragment> <React.Fragment>
{isAdmin ? {isAdmin ?
@ -150,8 +149,8 @@ class TabRightComponents extends Component{
{this.props.isAdmin()? <li className="li_line drop_down fr color-blue font-16 mt20" style={{"padding":"0 20px"}}> {this.props.isAdmin()? <li className="li_line drop_down fr color-blue font-16 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":"-34px","left":"unset","height":"auto"}}> <ul className="drop_down_menu" style={{"right":"-34px","left":"unset","height":"auto"}}>
<li><a onClick={(url)=>this.confirmysl(exportResultUrl)} className="color-dark">导出成绩</a></li> <li><a onClick={(url)=>this.confirmysl(exportResultUrls)} className="color-dark">导出成绩</a></li>
<li><a onClick={(url)=>this.confirmysl(exportUrl)} className="color-dark">导出作品附件</a></li> <li><a onClick={(url)=>this.confirmysl(exportUrls)} className="color-dark">导出作品附件</a></li>
</ul> </ul>
</li>:""} </li>:""}

@ -1,6 +1,6 @@
import React, { Component } from 'react'; import React, { Component } from 'react';
import {Button,Layout,Tabs,Icon, Card, Avatar, Row, Col ,Table,Badge} from 'antd'; import {Button,Layout,Tabs,Icon, Card, Avatar, Row, Col ,Table,Badge} from 'antd';
import {markdownToHTML,getImageUrl} from 'educoder'; import {markdownToHTML,getImageUrl,getRandomNumber} from 'educoder';
import axios from 'axios'; import axios from 'axios';
const { Content } = Layout; const { Content } = Layout;
@ -69,7 +69,7 @@ class CompetitionContents extends Component{
const operations = <div> const operations = <div>
<Button className={"fr"} type="primary" ghost onClick={()=>this.props.Competitionedit()}>编辑</Button> <Button className={"fr"} type="primary" ghost onClick={()=>this.props.Competitionedit()}>编辑</Button>
<Button className={"fr mr20"} type="primary" ghost> <Button className={"fr mr20"} type="primary" ghost>
<a onClick={()=>this.derivefun(`/competitions/${this.props.match.params.identifier}/charts.xlsx`)}>导出</a> <a onClick={()=>this.derivefun(`/competitions/${this.props.match.params.identifier}/charts.xlsx?${getRandomNumber(true)}`)}>导出</a>
</Button> </Button>
</div> </div>
const columns = [ const columns = [

@ -549,6 +549,10 @@ class Coursesleftnav extends Component{
window.location.href=`/courses/${coursesId}/boards/${result.data.category_id}`; window.location.href=`/courses/${coursesId}/boards/${result.data.category_id}`;
} }
if(positiontype!="course_groups"){
this.updasaveNavmoda()
}
if(positiontype==="course_groups"){ if(positiontype==="course_groups"){
window.location.href=`/courses/${coursesId}/course_groups/${result.data.group_id}`; window.location.href=`/courses/${coursesId}/course_groups/${result.data.group_id}`;
} }

@ -1,7 +1,7 @@
import React,{ Component } from "react"; import React,{ Component } from "react";
import {Checkbox,Input,Table, Pagination,Menu,Spin} from "antd"; import {Checkbox,Input,Table, Pagination,Menu,Spin} from "antd";
import {Link,NavLink} from 'react-router-dom'; import {Link,NavLink} from 'react-router-dom';
import { WordsBtn ,ActionBtn,queryString,getRandomcode} from 'educoder'; import { WordsBtn ,getRandomNumber,queryString,getRandomcode} from 'educoder';
import CoursesListType from '../coursesPublic/CoursesListType'; import CoursesListType from '../coursesPublic/CoursesListType';
import '../css/members.css'; import '../css/members.css';
import '../css/busyWork.css'; import '../css/busyWork.css';
@ -175,9 +175,9 @@ class Testpapersettinghomepage extends Component{
if(child!=undefined){ if(child!=undefined){
params =child._getRequestParams()!==undefined?child._getRequestParams():{}; params =child._getRequestParams()!==undefined?child._getRequestParams():{};
} }
console.log("170");
console.log(params);
const urll=url+`?${queryString.stringify(params)}`; const urll=url+`?${queryString.stringify(params)}`;
axios.get(urll+ '&export=true').then((response) => { axios.get(urll+ '&export=true').then((response) => {
if(response===undefined){ if(response===undefined){
return return
@ -200,7 +200,7 @@ class Testpapersettinghomepage extends Component{
}) })
} }
}else { }else {
this.props.slowDownload(urll) this.props.slowDownload(getRandomcode(urll))
// this.setState({ donwloading: true }) // this.setState({ donwloading: true })
// downloadFile({ // downloadFile({
// url: urll, // url: urll,

@ -32,8 +32,8 @@ class Bullsubdirectory extends Component{
} }
componentDidMount() { componentDidMount() {
console.log("获取到数据"); // console.log("获取到数据");
console.log(this.props); // console.log(this.props);
let{id,myname,mydescription,index,item} =this.props let{id,myname,mydescription,index,item} =this.props
this.props.form.setFieldsValue({ this.props.form.setFieldsValue({
id:id, id:id,

@ -30,8 +30,8 @@ class Eduinforms extends Component{
} }
componentDidMount() { componentDidMount() {
console.log("Eduinformss"); // console.log("Eduinformss");
console.log("获取到数据"); // console.log("获取到数据");
// console.log(this.props); // console.log(this.props);
const query = this.props.location.search; const query = this.props.location.search;
// const type = query.split('?chinaoocTimestamp='); // const type = query.split('?chinaoocTimestamp=');

@ -1,5 +1,5 @@
import React, { Component } from 'react'; import React, { Component } from 'react';
import {getRandomNumber,queryString} from 'educoder'; import {getRandomNumber} from 'educoder';
import {Link} from 'react-router-dom'; import {Link} from 'react-router-dom';
import {Tooltip,Menu} from 'antd'; import {Tooltip,Menu} from 'antd';
import Loadable from 'react-loadable'; import Loadable from 'react-loadable';
@ -313,15 +313,18 @@ class GraduationTaskDetail extends Component{
} }
CodeReview=()=>{ CodeReview=()=>{
let newgetRandomNumber=getRandomNumber(true);
console.log(newgetRandomNumber)
this.props.showNotification("正在导出中..."); this.props.showNotification("正在导出中...");
if(newgetRandomNumber){
const task_Id = this.props.match.params.task_Id; const task_Id = this.props.match.params.task_Id;
window.open(`/api/graduation_tasks/${task_Id}/sonar? window.open(`/api/graduation_tasks/${task_Id}/sonar?
${this.state.taskdatas.teacher_comment===undefined||this.state.taskdatas.teacher_comment===null?"":"teacher_comment="+this.state.taskdatas.teacher_comment} ${this.state.taskdatas.teacher_comment===undefined||this.state.taskdatas.teacher_comment===null?"":"teacher_comment="+this.state.taskdatas.teacher_comment+"&"}
${this.state.taskdatas.task_status===undefined||this.state.taskdatas.task_status===null?"":"&task_status="+this.state.taskdatas.task_status} ${this.state.taskdatas.task_status===undefined||this.state.taskdatas.task_status===null?"":"task_status="+this.state.taskdatas.task_status+"&"}
${this.state.taskdatas.course_group===undefined||this.state.taskdatas.course_group===null?"":"&course_group="+this.state.taskdatas.course_group} ${this.state.taskdatas.course_group===undefined||this.state.taskdatas.course_group===null?"":"course_group="+this.state.taskdatas.course_group+"&"}
${this.state.taskdatas.cross_comment===undefined||this.state.taskdatas.cross_comment===null?"":"&cross_comment="+this.state.taskdatas.cross_comment} ${this.state.taskdatas.cross_comment===undefined||this.state.taskdatas.cross_comment===null?"":"cross_comment="+this.state.taskdatas.cross_comment+"&"}
${this.state.taskdatas.search===undefined||this.state.taskdatas.search===null?"":"&search="+this.state.taskdatas.search+"&"}${getRandomNumber(true)}`) ${this.state.taskdatas.search===undefined||this.state.taskdatas.search===null?"":"search="+this.state.taskdatas.search+"&"}${newgetRandomNumber}`)
}
} }
getsonars=(teacher_comment,task_status,course_group,cross_comment,search)=>{ getsonars=(teacher_comment,task_status,course_group,cross_comment,search)=>{
@ -519,8 +522,8 @@ class GraduationTaskDetail extends Component{
{this.props.isAdmin()? <li className="li_line drop_down fr color-blue font-16 mt20" style={{"paddingLeft":"0px"}}> {this.props.isAdmin()? <li className="li_line drop_down fr color-blue font-16 mt20" style={{"paddingLeft":"0px"}}>
导出<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":"-34px","left":"unset","height":"auto"}}> <ul className="drop_down_menu" style={{"right":"-34px","left":"unset","height":"auto"}}>
<li><a onClick={()=>this.child.confirmysl("/graduation_tasks/"+task_Id+"/tasks_list.xlsx")} className="color-dark">导出成绩</a></li> <li><a onClick={()=>this.child.confirmysl(`/graduation_tasks/${task_Id}/tasks_list.xlsx`)} className="color-dark">导出成绩</a></li>
<li><a onClick={()=>this.child.confirmysl("/graduation_tasks/"+task_Id+"/tasks_list.zip")} className="color-dark">导出作品附件</a></li> <li><a onClick={()=>this.child.confirmysl(`/graduation_tasks/${task_Id}/tasks_list.xlsx`)} className="color-dark">导出作品附件</a></li>
</ul> </ul>
</li>:""} </li>:""}
{questionslist.work_status===undefined||questionslist.work_status===null||questionslist.work_status.length===0?"":questionslist.work_status.map((item,key)=>{ {questionslist.work_status===undefined||questionslist.work_status===null||questionslist.work_status.length===0?"":questionslist.work_status.map((item,key)=>{

@ -20,7 +20,8 @@ class GraduationTasksappraiseMainEditor extends Component{
score: undefined, score: undefined,
same_score: false, same_score: false,
errorMessage: '', errorMessage: '',
numberErrorMessage: '' numberErrorMessage: '',
errorMessagetype:false
} }
} }
onSubmit = () => { onSubmit = () => {
@ -31,11 +32,20 @@ class GraduationTasksappraiseMainEditor extends Component{
return item.response ? item.response.id : item.id return item.response ? item.response.id : item.id
}) })
const comment = this.mdRef.current.getValue() const comment = this.mdRef.current.getValue()
if ((!comment || comment.trim() == "") && !score) { if ((!comment || comment.trim() == "") && !score &&this.props.isAdmin()===true) {
this.setState( {errorMessage : '分数和评语不能同时为空' }) this.setState( {errorMessage : '分数和评语不能同时为空' })
// this.props.showNotification('请先输入评阅说明') // this.props.showNotification('请先输入评阅说明')
return; return;
} }
if (!score && this.props.isAdmin()===false) {
this.setState( {
errorMessage : '分数不能为空',
errorMessagetype:true
})
// this.props.showNotification('请先输入评阅说明')
return;
}
if (comment.length > 2000) { if (comment.length > 2000) {
this.setState( {errorMessage : '不能超过2000个字符' }) this.setState( {errorMessage : '不能超过2000个字符' })
// this.props.showNotification('评阅说明文本长度不能超过2000') // this.props.showNotification('评阅说明文本长度不能超过2000')
@ -136,6 +146,12 @@ class GraduationTasksappraiseMainEditor extends Component{
}); });
} }
onScoreChange = (val) => { onScoreChange = (val) => {
if(val){
this.setState( {
errorMessage: '',
errorMessagetype:false
})
}
if (val > 100 ) { if (val > 100 ) {
this.props.showNotification('不能大于100') this.props.showNotification('不能大于100')
this.setState({ score: 100 }) this.setState({ score: 100 })
@ -157,7 +173,7 @@ class GraduationTasksappraiseMainEditor extends Component{
this.setState({ same_score: e.target.checked }) //!this.state.same_score this.setState({ same_score: e.target.checked }) //!this.state.same_score
} }
render(){ render(){
let { total_count, comments, pageCount, fileList, score, same_score, errorMessage, numberErrorMessage } = this.state let { total_count, comments, errorMessagetype, fileList, score, same_score, errorMessage, numberErrorMessage } = this.state
const { current_user, memo, showSameScore, placeholder } = this.props const { current_user, memo, showSameScore, placeholder } = this.props
const isAdmin = this.props.isAdmin() const isAdmin = this.props.isAdmin()
const commentUploadProp = { const commentUploadProp = {
@ -209,7 +225,7 @@ class GraduationTasksappraiseMainEditor extends Component{
`}</style> `}</style>
{this.props.title && <span className="mainEditorTitle color-grey-6">{this.props.title}</span>} {this.props.title && <span className="mainEditorTitle color-grey-6">{this.props.title}</span>}
<TPMMDEditor ref={this.mdRef} mdID={'appraiseEditor'} placeholder={placeholder || "请在此输入对本作品的评语最大限制2000个字符"} <TPMMDEditor ref={this.mdRef} mdID={'appraiseEditor'} placeholder={placeholder || "请在此输入对本作品的评语最大限制2000个字符"}
watch={false} height={160} className={errorMessage ? 'editorInputError' : ''} imageExpand={true}></TPMMDEditor> watch={false} height={160} className={errorMessage&&errorMessagetype!=true ? 'editorInputError' : ''} imageExpand={true}></TPMMDEditor>
{ showSameScore == true && <div> { showSameScore == true && <div>
<Checkbox checked={same_score} onChange={this.same_score_change}>整组同评</Checkbox> <Checkbox checked={same_score} onChange={this.same_score_change}>整组同评</Checkbox>
<span className={"font-14 color-grey-9"}>(选中则本次评阅对象指小组全部成员否则仅评阅此成员1人 )</span> <span className={"font-14 color-grey-9"}>(选中则本次评阅对象指小组全部成员否则仅评阅此成员1人 )</span>

@ -2,7 +2,7 @@ import React,{Component} from "react";
import { Form, Select, Input, Button,Checkbox,Upload,Icon,message,Modal, Table, Divider, Tag,DatePicker,Radio,Tooltip} from "antd"; import { Form, Select, Input, Button,Checkbox,Upload,Icon,message,Modal, Table, Divider, Tag,DatePicker,Radio,Tooltip} from "antd";
import {Link} from 'react-router-dom'; import {Link} from 'react-router-dom';
import locale from 'antd/lib/date-picker/locale/zh_CN'; import locale from 'antd/lib/date-picker/locale/zh_CN';
import { WordsBtn,getUrl ,handleDateString} from 'educoder'; import { WordsBtn,getRandomcode ,handleDateString} from 'educoder';
import axios from 'axios'; import axios from 'axios';
import Modals from '../../../modals/Modals'; import Modals from '../../../modals/Modals';
import DownloadMessageysl from "../../../modals/DownloadMessageysl"; import DownloadMessageysl from "../../../modals/DownloadMessageysl";
@ -870,9 +870,8 @@ class GraduationTaskssettingapp extends Component{
} }
/// 确认是否下载 /// 确认是否下载
confirmysl(url){ confirmysl(url,urls){
debugger;
console.log(3);
axios.get(url + '?export=true' ).then((response) => { axios.get(url + '?export=true' ).then((response) => {
if(response === undefined){ if(response === undefined){
return return
@ -895,8 +894,10 @@ class GraduationTaskssettingapp extends Component{
}) })
} }
}else { }else {
this.props.slowDownload(url)
// this.props.showNotification(`正在下载中`);
this.props.slowDownload(getRandomcode(url))
// window.open(getRandomcode("/api" + url), '_blank');
// this.props.showNotification(`正在下载中`); // this.props.showNotification(`正在下载中`);
// window.open("/api"+url, '_blank'); // window.open("/api"+url, '_blank');
} }

@ -1,7 +1,7 @@
import React,{Component} from "react"; import React,{Component} from "react";
import { Form, Select, Input, Button,Checkbox,Upload,Icon,message,Modal,Pagination, Table, Divider, Tag,Tooltip} from "antd"; import { Form, Select, Input, Button,Checkbox,Upload,Icon,message,Modal,Pagination, Table, Divider, Tag,Tooltip} from "antd";
import {Link} from 'react-router-dom'; import {Link} from 'react-router-dom';
import {getImageUrl, NoneData, sortDirections} from 'educoder'; import {getImageUrl, NoneData, sortDirections,getRandomcode} from 'educoder';
import axios from 'axios'; import axios from 'axios';
import moment from 'moment'; import moment from 'moment';
import HomeworkModal from "../../coursesPublic/HomeworkModal"; import HomeworkModal from "../../coursesPublic/HomeworkModal";
@ -759,7 +759,7 @@ class GraduationTaskssettinglist extends Component{
}) })
} }
}else { }else {
this.props.slowDownload(url) this.props.slowDownload(getRandomcode(url))
// this.props.showNotification(`正在下载中`); // this.props.showNotification(`正在下载中`);
// window.open("/api"+url, '_blank'); // window.open("/api"+url, '_blank');

@ -1,7 +1,7 @@
import React,{Component} from "react"; import React,{Component} from "react";
import { Form, Select, Input, Button,Checkbox,Upload,Icon,message,Modal, Table, Divider, Tag} from "antd"; import { Form, Select, Input, Button,Checkbox,Upload,Icon,message,Modal, Table, Divider, Tag} from "antd";
import {Link} from 'react-router-dom'; import {Link} from 'react-router-dom';
import { WordsBtn,markdownToHTML,AttachmentList} from 'educoder'; import { getRandomcode,markdownToHTML,AttachmentList} from 'educoder';
import axios from 'axios'; import axios from 'axios';
import Modals from '../../../modals/Modals'; import Modals from '../../../modals/Modals';
import DownloadMessageysl from "../../../modals/DownloadMessageysl"; import DownloadMessageysl from "../../../modals/DownloadMessageysl";
@ -214,9 +214,8 @@ class GraduationTasksquestions extends Component{
} }
/// 确认是否下载 /// 确认是否下载
confirmysl(url){ confirmysl(url,urls){
debugger;
console.log(2);
axios.get(url + '?export=true').then((response) => { axios.get(url + '?export=true').then((response) => {
if(response === undefined){ if(response === undefined){
return return
@ -239,8 +238,10 @@ class GraduationTasksquestions extends Component{
}) })
} }
}else { }else {
this.props.slowDownload(url) // this.props.slowDownload(urls)
//this.props.showNotification(`正在下载中`);
this.props.slowDownload(getRandomcode(url))
// window.open(getRandomcode("/api" + url), '_blank');
// this.props.showNotification(`正在下载中`); // this.props.showNotification(`正在下载中`);
// window.open("/api"+url, '_blank'); // window.open("/api"+url, '_blank');
} }

@ -4,7 +4,7 @@ import {Checkbox, Menu, Pagination,Spin} from "antd";
import Titlesearchsection from '../../common/titleSearch/TitleSearchSection' import Titlesearchsection from '../../common/titleSearch/TitleSearchSection'
import DownloadMessageysl from "../../../modals/DownloadMessageysl"; import DownloadMessageysl from "../../../modals/DownloadMessageysl";
import { WordsBtn ,getRandomcode} from 'educoder' import { WordsBtn ,getRandomcode,getRandomNumber} from 'educoder'
import NoneData from '../../coursesPublic/NoneData' import NoneData from '../../coursesPublic/NoneData'
import Modals from "../../../modals/Modals" import Modals from "../../../modals/Modals"
import axios from 'axios' import axios from 'axios'
@ -335,7 +335,7 @@ onBoardsNew=()=>{
} }
/// 确认是否下载 /// 确认是否下载
confirmysl(url){ confirmysl(url){
axios.get(url + '?export=true').then((response) => { axios.get(url + '&export=true').then((response) => {
if(response.data.status&&response.data.status===-1){ if(response.data.status&&response.data.status===-1){
}else if(response.data.status&&response.data.status===-2){ }else if(response.data.status&&response.data.status===-2){

@ -1,6 +1,6 @@
import React, {Component} from "react"; import React, {Component} from "react";
import { WordsBtn,on, off, trigger,markdownToHTML,getImageUrl} from 'educoder'; import { WordsBtn,on, off, trigger,markdownToHTML,getRandomNumber} from 'educoder';
import { import {
Button, Button,
Checkbox, Checkbox,
@ -23,7 +23,8 @@ class GroupPackage extends Component {
} }
} }
DownloadOpenPdf=(type,url)=>{ DownloadOpenPdf=(type,url)=>{
type===true?window.open(url):window.location.href=url; let newurl=url+getRandomNumber();
type===true?window.open(newurl):window.location.href=newurl;
} }
componentDidMount() { componentDidMount() {
console.log("Groupjobquesanswer"); console.log("Groupjobquesanswer");

@ -14,7 +14,7 @@ import CourseLayoutcomponent from '../common/CourseLayoutComponent'
import Titlesearchsection from '../common/titleSearch/TitleSearchSection' import Titlesearchsection from '../common/titleSearch/TitleSearchSection'
import ColorCountText from '../common/titleSearch/ColorCountText' import ColorCountText from '../common/titleSearch/ColorCountText'
import { WordsBtn, trigger, on, off, getUrl, downloadFile , sortDirections, NoneData } from 'educoder' import { WordsBtn, trigger, on, off, getUrl, downloadFile , getRandomcode, NoneData } from 'educoder'
import Modals from "../../modals/Modals"; import Modals from "../../modals/Modals";
import DownloadMessageysl from "../../modals/DownloadMessageysl"; import DownloadMessageysl from "../../modals/DownloadMessageysl";
@ -83,7 +83,7 @@ function CourseGroupList(props) {
} }
const confirmysl = (url) => { const confirmysl = (url) => {
axios.get(url + 'export=true').then((response) => { axios.get(url + '&export=true').then((response) => {
if(response === undefined){ if(response === undefined){
return return
} }
@ -100,7 +100,7 @@ function CourseGroupList(props) {
setDownloadMessageval(500) setDownloadMessageval(500)
} }
}else { }else {
props.slowDownload(url) props.slowDownload(getRandomcode(url))
} }
}).catch((error) => { }).catch((error) => {
console.log(error) console.log(error)
@ -121,9 +121,9 @@ function CourseGroupList(props) {
const course_groups = listRes.course_groups const course_groups = listRes.course_groups
const current_group_id = listRes.current_group_id const current_group_id = listRes.current_group_id
let exportUrl = `/courses/${courseId}/export_member_scores_excel.xlsx?`; //总成绩 let exportUrl = `/courses/${courseId}/export_member_scores_excel.xlsx`; //总成绩
let exportUrltwo = `/courses/${courseId}/export_couser_info.xlsx?`; //课堂信息 let exportUrltwo = `/courses/${courseId}/export_couser_info.xlsx`; //课堂信息
let exportUrlthree = `/courses/${courseId}/export_member_act_score.xlsx?`; //活跃度 let exportUrlthree = `/courses/${courseId}/export_member_act_score.xlsx`; //活跃度
return ( return (
<React.Fragment> <React.Fragment>
<DownloadMessageysl <DownloadMessageysl

@ -7,7 +7,7 @@ import CourseLayoutcomponent from '../common/CourseLayoutComponent'
import Titlesearchsection from '../common/titleSearch/TitleSearchSection' import Titlesearchsection from '../common/titleSearch/TitleSearchSection'
import ColorCountText from '../common/titleSearch/ColorCountText' import ColorCountText from '../common/titleSearch/ColorCountText'
import { WordsBtn, trigger, on, off, getUrl, downloadFile , sortDirections } from 'educoder' import { WordsBtn, trigger, on, off, getRandomcode, getRandomNumber , sortDirections } from 'educoder'
import Modals from "../../modals/Modals"; import Modals from "../../modals/Modals";
import axios from 'axios' import axios from 'axios'
import _ from 'lodash' import _ from 'lodash'
@ -199,7 +199,7 @@ class studentsList extends Component{
} }
} }
/// 确认是否下载 /// 确认是否下载
confirmysl(url){ confirmysl(url,urls){
// this.props.showGlobalLoading('正在生成文件,请稍后...') // this.props.showGlobalLoading('正在生成文件,请稍后...')
axios.get(url + 'export=true').then((response) => { axios.get(url + 'export=true').then((response) => {
if(response === undefined){ if(response === undefined){
@ -226,7 +226,7 @@ class studentsList extends Component{
// this.props.showNotification(`正在下载中`); // this.props.showNotification(`正在下载中`);
// window.open("/api"+url, '_blank'); // window.open("/api"+url, '_blank');
this.props.slowDownload(url) this.props.slowDownload(getRandomcode(url))
// getUrl() + "/api"+ // getUrl() + "/api"+
// const fileUrl = url; // const fileUrl = url;
@ -673,6 +673,8 @@ class studentsList extends Component{
let exportUrltwo = `/courses/${courseId}/export_couser_info.xlsx?`; //课堂信息 let exportUrltwo = `/courses/${courseId}/export_couser_info.xlsx?`; //课堂信息
let exportUrlthree = `/courses/${courseId}/export_member_act_score.xlsx?`; //活跃度 let exportUrlthree = `/courses/${courseId}/export_member_act_score.xlsx?`; //活跃度
const params = {} const params = {}
if (course_group_id) { if (course_group_id) {
params.group_id = course_group_id params.group_id = course_group_id
@ -685,11 +687,13 @@ class studentsList extends Component{
} }
let paramsString = '' let paramsString = ''
for (let key in params) { for (let key in params) {
paramsString += `${key}=${params[key]}&` paramsString += `&${key}=${params[key]}&`
} }
exportUrl += paramsString; exportUrl += paramsString;
exportUrltwo+=paramsString; exportUrltwo+=paramsString;
exportUrlthree+=paramsString; exportUrlthree += paramsString;
// console.log(paramsString); // console.log(paramsString);
// console.log(checkBoxValues); // console.log(checkBoxValues);
// console.log(searchValue); // console.log(searchValue);
@ -815,6 +819,7 @@ class studentsList extends Component{
<li className="li_line drop_down fr color-blue font-16"> <li className="li_line drop_down fr color-blue font-16">
导出<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": "-20px", "left": "unset", "height": "auto"}}> <ul className="drop_down_menu" style={{"right": "-20px", "left": "unset", "height": "auto"}}>
<li><a <li><a
onClick={(i) => this.confirmysl(exportUrltwo)}>课堂信息</a> onClick={(i) => this.confirmysl(exportUrltwo)}>课堂信息</a>
</li> </li>
@ -824,6 +829,7 @@ class studentsList extends Component{
<li><a <li><a
onClick={(i) => this.confirmysl(exportUrl)}>总成绩</a> onClick={(i) => this.confirmysl(exportUrl)}>总成绩</a>
</li> </li>
</ul> </ul>
</li> </li>
} }

@ -3,7 +3,7 @@ import {Menu} from "antd";
import CoursesListType from '../coursesPublic/CoursesListType'; import CoursesListType from '../coursesPublic/CoursesListType';
import { WordsBtn } from 'educoder' import { WordsBtn,getRandomcode } from 'educoder'
import PollTabFirst from './PollDetailTabFirst' import PollTabFirst from './PollDetailTabFirst'
import PollTabSecond from './PollDetailTabSecond' import PollTabSecond from './PollDetailTabSecond'
import PollTabThird from './PollDetailTabThird' import PollTabThird from './PollDetailTabThird'
@ -112,7 +112,7 @@ class PollDetailIndex extends Component{
/// 确认是否下载 /// 确认是否下载
confirmysl(url){ confirmysl(url){
axios.get(url + '?export=true' ).then((response) => { axios.get(url + '&export=true' ).then((response) => {
if(response.data.status&&response.data.status===-1){ if(response.data.status&&response.data.status===-1){
}else if(response.data.status&&response.data.status===-2){ }else if(response.data.status&&response.data.status===-2){
@ -131,7 +131,7 @@ class PollDetailIndex extends Component{
}) })
} }
}else { }else {
this.props.slowDownload(url) this.props.slowDownload(getRandomcode(url))
// this.props.showNotification(`正在下载中`); // this.props.showNotification(`正在下载中`);
// window.open("/api"+url, '_blank'); // window.open("/api"+url, '_blank');
@ -239,7 +239,7 @@ class PollDetailIndex extends Component{
</li> </li>
:"" :""
} */} } */}
<a className="fl color-blue font-16" onClick={(url)=>this.confirmysl("/polls/"+this.props.match.params.pollId+"/commit_result.xlsx")} href="javascript:void(0);">导出统计</a> <a className="fl color-blue font-16" onClick={(url)=>this.confirmysl(`/polls/${this.props.match.params.pollId}/commit_result.xlsx`)} href="javascript:void(0);">导出统计</a>
</span> </span>
} }
{ {

@ -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, publicSearchs, sortDirections} from 'educoder'; import {getRandomcode, publicSearchs, sortDirections} from 'educoder';
import { import {
Form, Form,
Select, Select,
@ -3418,7 +3418,7 @@ class Listofworksstudentone extends Component {
} else { } else {
// this.props.showNotification(`正在下载中`); // this.props.showNotification(`正在下载中`);
// window.open("/api"+url, '_blank'); // window.open("/api"+url, '_blank');
this.props.slowDownload(url); this.props.slowDownload(getRandomcode(url));
} }
}).catch((error) => { }).catch((error) => {
console.log(error) console.log(error)

@ -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, getRandomcode, sortDirections} from 'educoder'; import {getRandomNumber, getRandomcode, sortDirections} from 'educoder';
import ShixunWorkModal from './Shixunworkdetails/ShixunWorkModal'; import ShixunWorkModal from './Shixunworkdetails/ShixunWorkModal';
import HomeworkModal from "../coursesPublic/HomeworkModal"; import HomeworkModal from "../coursesPublic/HomeworkModal";
import OneSelfOrderModal from "../coursesPublic/OneSelfOrderModal"; import OneSelfOrderModal from "../coursesPublic/OneSelfOrderModal";
@ -599,7 +599,7 @@ class ShixunStudentWork extends Component {
} }
confirmysl(url){ confirmysl(url){
axios.get(url + '?export=true').then((response) => { axios.get(url + '&export=true').then((response) => {
if(response === undefined){ if(response === undefined){
return return
} }

@ -1,7 +1,7 @@
import React, {Component} from "react"; import React, {Component} from "react";
import CoursesListType from '../coursesPublic/CoursesListType'; import CoursesListType from '../coursesPublic/CoursesListType';
import HomeworkModal from "../coursesPublic/HomeworkModal"; import HomeworkModal from "../coursesPublic/HomeworkModal";
import {WordsBtn, getRandomcode, handleDateString, getImageUrl} from 'educoder'; import {getRandomNumber, getRandomcode, handleDateString, getImageUrl} from 'educoder';
import PollDetailTabForthRules from '../poll/PollDetailTabForthRules'; import PollDetailTabForthRules from '../poll/PollDetailTabForthRules';
import ShixunWorkModal from './Shixunworkdetails/ShixunWorkModal'; import ShixunWorkModal from './Shixunworkdetails/ShixunWorkModal';
import { import {
@ -2252,16 +2252,16 @@ class Trainingjobsetting extends Component {
daochushixunbaogao = () => { daochushixunbaogao = () => {
let url = `/zip/shixun_report?homework_common_id=${this.props.match.params.homeworkid}`; let url = `/zip/shixun_report?homework_common_id=${this.props.match.params.homeworkid}`;
this.confirmysl(url, url + '&export=true'); this.confirmysl(url,true) ;
} }
daochuzuoye = () => { daochuzuoye = () => {
let url = `/homework_commons/${this.props.match.params.homeworkid}/works_list.xlsx`; let url = `/homework_commons/${this.props.match.params.homeworkid}/works_list.xlsx`;
this.confirmysl(url, url + '?export=true'); this.confirmysl(url,true);
} }
confirmysl(url, urlWithExport) { confirmysl(url, urlWithExport) {
axios.get(urlWithExport).then((response) => { axios.get(url+`?export=true`).then((response) => {
if (response === undefined) { if (response === undefined) {
return return
} }
@ -2285,6 +2285,7 @@ class Trainingjobsetting extends Component {
} else { } else {
this.props.showNotification(`正在下载中`); this.props.showNotification(`正在下载中`);
window.open(getRandomcode("/api" + url), '_blank'); window.open(getRandomcode("/api" + url), '_blank');
} }
}).catch((error) => { }).catch((error) => {
console.log(error) console.log(error)

@ -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, getRandomcode, markdownToHTML} from 'educoder'; import {getRandomNumber, getRandomcode, markdownToHTML} from 'educoder';
import { import {
Form, Form,
Select, Select,
@ -381,12 +381,12 @@ class Workquestionandanswer extends Component {
daochushixunbaogao=()=>{ daochushixunbaogao=()=>{
let url =`/zip/shixun_report?homework_common_id=${this.props.match.params.homeworkid}`; let url =`/zip/shixun_report?homework_common_id=${this.props.match.params.homeworkid}`;
this.confirmysl(url, url + '&export=true'); this.confirmysl(url, url + `&export=true`);
} }
daochuzuoye =() =>{ daochuzuoye =() =>{
let url = `/homework_commons/${this.props.match.params.homeworkid}/works_list.xlsx`; let url = `/homework_commons/${this.props.match.params.homeworkid}/works_list.xlsx`;
this.confirmysl(url, url + '?export=true'); this.confirmysl(url, url + `?export=true`);
} }
confirmysl(url, urlWithExport){ confirmysl(url, urlWithExport){

@ -1,6 +1,7 @@
import React from 'react'; import React from 'react';
import PropTypes from "prop-types"; import PropTypes from "prop-types";
import { Link } from 'react-router-dom'; import { Link } from 'react-router-dom';
import {getRandomNumber} from 'educoder';
import { Spin, Button, Input, Divider, Icon, Tooltip, Form, message, Modal } from 'antd'; import { Spin, Button, Input, Divider, Icon, Tooltip, Form, message, Modal } from 'antd';
import axios from 'axios'; import axios from 'axios';
import _ from 'lodash' import _ from 'lodash'
@ -233,7 +234,7 @@ class GraduationRequirement extends React.Component {
<Link to="/forums/3530" target="_blank" className="link ml10">查看详情</Link> <Link to="/forums/3530" target="_blank" className="link ml10">查看详情</Link>
</div> </div>
</div> </div>
<a href={`/api/ec_years/${this.props.yearId}/ec_graduation_requirements.xlsx`} target="_blank" className="ant-btn ant-btn-primary color-white">导出毕业要求</a> <a href={`/api/ec_years/${this.props.yearId}/ec_graduation_requirements.xlsx${getRandomNumber()}`} target="_blank" className="ant-btn ant-btn-primary color-white">导出毕业要求</a>
</div> </div>
<Divider/> <Divider/>

@ -1,7 +1,7 @@
import React, { Component } from 'react'; import React, { Component } from 'react';
import classNames from 'classnames' import classNames from 'classnames'
import {getRandomNumber} from 'educoder';
import axios from 'axios'; import axios from 'axios';
import { Table, Divider, Tag, Checkbox, InputNumber, Spin, Icon } from 'antd'; import { Table, Divider, Tag, Checkbox, InputNumber, Spin, Icon } from 'antd';
@ -140,7 +140,7 @@ class RequirementVsObjective extends Component {
</p> </p>
</li> </li>
<a href={`/api/ec_years/${this.props.yearId}/requirement_support_objectives.xlsx`} target="_blank" <a href={`/api/ec_years/${this.props.yearId}/requirement_support_objectives.xlsx${getRandomNumber()}`} target="_blank"
className="ant-btn ant-btn-primary color-white fr mt20">导出矩阵</a> className="ant-btn ant-btn-primary color-white fr mt20">导出矩阵</a>
</ul> </ul>
<div className="padding20-30" style={{ background: '#fff' }}> <div className="padding20-30" style={{ background: '#fff' }}>

@ -1,7 +1,7 @@
import React, { Component } from 'react'; import React, { Component } from 'react';
import classNames from 'classnames' import classNames from 'classnames'
import {getRandomNumber} from 'educoder'
import axios from 'axios'; import axios from 'axios';
import { Table, Divider, Tag, Checkbox, InputNumber, Spin, Icon } from 'antd'; import { Table, Divider, Tag, Checkbox, InputNumber, Spin, Icon } from 'antd';
@ -109,7 +109,7 @@ class RequirementVsObjective extends Component {
</p> </p>
</li> </li>
<a href={`/api/ec_years/${this.props.yearId}/subitem_support_standards.xlsx`} target="_blank" <a href={`/api/ec_years/${this.props.yearId}/subitem_support_standards.xlsx${getRandomNumber()}`} target="_blank"
className="ant-btn ant-btn-primary color-white fr mt20">导出矩阵</a> className="ant-btn ant-btn-primary color-white fr mt20">导出矩阵</a>
</ul> </ul>
<div className="padding20-30" style={{ background: '#fff' }}> <div className="padding20-30" style={{ background: '#fff' }}>

@ -2,6 +2,7 @@ import React from 'react';
import PropTypes from "prop-types"; import PropTypes from "prop-types";
import { Link } from 'react-router-dom'; import { Link } from 'react-router-dom';
import { Spin, Button, Input, Divider, Icon, Tooltip, Form, message } from 'antd'; import { Spin, Button, Input, Divider, Icon, Tooltip, Form, message } from 'antd';
import {getRandomNumber} from 'educoder';
import axios from 'axios'; import axios from 'axios';
import './index.scss'; import './index.scss';
@ -157,7 +158,7 @@ class TrainingObjective extends React.Component {
<Link to="/forums/3529" target="_blank" className="link ml10">查看详情</Link> <Link to="/forums/3529" target="_blank" className="link ml10">查看详情</Link>
</div> </div>
</div> </div>
<a href={`/api/ec_years/${this.props.yearId}/ec_training_objectives.xlsx`} target="_blank" className="ant-btn ant-btn-primary color-white">导出培养目标</a> <a href={`/api/ec_years/${this.props.yearId}/ec_training_objectives.xlsx${getRandomNumber()}`} target="_blank" className="ant-btn ant-btn-primary color-white">导出培养目标</a>
</div> </div>
<Divider/> <Divider/>

@ -1,6 +1,8 @@
import React, { Component } from 'react'; import React, { Component } from 'react';
import classNames from 'classnames' import classNames from 'classnames';
import {getRandomNumber} from 'educoder';
import axios from 'axios'; import axios from 'axios';
@ -687,7 +689,7 @@ class GraduatesRequirement extends Component {
<a href="javascript:void(0)" <a href="javascript:void(0)"
class="white-btn edu-orangeback-btn fr mr10" class="white-btn edu-orangeback-btn fr mr10"
href={`/api/ec_years/${this.state.ec_year_id}/reach_evaluation.xlsx`} href={`/api/ec_years/${this.state.ec_year_id}/reach_evaluation.xlsx${getRandomNumber()}`}
>导出</a> >导出</a>
{/* /ec_major_schools/3/academic_years/5/export_reach_requirements_data.xls {/* /ec_major_schools/3/academic_years/5/export_reach_requirements_data.xls
let major_school_id =this.props.match.params.major_school_id; let major_school_id =this.props.match.params.major_school_id;

@ -1,23 +1,13 @@
import React, { Component } from 'react'; import React, { Component } from 'react';
import classNames from 'classnames'
import axios from 'axios'; import {getRandomNumber} from 'educoder';
import { TPMIndexHOC } from '../../tpm/TPMIndexHOC';
import { SnackbarHOC } from 'educoder'
import { message,Modal,Spin,Icon} from 'antd';
import 'antd/dist/antd.css'; import 'antd/dist/antd.css';
import EcTitleCourseEvaluations from '../ecTitle/ecTitle'
import '../css/ecCourseSupports.css'; import '../css/ecCourseSupports.css';
import '../css/ecCourseEvaluations.css'; import '../css/ecCourseEvaluations.css';
import { import {
BrowserRouter as Router,
Route, Route,
Switch Switch
} from 'react-router-dom'; } from 'react-router-dom';
@ -223,7 +213,7 @@ class Curriculum extends Component {
titine===5? titine===5?
<span> <span>
<span className={ismanager===false?"none":""} style={{top: "26px"}}> <span className={ismanager===false?"none":""} style={{top: "26px"}}>
<a className="white-btn edu-blueback-btn fr mb10 mr10 mt9" target="_blank" href={`/ec_courses/${ec_course_id}/course_targets.xlsx`}>导出评价详情</a> <a className="white-btn edu-blueback-btn fr mb10 mr10 mt9" target="_blank" href={`/ec_courses/${ec_course_id}/course_targets.xlsx${getRandomNumber()}`}>导出评价详情</a>
</span> </span>
<span className={ismanager===false?"none":"right newrightcalculatebuttons fr mb10 mr20 "} <span className={ismanager===false?"none":"right newrightcalculatebuttons fr mb10 mr20 "}
onClick={()=>this.newrightcalculatebuttonysl(this.child)}>计算</span> onClick={()=>this.newrightcalculatebuttonysl(this.child)}>计算</span>

@ -845,7 +845,7 @@ class MemoDetail extends Component {
</div> </div>
: :
<div className="memoMore"> <div className="memoMore">
<div className="writeCommentBtn" onClick={this.showCommentInput}>写评论1</div> <div className="writeCommentBtn" onClick={this.showCommentInput}>写评论</div>
</div>} </div>}
</div> </div>

@ -14,6 +14,7 @@ import passpartImg from '../../../images/tpi/passpart.png'
import empiricgreenImg from '../../../images/tpi/empiricgreen.png' import empiricgreenImg from '../../../images/tpi/empiricgreen.png'
import { trigger } from 'educoder'; import { trigger } from 'educoder';
import SecondTab from "../../paths/SchoolStatistics/SecondTab";
class TaskResultLayer extends Component { class TaskResultLayer extends Component {
@ -177,7 +178,15 @@ class TaskResultLayer extends Component {
</p> </p>
</div> </div>
<div className="winPanel"> <div className="winPanel">
<style>
{
`
.page--body{
z-index: 0 !important;
}
`
}
</style>
<div className="cl"></div> <div className="cl"></div>
{ !game.star ? { !game.star ?
<React.Fragment> <React.Fragment>

@ -1047,17 +1047,17 @@ submittojoinclass=(value)=>{
` `
} }
</style> </style>
<li className={`pr questionbanks`}> {/*<li className={`pr questionbanks`}>*/}
<Popover placement="bottom" content={contents} trigger="click" > {/* <Popover placement="bottom" content={contents} trigger="click" >*/}
<div className=" sortinxdirection mr10"> {/* <div className=" sortinxdirection mr10">*/}
<div style={{ {/* <div style={{*/}
color:"#fff" {/* color:"#fff"*/}
}}> {/* }}>*/}
题库 {/* 题库*/}
</div> {/* </div>*/}
</div> {/* </div>*/}
</Popover> {/* </Popover>*/}
</li> {/*</li>*/}
<li <li
style={{display: this.props.Headertop === undefined ? 'none' : this.props.Headertop.auth === null ? 'none' : 'block'}} style={{display: this.props.Headertop === undefined ? 'none' : this.props.Headertop.auth === null ? 'none' : 'block'}}

@ -115,7 +115,7 @@ class TPMRightSection extends Component {
<div className="font-16 mb5"> <div className="font-16 mb5">
<span><i className={"iconfont icon-jilu1 audit_situationactive font-14"}></i> </span> <span><i className={"iconfont icon-jilu1 audit_situationactive font-14"}></i> </span>
<span className={"sortinxdirection space-between fr"}> <span className={"sortinxdirection space-between fr"}>
<span className="color888hezuo font-14">已完成 {TPMRightSectionData&&TPMRightSectionData.complete_count===null?0:TPMRightSectionData&&TPMRightSectionData.complete_count} / {TPMRightSectionData&&TPMRightSectionData.challenge_count} </span> <span className="color888hezuo font-14">已完成 {TPMRightSectionData&&TPMRightSectionData.complete_count===null?0:TPMRightSectionData&&TPMRightSectionData.complete_count} / {TPMRightSectionData&&TPMRightSectionData.challenge_count} </span>
</span> </span>
</div> </div>

@ -87,7 +87,7 @@ class Challengesjupyter extends Component {
// //
// } // }
this.setState({ this.setState({
opentitletype:true, opentitletype:false,
isopentitletype:"greater", isopentitletype:"greater",
boxoffsetHeigh:boxoffsetHeigh boxoffsetHeigh:boxoffsetHeigh
}) })
@ -646,11 +646,13 @@ class Challengesjupyter extends Component {
} }
</style> </style>
{/*this.state.enlarge===false?"":*/} {/*this.state.enlarge===false?"":*/}
{this.state.isopentitletype==="Less"?"":this.state.opentitletype===true?<Divider dashed={true} onClick={()=>this.opentitle()} className={"pointer Breadcrumbfont color-grey-9 "}> {/*{this.state.isopentitletype==="Less"?"":this.state.opentitletype===true?<Divider dashed={true} onClick={()=>this.opentitle()} className={"pointer Breadcrumbfont color-grey-9 "}>*/}
<a className={"font-14 color-grey-9"}>阅读全文 <i className={"iconfont icon-jiantou9 font-14"}></i></a> {/* <a className={"font-14 color-grey-9"}>阅读全文 <i className={"iconfont icon-jiantou9 font-14"}></i></a>*/}
</Divider>:<Divider dashed={true} onClick={()=>this.opentitle()} className={"pointer Breadcrumbfont color-grey-9 "}> {/*</Divider>:<Divider dashed={true} onClick={()=>this.opentitle()} className={"pointer Breadcrumbfont color-grey-9 "}>*/}
<a className={"font-14 color-grey-9"}>收起全文 <i className={"iconfont icon-changyongtubiao-xianxingdaochu-zhuanqu- font-14"}></i></a> {/* <a className={"font-14 color-grey-9"}>收起全文 <i className={"iconfont icon-changyongtubiao-xianxingdaochu-zhuanqu- font-14"}></i></a>*/}
</Divider>} {/*</Divider>}*/}
</div> </div>
</p> </p>

@ -608,7 +608,7 @@ class LoginRegisterComponent extends Component {
}; };
//短信验证 //短信验证
SMSverification = () => { SMSverification = () => {
let logins=this.state.login; let logins=this.state.logins;
var url = `/accounts/get_verification_code.json`; var url = `/accounts/get_verification_code.json`;
axios.get((url), { axios.get((url), {
params: { params: {

Loading…
Cancel
Save