杨树林 5 years ago
commit 9e6b31dddd

@ -31,7 +31,7 @@ export function initAxiosInterceptors(props) {
// proxy = "http://testbdweb.trustie.net"
// proxy = "http://testbdweb.educoder.net"
proxy = "https://testeduplus2.educoder.net"
proxy="http://47.96.87.25:48080"
//proxy="http://47.96.87.25:48080"
// 在这里使用requestMap控制避免用户通过双击等操作发出重复的请求
// 如果需要支持重复的请求考虑config里面自定义一个allowRepeat参考来控制

@ -1,7 +1,19 @@
/**
EDU_ADMIN = 1 # 超级管理员
EDU_BUSINESS = 2 # 运营人员
EDU_SHIXUN_MANAGER = 3 # 实训管理员
EDU_SHIXUN_MEMBER = 4 # 实训成员
EDU_CERTIFICATION_TEACHER = 5 # 平台认证的老师
EDU_GAME_MANAGER = 6 # TPI的创建者
EDU_TEACHER = 7 # 平台老师,但是未认证
EDU_NORMAL = 8 # 普通用户
*/
export const EDU_ADMIN = 1 // 超级管理员
export const EDU_SHIXUN_MANAGER = 2 // 实训管理员
export const EDU_SHIXUN_MEMBER = 3 // 实训成员
export const EDU_CERTIFICATION_TEACHER = 4 // 平台认证的老师
export const EDU_GAME_MANAGER = 5 // TPI的创建者
export const EDU_TEACHER = 6 // 平台老师,但是未认证
export const EDU_NORMAL = 7 // 普通用户
export const EDU_BUSINESS = 2 // # 运营人员
export const EDU_SHIXUN_MANAGER = 3 // 实训管理员
export const EDU_SHIXUN_MEMBER = 4 // 实训成员
export const EDU_CERTIFICATION_TEACHER = 5 // 平台认证的老师
export const EDU_GAME_MANAGER = 6 // TPI的创建者
export const EDU_TEACHER = 7 // 平台老师,但是未认证
export const EDU_NORMAL = 8 // 普通用户

@ -24,7 +24,7 @@ export { toStore as toStore, fromStore as fromStore } from './Store'
export { trace_collapse, trace, debug, info, warn, error, trace_c, debug_c, info_c, warn_c, error_c } from './LogUtil'
export { EDU_ADMIN, EDU_SHIXUN_MANAGER, EDU_SHIXUN_MEMBER, EDU_CERTIFICATION_TEACHER
export { EDU_ADMIN, EDU_BUSINESS, EDU_SHIXUN_MANAGER, EDU_SHIXUN_MEMBER, EDU_CERTIFICATION_TEACHER
, EDU_GAME_MANAGER, EDU_TEACHER, EDU_NORMAL} from './Const'
export { ModalHOC } from './components/ModalHOC'

@ -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} from 'educoder'
, EDU_GAME_MANAGER, EDU_TEACHER, EDU_NORMAL, EDU_BUSINESS} from 'educoder'
import { MuiThemeProvider, createMuiTheme, withStyles } from 'material-ui/styles';
import MUIDialogStyleUtil from '../modules/page/component/MUIDialogStyleUtil'
@ -447,6 +447,18 @@ pop_box_new(htmlvalue, 480, 182);
// const EDU_TEACHER = 6 // 平台老师,但是未认证
// const EDU_NORMAL = 7 // 普通用户
/**
EDU_ADMIN = 1 # 超级管理员
EDU_BUSINESS = 2 # 运营人员
EDU_SHIXUN_MANAGER = 3 # 实训管理员
EDU_SHIXUN_MEMBER = 4 # 实训成员
EDU_CERTIFICATION_TEACHER = 5 # 平台认证的老师
EDU_GAME_MANAGER = 6 # TPI的创建者
EDU_TEACHER = 7 # 平台老师,但是未认证
EDU_NORMAL = 8 # 普通用户
*/
// myshixun_manager power is_teacher
resData.power = 0
resData.myshixun_manager = false
@ -455,6 +467,9 @@ pop_box_new(htmlvalue, 480, 182);
if (resData.user.identity === EDU_ADMIN) {
resData.power = 1
resData.myshixun_manager = true
} else if (resData.user.identity === EDU_BUSINESS) {
resData.power = 1
resData.myshixun_manager = true
} else if (resData.user.identity === EDU_SHIXUN_MANAGER) {
resData.power = 1
resData.myshixun_manager = true

@ -180,6 +180,12 @@ class CommonWorkAppraise extends Component{
</div> */}
<div className={" "} style={{}}>
<style>{`
.workAppraise>div:last-child {
border-bottom: none !important;
}
`}</style>
<div className={"workAppraise"}>
{(description || (attachments && attachments.length != 0)) && <div className={"stud-class-set bor-bottom-greyE edu-back-white"} style={{ padding: '20px 20px 20px 20px'}}>
<div className={"color-grey-6 h20 mb20 font-16"}>
内容
@ -209,7 +215,7 @@ class CommonWorkAppraise extends Component{
{ update_time &&
<React.Fragment>
<span className={"color9B9B fr"}>更新</span>
<span className={"fr font-13 mr10 ml10"}>{update_user_name}</span>
<span className={"fr font-14 mr10 ml10"}>{update_user_name}</span>
<span className={"color9B9B fr"}>
{moment(update_time).format('YYYY-MM-DD HH:mm')==="Invalid date"?"":moment(update_time).format('YYYY-MM-DD HH:mm')}
</span>
@ -218,7 +224,7 @@ class CommonWorkAppraise extends Component{
{ commit_time &&
<React.Fragment>
<span className={"color9B9B fr mr30"}>提交</span>
<span className={"fr font-13 mr10 ml10"}>{author_name}</span>
<span className={"fr font-14 mr10 ml10"}>{author_name}</span>
<span className={" color9B9B fr"}>
{moment(commit_time).format('YYYY-MM-DD HH:mm')==="Invalid date"?"":moment(commit_time).format('YYYY-MM-DD HH:mm')}
</span>
@ -286,6 +292,7 @@ class CommonWorkAppraise extends Component{
</div>
</div>
}
</div>
{/* task_type={datalist&&datalist.task_type} */}

@ -97,6 +97,13 @@ class CommonWorkItem extends Component{
setupdate = () => {
}
toCreateProject = () => {
if (window.location.port == 3007) {
window.location.href = '/testbdweb.educoder.net/projects/new'
} else {
window.location.href = '/projects/new'
}
}
render(){
let { mainList,workType }=this.props;
const { aModalVisible, fileList, revise_reason } = this.state
@ -195,12 +202,22 @@ class CommonWorkItem extends Component{
<li className="fr">
{ //
item.work_status && item.work_status.indexOf('关联项目') != -1 &&
<WordsBtn style="blue" className={` font-16 fl}`} onClick={() => this.props.openConnectionProject(item)}>关联项目</WordsBtn>
<React.Fragment>
<WordsBtn style="blue" className={` font-16 fl`} onClick={() => this.props.toCreateProject(item)}>创建项目</WordsBtn>
<WordsBtn style="blue" className={` font-16 fl ml28`} onClick={() => this.props.openConnectionProject(item)}>关联项目</WordsBtn>
</React.Fragment>
}
{ //
item.work_status && item.work_status.indexOf('取消关联') != -1 &&
<WordsBtn style="blue" className={` font-16 fl`} onClick={() => this.props.cancelConnectionProject(item)}>取消关联</WordsBtn>
}
{ //
item.work_status && item.work_status.indexOf('提交作品') != -1 &&
<WordsBtn style="blue" className="fl font-16 ml28" onClick={() => this.props.toWorkPostPage(this.props.match.params, item.homework_id)}>提交作品</WordsBtn>
}
{
//
item.work_status && item.work_status.indexOf('补交作品') != -1 &&

@ -31,7 +31,9 @@ function renderScore(score, content) {
} else if (score >= 60) {
color = '#FF6800'
}
return <a href="javascript:;" style={{ color, minWidth: '30px', display: 'inline-block', textAlign: 'center' }}>{score == '--' ? '--': (content || score)}</a>
return <a href="javascript:;" style={{ color, minWidth: '30px', display: 'inline-block', textAlign: 'center' }}>
{score == null || score == undefined || score == '--' ? '--': (content || score)}
</a>
}
function getScoreTip(score, dom) {
return score == '--' ? '未评分' : score == '**' ? '未公开' : dom
@ -51,7 +53,7 @@ function buildColumns(that, student_works) {
const isAdmin = that.props.isAdmin()
const isAdminOrStudent = that.props.isAdminOrStudent()
const isStudent = that.props.isStudent()
const isNiPing = homework_status.indexOf('匿评中') != -1
const isNiPing = homework_status && homework_status.indexOf('匿评中') != -1
// https://www.trustie.net/issues/21450 分组作业作品列表 学时视角,匿评阶段的列表显示信息不正确
const niPingAndIsStudent = isStudent && isNiPing
@ -84,7 +86,7 @@ function buildColumns(that, student_works) {
}]
if (!niPingAndIsStudent) {
columns.push({
width: 180,
width: 88,
title: '学号',
dataIndex: 'student_id',
key: 'student_id',
@ -152,7 +154,7 @@ function buildColumns(that, student_works) {
</span>
)},
}, {
width: 133,
width: 150,
title: '更新时间',
dataIndex: 'update_time',
key: 'update_time',
@ -226,7 +228,7 @@ function buildColumns(that, student_works) {
<Tooltip title={
getScoreTip(student_score,
<div>
<div>{`${record.student_comment_count}名学生进行了匿评`}</div>
{record.student_comment_count && <div>{`${record.student_comment_count}名学生进行了匿评`}</div>}
<div>有效平均分{record.student_score}</div>
</div>
)
@ -250,9 +252,10 @@ function buildColumns(that, student_works) {
{ !!appeal_all_count &&
<Tooltip placement="bottom" title={`共有${appeal_all_count}条匿评申诉,${record.appeal_deal_count}条待处理`}>
<span style={{ minWidth: '30px', display: 'inline-block', textAlign: 'center' }}>
{`${appeal_all_count}/${record.appeal_deal_count}`}
{`${record.appeal_deal_count}/${appeal_all_count}`}
</span>
</Tooltip> }
{ !appeal_all_count && '-/-'}
</span>
),
})

@ -173,7 +173,7 @@ class CommonWorkPost extends Component{
}
if(isGroup){
if(userids!=undefined){
if(userids.length<memberNumMin){
if(userids.length + 1<memberNumMin){
this.setState({
minvalue: memberNumMin,
setvalue:"小于",
@ -181,7 +181,7 @@ class CommonWorkPost extends Component{
})
return
}else if(userids.length>memberNumMax){
}else if(userids.length + 1>memberNumMax){
this.setState({
minvalue: memberNumMax,
setvalue:"大于",

@ -101,14 +101,13 @@ class CommonWorkQuestion extends Component{
{isGroup && <div className="df mt10">
<div style={{flex: '0 0 160px'}}>
<div>分组要求</div>
<div>分组人数 {group_info.min_num} - {group_info.max_num} </div>
<div>{group_info.base_on_project ? '基于项目实施' : '不基于项目实施'}</div>
<div>分组要求 {group_info.min_num} ~ {group_info.max_num}</div>
<div>{group_info.base_on_project ? '基于项目实施' : '不基于项目'}</div>
</div>
<div style={{color: '#9B9B9B'}}>
<div>提交作品时需要关联同组成员组内成员作品共享</div>
<div>{group_info.base_on_project ? '基于项目,则项目管理员角色的成员可以提交作品' : '非基于项目,则任意小组成员可以提交作品'}</div>
<div>各小组必须在educoder平台创建项目</div>
<div>学生提交作品时需要关联同组成员组内成员作品共享</div>
<div>{group_info.base_on_project ? '学生必须在本平台创建项目,项目管理员可以提交作品' : '无需再平台创建项目,任意小组成员均可以提交作品'}</div>
{/* <div>各小组必须在educoder平台创建项目</div> */}
</div>
</div>}

@ -259,15 +259,20 @@ class CommonWorkSetting extends Component{
unified_setting: checked
})
}
// 启用匿评
anonymous_comment_change = (e) => {
const checked = e.target.checked;
const { end_time } = this.state;
const currentEndTime = this._getCurrentEndTime()
let evaluation_start, evaluation_end, evaluation_num = 0, absence_penalty = 0;
if (checked) {
if (end_time) {
evaluation_start = moment(end_time).add(7, 'days').format(dateFormat)
evaluation_end = moment(end_time).add(21, 'days').format(dateFormat)
if (currentEndTime) {
evaluation_start = moment(currentEndTime).add(7, 'days').format(dateFormat)
evaluation_end = moment(currentEndTime).add(21, 'days').format(dateFormat)
}
if (!this.state.evaluation_num) {
evaluation_num = 3
}
if (!this.state.absence_penalty) {
absence_penalty = 2
}
} else {
@ -310,6 +315,7 @@ class CommonWorkSetting extends Component{
absence_penalty:value
})
}
// 启用匿评申诉
anonymous_appeal_change = (e) => {
const { evaluation_end } = this.state;
const anonymous_appeal = e.target.checked
@ -389,9 +395,10 @@ class CommonWorkSetting extends Component{
this.setState({
late_penalty: 5
})
if (this.state.end_time && !this.state.late_time) {
const currentEndTime = this._getCurrentEndTime();
if (currentEndTime && !this.state.late_time) {
this.setState({
late_time: moment(handleDateString(this.state.end_time)).add(1, 'months').format(dateFormat)
late_time: moment(handleDateString(currentEndTime)).add(1, 'months').format(dateFormat)
})
}
}
@ -469,6 +476,20 @@ class CommonWorkSetting extends Component{
// }
}
_getCurrentEndTime = () => {
const { unified_setting, end_time, rules } = this.state;
if (unified_setting) {
return end_time
} else {
let max_un_unified_setting_end_time = null;
rules.map(item => {
if (!max_un_unified_setting_end_time || moment(item.end_time) > moment(max_un_unified_setting_end_time)) {
max_un_unified_setting_end_time = item.end_time;
}
})
return max_un_unified_setting_end_time
}
}
saveWorkSetting=()=>{
let workId=this.props.match.params.workId;
@ -1077,6 +1098,7 @@ class CommonWorkSetting extends Component{
course_group={adaptered_group_settings}
rulesCheckInfo={(info)=>this.rulesCheckInfo(info)}
flagPageEdit={true}
moduleName="作业"
></PollDetailTabForthRules>
}
@ -1254,7 +1276,7 @@ class CommonWorkSetting extends Component{
margin-left: 18px;
}
`}</style>
<PopInstruction width={448} id={1}>
<PopInstruction width={458} id={1}>
<p className="font-14 edu-txt-left pop-instruction">
允许学生对自己作品的匿评评分进行申诉由教师和助教处理申诉<br/>
@ -1297,7 +1319,7 @@ class CommonWorkSetting extends Component{
</span>
</Tooltip>
<span className={"font-14 color-grey-9 ml10"}></span>
<span className={"font-14 color-grey-9 ml10"}>学生提交匿评申诉的时间截点</span>
</div>
{<div className={" appeal_time_tip color-red ml60 mb6"}>{appeal_time_tip}</div>}
@ -1311,7 +1333,7 @@ class CommonWorkSetting extends Component{
/>
</span>
</Tooltip>
<span className={"font-14 color-grey-9 ml10"}></span>
<span className={"font-14 color-grey-9 ml10"}>学生违规匿评TA人作品时其成绩将被扣减的分值</span>
</div>
{this.state.appeal_penalty_tip && <div className={" appeal_penalty_tip color-red ml60"} style={{marginTop: '-6px'}}>{this.state.appeal_penalty_tip}</div>}
@ -1346,21 +1368,17 @@ class CommonWorkSetting extends Component{
<RadioGroup onChange={this.final_mode_change} value={final_mode}>
<Radio style={radioStyle} value={false} disabled={noAuth}>
多项评分配比<span className={"font-14 color-grey-9 ml10"}>选中则按照比例计算最终成绩</span>
<PopInstruction width={500} id={2}>
<PopInstruction width={512} id={2}>
<p className="font-14 edu-txt-left pop-instruction">
计算说明<br/>
优先顺序排前的非零评分 * 100% - <br/>
( 迟交扣分 + 缺评扣分 * 缺评数 + 违规匿评扣分 * 违规匿评数 )<br/>
有教师评分则教师评分100%否则教辅评分100%依次类推
{/* 教师评分 * 其百分比 + 助教评分 * 其百分比 + 学生匿评平均分 * 其百分比 - <br/>
( 迟交扣分 + 缺评扣分 * 缺评数 + 违规匿评扣分 * 违规匿评数 )<br/>
<br/>
教师评分 * 其百分比 + 助教评分 * 其百分比 + 学生匿评平均分 * 其百分比 - ( <br/>
迟交扣分 + 缺评扣分 * 缺评数 + 违规匿评扣分 * 违规匿评数 )<br/><br/>
注意<br/>
非零百分比的评分选项在没有评分记录的情况下其百分比平摊到另外的评<br/>
分选项上例如教师评分40% + 助教评分35% + 学生匿评25%学生A没<br/>
有得到教师评分则最终成绩将按照助教评分55% + 学生匿评45%进行计算 */}
非零百分比的评分选项若评分记录为空则其百分比将自动平摊到其它非零<br/>
评分选项上<br/>
教师评分40% + 助教评分35% + 学生匿评25%学生A没有教师评分记<br/>
则其最终成绩按照助教评分55% + 学生匿评45%进行计算
</p>
</PopInstruction>
@ -1392,12 +1410,30 @@ class CommonWorkSetting extends Component{
{<div className={"color-red ml30 final_mode_false_tip"}>{final_mode_false_tip}</div>}
<Radio style={radioStyle} value={true} disabled={noAuth}>
单项评分优先<span className={"font-14 color-grey-9 ml10"}>选中则按照优先顺序计算最终成绩</span>
<PopInstruction width={500} id={3}>
<p className="font-14 edu-txt-left pop-instruction">
计算说明<br/>
优先顺序排前的非零评分 * 100% - <br/>
( 迟交扣分 + 缺评扣分 * 缺评数 + 违规匿评扣分 * 违规匿评数 )<br/>
有教师评分则教师评分100%否则教辅评分100%依次类推
{/* 教师评分 * 其百分比 + 助教评分 * 其百分比 + 学生匿评平均分 * 其百分比 - <br/>
( 迟交扣分 + 缺评扣分 * 缺评数 + 违规匿评扣分 * 违规匿评数 )<br/>
<br/>
注意<br/>
非零百分比的评分选项在没有评分记录的情况下其百分比平摊到另外的评<br/>
分选项上例如教师评分40% + 助教评分35% + 学生匿评25%学生A没<br/>
有得到教师评分则最终成绩将按照助教评分55% + 学生匿评45%进行计算 */}
</p>
</PopInstruction>
</Radio>
</RadioGroup>
<div className={"font-16"} style={{ marginLeft: '25px' }}>
<span>教师评分 教辅评分 学生匿评评分</span>
<span className={"font-14 color-grey-9 ml10"}>有教师评分则教师评分100%否则教辅评分100%依次类推 </span>
{/* <span className={"font-14 color-grey-9 ml10"}>有教师评分则教师评分100%否则教辅评分100%,依次类推 </span> */}
</div>
</div>

@ -44,6 +44,7 @@ class ConnectProject extends Component{
}).then((result)=>{
if(result.data.status==0){
this.closeConnectionProject()
this.props.connectSuccess()
this.props.showNotification('关联成功')
}
}).catch((error)=>{
@ -122,7 +123,24 @@ class ConnectProject extends Component{
footer={null}
destroyOnClose={true}
>
<div className="newupload_conbox clearfix">
<style>{`
.connectProject .ant-radio {
float: left;
line-height: 18px;
}
.connectProject .ant-radio-wrapper .name {
max-width: 480px;
display: inline-block;
overflow: hidden;
text-overflow:ellipsis;
white-space: nowrap;
}
.connectProject .ant-radio-wrapper>span:last-child {
line-height: 18px;
}
`}</style>
<div className="newupload_conbox clearfix connectProject">
{
(projects && !!projects.length || this.state.keyword) &&
<div>
@ -131,7 +149,7 @@ class ConnectProject extends Component{
onSearch={this.onSearchValue}
></Search>
<Radio.Group onChange={this.onChange} value={this.state.radioValue} className={"with100"}>
<div className="mt15" style={{"maxHeight":"161px","overflow-y":"auto"}}>
<div className="mt15" style={{"maxHeight":"228px","overflow-y":"auto", "overflow-x": 'hidden'}}>
<InfiniteScroll
threshold={20}
initialLoad={false}
@ -141,7 +159,9 @@ class ConnectProject extends Component{
useWindow={false}
>
{ projects.map(item => {
return <p className="mb7" key={item.id}><Radio value={item.id}>{item.name}</Radio></p>
return <p className="mb7" key={item.id}><Radio value={item.id}>
<span title={item.name.length > 12 ? item.name : ''} className="name">{item.name}</span>
</Radio></p>
})}
</InfiniteScroll>
</div>

@ -75,12 +75,6 @@ class CoursesWorkIndex extends Component{
(props) => (<CommonWorkDetailIndex {...this.props} {...props} {...this.state} />)
}
></Route>
<Route exact path="/courses/:coursesId/common_homeworks/new"
render={
(props) => (<NewWork {...this.props} {...props} {...this.state} />)
}
></Route>
{/* 作业问答 */}
<Route exact path="/courses/:coursesId/common_homeworks/:workId/question"
render={
@ -120,7 +114,7 @@ class CoursesWorkIndex extends Component{
(props) => (<NewWork {...this.props} {...props} {...this.state} />)
}
></Route>
<Route exact path="/courses/:coursesId/common_homeworks/new"
<Route exact path="/courses/:coursesId/common_homeworks/:categroy_id/new"
render={
(props) => (<NewWork {...this.props} {...props} {...this.state} />)
}

@ -117,7 +117,7 @@ class CoursesWorkIndex extends Component{
(props) => (<NewWork {...this.props} {...props} {...this.state} />)
}
></Route>
<Route exact path="/courses/:coursesId/group_homeworks/new"
<Route exact path="/courses/:coursesId/group_homeworks/:categroy_id/new"
render={
(props) => (<NewWork {...this.props} {...props} {...this.state} />)
}

@ -52,9 +52,9 @@ class PublishRightnow extends Component{
modalname: isPublish ? "立即发布" : "立即截止",
modaltype:1,
visible:true,
Topval: isPublish ? "本操作只对“未发布”的对象生效" : "本操作只对“提交中”的对象生效",
Botvalleft: isPublish ? "暂不发布" : "暂不截止",
Botval: isPublish ? "则通过后续手动设置,定时发布" : "则将根据已设置的截止时间,定时截止",
Topval: isPublish ? "学生将立即收到作业" : "学生将不能再提交作品",
// Botvalleft: isPublish ? "暂不发布" : "暂不截止",
Botval: this.props.fromListPage ? (isPublish ? "本操作只对“未发布”的分班有效" : "本操作只对“提交中”的分班有效") : '',
starttime: isPublish ? `发布时间:${startMoment.format(dateFormat)}` : '',
starttimes:isPublish ? `${startMoment.format(dateFormat)}` : '',
endtime: isPublish ? `截止时间:${startMoment.add(1, 'months').add(1, 'hours').minutes(0).format(dateFormat)}` : '',

@ -67,9 +67,9 @@ export function RouteHOC(options = {}) {
this.props.history.push(`/courses/${_courseId}/${secondName}/${_workId}/${_studentWorkId}/appraise`)
}
}
toNewPage = (courseId, workId) => {
toNewPage = (courseId) => {
const secondName = this.getModuleName()
this.props.history.push(`/courses/${courseId.coursesId}/${secondName}/new`)
this.props.history.push(`/courses/${courseId.coursesId}/${secondName}/${courseId.category_id}/new`)
}
toListPage = (_courseId, _workId) => {
const secondName = this.getModuleName()

@ -75,7 +75,6 @@ class commonWork extends Component{
}
componentDidUpdate(prevProps, prevState) {
debugger;
if (prevProps.match.path != this.props.match.path) {
this.componentDidMount()
}
@ -198,6 +197,7 @@ class commonWork extends Component{
this.clearSelection()
let {search,order}=this.state;
this.getList(1,search,order);
this.props.updataleftNavfun()
}
console.log(response)
}).catch((error) => {
@ -279,6 +279,26 @@ class commonWork extends Component{
console.log(error)
})
}
connectSuccess = () => {
let {page,search,order}=this.state;
this.getList(page,search,order);
}
cancelConnectionProject = (work) => {
let workId=this.props.match.params.workId;
let courseId=this.props.match.params.coursesId;
const url = `/homework_commons/${work.homework_id}/student_works/cancel_relate_project.json`
axios.get(url).then((response)=> {
if (response.data.status == 0) {
let {page,search,order}=this.state;
this.getList(page,search,order);
this.props.showNotification('取消关联成功')
}
}).catch((error)=>{
console.log(error)
})
}
render(){
@ -341,7 +361,7 @@ class commonWork extends Component{
</div>
</div>
</div> */}
<ConnectProject ref="connectProject" {...this.props}></ConnectProject>
<ConnectProject ref="connectProject" {...this.props} connectSuccess={this.connectSuccess}></ConnectProject>
<Titlesearchsection
@ -395,11 +415,11 @@ class commonWork extends Component{
</li>
<li className="li_line">
<PublishRightnow showActionButton={true} {...this.props} checkBoxValues={checkBoxValues}
isPublish={true} doWhenSuccess={this.doWhenSuccess}></PublishRightnow>
isPublish={true} doWhenSuccess={this.doWhenSuccess} fromListPage={true}></PublishRightnow>
</li>
<li className="li_line">
<PublishRightnow showActionButton={true} {...this.props} checkBoxValues={checkBoxValues}
isPublish={false} doWhenSuccess={this.doWhenSuccess}></PublishRightnow>
isPublish={false} doWhenSuccess={this.doWhenSuccess} fromListPage={true}></PublishRightnow>
</li>
{ !!course_public && <li className="li_line"><a href="javascript:void(0)" onClick={this.onSetPublic} className="color-grey-9">设为公开</a></li>}
@ -425,6 +445,7 @@ class commonWork extends Component{
<Checkbox.Group style={{"width":"100%"}} onChange={this.onChangeSelect} value={checkBoxValues}>
<CommonWorkItem mainList={mainList} {...this.props} workType={workType} onItemClick={this.onItemClick}
openConnectionProject={this.openConnectionProject}
cancelConnectionProject={this.cancelConnectionProject}
></CommonWorkItem>
</Checkbox.Group>
</Spin>

@ -1,7 +1,7 @@
import React, {Component} from 'react';
import {Link} from "react-router-dom";
import axios from 'axios';
import {getImageUrl, trigger} from 'educoder';
import {getImageUrl, trigger, on, off} from 'educoder';
import { Tooltip, message,Popover} from 'antd';
import CoursesListType from '../coursesPublic/CoursesListType';
import Addcourses from '../coursesPublic/Addcourses';
@ -48,8 +48,12 @@ class CoursesBanner extends Component {
componentDidMount() {
this.onloadupdatabanner()
on('updatabanner', this.updatabanner)
}
componentWillUnmount() {
off('updatabanner', this.updatabanner)
}
onloadupdatabanner=()=>{
this.updatabanner()

@ -259,26 +259,25 @@ class GraduationTasksappraise extends Component{
</div>
<div className="color-grey" key={key}>
{firelistdata===undefined?"":firelistdata.length===0?"":firelistdata.revise_attachments.map((item,key)=>{
return(
<div className="color-grey" key={key}>
<a className="color-grey ml20">
<i className="font-14 color-green iconfont icon-fujian mr8" aria-hidden="true"></i>
</a>
<a href={item.url}
className="mr12 color9B9B" length="58">
{item.title}
</a>
<span className="color656565 mt2 color-grey-6 font-12 mr8">{item.filesize}</span>
{item.delete===true?<i className="font-14 iconfont icon-guanbi " id={item.id} aria-hidden="true" onClick={()=>this.onAttachmentRemove(item.id)}></i>:""}
</div>
)
})}
return(
<span>
<a className="color-grey ml20">
<i className="font-14 color-green iconfont icon-fujian mr8" aria-hidden="true"></i>
</a>
<a href={item.url}
className="mr12 color9B9B" length="58">
{item.title}
</a>
<span className="color656565 mt2 color-grey-6 font-12 mr8">{item.filesize}</span>
{item.delete===true?<i className="font-14 iconfont icon-guanbi " id={item.id} aria-hidden="true" onClick={()=>this.onAttachmentRemove(item.id)}></i>:""}
</span>
)
})}
</div>
<div className={"color-grey-6 h20 ml20"}>

@ -197,7 +197,6 @@ class GraduationTasksappraiseMainEditor extends Component{
.mainEditor {
padding: 0 10px;
padding-bottom: 8px;
height: 288px;
}
.mainEditorTitle {
margin-bottom: 6px;
@ -218,7 +217,7 @@ class GraduationTasksappraiseMainEditor extends Component{
</Upload>
<div>
<div style={{height: '36px'}}>
<div style={{ float: 'left' }}>
<InputNumber placeholder="请填写分数" value={score} onChange={this.onScoreChange} className={numberErrorMessage ? 'numberInputError' : ''}
style={{width:"120px", marginRight: '6px'}}

@ -79,7 +79,7 @@ const buildColumns = (that) => {
return columns;
}
// 1-按照学号排序 2-按照分班排序
// 1-按照学生学号 2-按照分班名称
const ORDER_BY_NUM = 1;
const ORDER_BY_GROUP = 2;
@ -317,6 +317,8 @@ class studentsList extends Component{
if (result.data.status == 0) {
this.props.showNotification('移动成功')
this.fetchAll()
this.props.updataleftNavfun()
}
}).catch((error)=>{
console.log(error);
@ -362,6 +364,7 @@ class studentsList extends Component{
this.props.showNotification('删除成功')
this.fetchAll()
this.setState({checkBoxValues: []})
trigger('updatabanner')
}
}).catch((error)=>{
console.log(error);
@ -428,9 +431,9 @@ class studentsList extends Component{
checkBoxValues,
checkAllValue
}=this.state;
let currentOrderName = '学排序'
let currentOrderName = '学生学号'
if (order == ORDER_BY_GROUP) {
currentOrderName = '分班排序'
currentOrderName = '分班名称'
}
const { coursesids } = this.props
const course_group_id = this.props.match.params.course_group_id
@ -574,8 +577,8 @@ class studentsList extends Component{
<li className="drop_down">
{currentOrderName}<i className="iconfont icon-xiajiantou font-12 ml2"></i>
<ul className="drop_down_normal">
<li onClick={() => this.onSortTypeChange(ORDER_BY_NUM)} >排序</li>
<li onClick={() => this.onSortTypeChange(ORDER_BY_GROUP)} >分班排序</li>
<li onClick={() => this.onSortTypeChange(ORDER_BY_NUM)} >生学</li>
<li onClick={() => this.onSortTypeChange(ORDER_BY_GROUP)} >分班名称</li>
</ul>
</li>
</div>

@ -51,7 +51,7 @@ function buildColumns(that) {
dataIndex: 'role',
key: 'role',
}]
that.course_groups && that.course_groups.length && columns.push({
that.state.course_groups && that.state.course_groups.length && columns.push({
title: <Tooltip title="仅能批阅指定分班的作品">管理权限</Tooltip>,
width: 230,
key: 'course_groups',
@ -462,6 +462,7 @@ class studentsList extends Component{
if (response.data.status == 0) {
// {"status":1,"message":"删除成功"}
this.props.showNotification('删除成功')
trigger('updatabanner')
this.fetchAll()
}
})

@ -340,8 +340,8 @@ class PollDetailTabForthRules extends Component{
<div className="bor-top-greyE pt20">
<p className="clearfix mb10">
<span className="fl with40 pr20">&nbsp;</span>
<span className="fl pr20 color-grey-c with25">(学生收到{this.props.type==="Exercise"?"试卷":"问卷"}的时间)</span>
<span className="fl color-grey-c">(学生可以答题的时间截点)</span>
<span className="fl pr20 color-grey-c with25">(学生收到{this.props.moduleName || (this.props.type==="Exercise"?"试卷":"问卷")}的时间)</span>
<span className="fl color-grey-c">({this.props.moduleName == '作业' ? '学生“按时”提交作品的时间截点' : '学生可以答题的时间截点'})</span>
</p>
{

@ -34,8 +34,8 @@ class Trialapplication extends Component {
showTrial: false,
}
//user_phone_binded 判断是否手机号验证
console.log("Trialapplication");
console.log(props);
// console.log("Trialapplication");
// console.log(props);
}
Cancel = () => {

@ -354,7 +354,7 @@ class TPMBanner extends Component {
//开始实战按钮
startshixunCombat=(id)=>{
let {shixunsDetails} = this.props
if( shixunsDetails.status>1){
if( shixunsDetails.shixun_status>1){
this.setState({
startbtn:true,
hidestartshixunsreplacevalue:""
@ -463,11 +463,11 @@ class TPMBanner extends Component {
//
// }
if(shixunsDetails!=undefined){
if (shixunsDetails.status === 0 ) {
if (shixunsDetails.shixun_status === 0 ) {
challengeBtnText = '继续实战'
} else if (shixunsDetails.status === 1) {
} else if (shixunsDetails.shixun_status === 1) {
challengeBtnText = '查看实战'
} else if (shixunsDetails.status === 3) {
} else if (shixunsDetails.shixun_status === 3) {
challengeBtnText = '继续实战'
}else{
challengeBtnText = "开始实战"
@ -640,7 +640,7 @@ class TPMBanner extends Component {
className="fr user_default_btn task-btn-orange font-18"
id="shixun_operation" data-remote="true"
>
{shixunsDetails.task_operation === undefined ? "" : shixunsDetails.status > 1 ? shixunsDetails.task_operation[0] : "模拟实战"}
{shixunsDetails.task_operation === undefined ? "" : shixunsDetails.shixun_status > 1 ? shixunsDetails.task_operation[0] : "模拟实战"}
</a>
</Tooltip>
: ""
@ -707,7 +707,7 @@ class TPMBanner extends Component {
{/*>{shixunsDetails.task_operation===undefined?"":shixunsDetails.task_operation[0]}</a>:""*/}
{/*}*/}
{shixunsDetails.status === 0 && this.props.identity < 4 ?
{shixunsDetails.shixun_status === 0 && this.props.identity < 4 ?
<a onClick={this.applyrelease} className="fr user_default_btn user_blue_btn mr20 font-18 height39"
id="challenge_begin">申请发布</a> : ""
}
@ -772,7 +772,7 @@ class TPMBanner extends Component {
</Modal>
{shixunsDetails.status === 1 && this.props.identity < 4 ?
{shixunsDetails.shixun_status === 1 && this.props.identity < 4 ?
<a onClick={this.cancel_publish} className="fr user_default_btn user_blue_btn mr20 font-18 height39"
id="challenge_begin">撤销发布</a> : ""
}
@ -781,7 +781,7 @@ class TPMBanner extends Component {
<a onClick={this.Senttothe}
className="fr user_default_btn user_blue_btn mr20 font-18"
data-tip-down=""
style={{display: shixunsDetails.status === 0 || shixunsDetails.status === 3 ||shixunsDetails.status === 1 ? "none" : "block"}}
style={{display: shixunsDetails.shixun_status === 0 || shixunsDetails.shixun_status === 3 ||shixunsDetails.shixun_status === 1 ? "none" : "block"}}
data-remote="true">
<Tooltip placement="bottom" title={"以实训作业的形式发送到我的课堂"}>
发送至
@ -847,7 +847,7 @@ class TPMBanner extends Component {
</div>
</Modal>
{shixunsDetails.status === 3 &&
{shixunsDetails.shixun_status === 3 &&
<a className="fr user_default_btn edu-greyback-btn mr15 font-18">已关闭</a>
}
@ -918,7 +918,7 @@ class TPMBanner extends Component {
</div>
<div className="alert alert-orange mb15 mt15 clearfix"
style={{display:shixunsDetails.status === 1?"block":"none"}}
style={{display:shixunsDetails.shixun_status === 1?"block":"none"}}
>正在等待管理员的审核在审核通过前可以随时撤销发布</div>
</div>

File diff suppressed because it is too large Load Diff

@ -239,7 +239,7 @@ class Challenges extends Component {
<p className="clearfix mb30">
<span className="font-16 fl">简介</span>
<a style={{ display: this.props.identity < 4 && this.props.status < 3 ? "block" : 'none' }}
<a style={{ display: this.props.identity < 4 && ChallengesDataList&&ChallengesDataList.shixun_status < 3 ? "block" : 'none' }}
href={"/shixuns/" + id + "/settings?edit=1"} className="ring-green fr"
data-tip-down="编辑">
<img src={getImageUrl("images/educoder/icon/edit.svg")} className="fl mt3 ml2" />
@ -249,7 +249,7 @@ class Challenges extends Component {
<div className="justify break_full_word new_li markdown-body"
id="challenge_editorMd_description">
<p id="ReactMarkdown" style={{overflow:'hidden'}}>
{ChallengesDataList === undefined ? "" :ChallengesDataList.description===null?"":
{ChallengesDataList === undefined ? "" :ChallengesDataList&&ChallengesDataList.description===null?"":
<div dangerouslySetInnerHTML={{__html: markdownToHTML(ChallengesDataList.description).replace(/▁/g,"▁▁▁")}}></div>
}
</p>
@ -262,7 +262,7 @@ class Challenges extends Component {
<p className="clearfix mb10">
<span className="font-16 fl">全部任务</span>
{this.props.identity < 4 && this.props.status === 0 ?
{this.props.identity < 4 && ChallengesDataList&&ChallengesDataList.shixun_status=== 0 ?
<Link to={"/shixuns/" + id + "/challenges/new"}
className="white-btn edu-greenline-btn fr"
// data-tip-down="新增代码编辑类型任务"
@ -275,7 +275,7 @@ class Challenges extends Component {
</Link> : ""
}
{this.props.identity < 4 && this.props.status === 0 ?
{this.props.identity < 4 && ChallengesDataList&&ChallengesDataList.shixun_status=== 0 ?
<Link to={"/shixuns/" + id + "/challenges/newquestion"}
className="white-btn edu-greenline-btn fr mr20"
// data-tip-down="新增选择题类型任务"
@ -359,7 +359,7 @@ class Challenges extends Component {
{item.delete_url != undefined &&
<Tooltip placement="bottom" title={"删除"}>
<a onClick={() => this.delOperations(item.challenge_id)}
style={{ display: this.props.identity < 4 && this.props.status === 0 ? "block" : 'none' }}
style={{ display:this.props.user.admin===true?"block":this.props.identity < 4 && ChallengesDataList.shixun_status === 0 ? "block" : 'none' }}
className="fl ring-op-green mr25">
<img src={getImageUrl("images/educoder/icon/close.svg")}
className="fl mt5 ml5" />
@ -371,7 +371,7 @@ class Challenges extends Component {
{item.up_url != undefined &&
<Tooltip placement="bottom" title={"向上移动"}>
<a onClick={operationstrue===true?"":() => this.operations(item.challenge_id, "up")}
style={{ display: this.props.identity < 4 && this.props.status === 0 ? "block" : 'none' }}
style={{ display:this.props.user.admin===true?"block":this.props.identity < 4 && ChallengesDataList.shixun_status === 0 ? "block" : 'none' }}
className="fl ring-op-green mr25">
<img src={getImageUrl("images/educoder/icon/moveup.svg")}
className="fl mt2 ml4" />
@ -381,7 +381,7 @@ class Challenges extends Component {
{item.down_url != undefined &&
<Tooltip placement="bottom" title={"向下移动"}>
<a onClick={operationstrue===true?"":() => this.operations(item.challenge_id, "down")}
style={{ display: this.props.identity < 4 && this.props.status === 0 ? "block" : 'none' }}
style={{ display: this.props.user.admin===true?"block":this.props.identity < 4 && ChallengesDataList.shixun_status=== 0 ? "block" : 'none' }}
className="fl ring-op-green mr25">
<img src={getImageUrl("images/educoder/icon/movedown.svg")} className="fl mt2 ml4" />
</a>
@ -393,7 +393,7 @@ class Challenges extends Component {
item.st === 1 ?
<Tooltip placement="bottom" title={"编辑"}>
<a
style={{ display: this.props.identity < 4 && this.props.status < 3 ? "block" : 'none' }}
style={{ display:this.props.user.admin===true?"block":this.props.identity < 4 && ChallengesDataList.shixun_status< 3 ? "block" : 'none' }}
href={"/shixuns/" + ChallengesDataList.shixun_identifier + "/challenges/" + item.challenge_id + "/editquestion"}
className="fl ring-green">
<img src={getImageUrl("images/educoder/icon/edit.svg")}
@ -403,7 +403,7 @@ class Challenges extends Component {
:
<Tooltip placement="bottom" title={"编辑"}>
<a
style={{ display: this.props.identity < 4 && this.props.status < 3 ? "block" : 'none' }}
style={{ display:this.props.user.admin===true?"block":this.props.identity < 4 && ChallengesDataList.shixun_status < 3 ? "block" : 'none' }}
href={"/shixuns/" + ChallengesDataList.shixun_identifier + "/challenges/" + item.challenge_id + "/editcheckpoint"}
className="fl ring-green">
<img src={getImageUrl("images/educoder/icon/edit.svg")}

Loading…
Cancel
Save