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

@ -530,7 +530,7 @@ module ExercisesHelper
exercise_cha_score = 0.0
answer_status = 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 = exercise_cha.question_score #每一关卡的得分
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="student";
//debugType="student";
function railsgettimes(proxy) {
if(timestamp&&checkSubmitFlg===false){
$.ajax({url:proxy,async:false,success:function(data){
if(data.status===0){
timestamp=data.data.t;
timestamp=data.message;
}
}})
checkSubmitFlg=true
@ -59,7 +59,7 @@ debugType="student";
}else if(checkSubmitFlg===false){
$.ajax({url:proxy,async:false,success:function(data){
if(data.status===0){
timestamp=data.data.t;
timestamp=data.message;
}
}})
checkSubmitFlg=true
@ -127,7 +127,8 @@ export function initAxiosInterceptors(props) {
if (window.location.port === "3007") {
// let timestamp=railsgettimes(proxy);
// 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)
config.url = `${proxy}${url}`;
if (config.url.indexOf('?') == -1) {
@ -137,7 +138,9 @@ export function initAxiosInterceptors(props) {
}
} else {
// 加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)
config.url = url;
if (config.url.indexOf('?') == -1) {

@ -79,20 +79,26 @@ let newtimestamp;
let checkSubmitFlgs = false;
function railsgettimess(proxy) {
if(checkSubmitFlgs===false){
$.ajax({url:proxy,async:false,success:function(data){
$.ajax({url:proxy,
async:false,success:function(data){
if(data.status===0){
newtimestamp=data.data.t;
newtimestamp=data.message;
checkSubmitFlgs = true;
}
}})
checkSubmitFlgs=true
window.setTimeout(function () {
checkSubmitFlgs=false;
}, 2500);
}
}
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) {
@ -120,7 +126,7 @@ export function getUploadActionUrlOfAuth(id) {
}
export function getRandomNumber(type) {
Railsgettimes()
Railsgettimes()
let anewopens=md5(newopens+newtimestamp);
return type===true?`randomcode=${newtimestamp}&client_key=${anewopens}`:`?randomcode=${newtimestamp}&client_key=${anewopens}`
}

@ -1,5 +1,5 @@
import React,{ Component } from "react";
import { ConditionToolTip } from 'educoder'
import { ConditionToolTip,getRandomNumber } from 'educoder'
class AttachmentsList extends Component{
constructor(props){
@ -15,9 +15,9 @@ class AttachmentsList extends Component{
<p key={key} className="clearfix mb3">
<a className="color-grey fl">
<i className="font-14 color-green iconfont icon-fujian mr8"></i>
</a>
</a>
<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>
<span className="color-grey mt2 color-grey-6 font-12">{item.filesize}</span>
</p>

@ -32,7 +32,7 @@ import _ from 'lodash'
import TPIContext from './TPIContext'
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 MUIDialogStyleUtil from '../modules/page/component/MUIDialogStyleUtil'
@ -176,7 +176,7 @@ class TPIContextProvider extends Component {
testPath = 'http://test-newweb.educoder.net'
}
// 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({
type: 'get',
url: url,

@ -1,6 +1,6 @@
import React, { Component } from 'react';
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';
const { Content } = Layout;
@ -69,7 +69,7 @@ class CompetitionContents extends Component{
const operations = <div>
<Button className={"fr"} type="primary" ghost onClick={()=>this.props.Competitionedit()}>编辑</Button>
<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>
</div>
const columns = [

@ -1,10 +1,10 @@
import React, { Component } from 'react';
import { SnackbarHOC } from 'educoder';
import { getRandomNumber } from 'educoder';
import {Link} from 'react-router-dom';
import {BrowserRouter as Router,Route,Switch} from 'react-router-dom';
import Loadable from 'react-loadable';
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 CoursesListType from '../coursesPublic/CoursesListType';
import AccessoryModal from "../coursesPublic/AccessoryModal";
@ -125,7 +125,7 @@ class CommonWorkDetailIndex extends Component{
})
}
}else {
this.props.slowDownload(url)
this.props.slowDownload(getRandomcode(url))
// this.props.showNotification(`正在下载中`);
// this.setState({ donwloading: true })
@ -206,7 +206,7 @@ class CommonWorkDetailIndex extends Component{
}
const isAdmin = this.props.isAdmin()
let exportParams = {}
const isListModule = childModuleName == '作品列表';
// 是列表页
@ -221,10 +221,10 @@ class CommonWorkDetailIndex extends Component{
// console.log(params);
let exportUrl = `/homework_commons/${workId}/works_list.zip?${queryString.stringify(params)}`
let exportResultUrl = `/homework_commons/${workId}/works_list.xlsx?${queryString.stringify(params)}`
document.title=course_name === undefined ? "" : course_name;
document.title=course_name === undefined ? "" : course_name;
return (
<div>
<PublishRightnow ref={this.publishModal} showActionButton={false} {...this.props} checkBoxValues={[workId]}
<PublishRightnow ref={this.publishModal} showActionButton={false} {...this.props} checkBoxValues={[workId]}
isPublish={true} doWhenSuccess={this.doWhenSuccess} checkBeforePost={this.saveWorkSetting}
onToPublishClick={this.onToPublishClick}
></PublishRightnow>
@ -234,8 +234,8 @@ class CommonWorkDetailIndex extends Component{
modalCancel={this.Downloadcal}
modalsType={this.state.DownloadType}
/>
<PublishRightnow ref={this.endModal} showActionButton={false} {...this.props} checkBoxValues={[workId]}
isPublish={false} doWhenSuccess={this.doWhenSuccess}></PublishRightnow>
<PublishRightnow ref={this.endModal} showActionButton={false} {...this.props} checkBoxValues={[workId]}
isPublish={false} doWhenSuccess={this.doWhenSuccess}></PublishRightnow>
<div className="newMain clearfix worklist1">
@ -266,7 +266,7 @@ class CommonWorkDetailIndex extends Component{
typelist={homework_status}
typesylename={"mt12"}
/>
{category && <a className="color-grey-6 fr font-16 ml30 mt5 mr20" onClick={this.goback} style={{ marginRight: '26px'}}>返回</a>}
@ -293,24 +293,24 @@ class CommonWorkDetailIndex extends Component{
{ noTab !== true && <div className="stud-class-set bor-bottom-greyE floatSpinParent">
<div className="mt10 clearfix edu-back-white poll_list pl5">
<Link
<Link
onClick={() => this.setState({moduleName: '作品列表'})}
className={`${isListModule ? 'active' : '' } `}
to={`/courses/${courseId}/${moduleEngName}/${workId}/list`}>作品列表</Link>
<Link
<Link
onClick={() => this.setState({moduleName: '作业描述'})}
className={`${childModuleName == '作业描述' ? 'active' : '' } `}
to={`/courses/${courseId}/${moduleEngName}/${workId}/question`}>作业描述</Link>
{view_answer == true && <Link
{view_answer == true && <Link
onClick={() => this.setState({moduleName: '参考答案'})}
className={`${childModuleName == '参考答案' ? 'active' : '' } `}
className={`${childModuleName == '参考答案' ? 'active' : '' } `}
to={`/courses/${courseId}/${moduleEngName}/${workId}/answer`}>参考答案</Link>}
<Link
onClick={() => this.setState({moduleName: '设置'})}
className={`${childModuleName == '设置' ? 'active' : '' } `}
style={{paddingLeft:this.props.isAdmin()?'38px':'20px'}}
to={`/courses/${courseId}/${moduleEngName}/${workId}/setting`}>{this.props.isAdmin()?"设置":"得分规则"}</Link>
{/* { this.props.tabRightComponents } */}
<React.Fragment>
@ -365,16 +365,16 @@ class CommonWorkDetailIndex extends Component{
{isAdmin && <a className={"fr color-blue font-16"} onClick={() => this.props.toEditPage(this.props.match.params, workId)}>编辑作业</a>}
{ //
work_statuses && work_statuses.indexOf('关联项目') != -1 &&
work_statuses && work_statuses.indexOf('关联项目') != -1 &&
<React.Fragment>
<ConnectProject ref="connectProject" {...this.props} connectSuccess={this.connectSuccess}></ConnectProject>
<WordsBtn style="blue" className={` font-16 fr`} onClick={() => this.openConnectionProject({ homework_id: workId })}>关联项目</WordsBtn>
<WordsBtn style="blue" className={` font-16 fr`} onClick={() => this.props.toCreateProject()}>创建项目</WordsBtn>
</React.Fragment>
}
{ //
work_statuses && work_statuses.indexOf('取消关联') != -1 &&
work_statuses && work_statuses.indexOf('取消关联') != -1 &&
<WordsBtn style="blue" className={` font-16 fr`} onClick={() => this.cancelConnectionProject( {homework_id: workId} )}>取消关联</WordsBtn>
}
@ -390,7 +390,7 @@ class CommonWorkDetailIndex extends Component{
{work_statuses && work_statuses.indexOf('修改作品') != -1 && <a className={"fr color-blue font-16"} href={"javascript:void(0)"}
onClick={() => { this.props.toWorkPostPage(this.props.match.params, null, true, work_id)}}
>修改作品</a>}
{work_statuses && work_statuses.indexOf('补交附件') != -1 &&
{work_statuses && work_statuses.indexOf('补交附件') != -1 &&
<React.Fragment>
<AccessoryModal
{...this.props}
@ -406,7 +406,7 @@ class CommonWorkDetailIndex extends Component{
onClick={this.addAccessory}
>补交附件</a>
</React.Fragment>
}
</React.Fragment>
@ -415,7 +415,7 @@ class CommonWorkDetailIndex extends Component{
{/* 内容区 */}
<Switch {...this.props}>
{/* --------------------------------------------------------------------- */}
{/* 作业设置 */}
@ -474,7 +474,7 @@ class CommonWorkDetailIndex extends Component{
</div>
</div>
</div>
)
}
}

@ -978,10 +978,8 @@ class CommonWorkSetting extends Component{
let exportUrl = `/api/homework_commons/${workId}/works_list.zip`
const exportResultUrl = `/api/homework_commons/${workId}/works_list.xlsx`
const noAuth = !isAdmin || !startEditFlag;
return(
return(
<React.Fragment>
<Modals
modalsType={Modalstype}
@ -1222,7 +1220,7 @@ class CommonWorkSetting extends Component{
<Checkbox className="ml30" checked={anonymous_comment} onChange={this.anonymous_comment_change}
disabled={noAuth || moment(init_evaluation_start) < moment()}
>启用匿评</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 className={"h20 mb30 ml60"}>

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

@ -1,6 +1,6 @@
import React, { Component } from 'react';
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';
const { Content } = Layout;
@ -69,7 +69,7 @@ class CompetitionContents extends Component{
const operations = <div>
<Button className={"fr"} type="primary" ghost onClick={()=>this.props.Competitionedit()}>编辑</Button>
<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>
</div>
const columns = [

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

@ -1,7 +1,7 @@
import React,{ Component } from "react";
import {Checkbox,Input,Table, Pagination,Menu,Spin} from "antd";
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 '../css/members.css';
import '../css/busyWork.css';
@ -175,9 +175,9 @@ class Testpapersettinghomepage extends Component{
if(child!=undefined){
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) => {
if(response===undefined){
return
@ -200,7 +200,7 @@ class Testpapersettinghomepage extends Component{
})
}
}else {
this.props.slowDownload(urll)
this.props.slowDownload(getRandomcode(urll))
// this.setState({ donwloading: true })
// downloadFile({
// url: urll,

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

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

@ -1,5 +1,5 @@
import React, { Component } from 'react';
import {getRandomNumber,queryString} from 'educoder';
import {getRandomNumber} from 'educoder';
import {Link} from 'react-router-dom';
import {Tooltip,Menu} from 'antd';
import Loadable from 'react-loadable';
@ -313,15 +313,18 @@ class GraduationTaskDetail extends Component{
}
CodeReview=()=>{
let newgetRandomNumber=getRandomNumber(true);
console.log(newgetRandomNumber)
this.props.showNotification("正在导出中...");
if(newgetRandomNumber){
const task_Id = this.props.match.params.task_Id;
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.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.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.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.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.search===undefined||this.state.taskdatas.search===null?"":"search="+this.state.taskdatas.search+"&"}${newgetRandomNumber}`)
}
}
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"}}>
导出<i className="iconfont icon-xiajiantou font-12 ml2"></i>
<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.zip")} 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.xlsx`)} className="color-dark">导出作品附件</a></li>
</ul>
</li>:""}
{questionslist.work_status===undefined||questionslist.work_status===null||questionslist.work_status.length===0?"":questionslist.work_status.map((item,key)=>{

@ -7,7 +7,7 @@ import TPMMDEditor from '../../../tpm/challengesnew/TPMMDEditor';
import { getUrl, getUploadActionUrl } from 'educoder'
const $ = window.$;
/*
/*
*/
class GraduationTasksappraiseMainEditor extends Component{
@ -20,22 +20,32 @@ class GraduationTasksappraiseMainEditor extends Component{
score: undefined,
same_score: false,
errorMessage: '',
numberErrorMessage: ''
numberErrorMessage: '',
errorMessagetype:false
}
}
onSubmit = () => {
const { score, same_score } = this.state
let category_id= this.props.match.params.category_id;
const url = `/graduation_works/${category_id}/add_score.json`
let category_id= this.props.match.params.category_id;
const url = `/graduation_works/${category_id}/add_score.json`
const attachment_ids = this.state.fileList.map(item => {
return item.response ? item.response.id : item.id
})
const comment = this.mdRef.current.getValue()
if ((!comment || comment.trim() == "") && !score) {
if ((!comment || comment.trim() == "") && !score &&this.props.isAdmin()===true) {
this.setState( {errorMessage : '分数和评语不能同时为空' })
// this.props.showNotification('请先输入评阅说明')
return;
}
if (!score && this.props.isAdmin()===false) {
this.setState( {
errorMessage : '分数不能为空',
errorMessagetype:true
})
// this.props.showNotification('请先输入评阅说明')
return;
}
if (comment.length > 2000) {
this.setState( {errorMessage : '不能超过2000个字符' })
// this.props.showNotification('评阅说明文本长度不能超过2000')
@ -63,12 +73,12 @@ class GraduationTasksappraiseMainEditor extends Component{
this.clearInputs()
this.props.addSuccess();
}
}).catch((error)=>{
console.log(error)
})
}
}
clearInputs = () => {
this.setState({
@ -79,7 +89,7 @@ class GraduationTasksappraiseMainEditor extends Component{
this.mdRef.current.setValue('')
}
onCancel = () => {
this.clearInputs()
this.clearInputs()
}
componentDidMount(){
}
@ -119,7 +129,7 @@ class GraduationTasksappraiseMainEditor extends Component{
const { status } = response.data;
if (status == 0) {
console.log('--- success')
this.setState((state) => {
const index = state[stateName].indexOf(file);
const newFileList = state[stateName].slice();
@ -136,6 +146,12 @@ class GraduationTasksappraiseMainEditor extends Component{
});
}
onScoreChange = (val) => {
if(val){
this.setState( {
errorMessage: '',
errorMessagetype:false
})
}
if (val > 100 ) {
this.props.showNotification('不能大于100')
this.setState({ score: 100 })
@ -157,7 +173,7 @@ class GraduationTasksappraiseMainEditor extends Component{
this.setState({ same_score: e.target.checked }) //!this.state.same_score
}
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 isAdmin = this.props.isAdmin()
const commentUploadProp = {
@ -209,7 +225,7 @@ class GraduationTasksappraiseMainEditor extends Component{
`}</style>
{this.props.title && <span className="mainEditorTitle color-grey-6">{this.props.title}</span>}
<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>
<Checkbox checked={same_score} onChange={this.same_score_change}>整组同评</Checkbox>
<span className={"font-14 color-grey-9"}>(选中则本次评阅对象指小组全部成员否则仅评阅此成员1人 )</span>
@ -235,7 +251,7 @@ class GraduationTasksappraiseMainEditor extends Component{
<a className="task-btn task-btn-orange fr mt4" style={{height: '30px', width: '100px'}}
onClick={this.onSubmit}
>提交</a>
<a onClick={this.onCancel} className="defalutCancelbtn fr mt4"
<a onClick={this.onCancel} className="defalutCancelbtn fr mt4"
style={{height: '30px', width: '100px', fontSize: '14px', lineHeight: '30px', marginRight: '20px'}}>清空</a>
</div>

@ -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 {Link} from 'react-router-dom';
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 Modals from '../../../modals/Modals';
import DownloadMessageysl from "../../../modals/DownloadMessageysl";
@ -870,9 +870,8 @@ class GraduationTaskssettingapp extends Component{
}
/// 确认是否下载
confirmysl(url){
debugger;
console.log(3);
confirmysl(url,urls){
axios.get(url + '?export=true' ).then((response) => {
if(response === undefined){
return
@ -895,8 +894,10 @@ class GraduationTaskssettingapp extends Component{
})
}
}else {
this.props.slowDownload(url)
// this.props.showNotification(`正在下载中`);
this.props.slowDownload(getRandomcode(url))
// window.open(getRandomcode("/api" + url), '_blank');
// this.props.showNotification(`正在下载中`);
// window.open("/api"+url, '_blank');
}

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

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

@ -4,7 +4,7 @@ import {Checkbox, Menu, Pagination,Spin} from "antd";
import Titlesearchsection from '../../common/titleSearch/TitleSearchSection'
import DownloadMessageysl from "../../../modals/DownloadMessageysl";
import { WordsBtn ,getRandomcode} from 'educoder'
import { WordsBtn ,getRandomcode,getRandomNumber} from 'educoder'
import NoneData from '../../coursesPublic/NoneData'
import Modals from "../../../modals/Modals"
import axios from 'axios'
@ -55,7 +55,7 @@ class Boards extends Component{
let {pageSize}=this.state;
const cid = this.props.match.params.coursesId
let url = `/courses/${cid}/graduation_topics.json?limit=${pageSize}`
if(searchValue!=""){
url+="&search="+searchValue
@ -142,8 +142,8 @@ class Boards extends Component{
checkBoxValues: _.difference(this.state.checkBoxValues, values)
})
}
}
}
onItemClick = (item) => {
const checkBoxValues = this.state.checkBoxValues.slice(0);
const index = checkBoxValues.indexOf(item.id);
@ -198,7 +198,7 @@ class Boards extends Component{
})
}
cancelOperateTopic=()=>{
this.setState({
this.setState({
modalsType:false,
modalsTopval:"",
modalsBottomval:"",
@ -257,7 +257,7 @@ onDelete=(index)=>{
console.log(error)
})
}
}else{
this.setState({
// delType:true,
@ -319,7 +319,7 @@ sureDelTopic=()=>{
}).catch((error)=>{
console.log(error);
})
}
}
}else{
this.setState({
delType:false,
@ -335,7 +335,7 @@ onBoardsNew=()=>{
}
/// 确认是否下载
confirmysl(url){
axios.get(url + '?export=true').then((response) => {
axios.get(url + '&export=true').then((response) => {
if(response.data.status&&response.data.status===-1){
}else if(response.data.status&&response.data.status===-2){
@ -376,12 +376,12 @@ onBoardsNew=()=>{
this.fetchAll(searchValue,page,status);
}
render(){
let {
searchValue,
topicList,
let {
searchValue,
topicList,
data,
course_public,
checkBoxValues,
checkBoxValues,
checkAllValue,
page,
totalCount,
@ -507,9 +507,9 @@ onBoardsNew=()=>{
:
<div></div>
}
<div>
</div>
<div>
</div>
</React.Fragment>
)
}

@ -1,6 +1,6 @@
import React, {Component} from "react";
import { WordsBtn,on, off, trigger,markdownToHTML,getImageUrl} from 'educoder';
import { WordsBtn,on, off, trigger,markdownToHTML,getRandomNumber} from 'educoder';
import {
Button,
Checkbox,
@ -23,7 +23,8 @@ class GroupPackage extends Component {
}
}
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() {
console.log("Groupjobquesanswer");

@ -14,7 +14,7 @@ import CourseLayoutcomponent from '../common/CourseLayoutComponent'
import Titlesearchsection from '../common/titleSearch/TitleSearchSection'
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 DownloadMessageysl from "../../modals/DownloadMessageysl";
@ -23,7 +23,7 @@ import ChangeRolePop from './ChangeRolePop'
import CourseGroupListTable from './CourseGroupListTable'
import './studentsList.css'
/**
/**
角色数组, CREATOR: 创建者, PROFESSOR: 教师, ASSISTANT_PROFESSOR: 助教, STUDENT: 学生
*/
function CourseGroupList(props) {
@ -36,7 +36,7 @@ function CourseGroupList(props) {
const [listRes, setListRes] = useState({})
const createGroupModalEl = useRef(null);
const courseId = props.match.params.coursesId
const courseId = props.match.params.coursesId
useEffect(() => {
fetchAll()
@ -63,7 +63,7 @@ function CourseGroupList(props) {
}
const onConfirm = async () => {
}
function createGroupImportSuccess() {
}
@ -83,7 +83,7 @@ function CourseGroupList(props) {
}
const confirmysl = (url) => {
axios.get(url + 'export=true').then((response) => {
axios.get(url + '&export=true').then((response) => {
if(response === undefined){
return
}
@ -100,13 +100,13 @@ function CourseGroupList(props) {
setDownloadMessageval(500)
}
}else {
props.slowDownload(url)
props.slowDownload(getRandomcode(url))
}
}).catch((error) => {
console.log(error)
});
}
const isAdmin = props.isAdmin();
const isSuperAdmin = props.isSuperAdmin();
const isParent = true;
@ -121,9 +121,9 @@ function CourseGroupList(props) {
const course_groups = listRes.course_groups
const current_group_id = listRes.current_group_id
let exportUrl = `/courses/${courseId}/export_member_scores_excel.xlsx?`; //总成绩
let exportUrltwo = `/courses/${courseId}/export_couser_info.xlsx?`; //课堂信息
let exportUrlthree = `/courses/${courseId}/export_member_act_score.xlsx?`; //活跃度
let exportUrl = `/courses/${courseId}/export_member_scores_excel.xlsx`; //总成绩
let exportUrltwo = `/courses/${courseId}/export_couser_info.xlsx`; //课堂信息
let exportUrlthree = `/courses/${courseId}/export_member_act_score.xlsx`; //活跃度
return (
<React.Fragment>
<DownloadMessageysl
@ -140,8 +140,8 @@ function CourseGroupList(props) {
showSearchInput={total_count >= 10}
searchPlaceholder={ '请输入分班名称进行搜索' }
firstRowRight={
<React.Fragment>
{ // pageType !== TYPE_STUDENTS &&
<React.Fragment>
{ // pageType !== TYPE_STUDENTS &&
isSuperAdmin && <React.Fragment>
{/* ref="createGroupByImportModal" */}
<CreateGroupByImportModal {...props}
@ -151,12 +151,12 @@ function CourseGroupList(props) {
{/* this.refs['createGroupByImportModal'].setVisible(true) */}
<WordsBtn style="blue" className="mr30" onClick={()=> {createGroupModalEl.current.setVisible(true)}}>导入创建分班</WordsBtn>
</React.Fragment> }
{
// pageType !== TYPE_STUDENTS &&
{
// pageType !== TYPE_STUDENTS &&
!isCourseEnd && isAdmin && <WordsBtn style="blue" className="mr30" onClick={()=>addDir()}>新建分班</WordsBtn> }
{/* {
{/* {
isAdmin && !isParent && course_group_id != 0 && <WordsBtn style="blue" className="mr30" onClick={()=>deleteDir()}>删除分班</WordsBtn> } */}
{/* {
{/* {
isAdmin && !isParent && course_group_id != 0 && <WordsBtn style="blue" className="mr30" onClick={()=>this.renameDir()}>分班重命名</WordsBtn> } */}
<style>{`
.drop_down_menu li a {
@ -210,7 +210,7 @@ function CourseGroupList(props) {
}
onPressEnter={onPressEnter}
></Titlesearchsection>
{!!none_group_member_count && <div className="mt20 E9F8FF padding20-30 pointer" onClick={() => {props.history.push(`/courses/${courseId}/course_groups/0`)}}>
<span>未分班</span>
<span style={{color: '#999999'}}>{none_group_member_count}个学生</span>
@ -219,17 +219,17 @@ function CourseGroupList(props) {
</div>}
<Spin size="large" spinning={isSpin}>
{course_groups && !!course_groups.length ?
{course_groups && !!course_groups.length ?
<div className="mt20 edu-back-white padding20 courseGroupList">
<CourseGroupListTable
course_groups={course_groups}
onOperationSuccess={onOperationSuccess}
current_group_id={current_group_id}
{...props}
></CourseGroupListTable>
</div>:
></CourseGroupListTable>
</div>:
<NoneData></NoneData>}
</Spin>
</React.Fragment>

@ -7,7 +7,7 @@ import CourseLayoutcomponent from '../common/CourseLayoutComponent'
import Titlesearchsection from '../common/titleSearch/TitleSearchSection'
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 axios from 'axios'
import _ from 'lodash'
@ -24,7 +24,7 @@ const TYPE_COURSE_GOURP_CHILD = 3
const buildColumns = (that,isParent) => {
const { course_groups , sortedInfo } = that.state
let showSorter = isParent==true
const courseId = that.props.match.params.coursesId
const courseId = that.props.match.params.coursesId
const columns=[{
title: '序号',
dataIndex: 'id',
@ -35,7 +35,7 @@ const buildColumns = (that,isParent) => {
render: (id, student, index) => {
return (that.state.page - 1) * 20 + index + 1
}
},
},
// {
// title: '用户id',
// dataIndex: 'login',
@ -48,7 +48,7 @@ const buildColumns = (that,isParent) => {
// title={login && login.length > 10 ? login : ''}
// >{login}</span>
// }
// },
// },
{
title: '姓名',
dataIndex: 'name',
@ -57,7 +57,7 @@ const buildColumns = (that,isParent) => {
width:"10%",
className:"color-grey-6",
render: (name, record) => {
return <a className="color-dark overflowHidden1" target="_blank"
return <a className="color-dark overflowHidden1" target="_blank"
style={{maxWidth: '120px'}} href={`/users/${record.login}`}>{name}</a>
}
}, {
@ -106,7 +106,7 @@ const buildColumns = (that,isParent) => {
}
}
];
if (that.hasGroupModule()) {
that.isStudentPage && columns.push({
title: '分班',
@ -126,7 +126,7 @@ const buildColumns = (that,isParent) => {
if (item.title === "学号") {
columns.splice(key, 1)
return true
}
}
})
}
const isAdmin = that.props.isAdmin()
@ -149,7 +149,7 @@ const buildColumns = (that,isParent) => {
render: (text, record) => {
return (
<React.Fragment>
<WordsBtn onClick={() => that.onDelete(record)} style={'grey'}>删除学生</WordsBtn>
<WordsBtn onClick={() => that.onDelete(record)} style={'grey'}>删除学生</WordsBtn>
{record.member_roles && record.member_roles.length && <ChangeRolePop
style={{ marginLeft: '12px' }}
courseId={courseId}
@ -164,7 +164,7 @@ const buildColumns = (that,isParent) => {
)
},
})
}
return columns;
@ -199,7 +199,7 @@ class studentsList extends Component{
}
}
/// 确认是否下载
confirmysl(url){
confirmysl(url,urls){
// this.props.showGlobalLoading('正在生成文件,请稍后...')
axios.get(url + 'export=true').then((response) => {
if(response === undefined){
@ -223,11 +223,11 @@ class studentsList extends Component{
})
}
}else {
// this.props.showNotification(`正在下载中`);
// window.open("/api"+url, '_blank');
this.props.slowDownload(url)
this.props.slowDownload(getRandomcode(url))
// getUrl() + "/api"+
// const fileUrl = url;
@ -263,7 +263,7 @@ class studentsList extends Component{
DownloadMessageval:undefined
})
}
inputStudent=(e)=>{
this.setState({
StudentList_value:e.target.value
@ -307,7 +307,7 @@ class studentsList extends Component{
modalCancel:false
})
}
onChange=()=>{
}
@ -344,7 +344,7 @@ class studentsList extends Component{
this.fetchCourseGroups()
this.fetchAll()
}
addStudentSuccessListener=(e, data)=>{
const params = JSON.parse(data)
this.props.updataleftNavfun()
@ -358,10 +358,10 @@ class studentsList extends Component{
// console.log('addStudentSuccessListener', data)
}
fetchCourseGroups = () => {
const courseId = this.props.match.params.coursesId
const courseId = this.props.match.params.coursesId
let url = `/courses/${courseId}/all_course_groups.json`
axios.get(url, {
})
.then((response) => {
@ -382,7 +382,7 @@ class studentsList extends Component{
this.setState({checkBoxValues: [], checkAllValue: false })
this.fetchAll(1)
}
}
// 加载了2次
// else if (prevProps.coursesids != this.props.coursesids) {
// this.fetchAll(1)
@ -392,7 +392,7 @@ class studentsList extends Component{
this.setState({
isSpin:true
})
let id = this.props.match.params.coursesId
let id = this.props.match.params.coursesId
let course_group_id = this.props.match.params.course_group_id
const { coursesids } = this.props
@ -424,7 +424,7 @@ class studentsList extends Component{
}
axios.get(encodeURI(url)).then((result)=>{
if (result.data.students) {
this.setState({
this.setState({
students: result.data.students,
total_count: result.data.students_count,
course_group_name: result.data.course_group_name,
@ -468,7 +468,7 @@ class studentsList extends Component{
})
}
onPageChange = (page) => {
this.fetchAll(page)
this.fetchAll(page)
this.setState({ checkAllValue: false })
}
@ -490,7 +490,7 @@ class studentsList extends Component{
return;
}
let id = this.props.match.params.coursesId
let id = this.props.match.params.coursesId
let { order, searchValue }=this.state
let url=`/courses/${id}/transfer_to_course_group.json`;
axios.post((url), {
@ -541,7 +541,7 @@ class studentsList extends Component{
// content: `确认要删除所选的${len}个学生吗?`,
content: `是否确认删除?`,
onOk: () => {
let id = this.props.match.params.coursesId
let id = this.props.match.params.coursesId
let url=`/courses/${id}/delete_from_course.json`;
axios.post((url), {
students: [{course_member_id: record.course_member_id}] // this.state.checkBoxValues.map(item => {return {course_member_id: item} }),
@ -563,7 +563,7 @@ class studentsList extends Component{
trigger('groupAdd', this.props.coursesids)
}
doAddToDir = async () => {
const courseId = this.props.match.params.coursesId
const courseId = this.props.match.params.coursesId
const url = `/courses/${courseId}/join_course_group.json`
const course_group_id = this.props.match.params.course_group_id
@ -578,12 +578,12 @@ class studentsList extends Component{
}
addToDir = (record) => {
this.props.confirm({
content: `是否确认加入分班: ${this.state.course_group_name}?`,
okText: '确认',
cancelText: '取消',
onOk: () => {
this.doAddToDir()
},
@ -604,7 +604,7 @@ class studentsList extends Component{
</div>,
onOk: () => {
const course_group_id = this.props.match.params.course_group_id
const courseId = this.props.match.params.coursesId
const courseId = this.props.match.params.coursesId
const url = `/course_groups/${course_group_id}.json`
axios.delete(url)
@ -616,7 +616,7 @@ class studentsList extends Component{
})
.catch(function (error) {
console.log(error);
});
});
}
})
}
@ -643,7 +643,7 @@ class studentsList extends Component{
const isCourseEnd = this.props.isCourseEnd()
let {
page,
order,
StudentList_value,
stu_new_flag,
@ -662,17 +662,19 @@ class studentsList extends Component{
let currentOrderName = '学生学号排序'
if (order == ORDER_BY_GROUP) {
currentOrderName = '分班名称排序'
}
}
const { coursesids } = this.props
const course_group_id = this.props.match.params.course_group_id
const isParent = !course_group_id || course_group_id == coursesids
const { course_group_name, invite_code } = this.state;
const courseId = this.props.match.params.coursesId
const courseId = this.props.match.params.coursesId
let exportUrl = `/courses/${courseId}/export_member_scores_excel.xlsx?`; //总成绩
let exportUrltwo = `/courses/${courseId}/export_couser_info.xlsx?`; //课堂信息
let exportUrlthree = `/courses/${courseId}/export_member_act_score.xlsx?`; //活跃度
const params = {}
if (course_group_id) {
params.group_id = course_group_id
@ -685,11 +687,13 @@ class studentsList extends Component{
}
let paramsString = ''
for (let key in params) {
paramsString += `${key}=${params[key]}&`
paramsString += `&${key}=${params[key]}&`
}
exportUrl += paramsString;
exportUrltwo+=paramsString;
exportUrlthree+=paramsString;
exportUrlthree += paramsString;
// console.log(paramsString);
// console.log(checkBoxValues);
// console.log(searchValue);
@ -725,7 +729,7 @@ class studentsList extends Component{
}
)
}
return(
<React.Fragment >
<DownloadMessageysl
@ -735,7 +739,7 @@ class studentsList extends Component{
modalsType={this.state.DownloadType}
/>
<Titlesearchsection
title={isParent ? (pageType == TYPE_STUDENTS ? "全部学生" : "学生列表"):
title={isParent ? (pageType == TYPE_STUDENTS ? "全部学生" : "学生列表"):
<React.Fragment>
<span>
<Tooltip title="返回至分班列表">
@ -756,9 +760,9 @@ class studentsList extends Component{
<i class="iconfont icon-fuzhi font-14 ml10 copybtn" style={{color: '#FF6800', cursor: 'pointer', verticalAlign: 'baseline'}} data-clipboard-text={invite_code} ></i>
</span>
</Tooltip>
</React.Fragment>
</React.Fragment>
}
</React.Fragment>
}
searchValue={ searchValue }
@ -766,24 +770,24 @@ class studentsList extends Component{
showSearchInput={total_count >= 10}
searchPlaceholder={ '请输入姓名、学号进行搜索' }
firstRowRight={
<React.Fragment>
{/* {
// pageType !== TYPE_STUDENTS &&
<React.Fragment>
{/* {
// pageType !== TYPE_STUDENTS &&
!isStudentPage && isSuperAdmin && <React.Fragment>
<CreateGroupByImportModal ref="createGroupByImportModal" {...this.props}
createGroupImportSuccess={this.createGroupImportSuccess}
></CreateGroupByImportModal>
<WordsBtn style="blue" className="mr30" onClick={()=> this.refs['createGroupByImportModal'].setVisible(true)}>导入创建分班</WordsBtn>
</React.Fragment> } */}
{
{
!isStudentPage && isAdmin && !isParent && course_group_id != 0 && <WordsBtn style="blue" className="mr30" onClick={()=>this.deleteDir()}>删除分班</WordsBtn> }
{
{
!isStudentPage && isAdmin && !isParent && course_group_id != 0 && <WordsBtn style="blue" className="mr30" onClick={()=>this.renameDir()}>分班重命名</WordsBtn> }
{
{
!isStudentPage && !isCourseEnd && isAdmin && <WordsBtn style="blue" className="mr30" onClick={()=>this.addDir()}>新建分班</WordsBtn> }
{
{
!isStudentPage && isStudent && !isParent && course_group_id != 0 && <WordsBtn style="blue" className="" onClick={()=>this.addToDir()}>加入分班</WordsBtn> }
<style>{`
.drop_down_menu li a {
@ -815,6 +819,7 @@ class studentsList extends Component{
<li className="li_line drop_down fr color-blue font-16">
导出<i className="iconfont icon-xiajiantou font-12 ml2"></i>
<ul className="drop_down_menu" style={{"right": "-20px", "left": "unset", "height": "auto"}}>
<li><a
onClick={(i) => this.confirmysl(exportUrltwo)}>课堂信息</a>
</li>
@ -824,6 +829,7 @@ class studentsList extends Component{
<li><a
onClick={(i) => this.confirmysl(exportUrl)}>总成绩</a>
</li>
</ul>
</li>
}
@ -854,7 +860,7 @@ class studentsList extends Component{
''
}
{
course_group_id != 0 && course_groups && course_groups.length > 0 &&
course_group_id != 0 && course_groups && course_groups.length > 0 &&
<li key={0} onClick={() => this.moveToGroup({id: 0})}>未分班</li>
}
{ course_groups.filter((item)=> {
@ -865,8 +871,8 @@ class studentsList extends Component{
)
}) }
{ course_groups && course_groups.length > 0 && <Divider className="dividerStyle"></Divider> }
{ isAdmin && !isCourseEnd &&
{ isAdmin && !isCourseEnd &&
<p className="drop_down_btn">
<a href="javascript:void(0)" className="color-grey-6"
onClick={()=>this.addDir()}
@ -876,10 +882,10 @@ class studentsList extends Component{
}
</ul>
</li>}
{/* <li className="drop_down">
{currentOrderName}
{ course_groups && !!course_groups.length &&
{ course_groups && !!course_groups.length &&
<React.Fragment>
<i className="iconfont icon-xiajiantou font-12 ml2"></i>
<ul className="drop_down_normal" style={{width: '124px'}}>
@ -893,7 +899,7 @@ class studentsList extends Component{
</div>
<Spin size="large" spinning={this.state.isSpin}>
<div className="clearfix stu_table">
{students && !!students.length && <Checkbox.Group style={{ width: '100%' }} onChange={this.onCheckBoxChange} value={checkBoxValues}>
{students && !!students.length && <Checkbox.Group style={{ width: '100%' }} onChange={this.onCheckBoxChange} value={checkBoxValues}>
<Table columns={studentlist} dataSource={students} onChange={this.onTableChange} pagination={false}></Table>
</Checkbox.Group> }
</div>

@ -3,7 +3,7 @@ import {Menu} from "antd";
import CoursesListType from '../coursesPublic/CoursesListType';
import { WordsBtn } from 'educoder'
import { WordsBtn,getRandomcode } from 'educoder'
import PollTabFirst from './PollDetailTabFirst'
import PollTabSecond from './PollDetailTabSecond'
import PollTabThird from './PollDetailTabThird'
@ -112,7 +112,7 @@ class PollDetailIndex extends Component{
/// 确认是否下载
confirmysl(url){
axios.get(url + '?export=true' ).then((response) => {
axios.get(url + '&export=true' ).then((response) => {
if(response.data.status&&response.data.status===-1){
}else if(response.data.status&&response.data.status===-2){
@ -131,7 +131,7 @@ class PollDetailIndex extends Component{
})
}
}else {
this.props.slowDownload(url)
this.props.slowDownload(getRandomcode(url))
// this.props.showNotification(`正在下载中`);
// window.open("/api"+url, '_blank');
@ -239,7 +239,7 @@ class PollDetailIndex extends Component{
</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>
}
{

@ -1,6 +1,6 @@
import React, {Component} from "react";
import CoursesListType from '../coursesPublic/CoursesListType';
import {WordsBtn, publicSearchs, sortDirections} from 'educoder';
import {getRandomcode, publicSearchs, sortDirections} from 'educoder';
import {
Form,
Select,
@ -3389,7 +3389,7 @@ class Listofworksstudentone extends Component {
daochuzuoye = () => {
let url = `/homework_commons/${this.props.match.params.homeworkid}/works_list.xlsx?course_group=${this.state.checkedValuesineinfo === undefined || this.state.checkedValuesineinfo === null ? "" : this.state.checkedValuesineinfo}&work_status=${this.state.course_groupyslstwo === undefined || this.state.course_groupyslstwo === null ? "" : this.state.course_groupyslstwo}&search=${this.state.searchtext === undefined || this.state.searchtext === null ? "" : this.state.searchtext}`
this.confirmysl(url);
this.confirmysl(url);
}
@ -3418,7 +3418,7 @@ class Listofworksstudentone extends Component {
} else {
// this.props.showNotification(`正在下载中`);
// window.open("/api"+url, '_blank');
this.props.slowDownload(url);
this.props.slowDownload(getRandomcode(url));
}
}).catch((error) => {
console.log(error)

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

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

@ -1,6 +1,6 @@
import React, {Component} from "react";
import CoursesListType from '../coursesPublic/CoursesListType';
import {WordsBtn, getRandomcode, markdownToHTML} from 'educoder';
import {getRandomNumber, getRandomcode, markdownToHTML} from 'educoder';
import {
Form,
Select,
@ -381,12 +381,12 @@ class Workquestionandanswer extends Component {
daochushixunbaogao=()=>{
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 =() =>{
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){

@ -1,6 +1,7 @@
import React from 'react';
import PropTypes from "prop-types";
import { Link } from 'react-router-dom';
import {getRandomNumber} from 'educoder';
import { Spin, Button, Input, Divider, Icon, Tooltip, Form, message, Modal } from 'antd';
import axios from 'axios';
import _ from 'lodash'
@ -233,7 +234,7 @@ class GraduationRequirement extends React.Component {
<Link to="/forums/3530" target="_blank" className="link ml10">查看详情</Link>
</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>
<Divider/>

@ -1,7 +1,7 @@
import React, { Component } from 'react';
import classNames from 'classnames'
import {getRandomNumber} from 'educoder';
import axios from 'axios';
import { Table, Divider, Tag, Checkbox, InputNumber, Spin, Icon } from 'antd';
@ -48,7 +48,7 @@ class RequirementVsObjective extends Component {
// ...testState
}
}
componentDidMount(){
// this.init()
// return;
@ -58,7 +58,7 @@ class RequirementVsObjective extends Component {
axios.get(url).then((response) => {
if (response.data.graduation_requirements) {
this.setState( {...response.data} , () => {
this.init()
this.init()
})
}
}).catch((e) => {
@ -92,7 +92,7 @@ class RequirementVsObjective extends Component {
const yearId = this.props.match.params.yearId
const url = `/ec_years/${yearId}/requirement_support_objectives.json`
const method = select ? axios.delete : axios.post
method(url,
method(url,
select ? {
params: {
ec_graduation_requirement_id,
@ -105,7 +105,7 @@ class RequirementVsObjective extends Component {
).then((response) => {
if (response.data.status == 0) {
this.setState(
(prevState) => ({
(prevState) => ({
tableData : update(prevState.tableData, {[rowIndex]: {[colIndex]: {$set: select ? false : true}}})
})
)
@ -128,7 +128,7 @@ class RequirementVsObjective extends Component {
const columnIdIndexMap = {}
console.log(columns, tableData)
return (
<div className="educontent requirementVsObjective" style={{ background: '#fff' }}>
<ul className="clearfix padding20-30 bor-bottom-greyE backgroundFFF"
style={{ 'marginBottom': '0px' }} >
@ -140,7 +140,7 @@ class RequirementVsObjective extends Component {
</p>
</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>
</ul>
<div className="padding20-30" style={{ background: '#fff' }}>
@ -155,7 +155,7 @@ class RequirementVsObjective extends Component {
></SelectTable>
</div>
</div>
);
}
}

@ -1,7 +1,7 @@
import React, { Component } from 'react';
import classNames from 'classnames'
import {getRandomNumber} from 'educoder'
import axios from 'axios';
import { Table, Divider, Tag, Checkbox, InputNumber, Spin, Icon } from 'antd';
@ -12,10 +12,10 @@ class RequirementVsObjective extends Component {
constructor(props) {
super(props)
this.state={
}
}
componentDidMount(){
// this.init()
// return;
@ -25,7 +25,7 @@ class RequirementVsObjective extends Component {
axios.get(url).then((response) => {
if (response.data.graduation_subitems) {
this.setState( {...response.data} , () => {
this.init()
this.init()
})
}
}).catch((e) => {
@ -61,7 +61,7 @@ class RequirementVsObjective extends Component {
const yearId = this.props.match.params.yearId
const url = `/ec_years/${yearId}/subitem_support_standards.json`
const method = select ? axios.delete : axios.post
method(url,
method(url,
select ? {
params: {
ec_graduation_subitem_id,
@ -74,7 +74,7 @@ class RequirementVsObjective extends Component {
).then((response) => {
if (response.data.status == 0) {
this.setState(
(prevState) => ({
(prevState) => ({
tableData : update(prevState.tableData, {[rowIndex]: {[colIndex]: {$set: select ? false : true}}})
})
)
@ -97,7 +97,7 @@ class RequirementVsObjective extends Component {
const columnIdIndexMap = {}
console.log(columns, tableData)
return (
<div className="educontent requirementVsObjective" style={{ background: '#fff' }}>
<ul className="clearfix padding20-30 bor-bottom-greyE backgroundFFF"
style={{ 'marginBottom': '0px' }} >
@ -109,7 +109,7 @@ class RequirementVsObjective extends Component {
</p>
</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>
</ul>
<div className="padding20-30" style={{ background: '#fff' }}>
@ -126,7 +126,7 @@ class RequirementVsObjective extends Component {
></SelectTable>
</div>
</div>
);
}
}

@ -2,6 +2,7 @@ import React from 'react';
import PropTypes from "prop-types";
import { Link } from 'react-router-dom';
import { Spin, Button, Input, Divider, Icon, Tooltip, Form, message } from 'antd';
import {getRandomNumber} from 'educoder';
import axios from 'axios';
import './index.scss';
@ -157,7 +158,7 @@ class TrainingObjective extends React.Component {
<Link to="/forums/3529" target="_blank" className="link ml10">查看详情</Link>
</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>
<Divider/>
@ -191,7 +192,7 @@ class TrainingObjective extends React.Component {
</div>
)
}
<div className="training-objective-items">
<div className="training-objective-items-head">
<div className="no-column">分项</div>

@ -1,6 +1,8 @@
import React, { Component } from 'react';
import classNames from 'classnames'
import classNames from 'classnames';
import {getRandomNumber} from 'educoder';
import axios from 'axios';
@ -166,7 +168,7 @@ const buildColumns = (that) => {
const _i_remain = index % 3;
// 未达成
const obj = {
children: row.status ? <span style={{color: '#29BD88'}}>达成</span>
children: row.status ? <span style={{color: '#29BD88'}}>达成</span>
: <span style={{color: '#FF6800'}}>未达成</span>,
props: {},
};
@ -233,14 +235,14 @@ function getTableData(data_args) {
// 一个course数组的数据组合成三行table数据
innerItem.course_data.forEach((course, courseIndex) => {
nameRowData[`c${courseIndex + 1}`] = course.course_name;
targetValueRowData[`c${courseIndex + 1}`] = course.target_value && course.target_value.toFixed
targetValueRowData[`c${courseIndex + 1}`] = course.target_value && course.target_value.toFixed
? course.target_value.toFixed(3) : course.target_value ;
if (course.target_value) {
target_value_total = target_value_total + course.target_value
}
realValueRowData[`c${courseIndex + 1}`] = course.real_value && course.real_value.toFixed
realValueRowData[`c${courseIndex + 1}`] = course.real_value && course.real_value.toFixed
? course.real_value.toFixed(3) : course.real_value ;
if (course.real_value) {
real_value_total = real_value_total + course.real_value
@ -259,7 +261,7 @@ function getTableData(data_args) {
return tableData;
}
// new
function getTableData(data_args) {
function getTableData(data_args) {
let tableData = []
// 最大课程数量,根据这个值动态渲染课程列数
maxCouseCount = 0;
@ -274,16 +276,16 @@ let tableData = []
// 一个course数组的数据组合成三行table数据
innerItem.course_supports.forEach((course, courseIndex) => {
nameRowData[`c${courseIndex + 1}`] = course.course_name;
targetValueRowData[`c${courseIndex + 1}`] = course.reach_criteria
// course.target_value && course.target_value.toFixed
// course.target_value && course.target_value.toFixed
// ? course.target_value.toFixed(3) : course.target_value ;
// if (course.target_value) {
// target_value_total = target_value_total + course.target_value
// }
realValueRowData[`c${courseIndex + 1}`] = course.actually_reach
// course.real_value && course.real_value.toFixed
// course.real_value && course.real_value.toFixed
// ? course.real_value.toFixed(3) : course.real_value ;
// if (course.real_value) {
// real_value_total = real_value_total + course.real_value
@ -496,7 +498,7 @@ class GraduatesRequirement extends Component {
}
}
onDaChengYuZhiChange = (value) => {
if ( (!window.event || window.event.type == 'blur')
if ( (!window.event || window.event.type == 'blur')
&& this.state.daChengYuZhi > 1 && value == 1) {
this.props.showSingleButtonModal('提示', '达成阈值必须小于等于1')
}
@ -526,7 +528,7 @@ class GraduatesRequirement extends Component {
axios.post(url, {
reach_criteria : this.state.daChengYuZhi
}).then((response) => {
if( response.data.status === 0 ) {
this.setState({ daChengYuZhiSaved: this.state.daChengYuZhi })
this.setDaChengYuZhiEditableMode(false)
@ -537,7 +539,7 @@ class GraduatesRequirement extends Component {
console.log(error)
})
}
componentDidMount(){
window.document.title = '达成度评价结果';
@ -569,7 +571,7 @@ class GraduatesRequirement extends Component {
// const url = `ec_courses/7/get_calculation_data`
// const url = `/ec_courses/get_calculation_data?ec_year_id=${ec_year_id}`
const url = `/ec_years/${ec_year_id}/reach_evaluation.json`
// num_array = getNumArray(testData.calculation_data);
// num_array = getNumArray(testData.calculation_data);
// tableData = getTableData(testData.calculation_data)
// return
@ -578,8 +580,8 @@ class GraduatesRequirement extends Component {
})
.then((response) => {
if (response.data.graduation_requirements) {
num_array = getNumArray(response.data.graduation_requirements);
tableData = getTableData(response.data.graduation_requirements)
num_array = getNumArray(response.data.graduation_requirements);
tableData = getTableData(response.data.graduation_requirements)
// 先计算再触发render
this.setState({
calculationData: response.data.calculation_data,
@ -590,7 +592,7 @@ class GraduatesRequirement extends Component {
calculating: false,
})
}
})
.catch(function (error) {
@ -604,7 +606,7 @@ class GraduatesRequirement extends Component {
return;
}
this.setState({ calculating: true })
var Url = '/ec_courses/sync_all_course_data';
/**
@ -615,14 +617,14 @@ class GraduatesRequirement extends Component {
axios.post(Url, {
course_ids: this.state.course_ids
}).then((response) => {
// 计算需要一定的时间,让按钮转动
// 计算需要一定的时间,让按钮转动
if( response.data.status === 1 ) {
let ec_year_id = this.props.match.params.ec_year_id;
this.fetchData(ec_year_id);
this.props.showSingleButtonModal('提示', '计算完毕')
} else {
}
}).catch((error) => {
this.setState({ calculating: false })
@ -641,7 +643,7 @@ class GraduatesRequirement extends Component {
// showCalculateButton = true;
// }
return (
<div className="educontent graduatesRequirement">
<ul className="clearfix padding20-30 bor-bottom-greyE backgroundFFF"
@ -659,62 +661,62 @@ class GraduatesRequirement extends Component {
<p class="clearfix padding20-30 bor-bottom-greyE backgroundFFF"
style={{ 'paddingBottom': '12px' }}>
<span class="fl font-14">达成阈值</span>
{ daChengYuZhiEditableMode ?
{ daChengYuZhiEditableMode ?
<React.Fragment>
<InputNumber value={daChengYuZhi} onChange={this.onDaChengYuZhiChange}
size="small" min={0} max={1} step={0.01} ></InputNumber>
<span onClick={this.saveDaChengYuZhi}
<span onClick={this.saveDaChengYuZhi}
style={{color: '#4CACFF', marginLeft: '4px', cursor: 'pointer', fontSize: '13px'}}>确定
</span>
<span onClick={ this.onDaChengYuZhiCancel }
style={{color: '#d1d1d1', marginLeft: '4px', cursor: 'pointer', fontSize: '13px'}} >取消
</span>
</React.Fragment>
:
:
<React.Fragment>
<span class="color-orange fl" id="ReachStandardNum">{daChengYuZhiSaved}</span>
{/* data-tip-down="编辑" */}
<i
<i
onClick={() => { this.setDaChengYuZhiEditableMode(true) }}
class="iconfont icon-bianjidaibeijing color-green" idkey="0"
style={{ float: 'left', marginTop: '-3px', marginLeft: '3px', cursor: 'pointer' }}></i>
</React.Fragment>
}
{/* <a class="mr20 editSubentry" style={{display: 'block'}}>
</a> */}
<a href="javascript:void(0)"
class="white-btn edu-orangeback-btn fr mr10"
href={`/api/ec_years/${this.state.ec_year_id}/reach_evaluation.xlsx`}
<a href="javascript:void(0)"
class="white-btn edu-orangeback-btn fr mr10"
href={`/api/ec_years/${this.state.ec_year_id}/reach_evaluation.xlsx${getRandomNumber()}`}
>导出</a>
{/* /ec_major_schools/3/academic_years/5/export_reach_requirements_data.xls
let major_school_id =this.props.match.params.major_school_id;
let ec_year_id =this.props.match.params.ec_year_id;
*/}
{ showCalculateButton && ( this.state.calculating === true ?
{ showCalculateButton && ( this.state.calculating === true ?
<a href="javascript:void(0)" class="white-btn edu-grayback-btn mr20 fr">
计算中...
</a> :
</a> :
<a href="javascript:void(0)" class="white-btn edu-orangeline-btn mr20 fr" onClick={this.onCalculate}>
计算
</a> )
}
</p>
{/* { this.state.calculating == true ?
{/* { this.state.calculating == true ?
<Spin delay={500} className="Spinlarge" indicator={<Icon type="loading" style={{ fontSize: 30 }} spin />}></Spin>
: }   */}
<Table bordered loading={ this.state.calculating }
columns={buildColumns(this)} dataSource={tableData} pagination={false}
scroll={{ y: 530 }}
scroll={{ y: 530 }}
></Table>
</div>
);
}
}

@ -1,23 +1,13 @@
import React, { Component } from 'react';
import classNames from 'classnames'
import axios from 'axios';
import { TPMIndexHOC } from '../../tpm/TPMIndexHOC';
import { SnackbarHOC } from 'educoder'
import { message,Modal,Spin,Icon} from 'antd';
import {getRandomNumber} from 'educoder';
import 'antd/dist/antd.css';
import EcTitleCourseEvaluations from '../ecTitle/ecTitle'
import '../css/ecCourseSupports.css';
import '../css/ecCourseEvaluations.css';
import {
BrowserRouter as Router,
Route,
Switch
} from 'react-router-dom';
@ -223,7 +213,7 @@ class Curriculum extends Component {
titine===5?
<span>
<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 className={ismanager===false?"none":"right newrightcalculatebuttons fr mb10 mr20 "}
onClick={()=>this.newrightcalculatebuttonysl(this.child)}>计算</span>

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

@ -14,6 +14,7 @@ import passpartImg from '../../../images/tpi/passpart.png'
import empiricgreenImg from '../../../images/tpi/empiricgreen.png'
import { trigger } from 'educoder';
import SecondTab from "../../paths/SchoolStatistics/SecondTab";
class TaskResultLayer extends Component {
@ -29,7 +30,7 @@ class TaskResultLayer extends Component {
}
componentWillReceiveProps(newProps, newContext) {
if (newProps.currentGamePassed && (!this.props.currentGamePassed
if (newProps.currentGamePassed && (!this.props.currentGamePassed
|| (newProps.currentGamePassed !== this.props.currentGamePassed ))) {
// this.fakeRanking = this._fakeRanking()
const $ = window.$;
@ -51,10 +52,10 @@ class TaskResultLayer extends Component {
}
}
}
onStarChange(challenge, index, value) {
this.props.onStarChange(challenge, index, value);
this.setState({
stared: value ? true : false,
})
@ -87,11 +88,11 @@ class TaskResultLayer extends Component {
// this.context.router.push('/sample');
if (goNext === true) {
if (next_game) { // https://www.trustie.net/issues/18573
this.goNext = true;
this.goNext = true;
}
// 隐藏掉效果查看页面
window.$('#picture_display').hide()
}
}
this.props.onGamePassed();
this.setState({
stared: false
@ -110,9 +111,9 @@ class TaskResultLayer extends Component {
// return;
// }
// const { showLanguagePictrue } = this.props.challenge;
// if ( prevProps.challenge.showLanguagePictrue != showLanguagePictrue &&
// if ( prevProps.challenge.showLanguagePictrue != showLanguagePictrue &&
// showLanguagePictrue == true ) {
// }
// }
initEffectDisplayServerTimer = () => {
@ -128,7 +129,7 @@ class TaskResultLayer extends Component {
this.setState({ timeRemain })
}, 1000)
})
}
componentWillUnmount() {
this.intervalHandler && clearInterval(this.intervalHandler);
@ -162,7 +163,7 @@ class TaskResultLayer extends Component {
// const fakeRanking = this.fakeRanking;
return (
<div>
{currentGamePassed ?
{currentGamePassed ?
<div className="taskResultLayer">
<div className="pr passTaskContent" style={{display:'none'}} >
<i className="far fa-times-circle closeIcon" onClick={closeTaskResultLayer} title="关闭"></i>
@ -174,52 +175,60 @@ class TaskResultLayer extends Component {
<p className="inline inlines exp">
<img src={empiricgreenImg} className="mr8 mt5 fl"/>
{currentPassedGameGainExperience >= 0 ? `+${currentPassedGameGainExperience}` : '+0'}
</p>
</p>
</div>
<div className="winPanel">
<style>
{
`
.page--body{
z-index: 0 !important;
}
`
}
</style>
<div className="cl"></div>
{ !game.star ?
{ !game.star ?
<React.Fragment>
<p className="rateLabel ">您的评价决定老师的江湖地位~</p>
<Rate
defaultValue={0}
allowClear={false}
onChange={(value) => this.onStarChange(this.props.game, this.props.challenge.position, value)}
/>
/>
</React.Fragment>
: ''}
<p>
<p>
{/*<a href="javascript:void(0)" className="passNext">下一关</a>*/}
<a href="javascript:void(0)" className={`passed ${ stared || game.star ? 'stared' : '' }`}
{...titleObj} onClick={()=>this.onFinish(true)}>{ next_game ? '下一关' : '完成'}</a>
{ challenge.showLanguagePictrue &&
{ challenge.showLanguagePictrue &&
<a href="javascript:void(0)" className={`passed ${ stared || game.star ? 'stared' : '' }`}
{...titleObj} onClick={()=>this.onFinish()}>
{ `查看效果` }
{/* ${ moment(this.state.timeRemain * 1000).format('mm:ss') } */}
</a>
}
{/*
(this.state.timeRemain ?
{/*
(this.state.timeRemain ?
<Tooltip title={"注意效果查看服务只会保留5分钟"} disableFocusListener={true}>
</Tooltip>
</Tooltip>
:
<Tooltip title={"效果查看服务已被终止运行,需要重新评测后才能查看"} disableFocusListener={true}>
<a href="javascript:void(0)" className={`passed ${ stared || game.star ? 'stared' : '' }`}
{...titleObj} onClick={()=>{}} style={{ backgroundColor: 'gray'}}>
{ `查看效果` }
</a>
</Tooltip>
</Tooltip>
)
*/}
{/*
{/*
注意效果查看服务只会保留5分钟
效果查看服务已被终止运行需要重新评测后才能查看
*/}

@ -1047,17 +1047,17 @@ submittojoinclass=(value)=>{
`
}
</style>
<li className={`pr questionbanks`}>
<Popover placement="bottom" content={contents} trigger="click" >
<div className=" sortinxdirection mr10">
<div style={{
color:"#fff"
}}>
题库
</div>
</div>
</Popover>
</li>
{/*<li className={`pr questionbanks`}>*/}
{/* <Popover placement="bottom" content={contents} trigger="click" >*/}
{/* <div className=" sortinxdirection mr10">*/}
{/* <div style={{*/}
{/* color:"#fff"*/}
{/* }}>*/}
{/* 题库*/}
{/* </div>*/}
{/* </div>*/}
{/* </Popover>*/}
{/*</li>*/}
<li
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">
<span><i className={"iconfont icon-jilu1 audit_situationactive font-14"}></i> </span>
<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>
</div>

@ -87,7 +87,7 @@ class Challengesjupyter extends Component {
//
// }
this.setState({
opentitletype:true,
opentitletype:false,
isopentitletype:"greater",
boxoffsetHeigh:boxoffsetHeigh
})
@ -646,11 +646,13 @@ class Challengesjupyter extends Component {
}
</style>
{/*this.state.enlarge===false?"":*/}
{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>
</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>
</Divider>}
{/*{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>*/}
{/*</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>*/}
{/*</Divider>}*/}
</div>
</p>

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

Loading…
Cancel
Save