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

dev_item_bank^2
daiao 5 years ago
commit c2b17eba04

@ -38,7 +38,7 @@
</p> </p>
<p style="color:#333; "> <p style="color:#333; ">
您参与的课堂:<%= @course.name %>,有新的帖子发布了: 您参与的课堂:<%= @course.name %>,有新的帖子发布了:
<a href="https://www.educoder.net/courses/<%= @course.id %>/boards/<%= @message.board_id %>/messages/<%= @message.id %>" style="font-weight: normal; color:#ff7500;"><%= @message.subject %></a> <a href="https://www.educoder.net/classrooms/<%= @course.id %>/boards/<%= @message.board_id %>/messages/<%= @message.id %>" style="font-weight: normal; color:#ff7500;"><%= @message.subject %></a>
</p> </p>
<div style="text-align: center; margin-top:40px;"> <div style="text-align: center; margin-top:40px;">
<span style="font-weight: normal;color:#666;"> <span style="font-weight: normal;color:#666;">

@ -86,7 +86,7 @@ html, body {
/* antd扩展 */ /* antd扩展 */
.formItemInline.ant-form-item { .formItemInline.ant-form-item {
display: flex; display: flex;
} }
.formItemInline .ant-form-item-control-wrapper { .formItemInline .ant-form-item-control-wrapper {
@ -104,4 +104,4 @@ html, body {
.newContainers { .newContainers {
min-height: calc(100% - 60px) !important; min-height: calc(100% - 60px) !important;
} }
} }

@ -693,7 +693,7 @@ class App extends Component {
} }
></Route> ></Route>
{/*课堂*/} {/*课堂*/}
<Route path="/courses" component={CoursesIndex} {...this.props} {...this.state}></Route> <Route path="/classrooms" component={CoursesIndex} {...this.props} {...this.state}></Route>
{/* <Route path="/forums" component={ForumsIndexComponent}> {/* <Route path="/forums" component={ForumsIndexComponent}>
</Route> */} </Route> */}

@ -29,7 +29,7 @@ class College extends Component {
align: 'center', align: 'center',
className: "edu-txt-center font-14 maxnamewidth247", className: "edu-txt-center font-14 maxnamewidth247",
render: (text, record) => ( render: (text, record) => (
<a href={`/courses/${record.id}/students`} title={record.name} target="_blank" className="d-inline-block text-truncate maxnamewidth247" <a href={`/classrooms/${record.id}/students`} title={record.name} target="_blank" className="d-inline-block text-truncate maxnamewidth247"
style={{ style={{
maxWidth:'220px', maxWidth:'220px',
color:'#007bff', color:'#007bff',

@ -254,15 +254,15 @@ class CompetitionCommon extends Component{
if(url===undefined){ if(url===undefined){
let {data,signupdata}=this.state; let {data,signupdata}=this.state;
// if(signupdata.enrolled===true){ // if(signupdata.enrolled===true){
// this.props.history.replace(`/courses/${data.course_id}`); // this.props.history.replace(`/classrooms/${data.course_id}`);
// }else{ } // }else{ }
if (data.member_of_course === true) { if (data.member_of_course === true) {
// this.props.history.replace(`/courses/${data.course_id}`); // this.props.history.replace(`/classrooms/${data.course_id}`);
window.open(`/courses/${data.course_id}`) window.open(`/classrooms/${data.course_id}`)
} else { } else {
// 以学生身份调用加入课堂 进入课堂首页 // 以学生身份调用加入课堂 进入课堂首页
let url = "/courses/apply_to_join_course.json" let url = "/classrooms/apply_to_join_course.json"
axios.post(url, { axios.post(url, {
invite_code: data.invite_code, invite_code: data.invite_code,
student: 1 student: 1
@ -271,7 +271,7 @@ class CompetitionCommon extends Component{
if (response.data.status === 0) { if (response.data.status === 0) {
// this.props.history.replace(); // this.props.history.replace();
this.getbannerdata() this.getbannerdata()
window.open(`/courses/${data.course_id}`); window.open(`/classrooms/${data.course_id}`);
} }
}) })
@ -409,7 +409,7 @@ class CompetitionCommon extends Component{
{data.competition_status === "ended" ? {data.competition_status === "ended" ?
<div className={data.mode === 2 ?data.member_of_course==true?"gutter-box CompetitionsIndexbottomvalue Competitioncolor516 cursorpointer":"gutter-box CompetitionsIndexbottomvalue Competitioncolor516":"gutter-box CompetitionsIndexbottomvalue Competitioncolor516 cursorpointer"} <div className={data.mode === 2 ?data.member_of_course==true?"gutter-box CompetitionsIndexbottomvalue Competitioncolor516 cursorpointer":"gutter-box CompetitionsIndexbottomvalue Competitioncolor516":"gutter-box CompetitionsIndexbottomvalue Competitioncolor516 cursorpointer"}
// 已结束onClick={data.competition_status === "nearly_published" ? "" : () => this.gotocourse(`/competitions/${this.props.match.params.identifier}/enroll`)} // 已结束onClick={data.competition_status === "nearly_published" ? "" : () => this.gotocourse(`/competitions/${this.props.match.params.identifier}/enroll`)}
onClick={ data.mode === 2 ?data.member_of_course==true?() => this.newgotocourse(`/courses/${data.course_id}`):"":() => this.newgotocourse(`/competitions/${this.props.match.params.identifier}/enroll`)} onClick={ data.mode === 2 ?data.member_of_course==true?() => this.newgotocourse(`/classrooms/${data.course_id}`):"":() => this.newgotocourse(`/competitions/${this.props.match.params.identifier}/enroll`)}
>{data && data.member_count}</div> >{data && data.member_count}</div>
:data.competition_status === "nearly_published" ? :data.competition_status === "nearly_published" ?
<div className="gutter-box CompetitionsIndexbottomvalue Competitioncolor516" <div className="gutter-box CompetitionsIndexbottomvalue Competitioncolor516"

@ -1,100 +1,100 @@
import React, { Component } from 'react'; import React, { Component } from 'react';
import { SnackbarHOC } from 'educoder'; import { SnackbarHOC } from 'educoder';
import {BrowserRouter as Router,Route,Switch} from 'react-router-dom'; import {BrowserRouter as Router,Route,Switch} from 'react-router-dom';
import Loadable from 'react-loadable'; import Loadable from 'react-loadable';
import Loading from '../../Loading'; import Loading from '../../Loading';
import axios from 'axios'; import axios from 'axios';
// import { TPMIndexHOC } from '../tpm/TPMIndexHOC'; // import { TPMIndexHOC } from '../tpm/TPMIndexHOC';
import { CNotificationHOC } from './common/CNotificationHOC' import { CNotificationHOC } from './common/CNotificationHOC'
import "./css/Courses.css" import "./css/Courses.css"
//引入对应跳转的组件 //引入对应跳转的组件
const ListPageIndex = Loadable({ const ListPageIndex = Loadable({
loader: () => import('./ListPageIndex'), loader: () => import('./ListPageIndex'),
loading:Loading, loading:Loading,
}) })
// 讨论 // 讨论
const BoardsNew= Loadable({ const BoardsNew= Loadable({
loader: () => import('./boards/BoardsNew'), loader: () => import('./boards/BoardsNew'),
loading: Loading, loading: Loading,
}) })
const TopicDetail= Loadable({ const TopicDetail= Loadable({
loader: () => import('./boards/TopicDetail'), loader: () => import('./boards/TopicDetail'),
loading: Loading, loading: Loading,
}) })
// 讨论 // 讨论
const Boards= Loadable({ const Boards= Loadable({
loader: () => import('./boards'), loader: () => import('./boards'),
loading: Loading, loading: Loading,
}) })
class CoursesIndex extends Component{ class CoursesIndex extends Component{
constructor(props) { constructor(props) {
super(props) super(props)
this.state={ this.state={
// coursedata:undefined // coursedata:undefined
} }
} }
componentDidMount(){ componentDidMount(){
} }
render() { render() {
const common = { const common = {
} }
return ( return (
<Switch {...this.props}> <Switch {...this.props}>
{/*课堂讨论*/} {/*课堂讨论*/}
{/* /board/5464/messages/new */} {/* /board/5464/messages/new */}
{/* <Route exact path="/courses/:coursesId/board/:boardId/messages/:topicId/edit" {/* <Route exact path="/classrooms/:coursesId/board/:boardId/messages/:topicId/edit"
render={ render={
(props) => (<BoardsNew {...this.props} {...props} {...this.state} {...common} />) (props) => (<BoardsNew {...this.props} {...props} {...this.state} {...common} />)
} }
></Route> ></Route>
<Route exact path="/courses/:coursesId/board/:boardId/messages/new" component={BoardsNew} <Route exact path="/classrooms/:coursesId/board/:boardId/messages/new" component={BoardsNew}
render={ render={
(props) => (<BoardsNew {...this.props} {...props} {...this.state} {...common} />) (props) => (<BoardsNew {...this.props} {...props} {...this.state} {...common} />)
} }
></Route> */} ></Route> */}
{/*课堂讨论*/} {/*课堂讨论*/}
<Route exact path="/courses/:coursesId/boards/:boardId/messages/:topicId/edit" <Route exact path="/classrooms/:coursesId/boards/:boardId/messages/:topicId/edit"
render={ render={
(props) => (<BoardsNew {...this.props} {...props} {...this.state} {...common} />) (props) => (<BoardsNew {...this.props} {...props} {...this.state} {...common} />)
} }
></Route> ></Route>
<Route exact path="/courses/:coursesId/boards/:boardId/messages/new" <Route exact path="/classrooms/:coursesId/boards/:boardId/messages/new"
render={ render={
(props) => (<BoardsNew {...this.props} {...props} {...this.state} {...common} />) (props) => (<BoardsNew {...this.props} {...props} {...this.state} {...common} />)
} }
></Route> ></Route>
<Route exact path="/courses/:coursesId/boards/:boardId/messages/:topicId" <Route exact path="/classrooms/:coursesId/boards/:boardId/messages/:topicId"
render={ render={
(props) => (<TopicDetail {...this.props} {...this.state} {...props} {...common} />) (props) => (<TopicDetail {...this.props} {...this.state} {...props} {...common} />)
} }
></Route> ></Route>
<Route exact path="/courses/:coursesId/boards/:boardId/messages/:topicId" <Route exact path="/classrooms/:coursesId/boards/:boardId/messages/:topicId"
render={ render={
(props) => (<TopicDetail {...this.props} {...this.state} {...props} {...common} />) (props) => (<TopicDetail {...this.props} {...this.state} {...props} {...common} />)
} }
></Route> ></Route>
<Route exact path="/courses/:coursesId/boards/:boardId" <Route exact path="/classrooms/:coursesId/boards/:boardId"
render={ render={
(props) => (<ListPageIndex {...this.props} {...props} {...this.state} {...common} />) (props) => (<ListPageIndex {...this.props} {...props} {...this.state} {...common} />)
} }
></Route> ></Route>
</Switch> </Switch>
) )
} }
} }
export default CNotificationHOC() ( SnackbarHOC() ( (CoursesIndex) )); export default CNotificationHOC() ( SnackbarHOC() ( (CoursesIndex) ));

@ -502,40 +502,40 @@ class CoursesIndex extends Component{
return ( return (
<Switch {...this.props}> <Switch {...this.props}>
{/*排序*/} {/*排序*/}
<Route path="/courses/:coursesId/ordering/:ordering_type/:main_id" <Route path="/classrooms/:coursesId/ordering/:ordering_type/:main_id"
render={ render={
(props) => (<Ordering {...this.props} {...props} {...this.state} />) (props) => (<Ordering {...this.props} {...props} {...this.state} />)
} }
></Route> ></Route>
{/*视频列表*/} {/*视频列表*/}
<Route path="/courses/:coursesId/course_video/:videoId" <Route path="/classrooms/:coursesId/course_video/:videoId"
render={ render={
(props) => (<ListPageIndex {...this.props} {...props} {...this.state} />) (props) => (<ListPageIndex {...this.props} {...props} {...this.state} />)
} }
></Route> ></Route>
<Route path="/courses/:coursesId/course_videos" <Route path="/classrooms/:coursesId/course_videos"
render={ render={
(props) => (<ListPageIndex {...this.props} {...props} {...this.state} />) (props) => (<ListPageIndex {...this.props} {...props} {...this.state} />)
} }
></Route> ></Route>
{/* 资源列表页 */} {/* 资源列表页 */}
<Route path="/courses/:coursesId/file/:Id" exact <Route path="/classrooms/:coursesId/file/:Id" exact
render={ render={
(props) => (<ListPageIndex {...this.props} {...props} {...this.state} {...common}/>) (props) => (<ListPageIndex {...this.props} {...props} {...this.state} {...common}/>)
} }
></Route> ></Route>
<Route path="/courses/:coursesId/files/:main_id" <Route path="/classrooms/:coursesId/files/:main_id"
render={ render={
(props) => (<ListPageIndex {...this.props} {...props} {...this.state} {...common}/>) (props) => (<ListPageIndex {...this.props} {...props} {...this.state} {...common}/>)
} }
></Route> ></Route>
<Route exact path="/courses/:coursesId/boards/:boardId" <Route exact path="/classrooms/:coursesId/boards/:boardId"
render={ render={
(props) => (<ListPageIndex {...this.props} {...props} {...this.state} {...common}/>) (props) => (<ListPageIndex {...this.props} {...props} {...this.state} {...common}/>)
} }
></Route> ></Route>
{/*课堂讨论*/} {/*课堂讨论*/}
<Route path="/courses/:coursesId/boards/:boardId" <Route path="/classrooms/:coursesId/boards/:boardId"
render={ render={
(props) => (<BoardIndex {...this.props} {...props} {...this.state} {...common}/>) (props) => (<BoardIndex {...this.props} {...props} {...this.state} {...common}/>)
} }
@ -543,32 +543,32 @@ class CoursesIndex extends Component{
{/* 毕业设计 */} {/* 毕业设计 */}
{/* 毕设问答 */} {/* 毕设问答 */}
<Route path="/courses/:coursesId/graduation_topics/postwork/new" <Route path="/classrooms/:coursesId/graduation_topics/postwork/new"
render={ render={
(props) => (<GraduateTopicPostWorksNew {...this.props} {...props} {...this.state} {...common}/>) (props) => (<GraduateTopicPostWorksNew {...this.props} {...props} {...this.state} {...common}/>)
} }
></Route> ></Route>
{/* 毕设选题新建页 */} {/* 毕设选题新建页 */}
<Route path="/courses/:coursesId/graduation_topics/new" <Route path="/classrooms/:coursesId/graduation_topics/new"
render={ render={
(props) => (<GraduateTopicNew {...this.props} {...props} {...this.state} {...common}/>) (props) => (<GraduateTopicNew {...this.props} {...props} {...this.state} {...common}/>)
}></Route> }></Route>
{/* 毕设选题编辑页*/} {/* 毕设选题编辑页*/}
<Route path="/courses/:coursesId/graduation_topics/:topicId/edit" <Route path="/classrooms/:coursesId/graduation_topics/:topicId/edit"
render={ render={
(props) => (<GraduateTopicNew {...this.props} {...props} {...this.state} {...common}/>) (props) => (<GraduateTopicNew {...this.props} {...props} {...this.state} {...common}/>)
}></Route> }></Route>
{/* 毕设选题详情页 */} {/* 毕设选题详情页 */}
<Route path="/courses/:course_id/graduation_topics/:graduation_topic_id/detail" <Route path="/classrooms/:course_id/graduation_topics/:graduation_topic_id/detail"
render={ render={
(props)=>(<GraduationTopicsDetail {...this.props} {...props} {...this.state}></GraduationTopicsDetail>) (props)=>(<GraduationTopicsDetail {...this.props} {...props} {...this.state}></GraduationTopicsDetail>)
} }
></Route> ></Route>
{/* 毕设选题列表 */} {/* 毕设选题列表 */}
<Route path="/courses/:coursesId/graduation_topics/:Id" exact <Route path="/classrooms/:coursesId/graduation_topics/:Id" exact
render={ render={
(props) => (<ListPageIndex {...this.props} {...props} {...this.state} {...common}/>) (props) => (<ListPageIndex {...this.props} {...props} {...this.state} {...common}/>)
}></Route> }></Route>
@ -576,21 +576,21 @@ class CoursesIndex extends Component{
{/*————————————————————————————————————————————————————————————————————————————————————*/} {/*————————————————————————————————————————————————————————————————————————————————————*/}
{/* 作品评阅 https://www.trustie.net/issues/19981 */} {/* 作品评阅 https://www.trustie.net/issues/19981 */}
<Route path="/courses/:coursesId/graduation_tasks/:category_id/appraise" <Route path="/classrooms/:coursesId/graduation_tasks/:category_id/appraise"
render={ render={
(props) => (<GraduationTasksappraise {...this.props} {...props} {...this.state} {...common}/>) (props) => (<GraduationTasksappraise {...this.props} {...props} {...this.state} {...common}/>)
} }
></Route> ></Route>
{/* 新建作品 */} {/* 新建作品 */}
<Route path="/courses/:coursesId/graduation_tasks/:category_id/works/:task_Id/new" <Route path="/classrooms/:coursesId/graduation_tasks/:category_id/works/:task_Id/new"
render={ render={
(props) => (<GraduationTasksSubmitnewApp {...this.props} {...props} {...this.state} {...common}/>) (props) => (<GraduationTasksSubmitnewApp {...this.props} {...props} {...this.state} {...common}/>)
} }
></Route> ></Route>
{/* 修改作品 */} {/* 修改作品 */}
<Route path="/courses/:coursesId/graduation_tasks/:category_id/works/:work_Id/edit" <Route path="/classrooms/:coursesId/graduation_tasks/:category_id/works/:work_Id/edit"
render={ render={
(props) => (<GraduationTasksSubmiteditApp {...this.props} {...props} {...this.state} {...common}/>) (props) => (<GraduationTasksSubmiteditApp {...this.props} {...props} {...this.state} {...common}/>)
} }
@ -598,20 +598,20 @@ class CoursesIndex extends Component{
{/* 设置毕设任务 https://www.trustie.net/issues/19981 */} {/* 设置毕设任务 https://www.trustie.net/issues/19981 */}
{/* <Route path="/courses/:coursesId/graduation_tasks/:category_id/:task_Id/setting" {/* <Route path="/classrooms/:coursesId/graduation_tasks/:category_id/:task_Id/setting"
render={ render={
(props) => (<GraduationTaskssetting {...this.props} {...props} {...this.state} {...common}/>) (props) => (<GraduationTaskssetting {...this.props} {...props} {...this.state} {...common}/>)
} }
></Route> ></Route>
<Route path="/courses/:coursesId/graduation_tasks/:category_id/:task_Id/questions" <Route path="/classrooms/:coursesId/graduation_tasks/:category_id/:task_Id/questions"
render={ render={
(props) => (<GraduationTasksquestions {...this.props} {...props} {...this.state} />) (props) => (<GraduationTasksquestions {...this.props} {...props} {...this.state} />)
}></Route> */} }></Route> */}
<Route path="/courses/:coursesId/graduation_tasks/:category_id/detail/:task_Id" <Route path="/classrooms/:coursesId/graduation_tasks/:category_id/detail/:task_Id"
render={ render={
(props) => (<GraduationTaskssettinglist {...this.props} {...props} {...this.state} {...common}/>) (props) => (<GraduationTaskssettinglist {...this.props} {...props} {...this.state} {...common}/>)
} }
@ -619,7 +619,7 @@ class CoursesIndex extends Component{
{/* 修改毕设任务 https://www.trustie.net/issues/19981 */} {/* 修改毕设任务 https://www.trustie.net/issues/19981 */}
<Route path="/courses/:coursesId/graduation_tasks/:category_id/edit" <Route path="/classrooms/:coursesId/graduation_tasks/:category_id/edit"
render={ render={
(props) => (<GraduationTaskseditApp {...this.props} {...props} {...this.state} {...common}/>) (props) => (<GraduationTaskseditApp {...this.props} {...props} {...this.state} {...common}/>)
} }
@ -627,7 +627,7 @@ class CoursesIndex extends Component{
{/* 新建毕设任务 https://www.trustie.net/issues/19981 */} {/* 新建毕设任务 https://www.trustie.net/issues/19981 */}
<Route path="/courses/:coursesId/graduation_tasks/:category_id/new" <Route path="/classrooms/:coursesId/graduation_tasks/:category_id/new"
render={ render={
(props) => (<GraduationTasksnewApp {...this.props} {...props} {...this.state} {...common}/>) (props) => (<GraduationTasksnewApp {...this.props} {...props} {...this.state} {...common}/>)
} }
@ -635,104 +635,104 @@ class CoursesIndex extends Component{
{/* 毕设任务列表 https://www.trustie.net/issues/19981 */} {/* 毕设任务列表 https://www.trustie.net/issues/19981 */}
<Route path="/courses/:coursesId/graduation_tasks/:Id" exact <Route path="/classrooms/:coursesId/graduation_tasks/:Id" exact
render={ render={
(props) => (<ListPageIndex {...this.props} {...props} {...this.state} {...common}/>) (props) => (<ListPageIndex {...this.props} {...props} {...this.state} {...common}/>)
} }
></Route> ></Route>
{/*/!* 毕业设计主 https://www.trustie.net/issues/19981 *!/*/} {/*/!* 毕业设计主 https://www.trustie.net/issues/19981 *!/*/}
{/*<Route path="/courses/:coursesId/graduation"*/} {/*<Route path="/classrooms/:coursesId/graduation"*/}
{/*render={*/} {/*render={*/}
{/*(props) => (<GraduationTopics {...this.props} {...props} {...this.state} {...common}/>)*/} {/*(props) => (<GraduationTopics {...this.props} {...props} {...this.state} {...common}/>)*/}
{/*}*/} {/*}*/}
{/*></Route>*/} {/*></Route>*/}
{/*/!* 资源子目录 https://www.trustie.net/issues/19917 *!/*/} {/*/!* 资源子目录 https://www.trustie.net/issues/19917 *!/*/}
{/*<Route path="/courses/:coursesId/attachment/attachment/:attachmentId"*/} {/*<Route path="/classrooms/:coursesId/attachment/attachment/:attachmentId"*/}
{/*render={*/} {/*render={*/}
{/*(props) => (<Files {...this.props} {...props} {...this.state} {...common}/>)*/} {/*(props) => (<Files {...this.props} {...props} {...this.state} {...common}/>)*/}
{/*}*/} {/*}*/}
{/*></Route>*/} {/*></Route>*/}
{/* 教师列表*/} {/* 教师列表*/}
<Route path="/courses/:coursesId/teachers" <Route path="/classrooms/:coursesId/teachers"
render={ render={
(props) => (<ListPageIndex {...this.props} {...props} {...this.state} {...common}/>) (props) => (<ListPageIndex {...this.props} {...props} {...this.state} {...common}/>)
} }
></Route> ></Route>
{/* 学生列表*/} {/* 学生列表*/}
<Route path="/courses/:coursesId/students" <Route path="/classrooms/:coursesId/students"
render={ render={
(props) => (<ListPageIndex {...this.props} {...props} {...this.state} {...common}/>) (props) => (<ListPageIndex {...this.props} {...props} {...this.state} {...common}/>)
} }
></Route> ></Route>
{/* 分班列表 */} {/* 分班列表 */}
<Route path="/courses/:coursesId/course_groups/:course_group_id" <Route path="/classrooms/:coursesId/course_groups/:course_group_id"
render={ render={
(props) => (<ListPageIndex {...this.props} {...props} {...this.state} {...common}/>) (props) => (<ListPageIndex {...this.props} {...props} {...this.state} {...common}/>)
} }
></Route> ></Route>
<Route path="/courses/:coursesId/course_groups" <Route path="/classrooms/:coursesId/course_groups"
render={ render={
(props) => (<ListPageIndex {...this.props} {...props} {...this.state} {...common}/>) (props) => (<ListPageIndex {...this.props} {...props} {...this.state} {...common}/>)
} }
></Route> ></Route>
{/* 普通作业 */} {/* 普通作业 */}
<Route path="/courses/:coursesId/common_homeworks/:category_id" exact <Route path="/classrooms/:coursesId/common_homeworks/:category_id" exact
render={ render={
(props) => (<ListPageIndex {...this.props} {...props} {...this.state} {...common}/>) (props) => (<ListPageIndex {...this.props} {...props} {...this.state} {...common}/>)
} }
></Route> ></Route>
{/* 分组作业 */} {/* 分组作业 */}
<Route path="/courses/:coursesId/group_homeworks/:category_id" exact <Route path="/classrooms/:coursesId/group_homeworks/:category_id" exact
render={ render={
(props) => (<ListPageIndex {...this.props} {...props} {...this.state} {...common}/>) (props) => (<ListPageIndex {...this.props} {...props} {...this.state} {...common}/>)
} }
></Route> ></Route>
{/* 普通作业 */} {/* 普通作业 */}
<Route path="/courses/:coursesId/common_homeworks/" strict <Route path="/classrooms/:coursesId/common_homeworks/" strict
render={ render={
(props) => (<CommonWork {...this.props} {...props} {...this.state} {...common}/>) (props) => (<CommonWork {...this.props} {...props} {...this.state} {...common}/>)
} }
></Route> ></Route>
{/* 分组作业 */} {/* 分组作业 */}
<Route path="/courses/:coursesId/group_homeworks/" strict <Route path="/classrooms/:coursesId/group_homeworks/" strict
render={ render={
(props) => (<GroupWork {...this.props} {...props} {...this.state} {...common}/>) (props) => (<GroupWork {...this.props} {...props} {...this.state} {...common}/>)
} }
></Route> ></Route>
{/* 问卷答题 */} {/* 问卷答题 */}
<Route path="/courses/:coursesId/polls/:pollId/users/:login" <Route path="/classrooms/:coursesId/polls/:pollId/users/:login"
render={ render={
(props) => (<PollInfo {...this.props} {...props} {...this.state} {...common}/>) (props) => (<PollInfo {...this.props} {...props} {...this.state} {...common}/>)
} }
></Route> ></Route>
{/* 问卷详情 */} {/* 问卷详情 */}
<Route path="/courses/:coursesId/polls/:pollId/detail" <Route path="/classrooms/:coursesId/polls/:pollId/detail"
render={ render={
(props) => (<PollDetail {...this.props} {...props} {...this.state} {...common}/>) (props) => (<PollDetail {...this.props} {...props} {...this.state} {...common}/>)
} }
></Route> ></Route>
{/* 问卷新建 */} {/* 问卷新建 */}
<Route path="/courses/:coursesId/polls/:pollid/:news" <Route path="/classrooms/:coursesId/polls/:pollid/:news"
render={ render={
(props) => (<PollNew {...this.props} {...props} {...this.state} {...common}/>) (props) => (<PollNew {...this.props} {...props} {...this.state} {...common}/>)
} }
></Route> ></Route>
{/*/!* 问卷编辑 *!/*/} {/*/!* 问卷编辑 *!/*/}
{/*<Route path="/courses/:coursesId/polls/:pollid/:news"*/} {/*<Route path="/classrooms/:coursesId/polls/:pollid/:news"*/}
{/*render={*/} {/*render={*/}
{/*(props) => (<PollNew {...this.props} {...props} {...this.state} {...common} />)*/} {/*(props) => (<PollNew {...this.props} {...props} {...this.state} {...common} />)*/}
{/*}*/} {/*}*/}
{/*></Route>*/} {/*></Route>*/}
{/* 问卷 */} {/* 问卷 */}
<Route path="/courses/:coursesId/polls/:Id" <Route path="/classrooms/:coursesId/polls/:Id"
render={ render={
(props) => (<ListPageIndex {...this.props} {...props} {...this.state} {...common}/>) (props) => (<ListPageIndex {...this.props} {...props} {...this.state} {...common}/>)
} }
@ -740,20 +740,20 @@ class CoursesIndex extends Component{
{/* 试卷查看/评阅 */} {/* 试卷查看/评阅 */}
<Route exact path="/courses/:coursesId/exercises/:Id/users/:userId" <Route exact path="/classrooms/:coursesId/exercises/:Id/users/:userId"
render={ render={
(props)=>(<ExerciseReviewAndAnswer {...this.props} {...props} {...this.state} {...common}/>) (props)=>(<ExerciseReviewAndAnswer {...this.props} {...props} {...this.state} {...common}/>)
} }
></Route> ></Route>
{/*试卷新建 */} {/*试卷新建 */}
<Route exact path="/courses/:coursesId/exercises/new" <Route exact path="/classrooms/:coursesId/exercises/new"
render={ render={
(props) => (<ExerciseNew {...this.props} {...props} {...this.state} {...common}/>) (props) => (<ExerciseNew {...this.props} {...props} {...this.state} {...common}/>)
} }
></Route> ></Route>
{/*试卷新建 */} {/*试卷新建 */}
<Route exact path="/courses/:coursesId/exercises/:Id/edit" <Route exact path="/classrooms/:coursesId/exercises/:Id/edit"
render={ render={
(props) => (<ExerciseNew {...this.props} {...props} {...this.state} {...common}/>) (props) => (<ExerciseNew {...this.props} {...props} {...this.state} {...common}/>)
} }
@ -761,7 +761,7 @@ class CoursesIndex extends Component{
{/*试卷设置主页*/} {/*试卷设置主页*/}
<Route path="/courses/:coursesId/exercises/:Id/student_exercise_list" <Route path="/classrooms/:coursesId/exercises/:Id/student_exercise_list"
render={ render={
(props) => (<Testpapersettinghomepage {...this.props} {...props} {...this.state} {...common}/>) (props) => (<Testpapersettinghomepage {...this.props} {...props} {...this.state} {...common}/>)
} }
@ -770,14 +770,14 @@ class CoursesIndex extends Component{
{/*学生完成列表*/} {/*学生完成列表*/}
<Route <Route
path="/courses/:coursesId/exercises/:Id/Studentshavecompletedthelist" path="/classrooms/:coursesId/exercises/:Id/Studentshavecompletedthelist"
render={ render={
(props) => (<Studentshavecompletedthelist {...this.props} {...props} {...this.state} {...common}/>) (props) => (<Studentshavecompletedthelist {...this.props} {...props} {...this.state} {...common}/>)
} }
> >
</Route> </Route>
{/* 试卷 */} {/* 试卷 */}
<Route path="/courses/:coursesId/exercises/:Id" <Route path="/classrooms/:coursesId/exercises/:Id"
render={ render={
(props) => (<ListPageIndex {...this.props} {...props} {...this.state} {...common}/>) (props) => (<ListPageIndex {...this.props} {...props} {...this.state} {...common}/>)
} }
@ -785,95 +785,95 @@ class CoursesIndex extends Component{
{/*实训查重详情*/} {/*实训查重详情*/}
<Route path="/courses/:coursesId/shixun_homeworks/:homeworkid/review_detail/:userid" <Route path="/classrooms/:coursesId/shixun_homeworks/:homeworkid/review_detail/:userid"
render={ render={
(props) => (<ShixunWorkDetails {...this.props} {...props} {...this.state} {...common}/>) (props) => (<ShixunWorkDetails {...this.props} {...props} {...this.state} {...common}/>)
} }
></Route> ></Route>
<Route path="/courses/:coursesId/shixun_homework/:homeworkid/review_detail/:userid" <Route path="/classrooms/:coursesId/shixun_homework/:homeworkid/review_detail/:userid"
render={ render={
(props) => (<ShixunWorkDetails {...this.props} {...props} {...this.state} {...common}/>) (props) => (<ShixunWorkDetails {...this.props} {...props} {...this.state} {...common}/>)
} }
></Route> ></Route>
{/*实训查重列表*/} {/*实训查重列表*/}
<Route path="/courses/:coursesId/shixun_homeworks/:homeworkid/student_work" <Route path="/classrooms/:coursesId/shixun_homeworks/:homeworkid/student_work"
render={ render={
(props) => (<ShixunHomeworkPage {...this.props} {...props} {...this.state} {...common}/>) (props) => (<ShixunHomeworkPage {...this.props} {...props} {...this.state} {...common}/>)
} }
></Route> ></Route>
<Route path="/courses/:coursesId/shixun_homework/:homeworkid/student_work" <Route path="/classrooms/:coursesId/shixun_homework/:homeworkid/student_work"
render={ render={
(props) => (<ShixunHomeworkPage {...this.props} {...props} {...this.state} {...common}/>) (props) => (<ShixunHomeworkPage {...this.props} {...props} {...this.state} {...common}/>)
} }
></Route> ></Route>
{/*实训报告*/} {/*实训报告*/}
<Route path="/courses/:coursesId/shixun_homeworks/:homeworkid/shixun_work_report" <Route path="/classrooms/:coursesId/shixun_homeworks/:homeworkid/shixun_work_report"
render={ render={
(props) => (<ShixunWorkReport {...this.props} {...props} {...this.state} {...common}/>) (props) => (<ShixunWorkReport {...this.props} {...props} {...this.state} {...common}/>)
} }
></Route> ></Route>
<Route path="/courses/:coursesId/shixun_homework/:homeworkid/shixun_work_report" <Route path="/classrooms/:coursesId/shixun_homework/:homeworkid/shixun_work_report"
render={ render={
(props) => (<ShixunWorkReport {...this.props} {...props} {...this.state} {...common}/>) (props) => (<ShixunWorkReport {...this.props} {...props} {...this.state} {...common}/>)
} }
></Route> ></Route>
{/*教师列表*/} {/*教师列表*/}
<Route path="/courses/:coursesId/shixun_homeworks/:homeworkid/list" <Route path="/classrooms/:coursesId/shixun_homeworks/:homeworkid/list"
render={ render={
(props) => (<ShixunHomeworkPage {...this.props} {...props} {...this.state} {...common}/>) (props) => (<ShixunHomeworkPage {...this.props} {...props} {...this.state} {...common}/>)
} }
></Route> ></Route>
<Route path="/courses/:coursesId/shixun_homework/:homeworkid/list" <Route path="/classrooms/:coursesId/shixun_homework/:homeworkid/list"
render={ render={
(props) => (<ShixunHomeworkPage {...this.props} {...props} {...this.state} {...common}/>) (props) => (<ShixunHomeworkPage {...this.props} {...props} {...this.state} {...common}/>)
} }
></Route> ></Route>
{/*实训作业page*/} {/*实训作业page*/}
<Route path="/courses/:coursesId/shixun_homeworks/:homeworkid/Page" <Route path="/classrooms/:coursesId/shixun_homeworks/:homeworkid/Page"
render={ render={
(props) => (<ShixunHomeworkPage {...this.props} {...props} {...this.state} {...common}/>) (props) => (<ShixunHomeworkPage {...this.props} {...props} {...this.state} {...common}/>)
} }
></Route> ></Route>
{/*实训作业设置*/} {/*实训作业设置*/}
<Route path="/courses/:coursesId/shixun_homeworks/:homeworkid/settings" <Route path="/classrooms/:coursesId/shixun_homeworks/:homeworkid/settings"
render={ render={
(props) => (<ShixunHomeworkPage {...this.props} {...props} {...this.state} {...common}/>) (props) => (<ShixunHomeworkPage {...this.props} {...props} {...this.state} {...common}/>)
} }
></Route> ></Route>
<Route path="/courses/:coursesId/shixun_homework/:homeworkid/settings" <Route path="/classrooms/:coursesId/shixun_homework/:homeworkid/settings"
render={ render={
(props) => (<ShixunHomeworkPage {...this.props} {...props} {...this.state} {...common}/>) (props) => (<ShixunHomeworkPage {...this.props} {...props} {...this.state} {...common}/>)
} }
></Route> ></Route>
{/*/!*实训作品列表教师*!/*/} {/*/!*实训作品列表教师*!/*/}
{/*提交总结*/} {/*提交总结*/}
<Route path="/courses/:coursesId/shixun_homeworks/:id/commitsummary/:homeworkid" <Route path="/classrooms/:coursesId/shixun_homeworks/:id/commitsummary/:homeworkid"
render={ render={
(props) => (<CommitSummary {...this.props} {...props} {...this.state} />) (props) => (<CommitSummary {...this.props} {...props} {...this.state} />)
} }
></Route> ></Route>
<Route path="/courses/:coursesId/shixun_homework/:id/commitsummary/:homeworkid" <Route path="/classrooms/:coursesId/shixun_homework/:id/commitsummary/:homeworkid"
render={ render={
(props) => (<CommitSummary {...this.props} {...props} {...this.state} />) (props) => (<CommitSummary {...this.props} {...props} {...this.state} />)
} }
></Route> ></Route>
{/*实训作品列表学生未公布*/} {/*实训作品列表学生未公布*/}
{/*<Route path="/courses/:coursesId/shixun_homeworks/:homeworkid/noopenlist"*/} {/*<Route path="/classrooms/:coursesId/shixun_homeworks/:homeworkid/noopenlist"*/}
{/* render={*/} {/* render={*/}
{/* (props) => (<Studentnotcompleted {...this.props} {...props} {...this.state} />)*/} {/* (props) => (<Studentnotcompleted {...this.props} {...props} {...this.state} />)*/}
{/* }*/} {/* }*/}
{/*></Route>*/} {/*></Route>*/}
{/*实训学生作品列表已公布*/} {/*实训学生作品列表已公布*/}
{/* <Route path="/courses/:coursesId/shixun_homeworks/:homeworkid/list"*/} {/* <Route path="/classrooms/:coursesId/shixun_homeworks/:homeworkid/list"*/}
{/* render={*/} {/* render={*/}
{/* (props) => (<ShixunHomeworkPage {...this.props} {...props} {...this.state} />)*/} {/* (props) => (<ShixunHomeworkPage {...this.props} {...props} {...this.state} />)*/}
{/* }*/} {/* }*/}
{/* ></Route>*/} {/* ></Route>*/}
{/*/!*实训学生作品列表已公布*!/*/} {/*/!*实训学生作品列表已公布*!/*/}
{/*<Route path="/courses/:coursesId/shixun_homework/:homeworkid/list"*/} {/*<Route path="/classrooms/:coursesId/shixun_homework/:homeworkid/list"*/}
{/* render={*/} {/* render={*/}
{/* (props) => (<ShixunHomeworkPage {...this.props} {...props} {...this.state} />)*/} {/* (props) => (<ShixunHomeworkPage {...this.props} {...props} {...this.state} />)*/}
{/* }*/} {/* }*/}
@ -882,21 +882,21 @@ class CoursesIndex extends Component{
{/*实训作业问答主目录*/} {/*实训作业问答主目录*/}
<Route path="/courses/:coursesId/shixun_homeworks/:homeworkid/questions" <Route path="/classrooms/:coursesId/shixun_homeworks/:homeworkid/questions"
render={ render={
(props) => (<ShixunHomeworkPage {...this.props} {...props} {...this.state} {...common}/>) (props) => (<ShixunHomeworkPage {...this.props} {...props} {...this.state} {...common}/>)
} }
></Route> ></Route>
{/*实训作业问答子目录*/} {/*实训作业问答子目录*/}
<Route path="/courses/:coursesId/shixun_homework/:homeworkid/questions" <Route path="/classrooms/:coursesId/shixun_homework/:homeworkid/questions"
render={ render={
(props) => (<ShixunHomeworkPage {...this.props} {...props} {...this.state} {...common}/>) (props) => (<ShixunHomeworkPage {...this.props} {...props} {...this.state} {...common}/>)
} }
></Route> ></Route>
{/*新建课堂*/} {/*新建课堂*/}
<Route path="/courses/new" <Route path="/classrooms/new"
render={ render={
(props) => (<WrappedCoursesNewApp {...this.props} {...props} {...this.state} {...common}/>) (props) => (<WrappedCoursesNewApp {...this.props} {...props} {...this.state} {...common}/>)
} }
@ -904,33 +904,33 @@ class CoursesIndex extends Component{
{/*新建精品课堂*/} {/*新建精品课堂*/}
{/*coursesId 课堂id */} {/*coursesId 课堂id */}
{/*id 是否是私有或者公有*/} {/*id 是否是私有或者公有*/}
<Route path="/courses/news/:subjectid/newgold/:id" <Route path="/classrooms/news/:subjectid/newgold/:id"
render={ render={
(props) => (<WrappedCoursesNewAppGoldclass {...this.props} {...props} {...this.state} {...common}/>) (props) => (<WrappedCoursesNewAppGoldclass {...this.props} {...props} {...this.state} {...common}/>)
} }
></Route> ></Route>
{/*修改精品课堂*/} {/*修改精品课堂*/}
<Route path="/courses/:coursesId/newgolds/settings" <Route path="/classrooms/:coursesId/newgolds/settings"
render={ render={
(props) => (<WrappedCoursesNewAppGoldclass {...this.props} {...props} {...this.state} {...common}/>) (props) => (<WrappedCoursesNewAppGoldclass {...this.props} {...props} {...this.state} {...common}/>)
} }
></Route> ></Route>
{/*修改课堂*/} {/*修改课堂*/}
<Route path="/courses/:coursesId/settings" <Route path="/classrooms/:coursesId/settings"
render={ render={
(props) => (<WrappedCoursesNewApp {...this.props} {...props} {...this.state} {...common}/>) (props) => (<WrappedCoursesNewApp {...this.props} {...props} {...this.state} {...common}/>)
} }
></Route> ></Route>
{/* 实训作业子页面*/} {/* 实训作业子页面*/}
<Route path="/courses/:coursesId/shixun_homework/:category_id" <Route path="/classrooms/:coursesId/shixun_homework/:category_id"
render={ render={
(props) => (<ListPageIndex {...this.props} {...props} {...this.state} {...common}/>) (props) => (<ListPageIndex {...this.props} {...props} {...this.state} {...common}/>)
} }
></Route> ></Route>
{/* 实训作业页面*/} {/* 实训作业页面*/}
<Route path="/courses/:coursesId/shixun_homeworks/:main_id" <Route path="/classrooms/:coursesId/shixun_homeworks/:main_id"
render={ render={
(props) => (<ListPageIndex {...this.props} {...props} {...this.state} {...common}/>) (props) => (<ListPageIndex {...this.props} {...props} {...this.state} {...common}/>)
} }
@ -938,26 +938,26 @@ class CoursesIndex extends Component{
{/*课堂统计列表2019.10.29 */} {/*课堂统计列表2019.10.29 */}
<Route path="/courses/:coursesId/statistics" <Route path="/classrooms/:coursesId/statistics"
render={ render={
(props) => (<ListPageIndex {...this.props} {...props} {...this.state} />) (props) => (<ListPageIndex {...this.props} {...props} {...this.state} />)
} }
></Route> ></Route>
{/*/!*实训作业and课堂详情页*!/*/} {/*/!*实训作业and课堂详情页*!/*/}
<Route path="/courses/:coursesId" <Route path="/classrooms/:coursesId"
render={ render={
(props) => (<ListPageIndex {...this.props} {...props} {...this.state} {...common}/>) (props) => (<ListPageIndex {...this.props} {...props} {...this.state} {...common}/>)
} }
></Route> ></Route>
{/*课堂首页*/} {/*课堂首页*/}
<Route path="/courses" <Route path="/classrooms"
render={ render={
(props) => (<CoursesHome {...this.props} {...props} {...this.state} {...common}/>) (props) => (<CoursesHome {...this.props} {...props} {...this.state} {...common}/>)
} }
></Route> ></Route>
{/*<Route exact path="/courses" component={CoursesHome} {...this.props} {...props} {...this.state} ></Route>*/} {/*<Route exact path="/classrooms" component={CoursesHome} {...this.props} {...props} {...this.state} ></Route>*/}
</Switch> </Switch>
) )

@ -223,78 +223,78 @@ class ListPageIndex extends Component{
{/* --------------------------------------------------------------------- */} {/* --------------------------------------------------------------------- */}
{/* 作业设置 */} {/* 作业设置 */}
{/* http://localhost:3007/courses/1309/homework/9300/setting */} {/* http://localhost:3007/classrooms/1309/homework/9300/setting */}
{/* 普通作业 */} {/* 普通作业 */}
<Route path="/courses/:coursesId/common_homeworks/:category_id" <Route path="/classrooms/:coursesId/common_homeworks/:category_id"
render={ render={
(props) => (<CommonWork {...this.props} {...props} {...this.state} />) (props) => (<CommonWork {...this.props} {...props} {...this.state} />)
} }
></Route> ></Route>
{/* 作品列表 */} {/* 作品列表 */}
<Route path="/courses/:coursesId/group_homeworks/:category_id" <Route path="/classrooms/:coursesId/group_homeworks/:category_id"
render={ render={
(props) => (<CommonWork {...this.props} {...props} {...this.state} />) (props) => (<CommonWork {...this.props} {...props} {...this.state} />)
} }
></Route> ></Route>
<Route exact path="/courses/:coursesId/boards/:boardId" <Route exact path="/classrooms/:coursesId/boards/:boardId"
render={ render={
(props) => (<Boards {...this.props} {...props} {...this.state} />) (props) => (<Boards {...this.props} {...props} {...this.state} />)
} }
></Route> ></Route>
{/*视频列表*/} {/*视频列表*/}
<Route path="/courses/:coursesId/course_video/:videoId" <Route path="/classrooms/:coursesId/course_video/:videoId"
render={ render={
(props) => (<CourseVideo {...this.props} {...props} {...this.state} />) (props) => (<CourseVideo {...this.props} {...props} {...this.state} />)
} }
></Route> ></Route>
<Route path="/courses/:coursesId/course_videos" <Route path="/classrooms/:coursesId/course_videos"
render={ render={
(props) => (<CourseVideo {...this.props} {...props} {...this.state} />) (props) => (<CourseVideo {...this.props} {...props} {...this.state} />)
} }
></Route> ></Route>
<Route path="/courses/:coursesId/teachers" <Route path="/classrooms/:coursesId/teachers"
render={ render={
(props) => (<TeacherList updatabanners={()=>this.updatabanners()} {...this.props} {...props} {...this.state} />) (props) => (<TeacherList updatabanners={()=>this.updatabanners()} {...this.props} {...props} {...this.state} />)
} }
></Route> ></Route>
{/* 学生列表*/} {/* 学生列表*/}
<Route path="/courses/:coursesId/students" <Route path="/classrooms/:coursesId/students"
render={ render={
(props) => (<StudentsList {...this.props} {...props} {...this.state} />) (props) => (<StudentsList {...this.props} {...props} {...this.state} />)
} }
></Route> ></Route>
<Route path="/courses/:coursesId/course_groups/:course_group_id" <Route path="/classrooms/:coursesId/course_groups/:course_group_id"
render={ render={
(props) => (<StudentsList {...this.props} {...props} {...this.state} />) (props) => (<StudentsList {...this.props} {...props} {...this.state} />)
} }
></Route> ></Route>
<Route path="/courses/:coursesId/course_groups" <Route path="/classrooms/:coursesId/course_groups"
render={ render={
(props) => (<CourseGroupList {...this.props} {...props} {...this.state} />) (props) => (<CourseGroupList {...this.props} {...props} {...this.state} />)
} }
></Route> ></Route>
<Route path="/courses/:coursesId/exercises/:Id" <Route path="/classrooms/:coursesId/exercises/:Id"
render={ render={
(props) => (<Exercise {...this.props} {...props} {...this.state} />) (props) => (<Exercise {...this.props} {...props} {...this.state} />)
} }
></Route> ></Route>
<Route path="/courses/:coursesId/polls/:Id" <Route path="/classrooms/:coursesId/polls/:Id"
render={ render={
(props) => (<Poll {...this.props} {...props} {...this.state} />) (props) => (<Poll {...this.props} {...props} {...this.state} />)
} }
></Route> ></Route>
{/* <Route path="/courses/:coursesId/file/:Id" {/* <Route path="/classrooms/:coursesId/file/:Id"
render={ render={
(props) => (<Resourcelist {...this.props} {...props} {...this.state} />) (props) => (<Resourcelist {...this.props} {...props} {...this.state} />)
} }
></Route> */} ></Route> */}
{/* 实训作业子页面*/} {/* 实训作业子页面*/}
<Route path="/courses/:coursesId/shixun_homework/:category_id" <Route path="/classrooms/:coursesId/shixun_homework/:category_id"
render={ render={
(props) => (<ShixunHomework {...this.props} {...props} {...this.state} />) (props) => (<ShixunHomework {...this.props} {...props} {...this.state} />)
} }
@ -302,7 +302,7 @@ class ListPageIndex extends Component{
{/*课堂统计列表2019.10.29 */} {/*课堂统计列表2019.10.29 */}
<Route path="/courses/:coursesId/statistics" <Route path="/classrooms/:coursesId/statistics"
render={ render={
(props) => (<Statistics {...this.props} {...props} {...this.state} />) (props) => (<Statistics {...this.props} {...props} {...this.state} />)
} }
@ -311,49 +311,49 @@ class ListPageIndex extends Component{
{/*公告栏列表*/} {/*公告栏列表*/}
<Route path="/courses/:coursesId/informs" <Route path="/classrooms/:coursesId/informs"
render={ render={
(props) => (<Eduinforms {...this.props} {...props} {...this.state} />) (props) => (<Eduinforms {...this.props} {...props} {...this.state} />)
} }
></Route> ></Route>
{/*在线学习*/} {/*在线学习*/}
<Route <Route
path="/courses/:coursesId/online_learning" path="/classrooms/:coursesId/online_learning"
render={ render={
(props) => (<Elearning {...this.props} {...props} {...this.state} comyslElearning={(i)=>this.comyslElearning(i)} />) (props) => (<Elearning {...this.props} {...props} {...this.state} comyslElearning={(i)=>this.comyslElearning(i)} />)
} }
> >
</Route> </Route>
{/* 实训作业页面*/} {/* 实训作业页面*/}
<Route path="/courses/:coursesId/shixun_homeworks/:main_id" <Route path="/classrooms/:coursesId/shixun_homeworks/:main_id"
render={ render={
(props) => (<ShixunHomework {...this.props} {...props} {...this.state} />) (props) => (<ShixunHomework {...this.props} {...props} {...this.state} />)
} }
></Route> ></Route>
<Route path="/courses/:coursesId/files/:main_id" <Route path="/classrooms/:coursesId/files/:main_id"
render={ render={
(props) => (<Resourcelist {...this.props} {...props} {...this.state} />) (props) => (<Resourcelist {...this.props} {...props} {...this.state} />)
} }
></Route> ></Route>
<Route path="/courses/:coursesId/file/:Id" <Route path="/classrooms/:coursesId/file/:Id"
render={ render={
(props) => (<Resourcelist {...this.props} {...props} {...this.state} />) (props) => (<Resourcelist {...this.props} {...props} {...this.state} />)
} }
></Route> ></Route>
<Route path="/courses/:coursesId/graduation_topics/:Id" <Route path="/classrooms/:coursesId/graduation_topics/:Id"
render={ render={
(props) => (<GraduationTopics {...this.props} {...props} {...this.state} />) (props) => (<GraduationTopics {...this.props} {...props} {...this.state} />)
}></Route> }></Route>
<Route path="/courses/:coursesId/graduation_tasks/:Id" <Route path="/classrooms/:coursesId/graduation_tasks/:Id"
render={ render={
(props) => (<GraduationTasks {...this.props} {...props} {...this.state} />) (props) => (<GraduationTasks {...this.props} {...props} {...this.state} />)
} }
></Route> ></Route>
{/* 默认 */} {/* 默认 */}
<Route path="/courses/:coursesId" <Route path="/classrooms/:coursesId"
render={ render={
(props) => (<StudentsList {...this.props} {...props} {...this.state} />) (props) => (<StudentsList {...this.props} {...props} {...this.state} />)
} }
@ -375,4 +375,4 @@ class ListPageIndex extends Component{
) )
} }
} }
export default ListPageIndex; export default ListPageIndex;

@ -242,13 +242,13 @@ class Fileslistitem extends Component {
this.props.isAdmin ? this.props.isAdmin ?
(bools === true ? (bools === true ?
<a <a
// href={"/courses/" + coursesId + "/graduation/graduation_tasks/" + categoryid + "/" + taskid + "/list"} // href={"/classrooms/" + coursesId + "/graduation/graduation_tasks/" + categoryid + "/" + taskid + "/list"}
onClick={() => this.showfiles(discussMessage)} onClick={() => this.showfiles(discussMessage)}
title={discussMessage.title} title={discussMessage.title}
className="fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.title}</a> className="fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.title}</a>
: :
<a <a
// href={"/courses/" + coursesId + "/graduation/graduation_tasks/" + categoryid + "/" + taskid + "/list"} // href={"/classrooms/" + coursesId + "/graduation/graduation_tasks/" + categoryid + "/" + taskid + "/list"}
onClick={() => this.showfiless(discussMessage.link,discussMessage.id)} onClick={() => this.showfiless(discussMessage.link,discussMessage.id)}
title={discussMessage.title} title={discussMessage.title}
className="fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.title}</a> className="fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.title}</a>

@ -94,7 +94,7 @@ class Video extends Component {
let videoId = { let videoId = {
videoId: item.id, videoId: item.id,
title: item.title, title: item.title,
file_url: item.file_url, file_url: (item.play_url || item.file_url),
cover_url: item.cover_url cover_url: item.cover_url
} }
this.setState({ this.setState({

@ -65,13 +65,13 @@ class BoardsNew extends Component{
}); });
} }
componentDidMount = () => { componentDidMount = () => {
const topicId = this.props.match.params.topicId const topicId = this.props.match.params.topicId
const isEdit = !!topicId const isEdit = !!topicId
this.isEdit = isEdit this.isEdit = isEdit
const boardId = this.props.match.params.boardId const boardId = this.props.match.params.boardId
this.fetchBoards() this.fetchBoards()
if (isEdit) { if (isEdit) {
@ -99,7 +99,7 @@ class BoardsNew extends Component{
status: 'done' status: 'done'
} }
}) })
this.setState({ fileList: _fileList, board_name: data.board_name, title_num: parseInt(data.subject.length) ,isemail_notifys:response.data.data.email_notify}) this.setState({ fileList: _fileList, board_name: data.board_name, title_num: parseInt(data.subject.length) ,isemail_notifys:response.data.data.email_notify})
} }
} }
@ -160,7 +160,7 @@ class BoardsNew extends Component{
return item.response.id return item.response.id
}) })
} }
axios.post(url, { axios.post(url, {
...values, ...values,
email_notify:this.state.isemail_notify, email_notify:this.state.isemail_notify,
@ -224,7 +224,7 @@ class BoardsNew extends Component{
const { status } = response.data; const { status } = response.data;
if (status == 0) { if (status == 0) {
console.log('--- success') console.log('--- success')
this.setState((state) => { this.setState((state) => {
const index = state.fileList.indexOf(file); const index = state.fileList.indexOf(file);
const newFileList = state.fileList.slice(); const newFileList = state.fileList.slice();
@ -328,13 +328,13 @@ class BoardsNew extends Component{
<div className="edu-class-container edu-position courseForm"> <div className="edu-class-container edu-position courseForm">
<CBreadcrumb items={[ <CBreadcrumb items={[
{ to: current_user&&current_user.first_category_url, name: this.props.coursedata ? this.props.coursedata.name : ''}, { to: current_user&&current_user.first_category_url, name: this.props.coursedata ? this.props.coursedata.name : ''},
{ to: `/courses/${courseId}/boards/${boardId}`, name: this.state.board_name }, { to: `/classrooms/${courseId}/boards/${boardId}`, name: this.state.board_name },
{ name: this.isEdit ? '帖子编辑' : '帖子新建'} { name: this.isEdit ? '帖子编辑' : '帖子新建'}
]}></CBreadcrumb> ]}></CBreadcrumb>
<p className="clearfix mt20 mb20"> <p className="clearfix mt20 mb20">
<span className="fl font-24 color-grey-3">{this.isEdit ? "编辑" : "新建"}帖子</span> <span className="fl font-24 color-grey-3">{this.isEdit ? "编辑" : "新建"}帖子</span>
<a href="javascript:void(0)" className="color-grey-6 fr font-16 mr2" <a href="javascript:void(0)" className="color-grey-6 fr font-16 mr2"
onClick={this.goBack}> onClick={this.goBack}>
返回 返回
</a> </a>
@ -346,7 +346,7 @@ class BoardsNew extends Component{
<Checkbox onChange={this.setemailchange} checked={this.state.isemail_notifys===true?this.state.isemail_notifys:this.state.isemail_notify} disabled={this.state.isemail_notifys}>发送邮件提醒</Checkbox> <Checkbox onChange={this.setemailchange} checked={this.state.isemail_notifys===true?this.state.isemail_notifys:this.state.isemail_notify} disabled={this.state.isemail_notifys}>发送邮件提醒</Checkbox>
</span></Tooltip>:"":""} </span></Tooltip>:"":""}
{ isAdmin && { isAdmin &&
<React.Fragment> <React.Fragment>
{getFieldDecorator('sticky', { {getFieldDecorator('sticky', {
valuePropName: 'checked', valuePropName: 'checked',
@ -375,7 +375,7 @@ class BoardsNew extends Component{
label="标题" label="标题"
className="topicTitle " className="topicTitle "
> >
{getFieldDecorator('subject', { {getFieldDecorator('subject', {
rules: [{ rules: [{
required: true, message: '请输入标题', required: true, message: '请输入标题',
@ -400,7 +400,7 @@ class BoardsNew extends Component{
<div> <div>
{menu} {menu}
{ {
isAdmin && !isCourseEnd && isAdmin && !isCourseEnd &&
<React.Fragment> <React.Fragment>
<Divider style={{ margin: '4px 0' }} /> <Divider style={{ margin: '4px 0' }} />
<div style={{ padding: '8px', cursor: 'pointer' }} onMouseDown={() => this.refs['addDirModal'].open()}> <div style={{ padding: '8px', cursor: 'pointer' }} onMouseDown={() => this.refs['addDirModal'].open()}>
@ -464,7 +464,7 @@ class BoardsNew extends Component{
max: 10000, message: '最大限制为10000个字符', max: 10000, message: '最大限制为10000个字符',
}], }],
})( })(
<TPMMDEditor ref={this.mdRef} placeholder={'请在此输入帖子详情最大限制为10000个字符'} <TPMMDEditor ref={this.mdRef} placeholder={'请在此输入帖子详情最大限制为10000个字符'}
mdID={'courseMessageMD'} initValue={this.editTopic ? this.editTopic.content : ''} className="courseMessageMD"></TPMMDEditor> mdID={'courseMessageMD'} initValue={this.editTopic ? this.editTopic.content : ''} className="courseMessageMD"></TPMMDEditor>
)} )}
</Form.Item> </Form.Item>
@ -476,13 +476,13 @@ class BoardsNew extends Component{
(单个文件150M以内) (单个文件150M以内)
</Upload> </Upload>
</div> </div>
<Form.Item> <Form.Item>
<div className="clearfix mt30 mb30"> <div className="clearfix mt30 mb30">
<Button type="primary" htmlType="submit" className="defalutSubmitbtn fl mr20">提交</Button> <Button type="primary" htmlType="submit" className="defalutSubmitbtn fl mr20">提交</Button>
<a className="defalutCancelbtn fl" <a className="defalutCancelbtn fl"
onClick={() => this.isEdit ? onClick={() => this.isEdit ?
this.props.toDetailPage(Object.assign({}, this.props.match.params, {'coursesId': course_id})) : this.props.toDetailPage(Object.assign({}, this.props.match.params, {'coursesId': course_id})) :
this.props.toListPage(Object.assign({}, this.props.match.params, {'coursesId': course_id})) }>取消</ a> this.props.toListPage(Object.assign({}, this.props.match.params, {'coursesId': course_id})) }>取消</ a>
</div> </div>
</Form.Item> </Form.Item>
@ -494,4 +494,4 @@ class BoardsNew extends Component{
} }
const WrappedBoardsNew = Form.create({ name: 'boardsNew' })(BoardsNew); const WrappedBoardsNew = Form.create({ name: 'boardsNew' })(BoardsNew);
export default RouteHOC()(WrappedBoardsNew); export default RouteHOC()(WrappedBoardsNew);

@ -555,7 +555,7 @@ class TopicDetail extends Component {
`}</style> `}</style>
<CBreadcrumb className={'independent'} items={[ <CBreadcrumb className={'independent'} items={[
{ to: current_user&&current_user.first_category_url, name: this.props.coursedata.name}, { to: current_user&&current_user.first_category_url, name: this.props.coursedata.name},
{ to: `/courses/${courseId}/boards/${boardId}`, name: memo.board_name }, { to: `/classrooms/${courseId}/boards/${boardId}`, name: memo.board_name },
{ name: '帖子详情'} { name: '帖子详情'}
]}></CBreadcrumb> ]}></CBreadcrumb>

@ -1,66 +1,66 @@
import React, { Component } from 'react'; import React, { Component } from 'react';
export function RouteHOC(options = {}) { export function RouteHOC(options = {}) {
return function wrap(WrappedComponent) { return function wrap(WrappedComponent) {
return class Wrapper extends Component { return class Wrapper extends Component {
constructor(props) { constructor(props) {
super(props); super(props);
this.state = { this.state = {
} }
} }
toDetailPage = (_courseId, boardId, topicId) => { toDetailPage = (_courseId, boardId, topicId) => {
if (typeof _courseId == "object") { if (typeof _courseId == "object") {
const topicId = _courseId.topicId const topicId = _courseId.topicId
const boardId = _courseId.boardId const boardId = _courseId.boardId
const courseId = _courseId.coursesId const courseId = _courseId.coursesId
this.props.history.push(`/courses/${courseId}/boards/${boardId}/messages/${topicId}`) this.props.history.push(`/classrooms/${courseId}/boards/${boardId}/messages/${topicId}`)
} else { } else {
this.props.history.push(`/courses/${_courseId}/boards/${boardId}/messages/${topicId}`) this.props.history.push(`/classrooms/${_courseId}/boards/${boardId}/messages/${topicId}`)
} }
} }
toEditPage = (_courseId, boardId, topicId) => { toEditPage = (_courseId, boardId, topicId) => {
if (typeof _courseId == "object") { if (typeof _courseId == "object") {
const topicId = _courseId.topicId const topicId = _courseId.topicId
const boardId = _courseId.boardId const boardId = _courseId.boardId
const courseId = _courseId.coursesId const courseId = _courseId.coursesId
this.props.history.push(`/courses/${courseId}/boards/${boardId}/messages/${topicId}/edit`) this.props.history.push(`/classrooms/${courseId}/boards/${boardId}/messages/${topicId}/edit`)
} else { } else {
this.props.history.push(`/courses/${_courseId}/boards/${boardId}/messages/${topicId}/edit`) this.props.history.push(`/classrooms/${_courseId}/boards/${boardId}/messages/${topicId}/edit`)
} }
} }
toNewPage = (courseId, boardId) => { toNewPage = (courseId, boardId) => {
this.props.history.push(`/courses/${courseId}/boards/${boardId}/messages/new`) this.props.history.push(`/classrooms/${courseId}/boards/${boardId}/messages/new`)
} }
toListPage = (_courseId, boardId) => { toListPage = (_courseId, boardId) => {
if (typeof _courseId == "object") { if (typeof _courseId == "object") {
const boardId = _courseId.boardId const boardId = _courseId.boardId
const courseId = _courseId.coursesId const courseId = _courseId.coursesId
this.props.history.push(`/courses/${courseId}/boards/${boardId}`) this.props.history.push(`/classrooms/${courseId}/boards/${boardId}`)
} else { } else {
this.props.history.push(`/courses/${_courseId}/boards${boardId ? '/' + boardId : ''}`) this.props.history.push(`/classrooms/${_courseId}/boards${boardId ? '/' + boardId : ''}`)
} }
} }
render() { render() {
const { snackbarOpen} = this.state; const { snackbarOpen} = this.state;
return ( return (
<React.Fragment> <React.Fragment>
<WrappedComponent {...this.props} <WrappedComponent {...this.props}
toDetailPage={this.toDetailPage} toDetailPage={this.toDetailPage}
toEditPage={this.toEditPage} toEditPage={this.toEditPage}
toNewPage={this.toNewPage} toNewPage={this.toNewPage}
toListPage={this.toListPage} toListPage={this.toListPage}
> >
</WrappedComponent> </WrappedComponent>
</React.Fragment> </React.Fragment>
) )
} }
} }
} }
} }

@ -419,53 +419,53 @@ class CommonWorkDetailIndex extends Component{
{/* --------------------------------------------------------------------- */} {/* --------------------------------------------------------------------- */}
{/* 作业设置 */} {/* 作业设置 */}
{/* http://localhost:3007/courses/1309/homework/9300/setting */} {/* http://localhost:3007/classrooms/1309/homework/9300/setting */}
<Route exact path="/courses/:coursesId/common_homeworks/:workId/setting" <Route exact path="/classrooms/:coursesId/common_homeworks/:workId/setting"
render={ render={
(props) => (<CommonWorkSetting {...this.props} {...props} {...this.state} {...commonHandler}/>) (props) => (<CommonWorkSetting {...this.props} {...props} {...this.state} {...commonHandler}/>)
} }
></Route> ></Route>
{/* 作品列表 */} {/* 作品列表 */}
<Route exact path="/courses/:coursesId/common_homeworks/:workId/list" <Route exact path="/classrooms/:coursesId/common_homeworks/:workId/list"
render={ render={
(props) => (<CommonWorkList ref="commonWorkList" triggerRef={this.bindRef} {...this.props} {...props} {...this.state} {...commonHandler}/>) (props) => (<CommonWorkList ref="commonWorkList" triggerRef={this.bindRef} {...this.props} {...props} {...this.state} {...commonHandler}/>)
} }
></Route> ></Route>
{/* 作业问答 */} {/* 作业问答 */}
<Route exact path="/courses/:coursesId/common_homeworks/:workId/question" <Route exact path="/classrooms/:coursesId/common_homeworks/:workId/question"
render={ render={
(props) => (<CommonWorkQuestion {...this.props} {...props} {...this.state} {...commonHandler}/>) (props) => (<CommonWorkQuestion {...this.props} {...props} {...this.state} {...commonHandler}/>)
} }
></Route> ></Route>
<Route exact path="/courses/:coursesId/common_homeworks/:workId/answer" <Route exact path="/classrooms/:coursesId/common_homeworks/:workId/answer"
render={ render={
(props) => (<CommonWorkAnswer {...this.props} {...props} {...this.state} {...commonHandler}/>) (props) => (<CommonWorkAnswer {...this.props} {...props} {...this.state} {...commonHandler}/>)
} }
></Route> ></Route>
<Route exact path="/courses/:coursesId/group_homeworks/:workId/setting" <Route exact path="/classrooms/:coursesId/group_homeworks/:workId/setting"
render={ render={
(props) => (<CommonWorkSetting {...this.props} {...props} {...this.state} {...commonHandler}/>) (props) => (<CommonWorkSetting {...this.props} {...props} {...this.state} {...commonHandler}/>)
} }
></Route> ></Route>
{/* 作品列表 */} {/* 作品列表 */}
<Route exact path="/courses/:coursesId/group_homeworks/:workId/list" <Route exact path="/classrooms/:coursesId/group_homeworks/:workId/list"
render={ render={
(props) => (<CommonWorkList triggerRef={this.bindRef} {...this.props} {...props} {...this.state} {...commonHandler}/>) (props) => (<CommonWorkList triggerRef={this.bindRef} {...this.props} {...props} {...this.state} {...commonHandler}/>)
} }
></Route> ></Route>
{/* 作业问答 */} {/* 作业问答 */}
<Route exact path="/courses/:coursesId/group_homeworks/:workId/question" <Route exact path="/classrooms/:coursesId/group_homeworks/:workId/question"
render={ render={
(props) => (<CommonWorkQuestion {...this.props} {...props} {...this.state} {...commonHandler}/>) (props) => (<CommonWorkQuestion {...this.props} {...props} {...this.state} {...commonHandler}/>)
} }
></Route> ></Route>
<Route exact path="/courses/:coursesId/group_homeworks/:workId/answer" <Route exact path="/classrooms/:coursesId/group_homeworks/:workId/answer"
render={ render={
(props) => (<CommonWorkAnswer {...this.props} {...props} {...this.state} {...commonHandler}/>) (props) => (<CommonWorkAnswer {...this.props} {...props} {...this.state} {...commonHandler}/>)
} }
@ -479,4 +479,4 @@ class CommonWorkDetailIndex extends Component{
} }
} }
export default ( CommonWorkDetailIndex) ; export default ( CommonWorkDetailIndex) ;

@ -55,9 +55,9 @@ class CommonWorkItem extends Component{
// "url": "/attachments/:id/download", // "url": "/attachments/:id/download",
// "delete": true // "delete": true
// } // }
// ] // ]
// response.data.revise_reason = 'qweqweqweqe'; // response.data.revise_reason = 'qweqweqweqe';
// revise_reason revise_attachments 传给modal // revise_reason revise_attachments 传给modal
// attach to fileList // attach to fileList
const fileList = response.data.revise_attachments.map(item => { const fileList = response.data.revise_attachments.map(item => {
@ -174,12 +174,12 @@ class CommonWorkItem extends Component{
>{item.name}</a>} >{item.name}</a>}
{/* 只有非课堂成员且作业是私有的情况下才会为true */} {/* 只有非课堂成员且作业是私有的情况下才会为true */}
{ {
item.private_icon===true ? item.private_icon===true ?
(<Tooltip title={"私有属性,非课堂成员不能访问"} placement="bottom" > (<Tooltip title={"私有属性,非课堂成员不能访问"} placement="bottom" >
<i className="iconfont icon-guansuo color-grey-c ml10 font-16 fl"></i> <i className="iconfont icon-guansuo color-grey-c ml10 font-16 fl"></i>
</Tooltip>) : "" </Tooltip>) : ""
} }
<span className="fl"> <span className="fl">
<CoursesListType typelist={item.status} /> <CoursesListType typelist={item.status} />
</span> </span>
@ -204,7 +204,7 @@ class CommonWorkItem extends Component{
{item.commit_count===undefined?"":<span className="mr20 fl">{item.commit_count} 已交</span>} {item.commit_count===undefined?"":<span className="mr20 fl">{item.commit_count} 已交</span>}
{item.uncommit_count===undefined?"":<span className="mr20 fl">{item.uncommit_count} 未交</span>} {item.uncommit_count===undefined?"":<span className="mr20 fl">{item.uncommit_count} 未交</span>}
{ {
item.status_time!="" && item.status_time!="" &&
<span className="mr20 fl">{item.status_time}</span> <span className="mr20 fl">{item.status_time}</span>
@ -219,12 +219,12 @@ class CommonWorkItem extends Component{
<WordsBtn style="blue" className={"fl font-16 ml28"} <WordsBtn style="blue" className={"fl font-16 ml28"}
onClick={ canNotLink ? () => {} : () => this.onItemClick(item)} onClick={ canNotLink ? () => {} : () => this.onItemClick(item)}
>查看详情</WordsBtn> >查看详情</WordsBtn>
<WordsBtn style="blue" className="fl font-16 ml28" onClick={ () => { this.props.toEditPage(this.props.match.params, item.homework_id) }}>编辑</WordsBtn> <WordsBtn style="blue" className="fl font-16 ml28" onClick={ () => { this.props.toEditPage(this.props.match.params, item.homework_id) }}>编辑</WordsBtn>
<WordsBtn style="blue" className="fl font-16 ml28" onClick={ () => { this.props.toWorkSettingPage(this.props.match.params, item.homework_id) }}>设置</WordsBtn> <WordsBtn style="blue" className="fl font-16 ml28" onClick={ () => { this.props.toWorkSettingPage(this.props.match.params, item.homework_id) }}>设置</WordsBtn>
</div>} </div>}
{ {
// //
isStudent && isStudent &&
<li className="fr"> <li className="fr">
<WordsBtn style="blue" className={"fl font-16"} <WordsBtn style="blue" className={"fl font-16"}
@ -232,34 +232,34 @@ class CommonWorkItem extends Component{
>查看详情</WordsBtn> >查看详情</WordsBtn>
{ // { //
item.work_status && item.work_status.indexOf('关联项目') != -1 && item.work_status && item.work_status.indexOf('关联项目') != -1 &&
<React.Fragment> <React.Fragment>
<WordsBtn style="blue" className={` font-16 fl ml28`} onClick={() => this.props.toCreateProject(item)}>创建项目</WordsBtn> <WordsBtn style="blue" className={` font-16 fl ml28`} onClick={() => this.props.toCreateProject(item)}>创建项目</WordsBtn>
<WordsBtn style="blue" className={` font-16 fl ml28`} onClick={() => this.props.openConnectionProject(item)}>关联项目</WordsBtn> <WordsBtn style="blue" className={` font-16 fl ml28`} onClick={() => this.props.openConnectionProject(item)}>关联项目</WordsBtn>
</React.Fragment> </React.Fragment>
} }
{ // { //
item.work_status && item.work_status.indexOf('取消关联') != -1 && item.work_status && item.work_status.indexOf('取消关联') != -1 &&
<WordsBtn style="blue" className={` font-16 fl ml28`} onClick={() => this.props.cancelConnectionProject(item)}>取消关联</WordsBtn> <WordsBtn style="blue" className={` font-16 fl ml28`} onClick={() => this.props.cancelConnectionProject(item)}>取消关联</WordsBtn>
} }
{ // { //
item.work_status && item.work_status.indexOf('提交作品') != -1 && 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> <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 && 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> } <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 && 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, true, item.work_id)}>修改作品</WordsBtn> <WordsBtn style="blue" className="fl font-16 ml28" onClick={() => this.props.toWorkPostPage(this.props.match.params, item.homework_id, true, item.work_id)}>修改作品</WordsBtn>
} }
{ // { //
item.work_status && item.work_status.indexOf('补交附件') != -1 && item.work_status && item.work_status.indexOf('补交附件') != -1 &&
<React.Fragment> <React.Fragment>
<AccessoryModal <AccessoryModal
{...this.props} {...this.props}
@ -270,14 +270,14 @@ class CommonWorkItem extends Component{
Cancel={this.Cancelvisible} Cancel={this.Cancelvisible}
setupdate={this.setupdate} setupdate={this.setupdate}
reviseAttachmentUrl={`/student_works/${item.work_id}/revise_attachment.json`} reviseAttachmentUrl={`/student_works/${item.work_id}/revise_attachment.json`}
seeworks={`/courses/${this.props.match.params.coursesId}/common_homeworks/${item.homework_id}/${item.work_id}/appraise`} seeworks={`/classrooms/${this.props.match.params.coursesId}/common_homeworks/${item.homework_id}/${item.work_id}/appraise`}
/> />
<WordsBtn style="blue" className="fl font-16 ml28" onClick={() => this.addAccessory(item)}>补交附件</WordsBtn> <WordsBtn style="blue" className="fl font-16 ml28" onClick={() => this.addAccessory(item)}>补交附件</WordsBtn>
</React.Fragment> </React.Fragment>
} }
{ {
// //
item.work_status && item.work_status.indexOf('查看作品') != -1 && item.work_status && item.work_status.indexOf('查看作品') != -1 &&
<WordsBtn style="blue" className="fl font-16 ml28" onClick={() => this.props.toWorkDetailPage(this.props.match.params, item.homework_id, item.work_id)}>查看作品</WordsBtn> } <WordsBtn style="blue" className="fl font-16 ml28" onClick={() => this.props.toWorkDetailPage(this.props.match.params, item.homework_id, item.work_id)}>查看作品</WordsBtn> }
@ -287,7 +287,7 @@ class CommonWorkItem extends Component{
</p> </p>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
) )
}) })
@ -296,4 +296,4 @@ class CommonWorkItem extends Component{
) )
} }
} }
export default CommonWorkItem; export default CommonWorkItem;

@ -357,7 +357,7 @@ function buildColumns(that, student_works, studentData) {
>调分</a> >调分</a>
</Tooltip> } </Tooltip> }
{/* toWorkDetailPage */} {/* toWorkDetailPage */}
{/* /courses/"+courseId+"/common_homeworks/"+workId+ '/' + record.id +"/appraise */} {/* /classrooms/"+courseId+"/common_homeworks/"+workId+ '/' + record.id +"/appraise */}
<a style={{color: '#4CACFF', marginLeft: '4px'}} id={"asdasdasdasd"} <a style={{color: '#4CACFF', marginLeft: '4px'}} id={"asdasdasdasd"}
onMouseDown={(e) => that.props.toWorkDetailPage2(e, courseId, workId, record.id)} onMouseDown={(e) => that.props.toWorkDetailPage2(e, courseId, workId, record.id)}
onClick={() => that.props.toWorkDetailPage(courseId, workId, record.id)}>{isAdmin ? '评阅' : '查看'}</a> onClick={() => that.props.toWorkDetailPage(courseId, workId, record.id)}>{isAdmin ? '评阅' : '查看'}</a>
@ -378,7 +378,7 @@ const orderMap = {
student_id: 'asc', student_id: 'asc',
} }
const PAGE_SIZE = 20 const PAGE_SIZE = 20
// 类似页面 http://localhost:3007/courses/1309/graduation/graduation_tasks/48/76/setting // 类似页面 http://localhost:3007/classrooms/1309/graduation/graduation_tasks/48/76/setting
class CommonWorkList extends Component{ class CommonWorkList extends Component{
constructor(props){ constructor(props){

@ -44,7 +44,7 @@ function handleDateString (dateString) {
} }
return dateString return dateString
} }
// 类似页面 http://localhost:3007/courses/1309/graduation/graduation_tasks/48/76/setting // 类似页面 http://localhost:3007/classrooms/1309/graduation/graduation_tasks/48/76/setting
class CommonWorkSetting extends Component{ class CommonWorkSetting extends Component{
constructor(props){ constructor(props){
@ -82,16 +82,16 @@ class CommonWorkSetting extends Component{
<div className={"educontent mb20"}> <div className={"educontent mb20"}>
<p className="clearfix mt10"> <p className="clearfix mt10">
<WordsBtn style="grey" className="fl"> <Link to={"/courses/"+courseId} className="color-grey-6">{course_name}</Link></WordsBtn> <WordsBtn style="grey" className="fl"> <Link to={"/classrooms/"+courseId} className="color-grey-6">{course_name}</Link></WordsBtn>
<span className="color-grey-9 fl ml3 mr3">&gt;</span> <span className="color-grey-9 fl ml3 mr3">&gt;</span>
<WordsBtn style="grey" className="fl"> <Link to={"/courses/"+courseId+"/graduation"} className="color-grey-6">毕设任务</Link></WordsBtn> <WordsBtn style="grey" className="fl"> <Link to={"/classrooms/"+courseId+"/graduation"} className="color-grey-6">毕设任务</Link></WordsBtn>
<span className="color-grey-9 fl ml3 mr3">&gt;</span> <span className="color-grey-9 fl ml3 mr3">&gt;</span>
<span>任务详情</span> <span>任务详情</span>
</p> </p>
<div style={{ width:'100%',height:'75px'}} > <div style={{ width:'100%',height:'75px'}} >
<p className=" fl color-black mt25 summaryname"> <p className=" fl color-black mt25 summaryname">
<Link to={"/courses/"+courseId+"/graduation"+"/graduation_tasks/"}>{homework_name}</Link> <Link to={"/classrooms/"+courseId+"/graduation"+"/graduation_tasks/"}>{homework_name}</Link>
</p> </p>
<CoursesListType <CoursesListType
typelist={["已开启补交"]} typelist={["已开启补交"]}
@ -104,17 +104,17 @@ class CommonWorkSetting extends Component{
<div className="mt10 clearfix edu-back-white poll_list pl20"> <div className="mt10 clearfix edu-back-white poll_list pl20">
<Link <Link
className="active" className="active"
to={"/courses/"+courseId+"/graduation/graduation_tasks/"+category_id+"/"+task_Id+"/list"}>作品列表</Link> to={"/classrooms/"+courseId+"/graduation/graduation_tasks/"+category_id+"/"+task_Id+"/list"}>作品列表</Link>
<Link to={"/courses/"+courseId+"/graduation/graduation_tasks/"+category_id+"/"+task_Id+"/questions"}>作业描述</Link> <Link to={"/classrooms/"+courseId+"/graduation/graduation_tasks/"+category_id+"/"+task_Id+"/questions"}>作业描述</Link>
<Link to={"/courses/"+courseId+"/graduation/graduation_tasks/"+category_id+"/"+task_Id+"/questions"}>参考答案</Link> <Link to={"/classrooms/"+courseId+"/graduation/graduation_tasks/"+category_id+"/"+task_Id+"/questions"}>参考答案</Link>
<Link <Link
style={{paddingLeft:'38px'}} style={{paddingLeft:'38px'}}
to={"/courses/"+courseId+"/graduation/graduation_tasks/"+category_id+"/"+task_Id+"/setting"}>设置</Link> to={"/classrooms/"+courseId+"/graduation/graduation_tasks/"+category_id+"/"+task_Id+"/setting"}>设置</Link>
<a className={"fr color-blue font-16"} onClick={() => { this.end()} }>立即截止</a> <a className={"fr color-blue font-16"} onClick={() => { this.end()} }>立即截止</a>
<a className={"fr color-blue font-16"} onClick={() => { this.publish()} }>立即发布</a> <a className={"fr color-blue font-16"} onClick={() => { this.publish()} }>立即发布</a>
<a className={"fr color-blue font-16"} href={"/courses/"+courseId+"/graduation/graduation_tasks/"+task_Id+"/edit"}>编辑作业</a> <a className={"fr color-blue font-16"} href={"/classrooms/"+courseId+"/graduation/graduation_tasks/"+task_Id+"/edit"}>编辑作业</a>
</div> </div>
</div> </div>

@ -130,7 +130,7 @@ class CommonWorkPost extends Component{
setedit=(workId)=>{ setedit=(workId)=>{
let coursesId=this.props.match.params.coursesId; let coursesId=this.props.match.params.coursesId;
window.location.href="courses/"+coursesId+"/graduation_tasks/"+workId+"/appraise"; window.location.href="classrooms/"+coursesId+"/graduation_tasks/"+workId+"/appraise";
} }
@ -236,7 +236,7 @@ class CommonWorkPost extends Component{
// this.props.showNotification('保存成功') // this.props.showNotification('保存成功')
}else{ }else{
} }
this.props.history.push(`/courses/${coursesId}/${moduleName}/${workId}/${studentWorkId}/appraise`) this.props.history.push(`/classrooms/${coursesId}/${moduleName}/${workId}/${studentWorkId}/appraise`)
} }
}).catch((error) => { }).catch((error) => {
@ -251,7 +251,7 @@ class CommonWorkPost extends Component{
).then((response) => { ).then((response) => {
if(response.status===200) { if(response.status===200) {
if(response.data.status===0){ if(response.data.status===0){
this.props.history.push(`/courses/${coursesId}/${moduleName}/${workId}/${response.data.work_id}/appraise`) this.props.history.push(`/classrooms/${coursesId}/${moduleName}/${workId}/${response.data.work_id}/appraise`)
// this.props.showNotification('保存成功') // this.props.showNotification('保存成功')
// this.setState({ // this.setState({
// Modalstype:true, // Modalstype:true,
@ -644,10 +644,10 @@ render(){
<p className="clearfix mt10"> <p className="clearfix mt10">
<WordsBtn style="grey" className="fl"> <Link to={ current_user && current_user.first_category_url} className="color-grey-6">{course_name}</Link></WordsBtn> <WordsBtn style="grey" className="fl"> <Link to={ current_user && current_user.first_category_url} className="color-grey-6">{course_name}</Link></WordsBtn>
<span className="color-grey-9 fl ml3 mr3">&gt;</span> <span className="color-grey-9 fl ml3 mr3">&gt;</span>
<WordsBtn style="grey" className="fl"> <Link to={`/courses/${courseId}/${moduleName}/${workId}`} className="color-grey-6">{moduleCHName}</Link></WordsBtn> <WordsBtn style="grey" className="fl"> <Link to={`/classrooms/${courseId}/${moduleName}/${workId}`} className="color-grey-6">{moduleCHName}</Link></WordsBtn>
<span className="color-grey-9 fl ml3 mr3">&gt;</span> <span className="color-grey-9 fl ml3 mr3">&gt;</span>
{/*<WordsBtn style="grey" className="fl">*/} {/*<WordsBtn style="grey" className="fl">*/}
{/*<Link to={"/courses/"+courseId+"/graduation/graduation_tasks/"+category_id} className="color-grey-6">{workslist&&workslist.task_name}</Link>*/} {/*<Link to={"/classrooms/"+courseId+"/graduation/graduation_tasks/"+category_id} className="color-grey-6">{workslist&&workslist.task_name}</Link>*/}
{/*<span className="color-grey-9 ml3 mr3">&gt;</span>*/} {/*<span className="color-grey-9 ml3 mr3">&gt;</span>*/}
{/*</WordsBtn>*/} {/*</WordsBtn>*/}

@ -475,7 +475,7 @@ class CommonWorkSetting extends Component{
homepublish=()=>{ homepublish=()=>{
// let task_Id=this.props.match.params.task_Id; // let task_Id=this.props.match.params.task_Id;
// const cid = this.props.match.params.coursesId // const cid = this.props.match.params.coursesId
// let url = `/courses/${cid}/graduation_tasks/publish_task.json`; // let url = `/classrooms/${cid}/graduation_tasks/publish_task.json`;
// axios.post(url,{ // axios.post(url,{
// task_ids:[task_Id], // task_ids:[task_Id],
@ -843,7 +843,7 @@ class CommonWorkSetting extends Component{
// const coursesId = this.props.match.params.coursesId; // const coursesId = this.props.match.params.coursesId;
// const task_Id = this.props.match.params.task_Id; // const task_Id = this.props.match.params.task_Id;
// let url = `/courses/${coursesId}/graduation_tasks/end_task.json`; // let url = `/classrooms/${coursesId}/graduation_tasks/end_task.json`;
// axios.post(url,{ // axios.post(url,{
// task_ids:[task_Id], // task_ids:[task_Id],
// all_check:0 // all_check:0
@ -1531,7 +1531,7 @@ class CommonWorkSetting extends Component{
<Button type="primary" htmlType="submit" className="defalutSubmitbtn fl mr20" <Button type="primary" htmlType="submit" className="defalutSubmitbtn fl mr20"
onClick={this.onSubmit} onClick={this.onSubmit}
>提交</Button> >提交</Button>
{/*<Link to={"/courses/"+courseId+"/graduation_tasks/"+position+"/"+category_id+coursesearch} className="defalutCancelbtn fl">取消</Link>*/} {/*<Link to={"/classrooms/"+courseId+"/graduation_tasks/"+position+"/"+category_id+coursesearch} className="defalutCancelbtn fl">取消</Link>*/}
<a onClick={this.goback} className="defalutCancelbtn fl" <a onClick={this.goback} className="defalutCancelbtn fl"
>取消</a> >取消</a>
</div>:""} </div>:""}

@ -1,142 +1,142 @@
import React, { Component } from 'react'; import React, { Component } from 'react';
import { SnackbarHOC } from 'educoder'; import { SnackbarHOC } from 'educoder';
import {BrowserRouter as Router,Route,Switch} from 'react-router-dom'; import {BrowserRouter as Router,Route,Switch} from 'react-router-dom';
import Loadable from 'react-loadable'; import Loadable from 'react-loadable';
import Loading from '../../../Loading'; import Loading from '../../../Loading';
import { CNotificationHOC } from '../common/CNotificationHOC' import { CNotificationHOC } from '../common/CNotificationHOC'
import { RouteHOC } from './common' import { RouteHOC } from './common'
import "../css/busyWork.css" import "../css/busyWork.css"
//引入对应跳转的组件 //引入对应跳转的组件
const ListPageIndex = Loadable({ const ListPageIndex = Loadable({
loader: () => import('../ListPageIndex'), loader: () => import('../ListPageIndex'),
loading:Loading, loading:Loading,
}) })
//新建分组/普通作业 //新建分组/普通作业
const NewWork = Loadable({ const NewWork = Loadable({
loader: () => import('./NewWork'), loader: () => import('./NewWork'),
loading:Loading, loading:Loading,
}) })
const CommonWorkDetailIndex = Loadable({ const CommonWorkDetailIndex = Loadable({
loader: () => import('./CommonWorkDetailIndex'), loader: () => import('./CommonWorkDetailIndex'),
loading:Loading, loading:Loading,
}) })
const CommonWorkSetting = Loadable({ const CommonWorkSetting = Loadable({
loader: () => import('./CommonWorkSetting'), loader: () => import('./CommonWorkSetting'),
loading:Loading, loading:Loading,
}) })
const CommonWorkList = Loadable({ const CommonWorkList = Loadable({
loader: () => import('./CommonWorkList'), loader: () => import('./CommonWorkList'),
loading:Loading, loading:Loading,
}) })
const CommonWorkQuestion = Loadable({ const CommonWorkQuestion = Loadable({
loader: () => import('./CommonWorkQuestion'), loader: () => import('./CommonWorkQuestion'),
loading:Loading, loading:Loading,
}) })
const CommonWorkAnswer = Loadable({ const CommonWorkAnswer = Loadable({
loader: () => import('./CommonWorkAnswer'), loader: () => import('./CommonWorkAnswer'),
loading:Loading, loading:Loading,
}) })
const CommonWorkAppraise = Loadable({ const CommonWorkAppraise = Loadable({
loader: () => import('./CommonWorkAppraise'), loader: () => import('./CommonWorkAppraise'),
loading:Loading, loading:Loading,
}) })
const CommonWorkPost = Loadable({ const CommonWorkPost = Loadable({
loader: () => import('./CommonWorkPost'), loader: () => import('./CommonWorkPost'),
loading:Loading, loading:Loading,
}) })
const CommonWork = Loadable({ const CommonWork = Loadable({
loader: () => import('./commonWork'), loader: () => import('./commonWork'),
loading:Loading, loading:Loading,
}) })
class CoursesWorkIndex extends Component{ class CoursesWorkIndex extends Component{
constructor(props) { constructor(props) {
super(props) super(props)
} }
render() { render() {
return ( return (
<div> <div>
<Switch {...this.props}> <Switch {...this.props}>
{/* --------------------------------------------------------------------- */} {/* --------------------------------------------------------------------- */}
{/* 作业设置 */} {/* 作业设置 */}
{/* http://localhost:3007/courses/1309/homework/9300/setting */} {/* http://localhost:3007/classrooms/1309/homework/9300/setting */}
<Route exact path="/courses/:coursesId/common_homeworks/:workId/setting" <Route exact path="/classrooms/:coursesId/common_homeworks/:workId/setting"
render={ render={
(props) => (<CommonWorkDetailIndex {...this.props} {...props} {...this.state} />) (props) => (<CommonWorkDetailIndex {...this.props} {...props} {...this.state} />)
} }
></Route> ></Route>
{/* 作品列表 */} {/* 作品列表 */}
<Route exact path="/courses/:coursesId/common_homeworks/:workId/list" <Route exact path="/classrooms/:coursesId/common_homeworks/:workId/list"
render={ render={
(props) => (<CommonWorkDetailIndex {...this.props} {...props} {...this.state} />) (props) => (<CommonWorkDetailIndex {...this.props} {...props} {...this.state} />)
} }
></Route> ></Route>
{/* 作业问答 */} {/* 作业问答 */}
<Route exact path="/courses/:coursesId/common_homeworks/:workId/question" <Route exact path="/classrooms/:coursesId/common_homeworks/:workId/question"
render={ render={
(props) => (<CommonWorkDetailIndex {...this.props} {...props} {...this.state} />) (props) => (<CommonWorkDetailIndex {...this.props} {...props} {...this.state} />)
} }
></Route> ></Route>
<Route exact path="/courses/:coursesId/common_homeworks/:workId/answer" <Route exact path="/classrooms/:coursesId/common_homeworks/:workId/answer"
render={ render={
(props) => (<CommonWorkDetailIndex {...this.props} {...props} {...this.state} />) (props) => (<CommonWorkDetailIndex {...this.props} {...props} {...this.state} />)
} }
></Route> ></Route>
{/* 评阅 */} {/* 评阅 */}
<Route exact path="/courses/:coursesId/common_homeworks/:workId/:studentWorkId/appraise" <Route exact path="/classrooms/:coursesId/common_homeworks/:workId/:studentWorkId/appraise"
render={ render={
(props) => (<CommonWorkAppraise {...this.props} {...props} {...this.state} />) (props) => (<CommonWorkAppraise {...this.props} {...props} {...this.state} />)
} }
></Route> ></Route>
{/* 提交作品 */} {/* 提交作品 */}
<Route exact path="/courses/:coursesId/common_homeworks/:workId/post" <Route exact path="/classrooms/:coursesId/common_homeworks/:workId/post"
render={ render={
(props) => (<CommonWorkPost {...this.props} {...props} {...this.state} />) (props) => (<CommonWorkPost {...this.props} {...props} {...this.state} />)
} }
></Route> ></Route>
<Route exact path="/courses/:coursesId/common_homeworks/:workId/:studentWorkId/post_edit" <Route exact path="/classrooms/:coursesId/common_homeworks/:workId/:studentWorkId/post_edit"
render={ render={
(props) => (<CommonWorkPost {...this.props} {...props} {...this.state} />) (props) => (<CommonWorkPost {...this.props} {...props} {...this.state} />)
} }
></Route> ></Route>
{/* 新建 */} {/* 新建 */}
{/* http://localhost:3007/courses/1309/common_homeworks/9299/edit/1 */} {/* http://localhost:3007/classrooms/1309/common_homeworks/9299/edit/1 */}
<Route exact path="/courses/:coursesId/common_homeworks/:workId/:pageType" <Route exact path="/classrooms/:coursesId/common_homeworks/:workId/:pageType"
render={ render={
(props) => (<NewWork {...this.props} {...props} {...this.state} />) (props) => (<NewWork {...this.props} {...props} {...this.state} />)
} }
></Route> ></Route>
<Route exact path="/courses/:coursesId/common_homeworks/:categroy_id/new" <Route exact path="/classrooms/:coursesId/common_homeworks/:categroy_id/new"
render={ render={
(props) => (<NewWork {...this.props} {...props} {...this.state} />) (props) => (<NewWork {...this.props} {...props} {...this.state} />)
} }
></Route> ></Route>
{/* 作业列表 */} {/* 作业列表 */}
<Route path="/courses/:coursesId/common_homeworks" <Route path="/classrooms/:coursesId/common_homeworks"
render={ render={
(props) => (<ListPageIndex {...this.props} {...props} {...this.state} />) (props) => (<ListPageIndex {...this.props} {...props} {...this.state} />)
} }
></Route> ></Route>
{/* --------------------------------------------------------------------- */} {/* --------------------------------------------------------------------- */}
</Switch> </Switch>
</div> </div>
) )
} }
} }
export default RouteHOC() (CNotificationHOC() (SnackbarHOC() ( CoursesWorkIndex) )); export default RouteHOC() (CNotificationHOC() (SnackbarHOC() ( CoursesWorkIndex) ));

@ -1,140 +1,140 @@
import React, { Component } from 'react'; import React, { Component } from 'react';
import { SnackbarHOC } from 'educoder'; import { SnackbarHOC } from 'educoder';
import {BrowserRouter as Router,Route,Switch} from 'react-router-dom'; import {BrowserRouter as Router,Route,Switch} from 'react-router-dom';
import Loadable from 'react-loadable'; import Loadable from 'react-loadable';
import Loading from '../../../Loading'; import Loading from '../../../Loading';
import { CNotificationHOC } from '../common/CNotificationHOC' import { CNotificationHOC } from '../common/CNotificationHOC'
import { RouteHOC } from './common' import { RouteHOC } from './common'
import "../css/busyWork.css" import "../css/busyWork.css"
//引入对应跳转的组件 //引入对应跳转的组件
const ListPageIndex = Loadable({ const ListPageIndex = Loadable({
loader: () => import('../ListPageIndex'), loader: () => import('../ListPageIndex'),
loading:Loading, loading:Loading,
}) })
//新建分组/普通作业 //新建分组/普通作业
const NewWork = Loadable({ const NewWork = Loadable({
loader: () => import('./NewWork'), loader: () => import('./NewWork'),
loading:Loading, loading:Loading,
}) })
const CommonWorkPost = Loadable({ const CommonWorkPost = Loadable({
loader: () => import('./CommonWorkPost'), loader: () => import('./CommonWorkPost'),
loading:Loading, loading:Loading,
}) })
const CommonWorkSetting = Loadable({ const CommonWorkSetting = Loadable({
loader: () => import('./CommonWorkSetting'), loader: () => import('./CommonWorkSetting'),
loading:Loading, loading:Loading,
}) })
const CommonWorkList = Loadable({ const CommonWorkList = Loadable({
loader: () => import('./CommonWorkList'), loader: () => import('./CommonWorkList'),
loading:Loading, loading:Loading,
}) })
const CommonWorkQuestion = Loadable({ const CommonWorkQuestion = Loadable({
loader: () => import('./CommonWorkQuestion'), loader: () => import('./CommonWorkQuestion'),
loading:Loading, loading:Loading,
}) })
const CommonWorkAnswer = Loadable({ const CommonWorkAnswer = Loadable({
loader: () => import('./CommonWorkAnswer'), loader: () => import('./CommonWorkAnswer'),
loading:Loading, loading:Loading,
}) })
const CommonWorkAppraise = Loadable({ const CommonWorkAppraise = Loadable({
loader: () => import('./CommonWorkAppraise'), loader: () => import('./CommonWorkAppraise'),
loading:Loading, loading:Loading,
}) })
const CommonWork = Loadable({ const CommonWork = Loadable({
loader: () => import('./commonWork'), loader: () => import('./commonWork'),
loading:Loading, loading:Loading,
}) })
const CommonWorkDetailIndex = Loadable({ const CommonWorkDetailIndex = Loadable({
loader: () => import('./CommonWorkDetailIndex'), loader: () => import('./CommonWorkDetailIndex'),
loading:Loading, loading:Loading,
}) })
class CoursesWorkIndex extends Component{ class CoursesWorkIndex extends Component{
constructor(props) { constructor(props) {
super(props) super(props)
} }
render() { render() {
return ( return (
<div> <div>
<Switch {...this.props}> <Switch {...this.props}>
{/* --------------------------------------------------------------------- */} {/* --------------------------------------------------------------------- */}
{/* --------------------------------------------------------------------- */} {/* --------------------------------------------------------------------- */}
{/* 作业设置 */} {/* 作业设置 */}
<Route exact path="/courses/:coursesId/group_homeworks/:workId/setting" <Route exact path="/classrooms/:coursesId/group_homeworks/:workId/setting"
render={ render={
(props) => (<CommonWorkDetailIndex {...this.props} {...props} {...this.state} />) (props) => (<CommonWorkDetailIndex {...this.props} {...props} {...this.state} />)
} }
></Route> ></Route>
{/* 作品列表 */} {/* 作品列表 */}
<Route exact path="/courses/:coursesId/group_homeworks/:workId/list" <Route exact path="/classrooms/:coursesId/group_homeworks/:workId/list"
render={ render={
(props) => (<CommonWorkDetailIndex {...this.props} {...props} {...this.state} />) (props) => (<CommonWorkDetailIndex {...this.props} {...props} {...this.state} />)
} }
></Route> ></Route>
{/* 作业问答 */} {/* 作业问答 */}
<Route exact path="/courses/:coursesId/group_homeworks/:workId/question" <Route exact path="/classrooms/:coursesId/group_homeworks/:workId/question"
render={ render={
(props) => (<CommonWorkDetailIndex {...this.props} {...props} {...this.state} />) (props) => (<CommonWorkDetailIndex {...this.props} {...props} {...this.state} />)
} }
></Route> ></Route>
{/* 参考答案 */} {/* 参考答案 */}
<Route exact path="/courses/:coursesId/group_homeworks/:workId/answer" <Route exact path="/classrooms/:coursesId/group_homeworks/:workId/answer"
render={ render={
(props) => (<CommonWorkDetailIndex {...this.props} {...props} {...this.state} />) (props) => (<CommonWorkDetailIndex {...this.props} {...props} {...this.state} />)
} }
></Route> ></Route>
{/* 评阅 */} {/* 评阅 */}
<Route exact path="/courses/:coursesId/group_homeworks/:workId/:studentWorkId/appraise" <Route exact path="/classrooms/:coursesId/group_homeworks/:workId/:studentWorkId/appraise"
render={ render={
(props) => (<CommonWorkAppraise {...this.props} {...props} {...this.state} />) (props) => (<CommonWorkAppraise {...this.props} {...props} {...this.state} />)
} }
></Route> ></Route>
<Route exact path="/courses/:coursesId/group_homeworks/:workId/post" <Route exact path="/classrooms/:coursesId/group_homeworks/:workId/post"
render={ render={
(props) => (<CommonWorkPost {...this.props} {...props} {...this.state} />) (props) => (<CommonWorkPost {...this.props} {...props} {...this.state} />)
} }
></Route> ></Route>
<Route exact path="/courses/:coursesId/group_homeworks/:workId/:studentWorkId/post_edit" <Route exact path="/classrooms/:coursesId/group_homeworks/:workId/:studentWorkId/post_edit"
render={ render={
(props) => (<CommonWorkPost {...this.props} {...props} {...this.state} />) (props) => (<CommonWorkPost {...this.props} {...props} {...this.state} />)
} }
></Route> ></Route>
{/* 新建 */} {/* 新建 */}
{/* http://localhost:3007/courses/1309/group_homeworks/9299/edit/1 */} {/* http://localhost:3007/classrooms/1309/group_homeworks/9299/edit/1 */}
<Route exact path="/courses/:coursesId/group_homeworks/:workId/:pageType" <Route exact path="/classrooms/:coursesId/group_homeworks/:workId/:pageType"
render={ render={
(props) => (<NewWork {...this.props} {...props} {...this.state} />) (props) => (<NewWork {...this.props} {...props} {...this.state} />)
} }
></Route> ></Route>
<Route exact path="/courses/:coursesId/group_homeworks/:categroy_id/new" <Route exact path="/classrooms/:coursesId/group_homeworks/:categroy_id/new"
render={ render={
(props) => (<NewWork {...this.props} {...props} {...this.state} />) (props) => (<NewWork {...this.props} {...props} {...this.state} />)
} }
></Route> ></Route>
{/* 作业列表 */} {/* 作业列表 */}
<Route path="/courses/:coursesId/group_homeworks" <Route path="/classrooms/:coursesId/group_homeworks"
render={ render={
(props) => (<ListPageIndex {...this.props} {...props} {...this.state} />) (props) => (<ListPageIndex {...this.props} {...props} {...this.state} />)
} }
></Route> ></Route>
</Switch> </Switch>
</div> </div>
) )
} }
} }
export default RouteHOC() (CNotificationHOC() (SnackbarHOC() ( CoursesWorkIndex) )); export default RouteHOC() (CNotificationHOC() (SnackbarHOC() ( CoursesWorkIndex) ));

@ -167,7 +167,7 @@ class NewWork extends Component{
<div className="educontent mt20 mb50"> <div className="educontent mt20 mb50">
<CBreadcrumb items={[ <CBreadcrumb items={[
{ to: current_user && current_user.first_category_url, name: this.state.course_name}, { to: current_user && current_user.first_category_url, name: this.state.course_name},
{ to: `/courses/${courseId}/${moduleEngName}/${category && category.category_id ? category.category_id : ''}` { to: `/classrooms/${courseId}/${moduleEngName}/${category && category.category_id ? category.category_id : ''}`
, name: category && category.category_name }, , name: category && category.category_name },
{ name: `${ this.isEdit ? '编辑' : '新建'}` } { name: `${ this.isEdit ? '编辑' : '新建'}` }
]}></CBreadcrumb> ]}></CBreadcrumb>
@ -204,4 +204,4 @@ class NewWork extends Component{
} }
} }
export default NewWork; export default NewWork;

@ -91,18 +91,18 @@ class WorkDetailPageHeader extends Component{
`}</style> `}</style>
<CBreadcrumb items={[ <CBreadcrumb items={[
{ to: current_user&&current_user.first_category_url, name: course_name}, { to: current_user&&current_user.first_category_url, name: course_name},
{ to: `/courses/${courseId}/${moduleEngName}/${category_id}`, name: category_name }, { to: `/classrooms/${courseId}/${moduleEngName}/${category_id}`, name: category_name },
window.location.pathname.indexOf('appraise') == -1 ? { } : { to: `/courses/${courseId}/${moduleEngName}/${workId}/list`, name: '作业详情' }, window.location.pathname.indexOf('appraise') == -1 ? { } : { to: `/classrooms/${courseId}/${moduleEngName}/${workId}/list`, name: '作业详情' },
// 1. 与上一条联动当匿评他人作品时TA人作品的作者真实姓名切换为“匿名” // 1. 与上一条联动当匿评他人作品时TA人作品的作者真实姓名切换为“匿名”
window.location.pathname.indexOf('appraise') == -1 ? { name: '作业详情' } : { name: author_name }, window.location.pathname.indexOf('appraise') == -1 ? { name: '作业详情' } : { name: author_name },
// window.location.pathname.indexOf('appraise') == -1 ? { } : { to: `/courses/${courseId}/${moduleEngName}/${workId}/list`, name: '作品列表' }, // window.location.pathname.indexOf('appraise') == -1 ? { } : { to: `/classrooms/${courseId}/${moduleEngName}/${workId}/list`, name: '作品列表' },
// { name: childModuleName } // { name: childModuleName }
]}></CBreadcrumb> ]}></CBreadcrumb>
<div className="clearfix mt20 mb20" > <div className="clearfix mt20 mb20" >
<span className=" fl color-black summaryname"> <span className=" fl color-black summaryname">
{homework_name} {homework_name}
{/* <Link to={"/courses/"+courseId+"/graduation"+"/graduation_tasks/"}>{homework_name}</Link> */} {/* <Link to={"/classrooms/"+courseId+"/graduation"+"/graduation_tasks/"}>{homework_name}</Link> */}
</span> </span>
<CoursesListType <CoursesListType
typelist={homework_status} typelist={homework_status}
@ -137,18 +137,18 @@ class WorkDetailPageHeader extends Component{
<div className="mt10 clearfix edu-back-white poll_list pl5"> <div className="mt10 clearfix edu-back-white poll_list pl5">
<Link <Link
className={`${childModuleName == '作品列表' ? 'active' : '' } `} className={`${childModuleName == '作品列表' ? 'active' : '' } `}
to={`/courses/${courseId}/${moduleEngName}/${workId}/list`}>作品列表</Link> to={`/classrooms/${courseId}/${moduleEngName}/${workId}/list`}>作品列表</Link>
<Link <Link
className={`${childModuleName == '作业描述' ? 'active' : '' } `} className={`${childModuleName == '作业描述' ? 'active' : '' } `}
to={`/courses/${courseId}/${moduleEngName}/${workId}/question`}>作业描述</Link> to={`/classrooms/${courseId}/${moduleEngName}/${workId}/question`}>作业描述</Link>
{view_answer == true && <Link {view_answer == true && <Link
className={`${childModuleName == '参考答案' ? 'active' : '' } `} className={`${childModuleName == '参考答案' ? 'active' : '' } `}
to={`/courses/${courseId}/${moduleEngName}/${workId}/answer`}>参考答案</Link>} to={`/classrooms/${courseId}/${moduleEngName}/${workId}/answer`}>参考答案</Link>}
<Link <Link
className={`${childModuleName == '设置' ? 'active' : '' } `} className={`${childModuleName == '设置' ? 'active' : '' } `}
style={{paddingLeft:this.props.isAdmin()?'38px':'20px'}} style={{paddingLeft:this.props.isAdmin()?'38px':'20px'}}
to={`/courses/${courseId}/${moduleEngName}/${workId}/setting`}>{this.props.isAdmin()?"设置":"得分规则"}</Link> to={`/classrooms/${courseId}/${moduleEngName}/${workId}/setting`}>{this.props.isAdmin()?"设置":"得分规则"}</Link>
{ this.props.tabRightComponents } { this.props.tabRightComponents }

@ -57,7 +57,7 @@ class CoursesBanner extends Component {
componentDidMount() { componentDidMount() {
this.onloadupdatabanner() this.onloadupdatabanner()
on('updatabanner', this.updatabanner) on('updatabanner', this.updatabanner)
if(this.props.match.path==="/courses/:coursesId"){ if(this.props.match.path==="/classrooms/:coursesId"){
if(this.props.user!=undefined){ if(this.props.user!=undefined){
this.props.history.push(this.props.user.first_category_url) this.props.history.push(this.props.user.first_category_url)
} }
@ -77,7 +77,7 @@ class CoursesBanner extends Component {
} }
componentDidUpdate(prevProps) { componentDidUpdate(prevProps) {
if(prevProps.user!=this.props.user){ if(prevProps.user!=this.props.user){
if(this.props.match.path==="/courses/:coursesId"){ if(this.props.match.path==="/classrooms/:coursesId"){
if(this.props.user!=undefined){ if(this.props.user!=undefined){
this.props.history.push(this.props.user.first_category_url) this.props.history.push(this.props.user.first_category_url)
} }
@ -352,11 +352,11 @@ class CoursesBanner extends Component {
var url = `/courses/${id}/duplicate_course.json` var url = `/courses/${id}/duplicate_course.json`
axios.post(url).then((response) => { axios.post(url).then((response) => {
if(response!==undefined){ if(response!==undefined){
window.location.href = "/courses/" + response.data.new_course_id+"/students"; window.location.href = "/classrooms/" + response.data.new_course_id+"/students";
return return
} }
this.modalCancel(); this.modalCancel();
// window.location.href = "/courses/" + response.data.new_course_id; // window.location.href = "/classrooms/" + response.data.new_course_id;
}).catch( (error)=> { }).catch( (error)=> {
this.modalCancel(); this.modalCancel();
@ -450,7 +450,7 @@ class CoursesBanner extends Component {
} }
postsettings=()=>{ postsettings=()=>{
window.location.href = "/courses/" + this.props.match.params.coursesId + "/settings"; window.location.href = "/classrooms/" + this.props.match.params.coursesId + "/settings";
}; };
postsettingstwo=()=>{ postsettingstwo=()=>{
// var ids =1; // var ids =1;
@ -463,7 +463,7 @@ class CoursesBanner extends Component {
// }catch (e) { // }catch (e) {
// //
// } // }
window.location.href = `/courses/${this.props.match.params.coursesId}/newgolds/settings`; window.location.href = `/classrooms/${this.props.match.params.coursesId}/newgolds/settings`;
}; };
@ -748,13 +748,13 @@ background:rgba(204,204,204,0.2) !important;
title={<pre className="antsoancss"> title={<pre className="antsoancss">
{coursedata.teacher_applies_count===undefined?"":coursedata.teacher_applies_count>0? {coursedata.teacher_applies_count===undefined?"":coursedata.teacher_applies_count>0?
<span >您有{coursedata.teacher_applies_count}条新的加入申请 <span >您有{coursedata.teacher_applies_count}条新的加入申请
<a className={"daishenp"} onClick={excellent === true && this.props.isAdminOrStudent() === false ?"":()=>this.setHistoryFun("/courses/"+this.props.match.params.coursesId+"/teachers?tab=2")}> <a className={"daishenp"} onClick={excellent === true && this.props.isAdminOrStudent() === false ?"":()=>this.setHistoryFun("/classrooms/"+this.props.match.params.coursesId+"/teachers?tab=2")}>
<span style={{ <span style={{
color:"#FFA804" color:"#FFA804"
}}> }}>
待审批 待审批
</span></a></span>:""}</pre>}> </span></a></span>:""}</pre>}>
<span className="color-grey-c font-16" onClick={excellent === true && this.props.isAdminOrStudent() === false ?"":()=>this.setHistoryFun("/courses/"+this.props.match.params.coursesId+"/teachers")}> <span className="color-grey-c font-16" onClick={excellent === true && this.props.isAdminOrStudent() === false ?"":()=>this.setHistoryFun("/classrooms/"+this.props.match.params.coursesId+"/teachers")}>
<span className={"mr10"}>教师</span> <span className={"mr10"}>教师</span>
<span className={"mr10"}>{coursedata.teacher_count}</span> <span className={"mr10"}>{coursedata.teacher_count}</span>
</span> </span>
@ -763,7 +763,7 @@ background:rgba(204,204,204,0.2) !important;
<Breadcrumb.Item <Breadcrumb.Item
className={excellent === true && this.props.isAdminOrStudent() === false ?"":excellent===true&&coursedata.course_end === true?this.props.isAdminOrTeacher()===true?"pointer":"":"pointer"} className={excellent === true && this.props.isAdminOrStudent() === false ?"":excellent===true&&coursedata.course_end === true?this.props.isAdminOrTeacher()===true?"pointer":"":"pointer"}
onClick={excellent === true && this.props.isAdminOrStudent() === false ?"":excellent===true&&coursedata.course_end === true?this.props.isAdminOrTeacher()===true?()=>this.setHistoryFun("/courses/"+this.props.match.params.coursesId+"/students"):"":()=>this.setHistoryFun("/courses/"+this.props.match.params.coursesId+"/students")} onClick={excellent === true && this.props.isAdminOrStudent() === false ?"":excellent===true&&coursedata.course_end === true?this.props.isAdminOrTeacher()===true?()=>this.setHistoryFun("/classrooms/"+this.props.match.params.coursesId+"/students"):"":()=>this.setHistoryFun("/classrooms/"+this.props.match.params.coursesId+"/students")}
> >
<span className="color-grey-c font-16"><span className={"mr10 ml10"}>学生</span> <span className={"mr10"}>{coursedata.student_count}</span></span> <span className="color-grey-c font-16"><span className={"mr10 ml10"}>学生</span> <span className={"mr10"}>{coursedata.student_count}</span></span>
</Breadcrumb.Item> </Breadcrumb.Item>
@ -775,7 +775,7 @@ background:rgba(204,204,204,0.2) !important;
</Breadcrumb> </Breadcrumb>
{/*<li className={"mt7 teachersbox"} >*/} {/*<li className={"mt7 teachersbox"} >*/}
{/*<Link to={"/courses/"+this.props.match.params.coursesId+"/teachers"}>*/} {/*<Link to={"/classrooms/"+this.props.match.params.coursesId+"/teachers"}>*/}
{/*<span className="color-grey-c fl font-16">教师</span>*/} {/*<span className="color-grey-c fl font-16">教师</span>*/}
{/*<span*/} {/*<span*/}
{/*className="color-white fl font-16 bannerurli">{coursedata.teacher_count}</span>*/} {/*className="color-white fl font-16 bannerurli">{coursedata.teacher_count}</span>*/}
@ -783,7 +783,7 @@ background:rgba(204,204,204,0.2) !important;
{/*</li>*/} {/*</li>*/}
{/*<li className={"mt7 teachersbox"}>*/} {/*<li className={"mt7 teachersbox"}>*/}
{/*<Link to={"/courses/"+this.props.match.params.coursesId+"/students"}>*/} {/*<Link to={"/classrooms/"+this.props.match.params.coursesId+"/students"}>*/}
{/*<span className="color-grey-c fl font-16">学生</span>*/} {/*<span className="color-grey-c fl font-16">学生</span>*/}
{/*<span*/} {/*<span*/}
{/*className={coursedata.credit===null?"color-white fl font-16 bannerurlis":"color-white fl font-16 bannerurli"}>*/} {/*className={coursedata.credit===null?"color-white fl font-16 bannerurlis":"color-white fl font-16 bannerurli"}>*/}

@ -550,13 +550,13 @@ class Coursesleftnav extends Component{
if(positiontype==="files"){ if(positiontype==="files"){
this.updasaveNavmoda() this.updasaveNavmoda()
trigger('updateNavSuccess') trigger('updateNavSuccess')
this.props.history.push(`/courses/${coursesId}/file/${result.data.category_id}`); this.props.history.push(`/classrooms/${coursesId}/file/${result.data.category_id}`);
} }
if(positiontype==="boards"){ if(positiontype==="boards"){
this.updasaveNavmoda() this.updasaveNavmoda()
trigger('updateNavSuccess') trigger('updateNavSuccess')
this.props.history.push(`/courses/${coursesId}/boards/${result.data.category_id}`); this.props.history.push(`/classrooms/${coursesId}/boards/${result.data.category_id}`);
} }
if(positiontype!="course_groups"){ if(positiontype!="course_groups"){
@ -565,7 +565,7 @@ class Coursesleftnav extends Component{
if(positiontype==="course_groups"){ if(positiontype==="course_groups"){
this.props.updataleftNavfun(); this.props.updataleftNavfun();
this.props.history.push(`/courses/${coursesId}/course_groups/${result.data.group_id}`); this.props.history.push(`/classrooms/${coursesId}/course_groups/${result.data.group_id}`);
} }
} }
@ -1100,7 +1100,7 @@ class Coursesleftnav extends Component{
// visible={toopvisible===true&&toopvisibleindex===iem.category_id?true:false} // visible={toopvisible===true&&toopvisibleindex===iem.category_id?true:false}
visible={false} visible={false}
> >
{/*"/courses/"+this.props.match.params.coursesId+"/"+item.type+"/"+iem.category_type+"/"+iem.category_id*/} {/*"/classrooms/"+this.props.match.params.coursesId+"/"+item.type+"/"+iem.category_type+"/"+iem.category_id*/}
<a className={"Draggablelichild"} key={index}> <a className={"Draggablelichild"} key={index}>
<li className="clearfix width93 Draggableli" key={index} onClick={(e)=>this.selectnavids(e,key,iem.category_id,item.type+"child",iem.second_category_url,key)} onMouseLeave={(e)=>this.twosandianhide(e,index,item.type)} onMouseEnter={(e)=>this.twosandianshow(e,index,item.type)} <li className="clearfix width93 Draggableli" key={index} onClick={(e)=>this.selectnavids(e,key,iem.category_id,item.type+"child",iem.second_category_url,key)} onMouseLeave={(e)=>this.twosandianhide(e,index,item.type)} onMouseEnter={(e)=>this.twosandianshow(e,index,item.type)}
key={index} key={index}

@ -161,7 +161,7 @@ class CoursesHome extends Component {
</div> </div>
{user && user.user_identity !== '学生' ? {user && user.user_identity !== '学生' ?
<Fragment> <Fragment>
<a className="btn-new" style={{ top: '67px' }} onClick={() => { this.getUser("/courses/new") }} > <img src={btnNew} width={40} alt="创建教学课堂" /> </a> <a className="btn-new" style={{ top: '67px' }} onClick={() => { this.getUser("/classrooms/new") }} > <img src={btnNew} width={40} alt="创建教学课堂" /> </a>
<a className="btn-join" style={{ top: '123px' }} onClick={() => { window._header_componentHandler.tojoinclass() }} > <img src={btnJoin} width={40} alt="加入教学课堂" /> </a> <a className="btn-join" style={{ top: '123px' }} onClick={() => { window._header_componentHandler.tojoinclass() }} > <img src={btnJoin} width={40} alt="加入教学课堂" /> </a>
</Fragment> : null </Fragment> : null
} }
@ -190,4 +190,4 @@ class CoursesHome extends Component {
export default CoursesHome; export default CoursesHome;
// {/*<Pagination showQuickJumper current={page} pageSize={16} total={coursesHomelist.courses_count} onChange={this.onChange} />*/} // {/*<Pagination showQuickJumper current={page} pageSize={16} total={coursesHomelist.courses_count} onChange={this.onChange} />*/}

@ -185,12 +185,12 @@ class Addcourses extends Component{
if(Addcoursestype===true){ if(Addcoursestype===true){
this.props.hideAddcoursestype(); this.props.hideAddcoursestype();
} }
window.location.href ="/courses/"+course_id+"/students"; window.location.href ="/classrooms/"+course_id+"/students";
} }
} }
submitasyns=(course_id)=>{ submitasyns=(course_id)=>{
window.location.href ="/courses/"+course_id+"/students"; window.location.href ="/classrooms/"+course_id+"/students";
} }
submittojoinclass=()=>{ submittojoinclass=()=>{
@ -266,7 +266,7 @@ class Addcourses extends Component{
if(response.data.status===0){ if(response.data.status===0){
// https://www.trustie.net/issues/22365 // https://www.trustie.net/issues/22365
if (response.data.course_id == 2704) { if (response.data.course_id == 2704) {
this.props.history.push('/courses/2704/boards/8367/messages/42072') this.props.history.push('/classrooms/2704/boards/8367/messages/42072')
return; return;
} }
notification.open({ notification.open({

@ -237,7 +237,7 @@ class Ecerciseallbackagain extends Component{
> >
<a style={{"textAlign": "left"}} <a style={{"textAlign": "left"}}
className="task-hide color-grey-name" className="task-hide color-grey-name"
href={`/users/${item.user_id}/courses`} href={`/users/${item.user_id}/classrooms`}
target={'_blank'} target={'_blank'}
title={item.user_name} title={item.user_name}
>{item.user_name}</a> >{item.user_name}</a>
@ -272,4 +272,4 @@ class Ecerciseallbackagain extends Component{
) )
} }
} }
export default Ecerciseallbackagain; export default Ecerciseallbackagain;

@ -487,7 +487,7 @@ class Exercise extends Component{
this.props.isAdmin()===true? this.props.isAdmin()===true?
<li className="fr"> <li className="fr">
<p className="fl"><UseBank {...this.props} {...this.state} object_type={"exercise"} useBankSuccess={this.useBankSuccess}></UseBank></p> <p className="fl"><UseBank {...this.props} {...this.state} object_type={"exercise"} useBankSuccess={this.useBankSuccess}></UseBank></p>
{course_types&&course_types.course_status===0?<WordsBtn style="blue" className="font-16" to={`/courses/${this.props.match.params.coursesId}/exercises/new`}>新建</WordsBtn>:""} {course_types&&course_types.course_status===0?<WordsBtn style="blue" className="font-16" to={`/classrooms/${this.props.match.params.coursesId}/exercises/new`}>新建</WordsBtn>:""}
</li>:"" </li>:""
} }
@ -502,7 +502,7 @@ class Exercise extends Component{
<p className="fl font-14" style={{"marginTop":"27px"}}> <p className="fl font-14" style={{"marginTop":"27px"}}>
<span className="mr20">{exercises_counts && exercises_counts.exercises_total_counts}个试卷</span> <span className="mr20">{exercises_counts && exercises_counts.exercises_total_counts}个试卷</span>
<span className="mr20">已发布{exercises_counts && exercises_counts.exercises_published_counts}</span> <span className="mr20">已发布{exercises_counts && exercises_counts.exercises_published_counts}</span>
<span>未发布{exercises_counts && exercises_counts.exercises_unpublish_counts}</span> <span>未发布{exercises_counts && exercises_counts.exercises_unpublish_counts}</span>
</p> </p>
<div className="fr mt16 mb16 searchView"> <div className="fr mt16 mb16 searchView">
{publicSearchs("请输入名称进行搜索",this.searchInfo,this.inputStudent,this.inputStudent)} {publicSearchs("请输入名称进行搜索",this.searchInfo,this.inputStudent,this.inputStudent)}

@ -114,22 +114,22 @@ class ExerciseListItem extends Component{
<div className="flex1 pr"> <div className="flex1 pr">
<p className="clearfix mb20"> <p className="clearfix mb20">
{/*<Link to={`/courses/${coursesId}/exercises/${item.id}/exercises/student_exercise_list?tab=0`} className="fl font-16 font-bd mt2 color-grey-3 task-hide" style={{"maxWidth":"600px"}}>{item.exercise_name}</Link>*/} {/*<Link to={`/classrooms/${coursesId}/exercises/${item.id}/exercises/student_exercise_list?tab=0`} className="fl font-16 font-bd mt2 color-grey-3 task-hide" style={{"maxWidth":"600px"}}>{item.exercise_name}</Link>*/}
{ {
this.props.isAdmin()? <a className="fl font-16 font-bd mt2 color-grey-3 task-hide comnonwidth580 pointer" this.props.isAdmin()? <a className="fl font-16 font-bd mt2 color-grey-3 task-hide comnonwidth580 pointer"
title={item.exercise_name} title={item.exercise_name}
onClick={()=>this.toDetailPage(`/courses/${coursesId}/exercises/${item.id}/student_exercise_list?tab=0`)}>{item.exercise_name}</a>:"" onClick={()=>this.toDetailPage(`/classrooms/${coursesId}/exercises/${item.id}/student_exercise_list?tab=0`)}>{item.exercise_name}</a>:""
} }
{ {
this.props.isStudent()? this.props.isStudent()?
<a className="fl font-16 font-bd mt2 color-grey-3 task-hide comnonwidth580 pointer" title={item.exercise_name} onClick={()=>this.toDetailPage(`/courses/${coursesId}/exercises/${item.id}/student_exercise_list?tab=0`)}>{item.exercise_name}</a>:"" <a className="fl font-16 font-bd mt2 color-grey-3 task-hide comnonwidth580 pointer" title={item.exercise_name} onClick={()=>this.toDetailPage(`/classrooms/${coursesId}/exercises/${item.id}/student_exercise_list?tab=0`)}>{item.exercise_name}</a>:""
} }
{ {
this.props.isNotMember()? item.lock_status === 0 ? this.props.isNotMember()? item.lock_status === 0 ?
<span className="fl mt3 font-16 font-bd color-dark comnonwidth580 pointer" title={"私有属性,非课堂成员不能访问"}>{item.exercise_name}</span> <span className="fl mt3 font-16 font-bd color-dark comnonwidth580 pointer" title={"私有属性,非课堂成员不能访问"}>{item.exercise_name}</span>
: <a className="fl font-16 font-bd mt2 color-grey-3 task-hide comnonwidth580 pointer" title={item.exercise_name} onClick={()=>this.toDetailPage(`/courses/${coursesId}/exercises/${item.id}/student_exercise_list?tab=0`)}>{item.exercise_name}</a>:"" : <a className="fl font-16 font-bd mt2 color-grey-3 task-hide comnonwidth580 pointer" title={item.exercise_name} onClick={()=>this.toDetailPage(`/classrooms/${coursesId}/exercises/${item.id}/student_exercise_list?tab=0`)}>{item.exercise_name}</a>:""
} }
{ {
@ -189,9 +189,9 @@ class ExerciseListItem extends Component{
{ IsAdmin &&<div className="homepagePostSetting" style={{"right":"-17px","top":"46px","display":"block","width":"200px"}}> { IsAdmin &&<div className="homepagePostSetting" style={{"right":"-17px","top":"46px","display":"block","width":"200px"}}>
<a className="btn colorblue font-16 ml20" onClick={()=>this.toDetailPage(`/courses/${coursesId}/exercises/${item.id}/student_exercise_list?tab=0`)}>查看详情</a> <a className="btn colorblue font-16 ml20" onClick={()=>this.toDetailPage(`/classrooms/${coursesId}/exercises/${item.id}/student_exercise_list?tab=0`)}>查看详情</a>
<Link className="btn colorblue font-16 ml20" to={`/courses/${coursesId}/exercises/${item.id}/edit`}>编辑</Link> <Link className="btn colorblue font-16 ml20" to={`/classrooms/${coursesId}/exercises/${item.id}/edit`}>编辑</Link>
<Link className="btn colorblue ml20 font-16" to={`/courses/${coursesId}/exercises/${item.id}/student_exercise_list?tab=3`}>设置</Link> <Link className="btn colorblue ml20 font-16" to={`/classrooms/${coursesId}/exercises/${item.id}/student_exercise_list?tab=3`}>设置</Link>
</div> } </div> }
</p> </p>
@ -202,7 +202,7 @@ class ExerciseListItem extends Component{
{/*<li className="edu-position edu-position-hidebox">*/} {/*<li className="edu-position edu-position-hidebox">*/}
{/*<i className="fa fa-bars color-grey-b"></i>*/} {/*<i className="fa fa-bars color-grey-b"></i>*/}
{/*<ul className="edu-position-hide undis">*/} {/*<ul className="edu-position-hide undis">*/}
{/*<li> <Link className="" to={`/courses/${coursesId}/exercises/${item.id}/edit`}>编辑</Link></li>*/} {/*<li> <Link className="" to={`/classrooms/${coursesId}/exercises/${item.id}/edit`}>编辑</Link></li>*/}
{/*<li> <a className="" href={`*/} {/*<li> <a className="" href={`*/}
{/*/courses/${coursesId}/exercises/${item.id}/student_exercise_list?tab=3`*/} {/*/courses/${coursesId}/exercises/${item.id}/student_exercise_list?tab=3`*/}
{/*}>设置</a></li>*/} {/*}>设置</a></li>*/}
@ -216,10 +216,10 @@ class ExerciseListItem extends Component{
{ {
IsStudent && IsStudent &&
<div className="homepagePostSetting" style={{"right":"0px","top":"46px","position":"absolute","display":"block"}}> <div className="homepagePostSetting" style={{"right":"0px","top":"46px","position":"absolute","display":"block"}}>
<li className={"fl"}> <a className="btn colorblue font-16" onClick={()=>this.toDetailPage(`/courses/${coursesId}/exercises/${item.id}/student_exercise_list?tab=0`)}>查看详情</a></li> <li className={"fl"}> <a className="btn colorblue font-16" onClick={()=>this.toDetailPage(`/classrooms/${coursesId}/exercises/${item.id}/student_exercise_list?tab=0`)}>查看详情</a></li>
{item.current_status ===0&&item.exercise_status>1? <li className={"fl ml20"}> <Link className="btn colorblue font-16" to={`/courses/${coursesId}/exercises/${item.id}/users/${this.props.current_user.login}`}>继续答题</Link></li>: {item.current_status ===0&&item.exercise_status>1? <li className={"fl ml20"}> <Link className="btn colorblue font-16" to={`/classrooms/${coursesId}/exercises/${item.id}/users/${this.props.current_user.login}`}>继续答题</Link></li>:
item.current_status ===1&&item.exercise_status>1? <li className={"fl ml20"}> <a className="btn colorblue font-16" target="_blank" href={`/courses/${coursesId}/exercises/${item.id}/users/${this.props.current_user.login}`}>查看答题</a></li>: item.current_status ===1&&item.exercise_status>1? <li className={"fl ml20"}> <a className="btn colorblue font-16" target="_blank" href={`/classrooms/${coursesId}/exercises/${item.id}/users/${this.props.current_user.login}`}>查看答题</a></li>:
item.current_status ===2&&item.exercise_status>1? <li className={"fl ml20"}s> <a className="btn colorblue font-16" onClick={()=>this.setgameexercise(`/courses/${coursesId}/exercises/${item.id}/users/${this.props.current_user.login}`)}>开始答题</a></li>:""} item.current_status ===2&&item.exercise_status>1? <li className={"fl ml20"}s> <a className="btn colorblue font-16" onClick={()=>this.setgameexercise(`/classrooms/${coursesId}/exercises/${item.id}/users/${this.props.current_user.login}`)}>开始答题</a></li>:""}
</div> </div>
} }
@ -227,7 +227,7 @@ class ExerciseListItem extends Component{
this.props.isNotMember()? item.lock_status === 0 ? this.props.isNotMember()? item.lock_status === 0 ?
"" ""
: <div className="homepagePostSetting" style={{"right":"0px","top":"42px","position":"absolute","display":"block"}}> : <div className="homepagePostSetting" style={{"right":"0px","top":"42px","position":"absolute","display":"block"}}>
<li> <a className="btn colorblue font-16" onClick={()=>this.toDetailPage(`/courses/${coursesId}/exercises/${item.id}/student_exercise_list?tab=0`)}>查看详情</a></li> <li> <a className="btn colorblue font-16" onClick={()=>this.toDetailPage(`/classrooms/${coursesId}/exercises/${item.id}/student_exercise_list?tab=0`)}>查看详情</a></li>
</div>:"" </div>:""
} }
@ -236,4 +236,4 @@ class ExerciseListItem extends Component{
) )
} }
} }
export default ExerciseListItem export default ExerciseListItem

@ -40,21 +40,21 @@ class ExerciceNew extends Component{
this.state = { this.state = {
} }
} }
componentDidMount = () => { componentDidMount = () => {
} }
initData = (data) => { initData = (data) => {
this.setState({left_banner_id: data.left_banner_id}) this.setState({left_banner_id: data.left_banner_id})
} }
render() { render() {
let { left_banner_id } = this.state; let { left_banner_id } = this.state;
const { current_user } = this.props const { current_user } = this.props
const courseId=this.props.match.params.coursesId; const courseId=this.props.match.params.coursesId;
const isEdit = this.isEdit; const isEdit = this.isEdit;
@ -62,19 +62,19 @@ class ExerciceNew extends Component{
document.title=this.props.coursedata&&this.props.coursedata.name; document.title=this.props.coursedata&&this.props.coursedata.name;
return( return(
<div className="newMain exerciseNew"> <div className="newMain exerciseNew">
<div className="edu-class-container edu-position courseForm"> <div className="edu-class-container edu-position courseForm">
{ current_user && <CBreadcrumb items={[ { current_user && <CBreadcrumb items={[
{ to: current_user&&current_user.first_category_url, name: this.props.coursedata ? this.props.coursedata.name : ''}, { to: current_user&&current_user.first_category_url, name: this.props.coursedata ? this.props.coursedata.name : ''},
{ to: `/courses/${courseId}/exercises/${left_banner_id}`, name: '试卷列表' }, { to: `/classrooms/${courseId}/exercises/${left_banner_id}`, name: '试卷列表' },
{ name: this.isEdit ? '编辑试卷' : '新建试卷'} { name: this.isEdit ? '编辑试卷' : '新建试卷'}
]}></CBreadcrumb> } ]}></CBreadcrumb> }
<p className="clearfix mt20 mb20"> <p className="clearfix mt20 mb20">
<span className="fl font-24 color-grey-3">{this.isEdit ? "编辑" : "新建"}试卷</span> <span className="fl font-24 color-grey-3">{this.isEdit ? "编辑" : "新建"}试卷</span>
<a href="javascript:void(0)" className="color-grey-6 fr font-16 mr2" <a href="javascript:void(0)" className="color-grey-6 fr font-16 mr2"
// () => this.props.history.length == 1 ? : this.props.history.goBack() // () => this.props.history.length == 1 ? : this.props.history.goBack()
onClick={() => this.props.history.push(`/courses/${courseId}/exercises/${left_banner_id}`)}> onClick={() => this.props.history.push(`/classrooms/${courseId}/exercises/${left_banner_id}`)}>
返回 返回
</a> </a>
</p> </p>
@ -91,4 +91,4 @@ class ExerciceNew extends Component{
} }
} }
// RouteHOC() // RouteHOC()
export default (ExerciceNew); export default (ExerciceNew);

@ -79,7 +79,7 @@ class ExerciseNewCommon extends Component{
} }
fetchExercise = () => { fetchExercise = () => {
const Id = this.props.match.params.Id const Id = this.props.match.params.Id
this.isEdit = this.props.isEdit || !!Id this.isEdit = this.props.isEdit || !!Id
if (this.isEdit) { if (this.isEdit) {
const url = this.props.exercise_url ? `/${this.props.exercise_url }/${Id}.json` : `/exercises/${Id}/edit.json` const url = this.props.exercise_url ? `/${this.props.exercise_url }/${Id}.json` : `/exercises/${Id}/edit.json`
@ -194,15 +194,15 @@ class ExerciseNewCommon extends Component{
} }
if (exercise_questions[index].question_id) { // 编辑 if (exercise_questions[index].question_id) { // 编辑
this.setState( this.setState(
(prevState) => ({ (prevState) => ({
exercise_questions : update(prevState.exercise_questions, {[index]: { isNew: {$set: false}}}) exercise_questions : update(prevState.exercise_questions, {[index]: { isNew: {$set: false}}})
// update(prevState.exercise_questions, {$splice: [[index, 1]]}) // update(prevState.exercise_questions, {$splice: [[index, 1]]})
}) })
) )
} else { // 新建 } else { // 新建
this.setState( this.setState(
(prevState) => ({ (prevState) => ({
exercise_questions : update(prevState.exercise_questions, {$splice: [[index, 1]]}) exercise_questions : update(prevState.exercise_questions, {$splice: [[index, 1]]})
}) })
) )
} }
@ -214,7 +214,7 @@ class ExerciseNewCommon extends Component{
} }
if (this._checkIsEditing()) { if (this._checkIsEditing()) {
return; return;
} }
if (type == Q_TYPE_SHIXUN) { if (type == Q_TYPE_SHIXUN) {
this.addShixun(question_id_to_insert_after) this.addShixun(question_id_to_insert_after)
} else { } else {
@ -237,7 +237,7 @@ class ExerciseNewCommon extends Component{
// TODO 弹框选择实训 // TODO 弹框选择实训
if (this._checkIsEditing()) { if (this._checkIsEditing()) {
return; return;
} }
this.refs.shixunChooseModal.setVisible(true) this.refs.shixunChooseModal.setVisible(true)
this.question_id_to_insert_after = question_id_to_insert_after; this.question_id_to_insert_after = question_id_to_insert_after;
return; return;
@ -249,11 +249,11 @@ class ExerciseNewCommon extends Component{
editQestion = (index) => { editQestion = (index) => {
if (this._checkIsEditing()) { if (this._checkIsEditing()) {
return; return;
} }
this.editingId = `#question_${index}` this.editingId = `#question_${index}`
this.setState( this.setState(
(prevState) => ({ (prevState) => ({
exercise_questions : update(prevState.exercise_questions, {[index]: { isNew: {$set: true}}}) exercise_questions : update(prevState.exercise_questions, {[index]: { isNew: {$set: true}}})
}) })
) )
@ -261,8 +261,8 @@ class ExerciseNewCommon extends Component{
onSort = (index, question_id, isUp) => { onSort = (index, question_id, isUp) => {
if (this._checkIsEditing()) { if (this._checkIsEditing()) {
return; return;
} }
const url = `/${this.props.exercise_url_questions || 'exercise_questions'}/${question_id}/up_down.json` const url = `/${this.props.exercise_url_questions || 'exercise_questions'}/${question_id}/up_down.json`
axios.post(url, { opr: isUp ? 'up' : 'down'}) axios.post(url, { opr: isUp ? 'up' : 'down'})
.then((response) => { .then((response) => {
@ -305,16 +305,16 @@ class ExerciseNewCommon extends Component{
const _indexBefore = question_id_to_insert_after ? this.findIndexById(question_id_to_insert_after) : this.state.exercise_questions.length - 1 const _indexBefore = question_id_to_insert_after ? this.findIndexById(question_id_to_insert_after) : this.state.exercise_questions.length - 1
for (let i = _indexBefore; i >= 0; i--) { for (let i = _indexBefore; i >= 0; i--) {
if(this.state.exercise_questions[i].question_type == question_type) { if(this.state.exercise_questions[i].question_type == question_type) {
init_question_score = this.state.exercise_questions[i].question_score init_question_score = this.state.exercise_questions[i].question_score
break; break;
} }
} }
return init_question_score; return init_question_score;
} }
addEditingQuestion = (question_type, question_id_to_insert_after, otherAttributes) => { addEditingQuestion = (question_type, question_id_to_insert_after, otherAttributes) => {
let init_question_score = this.getInitScore(question_type, question_id_to_insert_after) let init_question_score = this.getInitScore(question_type, question_id_to_insert_after)
let questionObj = { let questionObj = {
question_type: question_type, // 需要这个通过类型判断 question_type: question_type, // 需要这个通过类型判断
init_question_score: init_question_score, init_question_score: init_question_score,
@ -325,7 +325,7 @@ class ExerciseNewCommon extends Component{
const { exercise_questions } = this.state; const { exercise_questions } = this.state;
let new_exercise_questions = exercise_questions.slice(0) let new_exercise_questions = exercise_questions.slice(0)
let newIndex = new_exercise_questions.length; let newIndex = new_exercise_questions.length;
if (question_id_to_insert_after) { if (question_id_to_insert_after) {
const _indexBefore = this.findIndexById(question_id_to_insert_after) const _indexBefore = this.findIndexById(question_id_to_insert_after)
new_exercise_questions.splice(_indexBefore + 1, 0, questionObj) new_exercise_questions.splice(_indexBefore + 1, 0, questionObj)
@ -347,7 +347,7 @@ class ExerciseNewCommon extends Component{
return i; return i;
} }
} }
} }
onQestionDelete = (question_id) => { onQestionDelete = (question_id) => {
this.props.confirm({ this.props.confirm({
content: `确认要删除这个问题吗?`, content: `确认要删除这个问题吗?`,
@ -363,15 +363,15 @@ class ExerciseNewCommon extends Component{
// const index = this.findIndexById(question_id) // const index = this.findIndexById(question_id)
// this.setState( // this.setState(
// (prevState) => ({ // (prevState) => ({
// exercise_questions : update(prevState.exercise_questions, {$splice: [[index, 1]]}) // exercise_questions : update(prevState.exercise_questions, {$splice: [[index, 1]]})
// }) // })
// ) // )
} }
}) })
.catch(function (error) { .catch(function (error) {
console.log(error); console.log(error);
}); });
} }
}) })
} }
@ -382,14 +382,14 @@ class ExerciseNewCommon extends Component{
goToPreview = () => { goToPreview = () => {
const exercise_id = this.props.match.params.Id const exercise_id = this.props.match.params.Id
const courseId = this.props.match.params.coursesId const courseId = this.props.match.params.coursesId
this.props.history.push(`/courses/${courseId}/exercises/${exercise_id}/student_exercise_list?tab=2`) this.props.history.push(`/classrooms/${courseId}/exercises/${exercise_id}/student_exercise_list?tab=2`)
} }
getAddQuestionUrl = () => { getAddQuestionUrl = () => {
const Id = this.props.match.params.Id const Id = this.props.match.params.Id
const url = this.props.exercise_url_questions ? `/${this.props.exercise_url_questions}.json` : `/exercises/${Id}/exercise_questions.json` const url = this.props.exercise_url_questions ? `/${this.props.exercise_url_questions}.json` : `/exercises/${Id}/exercise_questions.json`
return url; return url;
} }
getEditQuestionUrl = (question_id) => { getEditQuestionUrl = (question_id) => {
const editUrl = this.props.exercise_url_questions ? `/${this.props.exercise_url_questions}/${question_id}.json` : `/exercise_questions/${question_id}.json` const editUrl = this.props.exercise_url_questions ? `/${this.props.exercise_url_questions}/${question_id}.json` : `/exercise_questions/${question_id}.json`
return editUrl; return editUrl;
} }
@ -400,7 +400,7 @@ class ExerciseNewCommon extends Component{
// return '' // return ''
// } // }
// const { getFieldDecorator } = this.props.form; // const { getFieldDecorator } = this.props.form;
const { q_counts, q_scores, q_doubles, q_doubles_scores, q_judges, q_judges_scores, const { q_counts, q_scores, q_doubles, q_doubles_scores, q_judges, q_judges_scores,
q_mains, q_mains_scores, q_nulls, q_nulls_scores, q_shixuns, q_shixuns_scores, q_singles, q_singles_scores} = exercise_types; q_mains, q_mains_scores, q_nulls, q_nulls_scores, q_shixuns, q_shixuns_scores, q_singles, q_singles_scores} = exercise_types;
const formItemLayout = { const formItemLayout = {
labelCol: { labelCol: {
@ -458,7 +458,7 @@ class ExerciseNewCommon extends Component{
max-width: 1128px; max-width: 1128px;
} }
`}</style> `}</style>
{!this.state.editMode && <div className="padding20-30" style={{ background: '#fff'}}> {!this.state.editMode && <div className="padding20-30" style={{ background: '#fff'}}>
<div className="displayTitle font-16"> <div className="displayTitle font-16">
@ -470,7 +470,7 @@ class ExerciseNewCommon extends Component{
<div className="displayDescription color-grey-9" dangerouslySetInnerHTML={{__html: exercise_description}} <div className="displayDescription color-grey-9" dangerouslySetInnerHTML={{__html: exercise_description}}
style={{whiteSpace: 'pre-wrap'}} style={{whiteSpace: 'pre-wrap'}}
></div> ></div>
</div>} </div>}
{this.state.editMode && <Form {...formItemLayout} {this.state.editMode && <Form {...formItemLayout}
// onSubmit={this.handleSubmit} // onSubmit={this.handleSubmit}
@ -518,12 +518,12 @@ class ExerciseNewCommon extends Component{
</Form.Item> </Form.Item>
<Form.Item> <Form.Item>
{/* defalutSubmitbtn */} {/* defalutSubmitbtn */}
<a className="task-btn task-btn-orange fr mt4" style={{height: '30px', width: '70px'}} <a className="task-btn task-btn-orange fr mt4" style={{height: '30px', width: '70px'}}
onClick={this.onSaveExercise} onClick={this.onSaveExercise}
>保存</a> >保存</a>
{ this.isEdit && <a onClick={() => this.setState({editMode: false})} className="defalutCancelbtn fr mt4" { this.isEdit && <a onClick={() => this.setState({editMode: false})} className="defalutCancelbtn fr mt4"
style={{height: '30px', width: '70px', fontSize: '14px', lineHeight: '30px', marginRight: '16px'}}>取消</a>} style={{height: '30px', width: '70px', fontSize: '14px', lineHeight: '30px', marginRight: '16px'}}>取消</a>}
{/* <Button type="primary" onClick={this.onSaveExercise} className="fr">保存</Button> */} {/* <Button type="primary" onClick={this.onSaveExercise} className="fr">保存</Button> */}
</Form.Item> </Form.Item>
@ -532,7 +532,7 @@ class ExerciseNewCommon extends Component{
<a className="defalutCancelbtn fl" onClick={() => {}}>取消</ a> <a className="defalutCancelbtn fl" onClick={() => {}}>取消</ a>
</div> */} </div> */}
</Form>} </Form>}
<p className="clearfix padding20-30 color-grey-9"> <p className="clearfix padding20-30 color-grey-9">
<span className="fl"> <span className="fl">
@ -544,7 +544,7 @@ class ExerciseNewCommon extends Component{
{ !!q_shixuns && <span className="mr20">实训题{q_shixuns}{q_shixuns_scores}</span> } { !!q_shixuns && <span className="mr20">实训题{q_shixuns}{q_shixuns_scores}</span> }
</span> </span>
<span className="fr"> <span className="fr">
{ !!q_counts && { !!q_counts &&
<span> <span>
合计 <span className="color-blue">{q_counts}</span> 合计 <span className="color-blue">{q_counts}</span>
<span className={`${q_scores > 100 ? 'color-red font-bd' : 'color-orange'}`}>{q_scores}</span> <span className={`${q_scores > 100 ? 'color-red font-bd' : 'color-orange'}`}>{q_scores}</span>
@ -582,7 +582,7 @@ class ExerciseNewCommon extends Component{
} }
} else if (item.question_type == 5) { } else if (item.question_type == 5) {
if (item.isNew) { if (item.isNew) {
return <ShixunEditor {...this.props} {...item} index={index} {...commonHandler} return <ShixunEditor {...this.props} {...item} index={index} {...commonHandler}
chooseShixunSuccess={this.chooseShixunSuccess} chooseShixunSuccess={this.chooseShixunSuccess}
></ShixunEditor> ></ShixunEditor>
} else { } else {
@ -622,4 +622,4 @@ class ExerciseNewCommon extends Component{
} }
} }
// RouteHOC() // RouteHOC()
export default (ExerciseNewCommon); export default (ExerciseNewCommon);

@ -669,7 +669,7 @@ class Studentshavecompletedthelist extends Component {
record.score_open===true? record.score_open===true?
<a style={{textAlign: "center",width:"98px"}} className="color-blue" <a style={{textAlign: "center",width:"98px"}} className="color-blue"
target="_blank" target="_blank"
href={`/courses/${this.props.match.params.coursesId}/exercises/${this.props.match.params.Id}/users/${record.myid}`}>查看</a> href={`/classrooms/${this.props.match.params.coursesId}/exercises/${this.props.match.params.Id}/users/${record.myid}`}>查看</a>
:"" :""
: :
<span style={{textAlign: "center", color: '#999999',width:"98px"}}>--</span> <span style={{textAlign: "center", color: '#999999',width:"98px"}}>--</span>
@ -940,7 +940,7 @@ class Studentshavecompletedthelist extends Component {
: :
<a style={{textAlign: "center"}} className="color-blue" <a style={{textAlign: "center"}} className="color-blue"
target="_blank" target="_blank"
href={`/courses/${this.props.match.params.coursesId}/exercises/${this.props.match.params.Id}/users/${record.myid}`}>{record.operating}</a> href={`/classrooms/${this.props.match.params.coursesId}/exercises/${this.props.match.params.Id}/users/${record.myid}`}>{record.operating}</a>
} }
</span> </span>
@ -1163,7 +1163,7 @@ class Studentshavecompletedthelist extends Component {
:record.submitstate === "已提交"? :record.submitstate === "已提交"?
<a style={{textAlign: "center"}} className="color-blue" <a style={{textAlign: "center"}} className="color-blue"
target="_blank" target="_blank"
href={`/courses/${this.props.match.params.coursesId}/exercises/${this.props.match.params.Id}/users/${record.myid}`}>{record.finalscore}</a> href={`/classrooms/${this.props.match.params.coursesId}/exercises/${this.props.match.params.Id}/users/${record.myid}`}>{record.finalscore}</a>
: :
<span style={{textAlign: "center", color: '#999999'}}>--</span> <span style={{textAlign: "center", color: '#999999'}}>--</span>
} }
@ -1381,7 +1381,7 @@ class Studentshavecompletedthelist extends Component {
:record.submitstate === "已提交"? :record.submitstate === "已提交"?
<a style={{textAlign: "center"}} className="color-blue" <a style={{textAlign: "center"}} className="color-blue"
target="_blank" target="_blank"
href={`/courses/${this.props.match.params.coursesId}/exercises/${this.props.match.params.Id}/users/${record.myid}`}>{record.finalscore}</a> href={`/classrooms/${this.props.match.params.coursesId}/exercises/${this.props.match.params.Id}/users/${record.myid}`}>{record.finalscore}</a>
: :
<span style={{textAlign: "center", color: '#999999'}}>--</span> <span style={{textAlign: "center", color: '#999999'}}>--</span>
} }

@ -43,7 +43,7 @@ class Testpapersettinghomepage extends Component{
tab:e.key tab:e.key
}) })
// this.props.history.push(`/courses/${this.props.match.params.coursesId}/exercises/${this.props.match.params.Id}/student_exercise_list?tab=`+e.key) // this.props.history.push(`/classrooms/${this.props.match.params.coursesId}/exercises/${this.props.match.params.Id}/student_exercise_list?tab=`+e.key)
} }
componentDidMount(){ componentDidMount(){
@ -277,10 +277,10 @@ class Testpapersettinghomepage extends Component{
// let courseId=this.props.match.params.coursesId; // let courseId=this.props.match.params.coursesId;
// let category_id=this.props.match.params.category_id; // let category_id=this.props.match.params.category_id;
// //
// window.location.href="/courses/"+courseId+"/graduation_tasks/"+datalist.graduation_id; // window.location.href="/classrooms/"+courseId+"/graduation_tasks/"+datalist.graduation_id;
// let courseId=this.props.match.params.coursesId; // let courseId=this.props.match.params.coursesId;
// if(courseId===undefined){ // if(courseId===undefined){
// this.props.history.push("/courses"); // this.props.history.push("/classrooms");
// }else{ // }else{
// this.props.history.push(this.props.current_user.first_category_url); // this.props.history.push(this.props.current_user.first_category_url);
// } // }
@ -322,9 +322,9 @@ class Testpapersettinghomepage extends Component{
<div className="educontent mb20" style={{width:"1200px"}}> <div className="educontent mb20" style={{width:"1200px"}}>
<p className="clearfix mb20 mt10"> <p className="clearfix mb20 mt10">
<Link className=" btn colorgrey fl hovercolorblue " to = {`/courses/${this.props.match.params.coursesId}`} >{this.props.coursedata.name}</Link> <Link className=" btn colorgrey fl hovercolorblue " to = {`/classrooms/${this.props.match.params.coursesId}`} >{this.props.coursedata.name}</Link>
<span className="color-grey-9 fl ml3 mr3">&gt;</span> <span className="color-grey-9 fl ml3 mr3">&gt;</span>
<Link className=" btn colorgrey fl hovercolorblue " to={`/courses/${this.props.match.params.coursesId}/exercises/${Commonheadofthetestpaper&&Commonheadofthetestpaper.user_permission.left_banner_id}`} >试卷</Link> <Link className=" btn colorgrey fl hovercolorblue " to={`/classrooms/${this.props.match.params.coursesId}/exercises/${Commonheadofthetestpaper&&Commonheadofthetestpaper.user_permission.left_banner_id}`} >试卷</Link>
<span className="color-grey-9 fl ml3 mr3">&gt;</span> <span className="color-grey-9 fl ml3 mr3">&gt;</span>
<WordsBtn className="fl">试卷详情</WordsBtn> <WordsBtn className="fl">试卷详情</WordsBtn>
</p> </p>
@ -345,7 +345,7 @@ class Testpapersettinghomepage extends Component{
<CoursesListType <CoursesListType
typelist={[`${polls_status[Commonheadofthetestpaper && Commonheadofthetestpaper.exercise_status]}`]} typelist={[`${polls_status[Commonheadofthetestpaper && Commonheadofthetestpaper.exercise_status]}`]}
/> />
<Link className="color-grey-6 fr font-16 summaryname mr30" to={`/courses/${this.props.match.params.coursesId}/exercises/${Commonheadofthetestpaper&&Commonheadofthetestpaper.user_permission.left_banner_id}`}>返回</Link> <Link className="color-grey-6 fr font-16 summaryname mr30" to={`/classrooms/${this.props.match.params.coursesId}/exercises/${Commonheadofthetestpaper&&Commonheadofthetestpaper.user_permission.left_banner_id}`}>返回</Link>
<p className="color-grey-6 fr font-16"> </p> <p className="color-grey-6 fr font-16"> </p>
</div> </div>
@ -437,13 +437,13 @@ class Testpapersettinghomepage extends Component{
getsetdata={this.getsetdata} getsetdata={this.getsetdata}
></ImmediatelyPublish> ></ImmediatelyPublish>
:"":""} :"":""}
{isAdmin === true? <Link className="fr color-blue font-16 mt20 mr20" to={`/courses/${this.props.match.params.coursesId}/exercises/${this.props.match.params.Id}/edit`}>编辑试卷</Link>:""} {isAdmin === true? <Link className="fr color-blue font-16 mt20 mr20" to={`/classrooms/${this.props.match.params.coursesId}/exercises/${this.props.match.params.Id}/edit`}>编辑试卷</Link>:""}
{isAdmin === false && this.props.current_user !== undefined? {isAdmin === false && this.props.current_user !== undefined?
Commonheadofthetestpaper&&Commonheadofthetestpaper.user_permission.current_status===2? Commonheadofthetestpaper&&Commonheadofthetestpaper.user_permission.current_status===2?
<a className="fr color-blue font-16 mt20" onClick={()=>this.setgameexercise(`/courses/${this.props.match.params.coursesId}/exercises/${this.props.match.params.Id}/users/${this.props.current_user.login}`)}>开始答题</a>: <a className="fr color-blue font-16 mt20" onClick={()=>this.setgameexercise(`/classrooms/${this.props.match.params.coursesId}/exercises/${this.props.match.params.Id}/users/${this.props.current_user.login}`)}>开始答题</a>:
<Link className="fr color-blue font-16 mt20" <Link className="fr color-blue font-16 mt20"
to={`/courses/${this.props.match.params.coursesId}/exercises/${this.props.match.params.Id}/users/${this.props.current_user.login}`}> to={`/classrooms/${this.props.match.params.coursesId}/exercises/${this.props.match.params.Id}/users/${this.props.current_user.login}`}>
{exercise_status===2?start_Value[Commonheadofthetestpaper&&Commonheadofthetestpaper.user_permission.current_status]:exercise_status===3?"":exercise_status===4?"":start_Value[Commonheadofthetestpaper&&Commonheadofthetestpaper.user_permission.current_status]} {exercise_status===2?start_Value[Commonheadofthetestpaper&&Commonheadofthetestpaper.user_permission.current_status]:exercise_status===3?"":exercise_status===4?"":start_Value[Commonheadofthetestpaper&&Commonheadofthetestpaper.user_permission.current_status]}
</Link> </Link>
:""} :""}

@ -235,12 +235,12 @@ class GraduateTaskItem extends Component{
<h6> <h6>
{ {
this.props.isAdmin?<a onClick={()=>this.toDetailPage("/courses/"+coursesId+"/graduation_tasks/"+categoryid+"/detail/"+taskid+"/list")} this.props.isAdmin?<a onClick={()=>this.toDetailPage("/classrooms/"+coursesId+"/graduation_tasks/"+categoryid+"/detail/"+taskid+"/list")}
title={discussMessage.name} title={discussMessage.name}
className="fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.name}</a>:"" className="fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.name}</a>:""
} }
{ {
this.props.isStudent? <a onClick={()=>this.toDetailPage("/courses/"+coursesId+"/graduation_tasks/"+categoryid+"/detail/"+taskid+"/list")} this.props.isStudent? <a onClick={()=>this.toDetailPage("/classrooms/"+coursesId+"/graduation_tasks/"+categoryid+"/detail/"+taskid+"/list")}
title={discussMessage.name} title={discussMessage.name}
className="fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.name}</a>:"" className="fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.name}</a>:""
} }
@ -248,7 +248,7 @@ class GraduateTaskItem extends Component{
{ {
this.props.isNotMember===true?this.props.discussMessage.private_icon===true? this.props.isNotMember===true?this.props.discussMessage.private_icon===true?
<span className="fl mt3 font-16 font-bd color-dark maxwidth580 pointer" title={"私有属性,非课堂成员不能访问"}>{discussMessage.name}</span> <span className="fl mt3 font-16 font-bd color-dark maxwidth580 pointer" title={"私有属性,非课堂成员不能访问"}>{discussMessage.name}</span>
:<a onClick={()=>this.toDetailPage("/courses/"+coursesId+"/graduation_tasks/"+categoryid+"/"+taskid+"/list")} :<a onClick={()=>this.toDetailPage("/classrooms/"+coursesId+"/graduation_tasks/"+categoryid+"/"+taskid+"/list")}
title={discussMessage.name} title={discussMessage.name}
className="fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.name}</a>:"" className="fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.name}</a>:""
} }
@ -267,7 +267,7 @@ class GraduateTaskItem extends Component{
{/* { !!discussMessage.sticky && <span className="btn-cir btn-cir-red fl mt5 ml5">置顶</span> } */} {/* { !!discussMessage.sticky && <span className="btn-cir btn-cir-red fl mt5 ml5">置顶</span> } */}
</h6> </h6>
<div className="cl"></div> <div className="cl"></div>
<p className="color-grey mt16 fl"> <p className="color-grey mt16 fl">
<span className="mr50"> <span className="mr50">
@ -301,15 +301,15 @@ class GraduateTaskItem extends Component{
<div className="mt13"> <div className="mt13">
<WordsBtn style="blue" to={"/courses/"+coursesId+"/graduation_tasks/"+categoryid+"/detail/"+taskid+"/setting"} className="colorblue font-16 mrf4 fr"> <WordsBtn style="blue" to={"/classrooms/"+coursesId+"/graduation_tasks/"+categoryid+"/detail/"+taskid+"/setting"} className="colorblue font-16 mrf4 fr">
<a className="btn colorblue">设置</a> <a className="btn colorblue">设置</a>
</WordsBtn> </WordsBtn>
<WordsBtn style="blue" to={"/courses/"+coursesId+"/graduation_tasks/"+taskid+"/edit"} className="colorblue font-16 mr20 fr"> <WordsBtn style="blue" to={"/classrooms/"+coursesId+"/graduation_tasks/"+taskid+"/edit"} className="colorblue font-16 mr20 fr">
<a className="btn colorblue" >编辑</a> <a className="btn colorblue" >编辑</a>
</WordsBtn> </WordsBtn>
<WordsBtn style="blue" onClick={()=>this.toDetailPage("/courses/"+coursesId+"/graduation_tasks/"+categoryid+"/detail/"+taskid+"/list")} <WordsBtn style="blue" onClick={()=>this.toDetailPage("/classrooms/"+coursesId+"/graduation_tasks/"+categoryid+"/detail/"+taskid+"/list")}
className="btn colorblue colorblue font-16 mr20 fr"> className="btn colorblue colorblue font-16 mr20 fr">
查看详情 查看详情
</WordsBtn> </WordsBtn>
@ -331,7 +331,7 @@ class GraduateTaskItem extends Component{
{item==="提交作品"? {item==="提交作品"?
<WordsBtn style="blue" className="colorblue font-16 ml20 fr mt12"> <WordsBtn style="blue" className="colorblue font-16 ml20 fr mt12">
<a className="btn colorblue" href={"/courses/"+this.props.coursesId+"/graduation_tasks/"+this.props.categoryid+"/works"+"/"+this.props.taskid+"/new"}>提交作品</a> <a className="btn colorblue" href={"/classrooms/"+this.props.coursesId+"/graduation_tasks/"+this.props.categoryid+"/works"+"/"+this.props.taskid+"/new"}>提交作品</a>
</WordsBtn> </WordsBtn>
:""} :""}
@ -339,7 +339,7 @@ class GraduateTaskItem extends Component{
{item==="补交作品"? {item==="补交作品"?
<WordsBtn style="blue" className="colorblue font-16 ml20 fr mt12"> <WordsBtn style="blue" className="colorblue font-16 ml20 fr mt12">
<a className="btn colorblue" href={"/courses/"+this.props.coursesId+"/graduation_tasks/"+this.props.categoryid+"/works"+"/"+this.props.taskid+"/new"}>补交作品</a> <a className="btn colorblue" href={"/classrooms/"+this.props.coursesId+"/graduation_tasks/"+this.props.categoryid+"/works"+"/"+this.props.taskid+"/new"}>补交作品</a>
</WordsBtn> </WordsBtn>
:""} :""}
@ -347,7 +347,7 @@ class GraduateTaskItem extends Component{
{item==="修改作品"? {item==="修改作品"?
<WordsBtn style="blue" className="font-16 colorblue ml20 fr mt12"> <WordsBtn style="blue" className="font-16 colorblue ml20 fr mt12">
<a className="btn colorblue" href={"/courses/"+this.props.coursesId+"/graduation_tasks/"+this.props.categoryid+"/works"+"/"+this.props.workid+"/edit"}>修改作品</a> <a className="btn colorblue" href={"/classrooms/"+this.props.coursesId+"/graduation_tasks/"+this.props.categoryid+"/works"+"/"+this.props.workid+"/edit"}>修改作品</a>
</WordsBtn> </WordsBtn>
:""} :""}
@ -355,7 +355,7 @@ class GraduateTaskItem extends Component{
{item==="查看作品"? {item==="查看作品"?
<WordsBtn style="blue" className="font-16 colorblue ml20 fr mt12"> <WordsBtn style="blue" className="font-16 colorblue ml20 fr mt12">
<a className="btn colorblue" target="_blank" href={"/courses/"+this.props.coursesId+"/graduation_tasks/"+this.props.workid+"/appraise"}>查看作品</a> <a className="btn colorblue" target="_blank" href={"/classrooms/"+this.props.coursesId+"/graduation_tasks/"+this.props.workid+"/appraise"}>查看作品</a>
</WordsBtn> </WordsBtn>
:""} :""}
@ -385,7 +385,7 @@ class GraduateTaskItem extends Component{
<WordsBtn className="colorblue font-16 ml20 fr mt12" onClick={this.addAccessory}> <WordsBtn className="colorblue font-16 ml20 fr mt12" onClick={this.addAccessory}>
补交附件 补交附件
{/*<a className="btn colorblue " href={"/courses/"+this.props.coursesId+"/graduation_tasks/"+discussMessage.work_id+"/appraise"}></a>*/} {/*<a className="btn colorblue " href={"/classrooms/"+this.props.coursesId+"/graduation_tasks/"+discussMessage.work_id+"/appraise"}></a>*/}
</WordsBtn> </WordsBtn>
:""} :""}
@ -394,7 +394,7 @@ class GraduateTaskItem extends Component{
}):""} }):""}
{this.props.isStudent? {this.props.isStudent?
<WordsBtn style="blue" onClick={()=>this.toDetailPage("/courses/"+coursesId+"/graduation_tasks/"+categoryid+"/detail/"+taskid+"/list")} <WordsBtn style="blue" onClick={()=>this.toDetailPage("/classrooms/"+coursesId+"/graduation_tasks/"+categoryid+"/detail/"+taskid+"/list")}
className="colorblue font-16 ml20 fr mt12"> className="colorblue font-16 ml20 fr mt12">
查看详情 查看详情
</WordsBtn>:""} </WordsBtn>:""}
@ -404,4 +404,4 @@ class GraduateTaskItem extends Component{
) )
} }
} }
export default GraduateTaskItem; export default GraduateTaskItem;

@ -121,7 +121,7 @@ class GraduationAcross extends Component{
} }
} }
// 根据分班筛选 // 根据分班筛选
filterByGroup=(value,record)=>{ filterByGroup=(value,record)=>{
@ -163,12 +163,12 @@ class GraduationAcross extends Component{
this.setState({ this.setState({
showflag:false showflag:false
}) })
} }
} }
componentWillUnmount() { componentWillUnmount() {
window.removeEventListener('click', this.clickOther); window.removeEventListener('click', this.clickOther);
} }
getList=(page,group_ids,comment_status)=>{ getList=(page,group_ids,comment_status)=>{
let { limit }=this.state; let { limit }=this.state;
@ -325,8 +325,8 @@ class GraduationAcross extends Component{
} }
} }
render(){ render(){
let { let {
comment_status, comment_status,
users, users,
user_count, user_count,
graduation_groups, graduation_groups,
@ -350,7 +350,7 @@ class GraduationAcross extends Component{
marginRight:'0px' marginRight:'0px'
}; };
const rowSelection = { const rowSelection = {
// 选中行的key选中行 // 选中行的key选中行
@ -461,7 +461,7 @@ class GraduationAcross extends Component{
<RadioGroup onChange={this.funcommentstatus} value={comment_status}> <RadioGroup onChange={this.funcommentstatus} value={comment_status}>
<Radio style={radioStyle} value={2}>手动分配评阅<span className={"font-14 color-grey-c ml5"}>逐一指定每个学生的交叉评阅老师</span></Radio> <Radio style={radioStyle} value={2}>手动分配评阅<span className={"font-14 color-grey-c ml5"}>逐一指定每个学生的交叉评阅老师</span></Radio>
<Radio style={radioStyle} value={4}>答辩组分配评阅<span className={"font-14 color-grey-c ml5"}>将老师加入不同答辩组指定每个学生的交叉评阅答辩组 <Radio style={radioStyle} value={4}>答辩组分配评阅<span className={"font-14 color-grey-c ml5"}>将老师加入不同答辩组指定每个学生的交叉评阅答辩组
<a href={"/courses/"+courseId+"/teachers"} target="_blank"> <a href={"/classrooms/"+courseId+"/teachers"} target="_blank">
<span className={"color-blue"}>立即设置答辩组</span></a> <span className={"color-blue"}>立即设置答辩组</span></a>
</span></Radio> </span></Radio>
</RadioGroup> </RadioGroup>
@ -472,7 +472,7 @@ class GraduationAcross extends Component{
<span className="fr"> <span className="fr">
<span className={"fl mt5"}><span className={"color-orange"}>分配</span>{ comment_status && comment_status == 2 ? "":""}</span> <span className={"fl mt5"}><span className={"color-orange"}>分配</span>{ comment_status && comment_status == 2 ? "":""}</span>
<span className={"fl"} style={{height:"32px"}} id="selectTags"> <span className={"fl"} style={{height:"32px"}} id="selectTags">
<Select <Select
mode="multiple" mode="multiple"
placeholder={ comment_status && comment_status == 2 ? "请选择老师":"请选择答辩组"} placeholder={ comment_status && comment_status == 2 ? "请选择老师":"请选择答辩组"}
// value={AcrossTeamIds} // value={AcrossTeamIds}
@ -483,10 +483,10 @@ class GraduationAcross extends Component{
dropdownRender={menu => ( dropdownRender={menu => (
<div id="selectDropdown"> <div id="selectDropdown">
{comment_status == 2 &&teachers&&teachers.length>10?<div className="padding10-20"> {comment_status == 2 &&teachers&&teachers.length>10?<div className="padding10-20">
<Input <Input
type='input' type='input'
value={searchValue} value={searchValue}
onChange={this.changeSearchValue} onChange={this.changeSearchValue}
placeholder='请输入名称搜索' placeholder='请输入名称搜索'
style={{height:"30px"}} style={{height:"30px"}}
className="searchInput" className="searchInput"
@ -553,4 +553,4 @@ class GraduationAcross extends Component{
) )
} }
} }
export default GraduationAcross; export default GraduationAcross;

@ -105,16 +105,16 @@ class GraduationTaskDetail extends Component{
goback=()=>{ goback=()=>{
// let courseId=this.props.match.params.coursesId; // let courseId=this.props.match.params.coursesId;
// let category_id=this.props.match.params.category_id; // let category_id=this.props.match.params.category_id;
// window.location.href="/courses/"+courseId+"/graduation_tasks/"+category_id; // window.location.href="/classrooms/"+courseId+"/graduation_tasks/"+category_id;
// let courseId = this.props.match.params.coursesId; // let courseId = this.props.match.params.coursesId;
// if(courseId===undefined){ // if(courseId===undefined){
// this.props.history.push("/courses"); // this.props.history.push("/classrooms");
// }else{ // }else{
// this.props.history.push(this.props.current_user.first_category_url); // this.props.history.push(this.props.current_user.first_category_url);
// } // }
// this.props.history.goBack() // this.props.history.goBack()
this.props.history.replace(`/courses/${this.state.questionslist.course_id}/graduation_tasks/${this.state.questionslist.graduation_id}`); this.props.history.replace(`/classrooms/${this.state.questionslist.course_id}/graduation_tasks/${this.state.questionslist.graduation_id}`);
} }
setend_time=(time)=>{ setend_time=(time)=>{
@ -465,13 +465,13 @@ class GraduationTaskDetail extends Component{
<p className="clearfix mt10"> <p className="clearfix mt10">
<a onClick={this.goback} className="color-grey-9 fl">{questionslist.course_name}</a> <a onClick={this.goback} className="color-grey-9 fl">{questionslist.course_name}</a>
<span className="color-grey-9 fl ml3 mr3">&gt;</span> <span className="color-grey-9 fl ml3 mr3">&gt;</span>
<Link to={`/courses/${courseId}/graduation_tasks/${category_id}`} className="color-grey-9 fl">{questionslist.graduation_name}</Link> <Link to={`/classrooms/${courseId}/graduation_tasks/${category_id}`} className="color-grey-9 fl">{questionslist.graduation_name}</Link>
<span className="color-grey-9 fl ml3 mr3">&gt;</span> <span className="color-grey-9 fl ml3 mr3">&gt;</span>
<span className="color-grey-6">任务详情</span> <span className="color-grey-6">任务详情</span>
</p> </p>
<div className="clearfix mt20 mb20 lineh-25 linbox"> <div className="clearfix mt20 mb20 lineh-25 linbox">
<p className=" fl color-black summaryname"> <p className=" fl color-black summaryname">
<Link to={`/courses/${courseId}/graduation_tasks/${category_id}`} className="color-grey-3">{questionslist.task_name}</Link> <Link to={`/classrooms/${courseId}/graduation_tasks/${category_id}`} className="color-grey-3">{questionslist.task_name}</Link>
</p> </p>
<CoursesListType <CoursesListType
typelist={questionslist.task_status} typelist={questionslist.task_status}
@ -481,9 +481,9 @@ class GraduationTaskDetail extends Component{
<div className="stud-class-set bor-bottom-greyE"> <div className="stud-class-set bor-bottom-greyE">
<div className="clearfix edu-back-white pl30 pr30 graduationTaskMenu"> <div className="clearfix edu-back-white pl30 pr30 graduationTaskMenu">
<Link className={tab && tab == "list" ? "active" : ""} to={"/courses/"+courseId+"/graduation_tasks/"+category_id+"/detail/"+task_Id+"/list"}>任务列表</Link> <Link className={tab && tab == "list" ? "active" : ""} to={"/classrooms/"+courseId+"/graduation_tasks/"+category_id+"/detail/"+task_Id+"/list"}>任务列表</Link>
<Link className={tab && tab == "questions" ? "active" : ""} to={"/courses/"+courseId+"/graduation_tasks/"+category_id+"/detail/"+task_Id+"/questions"}>毕设描述</Link> <Link className={tab && tab == "questions" ? "active" : ""} to={"/classrooms/"+courseId+"/graduation_tasks/"+category_id+"/detail/"+task_Id+"/questions"}>毕设描述</Link>
<Link className={tab && tab == "setting" ? "active" : ""} to={"/courses/"+courseId+"/graduation_tasks/"+category_id+"/detail/"+task_Id+"/setting?tab=3"}>设置</Link> <Link className={tab && tab == "setting" ? "active" : ""} to={"/classrooms/"+courseId+"/graduation_tasks/"+category_id+"/detail/"+task_Id+"/setting?tab=3"}>设置</Link>
{/*<a className={"fr color-blue font-16"}>导出成绩</a>*/} {/*<a className={"fr color-blue font-16"}>导出成绩</a>*/}
{/*{this.props.isAdmin()?<a href={"/api/graduation_tasks/"+task_Id+"/tasks_list.xls"} className={"fr color-blue font-16"}>导出成绩</a>:""}*/} {/*{this.props.isAdmin()?<a href={"/api/graduation_tasks/"+task_Id+"/tasks_list.xls"} className={"fr color-blue font-16"}>导出成绩</a>:""}*/}
@ -529,10 +529,10 @@ class GraduationTaskDetail extends Component{
{questionslist.work_status===undefined||questionslist.work_status===null||questionslist.work_status.length===0?"":questionslist.work_status.map((item,key)=>{ {questionslist.work_status===undefined||questionslist.work_status===null||questionslist.work_status.length===0?"":questionslist.work_status.map((item,key)=>{
return( return(
<span key={key} className="fr mt20"> <span key={key} className="fr mt20">
{item==="提交作品"?<a className={"fr color-blue font-16 ml20"} href={"/courses/"+courseId+"/graduation_tasks/"+category_id+"/works/"+task_Id+"/new"}>提交作品</a>:""} {item==="提交作品"?<a className={"fr color-blue font-16 ml20"} href={"/classrooms/"+courseId+"/graduation_tasks/"+category_id+"/works/"+task_Id+"/new"}>提交作品</a>:""}
{item==="补交作品"?<a className={"fr color-blue font-16 ml20"} href={"/courses/"+courseId+"/graduation_tasks/"+category_id+"/works/"+task_Id+"/new"}>补交作品</a>:""} {item==="补交作品"?<a className={"fr color-blue font-16 ml20"} href={"/classrooms/"+courseId+"/graduation_tasks/"+category_id+"/works/"+task_Id+"/new"}>补交作品</a>:""}
{item==="修改作品"?<a className={"fr color-blue font-16 ml20"} href={"/courses/"+courseId+"/graduation_tasks/"+category_id+"/works"+"/"+ questionslist.work_id + "/edit"}>修改作品</a>:""} {item==="修改作品"?<a className={"fr color-blue font-16 ml20"} href={"/classrooms/"+courseId+"/graduation_tasks/"+category_id+"/works"+"/"+ questionslist.work_id + "/edit"}>修改作品</a>:""}
{item==="查看作品"?<a className={"fr color-blue font-16 ml20"} target="_blank" href={"/courses/"+courseId+"/graduation_tasks/"+ questionslist.work_id + "/appraise"}>查看作品</a> :""} {item==="查看作品"?<a className={"fr color-blue font-16 ml20"} target="_blank" href={"/classrooms/"+courseId+"/graduation_tasks/"+ questionslist.work_id + "/appraise"}>查看作品</a> :""}
{item==="创建项目"?<a className={"fr color-blue font-16 ml20"} href={'/projects/new'} target="_blank">创建项目</a>:""} {item==="创建项目"?<a className={"fr color-blue font-16 ml20"} href={'/projects/new'} target="_blank">创建项目</a>:""}
{item==="关联项目"?<a className={"fr color-blue font-16 ml20"} onClick={this.AssociationItems}>关联项目</a>:""} {item==="关联项目"?<a className={"fr color-blue font-16 ml20"} onClick={this.AssociationItems}>关联项目</a>:""}
{item==="取消关联"?<a className={"fr color-blue font-16 ml20"} onClick={this.cannelAssociation}>取消关联</a>:""} {item==="取消关联"?<a className={"fr color-blue font-16 ml20"} onClick={this.cannelAssociation}>取消关联</a>:""}
@ -546,26 +546,26 @@ class GraduationTaskDetail extends Component{
{ this.props.isAdmin() ? questionslist.status===1 ? <a className={"fr color-blue font-16 mr20"} onClick={() => { this.end()} }>立即截止</a> : "" : "" } { this.props.isAdmin() ? questionslist.status===1 ? <a className={"fr color-blue font-16 mr20"} onClick={() => { this.end()} }>立即截止</a> : "" : "" }
{ this.props.isAdmin() ? questionslist.status===0 ? <a className={"fr color-blue font-16 mr20"} onClick={() => { this.publish()} }>立即发布</a> : "" : "" } { this.props.isAdmin() ? questionslist.status===0 ? <a className={"fr color-blue font-16 mr20"} onClick={() => { this.publish()} }>立即发布</a> : "" : "" }
{ this.props.isAdmin() && questionslist.cross_comment ? <a className={"fr color-blue font-16"} onClick={this.openAcross}>交叉评阅设置</a> : "" } { this.props.isAdmin() && questionslist.cross_comment ? <a className={"fr color-blue font-16"} onClick={this.openAcross}>交叉评阅设置</a> : "" }
{ this.props.isAdmin() ? <a className={"fr color-blue font-16"} href={"/courses/"+courseId+"/graduation_tasks/"+task_Id+"/edit"}>编辑任务</a> : "" } { this.props.isAdmin() ? <a className={"fr color-blue font-16"} href={"/classrooms/"+courseId+"/graduation_tasks/"+task_Id+"/edit"}>编辑任务</a> : "" }
{ this.props.user&&this.props.user.admin===true || this.props.user&&this.props.user.business===true ? <a className={"fr color-blue font-16"} onClick={()=>this.CodeReview()}>代码评测</a> : "" } { this.props.user&&this.props.user.admin===true || this.props.user&&this.props.user.business===true ? <a className={"fr color-blue font-16"} onClick={()=>this.CodeReview()}>代码评测</a> : "" }
</div> </div>
</div> </div>
<Switch {...this.props}> <Switch {...this.props}>
{/*//毕设任务列表*/} {/*//毕设任务列表*/}
<Route exact path="/courses/:coursesId/graduation_tasks/:category_id/detail/:task_Id/list" <Route exact path="/classrooms/:coursesId/graduation_tasks/:category_id/detail/:task_Id/list"
render={ render={
(props) => (<GraduationTaskslist getsonar={(teacher_comment,task_status,course_group,cross_comment,search)=>this.getsonars(teacher_comment,task_status,course_group,cross_comment,search)}{...this.props} {...props} {...this.state} {...commom} triggerRef={this.bindRef} setend_time={(time)=>this.setend_time(time)} tab={`list`}/>) (props) => (<GraduationTaskslist getsonar={(teacher_comment,task_status,course_group,cross_comment,search)=>this.getsonars(teacher_comment,task_status,course_group,cross_comment,search)}{...this.props} {...props} {...this.state} {...commom} triggerRef={this.bindRef} setend_time={(time)=>this.setend_time(time)} tab={`list`}/>)
} }
></Route> ></Route>
<Route exact path="/courses/:coursesId/graduation_tasks/:category_id/detail/:task_Id/setting" <Route exact path="/classrooms/:coursesId/graduation_tasks/:category_id/detail/:task_Id/setting"
render={ render={
(props) => (<GraduationTaskssetting {...this.props} {...props} {...this.state} {...commom} triggerRef={this.bindRef} setend_time={(time)=>this.setend_time(time)} tab={`setting`}/>) (props) => (<GraduationTaskssetting {...this.props} {...props} {...this.state} {...commom} triggerRef={this.bindRef} setend_time={(time)=>this.setend_time(time)} tab={`setting`}/>)
} }
></Route> ></Route>
<Route exact path="/courses/:coursesId/graduation_tasks/:category_id/detail/:task_Id/questions" <Route exact path="/classrooms/:coursesId/graduation_tasks/:category_id/detail/:task_Id/questions"
render={ render={
(props) => (<GraduationTasksquestions {...this.props} {...props} {...this.state} {...commom} triggerRef={this.bindRef} setend_time={(time)=>this.setend_time(time)} tab={`questions`}/>) (props) => (<GraduationTasksquestions {...this.props} {...props} {...this.state} {...commom} triggerRef={this.bindRef} setend_time={(time)=>this.setend_time(time)} tab={`questions`}/>)
}></Route> }></Route>
@ -579,4 +579,4 @@ class GraduationTaskDetail extends Component{
} }
} }
// CNotificationHOC() ( SnackbarHOC() ( TPMIndexHOC)) // CNotificationHOC() ( SnackbarHOC() ( TPMIndexHOC))
export default (GraduationTaskDetail) ; export default (GraduationTaskDetail) ;

@ -104,7 +104,7 @@ class GraduationTasksSubmitedit extends Component{
// }else{ // }else{
// this.props.history.push(this.props.current_user.first_category_url); // this.props.history.push(this.props.current_user.first_category_url);
// } // }
this.props.history.replace(`/courses/${this.state.workslist.course_id}/graduation_tasks/${this.state.workslist.graduation_id}`); this.props.history.replace(`/classrooms/${this.state.workslist.course_id}/graduation_tasks/${this.state.workslist.graduation_id}`);
} }
@ -462,7 +462,7 @@ class GraduationTasksSubmitedit extends Component{
}) })
if(response!== undefined){ if(response!== undefined){
// this.goback() // this.goback()
window.location.href=`/courses/${coursesIds}/graduation_tasks/${workId}/appraise` window.location.href=`/classrooms/${coursesIds}/graduation_tasks/${workId}/appraise`
} }
// if(response.status===200) { // if(response.status===200) {
// GraduationTasksnewtype=false; // GraduationTasksnewtype=false;
@ -589,14 +589,14 @@ class GraduationTasksSubmitedit extends Component{
<div className={"educontent mb20"}> <div className={"educontent mb20"}>
<p className="clearfix mt10"> <p className="clearfix mt10">
{/*<WordsBtn style="grey" className="fl"> <Link to={"/courses/"+courseId+"/graduation"} className="color-grey-6">{workslist&&workslist.course_name}</Link></WordsBtn>*/} {/*<WordsBtn style="grey" className="fl"> <Link to={"/classrooms/"+courseId+"/graduation"} className="color-grey-6">{workslist&&workslist.course_name}</Link></WordsBtn>*/}
{/*<span className="color-grey-9 fl ml3 mr3">&gt;</span>*/} {/*<span className="color-grey-9 fl ml3 mr3">&gt;</span>*/}
<WordsBtn style="grey" className="fl"> <a onClick={this.goback} className="color-grey-6">毕设任务</a></WordsBtn> <WordsBtn style="grey" className="fl"> <a onClick={this.goback} className="color-grey-6">毕设任务</a></WordsBtn>
<span className="color-grey-9 fl ml3 mr3">&gt;</span> <span className="color-grey-9 fl ml3 mr3">&gt;</span>
<WordsBtn style="grey" className="fl"> <Link to={`/courses/${courseId}/graduation_tasks/${workslist && workslist.graduation_id}/detail/${workslist && workslist.task_id}/list`} className="color-grey-6">任务详情</Link></WordsBtn> <WordsBtn style="grey" className="fl"> <Link to={`/classrooms/${courseId}/graduation_tasks/${workslist && workslist.graduation_id}/detail/${workslist && workslist.task_id}/list`} className="color-grey-6">任务详情</Link></WordsBtn>
<span className="color-grey-9 fl ml3 mr3">&gt;</span> <span className="color-grey-9 fl ml3 mr3">&gt;</span>
{/*<WordsBtn style="grey" className="fl">*/} {/*<WordsBtn style="grey" className="fl">*/}
{/*<Link to={"/courses/"+courseId+"/graduation/graduation_tasks/"+category_id} className="color-grey-6">{workslist&&workslist.task_name}</Link>*/} {/*<Link to={"/classrooms/"+courseId+"/graduation/graduation_tasks/"+category_id} className="color-grey-6">{workslist&&workslist.task_name}</Link>*/}
{/*<span className="color-grey-9 ml3 mr3">&gt;</span>*/} {/*<span className="color-grey-9 ml3 mr3">&gt;</span>*/}
{/*</WordsBtn>*/} {/*</WordsBtn>*/}
<span>{this.props.current_user&&this.props.current_user.real_name} 修改作品</span> <span>{this.props.current_user&&this.props.current_user.real_name} 修改作品</span>

@ -80,7 +80,7 @@ class GraduationTasksSubmitnew extends Component{
setedit=(workId)=>{ setedit=(workId)=>{
let coursesId=this.props.match.params.coursesId; let coursesId=this.props.match.params.coursesId;
window.location.href="/courses/"+coursesId+"/graduation_tasks/"+workId+"/appraise"; window.location.href="/classrooms/"+coursesId+"/graduation_tasks/"+workId+"/appraise";
} }
@ -105,7 +105,7 @@ class GraduationTasksSubmitnew extends Component{
// }else{ // }else{
// this.props.history.push(this.props.current_user.first_category_url); // this.props.history.push(this.props.current_user.first_category_url);
// } // }
this.props.history.replace(`/courses/${this.state.workslist.course_id}/graduation_tasks/${this.state.workslist.graduation_id}`); this.props.history.replace(`/classrooms/${this.state.workslist.course_id}/graduation_tasks/${this.state.workslist.graduation_id}`);
} }
@ -463,7 +463,7 @@ class GraduationTasksSubmitnew extends Component{
if(response){ if(response){
if(response.data){ if(response.data){
if(response.data.work_id){ if(response.data.work_id){
window.location.href=`/courses/${this.props.match.params.coursesId}/graduation_tasks/${response.data.work_id}/appraise` window.location.href=`/classrooms/${this.props.match.params.coursesId}/graduation_tasks/${response.data.work_id}/appraise`
} }
} }
} }
@ -603,14 +603,14 @@ render(){
<div className={"educontent mb20"}> <div className={"educontent mb20"}>
<p className="clearfix mt10"> <p className="clearfix mt10">
{/*<WordsBtn style="grey" className="fl"> <Link to={"/courses/"+courseId+"/graduation_tasks"} className="color-grey-6">{workslist&&workslist.course_name}</Link></WordsBtn>*/} {/*<WordsBtn style="grey" className="fl"> <Link to={"/classrooms/"+courseId+"/graduation_tasks"} className="color-grey-6">{workslist&&workslist.course_name}</Link></WordsBtn>*/}
{/*<span className="color-grey-9 fl ml3 mr3">&gt;</span>*/} {/*<span className="color-grey-9 fl ml3 mr3">&gt;</span>*/}
<WordsBtn style="grey" className="fl"> <a onClick={this.goback} className="color-grey-6">毕设任务</a></WordsBtn> <WordsBtn style="grey" className="fl"> <a onClick={this.goback} className="color-grey-6">毕设任务</a></WordsBtn>
<span className="color-grey-9 fl ml3 mr3">&gt;</span> <span className="color-grey-9 fl ml3 mr3">&gt;</span>
<WordsBtn style="grey" className="fl"> <Link to={"/courses/"+courseId+"/graduation_tasks/"+category_id+"/detail/"+task_Id+"/list"} className="color-grey-6">任务详情</Link></WordsBtn> <WordsBtn style="grey" className="fl"> <Link to={"/classrooms/"+courseId+"/graduation_tasks/"+category_id+"/detail/"+task_Id+"/list"} className="color-grey-6">任务详情</Link></WordsBtn>
<span className="color-grey-9 fl ml3 mr3">&gt;</span> <span className="color-grey-9 fl ml3 mr3">&gt;</span>
{/*<WordsBtn style="grey" className="fl">*/} {/*<WordsBtn style="grey" className="fl">*/}
{/*<Link to={"/courses/"+courseId+"/graduation/graduation_tasks/"+category_id} className="color-grey-6">{workslist&&workslist.task_name}</Link>*/} {/*<Link to={"/classrooms/"+courseId+"/graduation/graduation_tasks/"+category_id} className="color-grey-6">{workslist&&workslist.task_name}</Link>*/}
{/*<span className="color-grey-9 ml3 mr3">&gt;</span>*/} {/*<span className="color-grey-9 ml3 mr3">&gt;</span>*/}
{/*</WordsBtn>*/} {/*</WordsBtn>*/}
<span>{this.props.current_user&&this.props.current_user.real_name} 提交作品</span> <span>{this.props.current_user&&this.props.current_user.real_name} 提交作品</span>

@ -71,15 +71,15 @@ class GraduationTasksappraise extends Component{
// let courseId=this.props.match.params.coursesId; // let courseId=this.props.match.params.coursesId;
// let category_id=this.props.match.params.category_id; // let category_id=this.props.match.params.category_id;
// //
// window.location.href="/courses/"+courseId+"/graduation_tasks/"+datalist.graduation_id; // window.location.href="/classrooms/"+courseId+"/graduation_tasks/"+datalist.graduation_id;
// let courseId=this.props.match.params.coursesId; // let courseId=this.props.match.params.coursesId;
// if(courseId===undefined){ // if(courseId===undefined){
// this.props.history.push("/courses"); // this.props.history.push("/classrooms");
// }else{ // }else{
// this.props.history.push(this.props.current_user.first_category_url); // this.props.history.push(this.props.current_user.first_category_url);
// } // }
this.props.history.replace(`/courses/${this.state.datalist.course_id}/graduation_tasks/${this.state.datalist.graduation_id}/${this.state.datalist.task_id}/list`); this.props.history.replace(`/classrooms/${this.state.datalist.course_id}/graduation_tasks/${this.state.datalist.graduation_id}/${this.state.datalist.task_id}/list`);
} }
@ -178,9 +178,9 @@ class GraduationTasksappraise extends Component{
<p className="clearfix mt10"> <p className="clearfix mt10">
<a onClick={this.goback} className="color-grey-9 fl">{datalist&&datalist.course_name}</a> <a onClick={this.goback} className="color-grey-9 fl">{datalist&&datalist.course_name}</a>
<span className="color-grey-9 fl ml3 mr3">&gt;</span> <span className="color-grey-9 fl ml3 mr3">&gt;</span>
<Link to={"/courses/"+courseId+"/graduation_tasks/"+graduation_id} className="color-grey-9 fl">{datalist&&datalist.graduation_name}</Link> <Link to={"/classrooms/"+courseId+"/graduation_tasks/"+graduation_id} className="color-grey-9 fl">{datalist&&datalist.graduation_name}</Link>
<span className="color-grey-9 fl ml3 mr3">&gt;</span> <span className="color-grey-9 fl ml3 mr3">&gt;</span>
<Link to={"/courses/"+courseId+"/graduation_tasks/"+graduation_id+"/detail/"+task_id+"/list"} className="color-grey-9 fl">任务详情</Link> <Link to={"/classrooms/"+courseId+"/graduation_tasks/"+graduation_id+"/detail/"+task_id+"/list"} className="color-grey-9 fl">任务详情</Link>
<span className="color-grey-9 fl ml3 mr3">&gt;</span> <span className="color-grey-9 fl ml3 mr3">&gt;</span>
<span className="color-grey-6 fl">{datalist&&datalist.author_name}</span> <span className="color-grey-6 fl">{datalist&&datalist.author_name}</span>
</p> </p>

@ -98,11 +98,11 @@ class GraduationTasksedit extends Component{
// let courseId = this.props.match.params.coursesId; // let courseId = this.props.match.params.coursesId;
// if(courseId===undefined){ // if(courseId===undefined){
// this.props.history.push("/courses"); // this.props.history.push("/classrooms");
// }else{ // }else{
// this.props.history.push(this.props.current_user.first_category_url); // this.props.history.push(this.props.current_user.first_category_url);
// } // }
this.props.history.replace(`/courses/${this.state.data.course_id}/graduation_tasks/${this.state.data.graduation_id}`); this.props.history.replace(`/classrooms/${this.state.data.course_id}/graduation_tasks/${this.state.data.graduation_id}`);
} }
@ -256,9 +256,9 @@ class GraduationTasksedit extends Component{
if(response.status===200) { if(response.status===200) {
// console.log(response) // console.log(response)
// GraduationTasksedittype=false; // GraduationTasksedittype=false;
// window.location.href="/courses/"+course_id+"/graduation/"+graduationId+"/graduation_tasks/"+category_id+"/questions"; // window.location.href="/classrooms/"+course_id+"/graduation/"+graduationId+"/graduation_tasks/"+category_id+"/questions";
this.goback() this.goback()
//this.props.history.push("/courses/"+this.props.match.params.coursesId+"/graduation_tasks/"+graduation_id+"/"+this.props.match.params.category_id +"/setting"); //this.props.history.push("/classrooms/"+this.props.match.params.coursesId+"/graduation_tasks/"+graduation_id+"/"+this.props.match.params.category_id +"/setting");
} }
}).catch((error) => { }).catch((error) => {
console.log(error) console.log(error)
@ -366,14 +366,14 @@ class GraduationTasksedit extends Component{
<p className="clearfix mt10"> <p className="clearfix mt10">
<WordsBtn style="grey" className="fl"> <WordsBtn style="grey" className="fl">
<Link to={`/courses/${graduationtask_id}`} className="color-grey-6">{this.props.current_user&&this.props.current_user.course_name}</Link> <Link to={`/classrooms/${graduationtask_id}`} className="color-grey-6">{this.props.current_user&&this.props.current_user.course_name}</Link>
</WordsBtn> </WordsBtn>
<span className="color-grey-9 fl ml3 mr3">&gt;</span> <span className="color-grey-9 fl ml3 mr3">&gt;</span>
<WordsBtn style="grey" className="fl"> <Link to={"/courses/"+courseId+"/graduation_tasks/"+graduationtask_id} className="color-grey-6">毕设任务</Link></WordsBtn> <WordsBtn style="grey" className="fl"> <Link to={"/classrooms/"+courseId+"/graduation_tasks/"+graduationtask_id} className="color-grey-6">毕设任务</Link></WordsBtn>
<span className="color-grey-9 fl ml3 mr3">&gt;</span> <span className="color-grey-9 fl ml3 mr3">&gt;</span>
{name===""?"": {name===""?"":
<WordsBtn style="grey" className="fl"> <WordsBtn style="grey" className="fl">
<Link to={"/courses/"+courseId+"/graduation_tasks/"+graduationtask_id+"/detail/"+category_id+"/list"} className="color-grey-6">{name}</Link> <Link to={"/classrooms/"+courseId+"/graduation_tasks/"+graduationtask_id+"/detail/"+category_id+"/list"} className="color-grey-6">{name}</Link>
<span className="color-grey-9 ml3 mr3">&gt;</span> <span className="color-grey-9 ml3 mr3">&gt;</span>
</WordsBtn> </WordsBtn>
} }

@ -92,7 +92,7 @@ class GraduationTasksnew extends Component {
// this.goback(); // this.goback();
if(response!==undefined){ if(response!==undefined){
// this.goback() // this.goback()
this.props.history.replace(`/courses/${coursesId}/graduation_tasks/${category_id}/detail/${response.data.task_id}/questions`); this.props.history.replace(`/classrooms/${coursesId}/graduation_tasks/${category_id}/detail/${response.data.task_id}/questions`);
} }
// } // }
}).catch((error) => { }).catch((error) => {
@ -110,12 +110,12 @@ class GraduationTasksnew extends Component {
goback = () => { goback = () => {
// let courseId = this.props.match.params.coursesId; // let courseId = this.props.match.params.coursesId;
// if(courseId===undefined){ // if(courseId===undefined){
// this.props.history.push("/courses"); // this.props.history.push("/classrooms");
// }else{ // }else{
// this.props.history.push(this.props.current_user.first_category_url); // this.props.history.push(this.props.current_user.first_category_url);
// } // }
// this.props.history.goBack() // this.props.history.goBack()
this.props.history.replace(`/courses/${this.props.match.params.coursesId}/graduation_tasks/${this.props.match.params.category_id}`); this.props.history.replace(`/classrooms/${this.props.match.params.coursesId}/graduation_tasks/${this.props.match.params.category_id}`);
} }
@ -350,7 +350,7 @@ class GraduationTasksnew extends Component {
<WordsBtn style="grey" className="fl"> <a onClick={this.goback} className="color-grey-6">{this.props.current_user && this.props.current_user.course_name}</a></WordsBtn> <WordsBtn style="grey" className="fl"> <a onClick={this.goback} className="color-grey-6">{this.props.current_user && this.props.current_user.course_name}</a></WordsBtn>
<span className="color-grey-9 fl ml3 mr3">&gt;</span> <span className="color-grey-9 fl ml3 mr3">&gt;</span>
<WordsBtn style="grey" className="fl"> <Link <WordsBtn style="grey" className="fl"> <Link
to={"/courses/" + courseId + "/graduation_tasks/" + category_id} className="color-grey-6">毕设任务</Link></WordsBtn> to={"/classrooms/" + courseId + "/graduation_tasks/" + category_id} className="color-grey-6">毕设任务</Link></WordsBtn>
<span className="color-grey-9 fl ml3 mr3">&gt;</span> <span className="color-grey-9 fl ml3 mr3">&gt;</span>
<span>{"新建"}</span> <span>{"新建"}</span>
</p> </p>

@ -77,12 +77,12 @@ class GraduationTaskssettinglist extends Component{
// window.history.back(-1) // window.history.back(-1)
// let courseId=this.props.match.params.coursesId; // let courseId=this.props.match.params.coursesId;
// if(courseId===undefined){ // if(courseId===undefined){
// this.props.history.push("/courses"); // this.props.history.push("/classrooms");
// }else{ // }else{
// this.props.history.push(this.props.current_user.first_category_url); // this.props.history.push(this.props.current_user.first_category_url);
// } // }
// this.props.history.goBack() // this.props.history.goBack()
this.props.history.replace(`/courses/${this.state.taskslistdata.course_id}/graduation_tasks/${this.state.taskslistdata.graduation_id}`); this.props.history.replace(`/classrooms/${this.state.taskslistdata.course_id}/graduation_tasks/${this.state.taskslistdata.graduation_id}`);
} }
reInit=()=>{ reInit=()=>{
@ -939,7 +939,7 @@ class GraduationTaskssettinglist extends Component{
{ {
tag.name && tag.name &&
<Tooltip key={key} placement="bottom" title={tag.name==="分配"?taskslistdata&&taskslistdata.cross_comment===true?"":"指定该作品的交叉评阅人":tag.name==="调分"?<pre>调整学生最终成绩<br/>其它历史评分将全部失效</pre>:""}> <Tooltip key={key} placement="bottom" title={tag.name==="分配"?taskslistdata&&taskslistdata.cross_comment===true?"":"指定该作品的交叉评阅人":tag.name==="调分"?<pre>调整学生最终成绩<br/>其它历史评分将全部失效</pre>:""}>
{tag.name==="评阅"?<a target="_blank" style={{color:'#4CACFF',padding:"0px 5px"}} href={"/courses/"+courseId+"/graduation_tasks/"+tag.id+"/appraise"} > {tag.name==="评阅"?<a target="_blank" style={{color:'#4CACFF',padding:"0px 5px"}} href={"/classrooms/"+courseId+"/graduation_tasks/"+tag.id+"/appraise"} >
{tag.name} {tag.name}
</a> </a>
: :
@ -958,7 +958,7 @@ class GraduationTaskssettinglist extends Component{
operation.map((tag,key) => { operation.map((tag,key) => {
return( return(
<div key={key}> <div key={key}>
{tag.view_work===false?"--":<a style={{color:'#4CACFF'}} target="_blank" href={"/courses/"+courseId+"/graduation_tasks/"+tag.id+"/appraise"} >查看</a>} {tag.view_work===false?"--":<a style={{color:'#4CACFF'}} target="_blank" href={"/classrooms/"+courseId+"/graduation_tasks/"+tag.id+"/appraise"} >查看</a>}
</div> </div>
)} )}
):"" ):""

@ -67,16 +67,16 @@ class GraduationTasksquestions extends Component{
goback=()=>{ goback=()=>{
// let courseId=this.props.match.params.coursesId; // let courseId=this.props.match.params.coursesId;
// let category_id=this.props.match.params.category_id; // let category_id=this.props.match.params.category_id;
// window.location.href="/courses/"+courseId+"/graduation_tasks/"+category_id; // window.location.href="/classrooms/"+courseId+"/graduation_tasks/"+category_id;
// let courseId = this.props.match.params.coursesId; // let courseId = this.props.match.params.coursesId;
// if(courseId===undefined){ // if(courseId===undefined){
// this.props.history.push("/courses"); // this.props.history.push("/classrooms");
// }else{ // }else{
// this.props.history.push(this.props.current_user.first_category_url); // this.props.history.push(this.props.current_user.first_category_url);
// } // }
// this.props.history.goBack() // this.props.history.goBack()
this.props.history.replace(`/courses/${this.state.questionslist.course_id}/graduation_tasks/${this.state.questionslist.graduation_id}`); this.props.history.replace(`/classrooms/${this.state.questionslist.course_id}/graduation_tasks/${this.state.questionslist.graduation_id}`);
} }
end=()=>{ end=()=>{

@ -669,7 +669,7 @@ class GraduationTasks extends Component{
{/*{this.props.isAdmin() ?<WordsBtn style="blue" className="mr30" onClick={() => this.addDir()}>题库选用</WordsBtn>:""}*/} {/*{this.props.isAdmin() ?<WordsBtn style="blue" className="mr30" onClick={() => this.addDir()}>题库选用</WordsBtn>:""}*/}
{/*{this.props.isAdmin() ?<a href={"/api/graduation_tasks/"+category_id+"/tasks_list.xls"} className={"fr color-blue font-16"}>导出成绩</a> :""}*/} {/*{this.props.isAdmin() ?<a href={"/api/graduation_tasks/"+category_id+"/tasks_list.xls"} className={"fr color-blue font-16"}>导出成绩</a> :""}*/}
{this.props.isAdmin() ? <WordsBtn style="blue" className=" fr font-16"> {this.props.isAdmin() ? <WordsBtn style="blue" className=" fr font-16">
<Link to={"/courses/" + coursesId + "/graduation_tasks/"+category_id+"/new"}> <Link to={"/classrooms/" + coursesId + "/graduation_tasks/"+category_id+"/new"}>
<span className={"color-blue font-16"}>新建</span> <span className={"color-blue font-16"}>新建</span>
</Link> </Link>
</WordsBtn> : ""} </WordsBtn> : ""}
@ -708,7 +708,7 @@ class GraduationTasks extends Component{
searchPlaceholder={"请输入名称进行搜索"} searchPlaceholder={"请输入名称进行搜索"}
/> />
{/* <GraduateTaskItem></GraduateTaskItem> {/* <GraduateTaskItem></GraduateTaskItem>
<FilesListItem></FilesListItem> */} <FilesListItem></FilesListItem> */}

@ -331,7 +331,7 @@ sureDelTopic=()=>{
// 新建 // 新建
onBoardsNew=()=>{ onBoardsNew=()=>{
let courseId=this.props.match.params.coursesId let courseId=this.props.match.params.coursesId
this.props.history.push(`/courses/${courseId}/graduation_topics/new`) this.props.history.push(`/classrooms/${courseId}/graduation_topics/new`)
} }
/// 确认是否下载 /// 确认是否下载
confirmysl(url){ confirmysl(url){
@ -416,7 +416,7 @@ onBoardsNew=()=>{
(<React.Fragment> (<React.Fragment>
{/* 参考普通作业 - 题库选用 */} {/* 参考普通作业 - 题库选用 */}
{/* <WordsBtn style="blue" className="mr30" onClick={()=>this.useFromBank()}>题库选用</WordsBtn> 正式版没有,先隐藏*/} {/* <WordsBtn style="blue" className="mr30" onClick={()=>this.useFromBank()}>题库选用</WordsBtn> 正式版没有,先隐藏*/}
< a className={"fl color-blue mr30 font-16"} onClick={(url)=>this.confirmysl(`/courses/${this.props.match.params.coursesId}/graduation_topics/export.xlsx`)}>导出</a> < a className={"fl color-blue mr30 font-16"} onClick={(url)=>this.confirmysl(`/classrooms/${this.props.match.params.coursesId}/graduation_topics/export.xlsx`)}>导出</a>
{/*<p className="fl"><UseBank {...this.props} {...this.state} object_type={"gtopic"} useBankSuccess={this.useBankSuccess}></UseBank></p> 题库选用*/} {/*<p className="fl"><UseBank {...this.props} {...this.state} object_type={"gtopic"} useBankSuccess={this.useBankSuccess}></UseBank></p> 题库选用*/}
<WordsBtn style="blue" className="font-16" onClick={()=>this.onBoardsNew()}>新建</WordsBtn> <WordsBtn style="blue" className="font-16" onClick={()=>this.onBoardsNew()}>新建</WordsBtn>
</React.Fragment>):"" </React.Fragment>):""
@ -514,4 +514,4 @@ onBoardsNew=()=>{
) )
} }
} }
export default Boards; export default Boards;

@ -136,7 +136,7 @@ function CourseGroupList(props) {
title={ title={
<ul className="course_publicNav"> <ul className="course_publicNav">
<li className="active">分班列表</li> <li className="active">分班列表</li>
<li onClick={() => {props.history.push(`/courses/${courseId}/course_groups/0`)}}>未分班</li> <li onClick={() => {props.history.push(`/classrooms/${courseId}/course_groups/0`)}}>未分班</li>
</ul> </ul>
} }
searchValue={ searchValue } searchValue={ searchValue }
@ -216,7 +216,7 @@ function CourseGroupList(props) {
onPressEnter={onPressEnter} onPressEnter={onPressEnter}
></Titlesearchsection> ></Titlesearchsection>
{/* {!!none_group_member_count && <div className="mt20 E9F8FF padding20-30 pointer" onClick={() => {props.history.push(`/courses/${courseId}/course_groups/0`)}}> {/* {!!none_group_member_count && <div className="mt20 E9F8FF padding20-30 pointer" onClick={() => {props.history.push(`/classrooms/${courseId}/course_groups/0`)}}>
<span>未分班</span> <span>未分班</span>
<span style={{color: '#999999'}}>{none_group_member_count}个学生</span> <span style={{color: '#999999'}}>{none_group_member_count}个学生</span>
@ -240,4 +240,4 @@ function CourseGroupList(props) {
</React.Fragment> </React.Fragment>
) )
} }
export default CourseGroupList export default CourseGroupList

@ -353,7 +353,7 @@ class studentsList extends Component{
if (params.course_group_id == course_group_id) { if (params.course_group_id == course_group_id) {
this.fetchAll(1) this.fetchAll(1)
} else { } else {
this.props.history.push(`/courses/${coursesId}/course_groups/${params.course_group_id || '0'}`) this.props.history.push(`/classrooms/${coursesId}/course_groups/${params.course_group_id || '0'}`)
} }
// console.log('addStudentSuccessListener', data) // console.log('addStudentSuccessListener', data)
} }
@ -611,7 +611,7 @@ class studentsList extends Component{
.then((response) => { .then((response) => {
if (response.data.status == 0) { if (response.data.status == 0) {
this.props.showNotification('删除成功') this.props.showNotification('删除成功')
this.props.history.push(`/courses/${courseId}/course_groups`) this.props.history.push(`/classrooms/${courseId}/course_groups`)
} }
}) })
.catch(function (error) { .catch(function (error) {
@ -742,21 +742,21 @@ class studentsList extends Component{
title={isParent ? (pageType == TYPE_STUDENTS ? "全部学生" : "学生列表"): title={isParent ? (pageType == TYPE_STUDENTS ? "全部学生" : "学生列表"):
<React.Fragment> <React.Fragment>
{ {
course_group_name ? course_group_name ?
<span> <span>
<Tooltip title="返回至分班列表"> <Tooltip title="返回至分班列表">
<i className="icon-zuojiantou iconfont font-14" onClick={() => { this.props.history.push(`/courses/${courseId}/course_groups`)}} <i className="icon-zuojiantou iconfont font-14" onClick={() => { this.props.history.push(`/classrooms/${courseId}/course_groups`)}}
style={{color: '#212121', verticalAlign: 'initial', marginRight: '14px' }} style={{color: '#212121', verticalAlign: 'initial', marginRight: '14px' }}
></i> ></i>
</Tooltip>{course_group_name} </Tooltip>{course_group_name}
</span> </span>
: :
<ul className="course_publicNav"> <ul className="course_publicNav">
<li onClick={() => { this.props.history.push(`/courses/${courseId}/course_groups`)}}>分班列表</li> <li onClick={() => { this.props.history.push(`/classrooms/${courseId}/course_groups`)}}>分班列表</li>
<li className="active">未分班</li> <li className="active">未分班</li>
</ul> </ul>
} }
{isAdmin && invite_code && <React.Fragment> {isAdmin && invite_code && <React.Fragment>
<span className="color-grey-9 font-16 ml10">邀请码</span> <span className="color-grey-9 font-16 ml10">邀请码</span>
<span className="color-orange font-16"> <span className="color-orange font-16">
@ -926,4 +926,4 @@ class studentsList extends Component{
) )
} }
} }
export default studentsList; export default studentsList;

@ -363,7 +363,7 @@ class CoursesNew extends Component {
goback = (id) => { goback = (id) => {
// if(this.props.match.params.coursesId===undefined){ // if(this.props.match.params.coursesId===undefined){
// this.props.history.push("/courses"); // this.props.history.push("/classrooms");
// }else{ // }else{
// this.props.history.push(this.props.current_user.first_category_url); // this.props.history.push(this.props.current_user.first_category_url);
// } // }
@ -681,14 +681,14 @@ class CoursesNew extends Component {
<div className={"educontent mb20"}> <div className={"educontent mb20"}>
{/*<Breadcrumb className="mt10" separator=">">*/} {/*<Breadcrumb className="mt10" separator=">">*/}
{/* <Breadcrumb.Item>*/} {/* <Breadcrumb.Item>*/}
{/* <a href="/courses">翻转课堂</a>*/} {/* <a href="/classrooms">翻转课堂</a>*/}
{/* </Breadcrumb.Item>*/} {/* </Breadcrumb.Item>*/}
{/* <Breadcrumb.Item>{this.props.match.params.coursesId === undefined ?"新建课堂":"编辑课堂"}</Breadcrumb.Item>*/} {/* <Breadcrumb.Item>{this.props.match.params.coursesId === undefined ?"新建课堂":"编辑课堂"}</Breadcrumb.Item>*/}
{/*</Breadcrumb>*/} {/*</Breadcrumb>*/}
<p className="clearfix mb20 mt10"> <p className="clearfix mb20 mt10">
<a className="btn colorgrey fl hovercolorblue " <a className="btn colorgrey fl hovercolorblue "
href={this.props.match.params.coursesId === undefined ?"/courses":this.props.current_user&&this.props.current_user.first_category_url} href={this.props.match.params.coursesId === undefined ?"/classrooms":this.props.current_user&&this.props.current_user.first_category_url}
> >
{this.props.match.params.coursesId === undefined ?"教学课堂":dataname} {this.props.match.params.coursesId === undefined ?"教学课堂":dataname}
</a> </a>

@ -488,7 +488,7 @@ class Goldsubject extends Component {
window.location.href=`/paths/${subjectids}` window.location.href=`/paths/${subjectids}`
}else{ }else{
// this.props.history.goBack(); // this.props.history.goBack();
window.location.href=`/courses/${this.props.match.params.coursesId}/informs` window.location.href=`/classrooms/${this.props.match.params.coursesId}/informs`
} }
} }

@ -167,7 +167,7 @@ class Ordering extends Component{
} }
goback=()=>{ goback=()=>{
window.location.href=`/courses/${this.props.match.params.coursesId}/shixun_homeworks/${this.props.match.params.main_id}` window.location.href=`/classrooms/${this.props.match.params.coursesId}/shixun_homeworks/${this.props.match.params.main_id}`
} }
@ -212,7 +212,7 @@ class Ordering extends Component{
<Breadcrumb separator=">"> <Breadcrumb separator=">">
<Breadcrumb.Item href={this.props.current_user&&this.props.current_user.first_category_url}>{this.props.current_user&&this.props.current_user.course_name}</Breadcrumb.Item> <Breadcrumb.Item href={this.props.current_user&&this.props.current_user.first_category_url}>{this.props.current_user&&this.props.current_user.course_name}</Breadcrumb.Item>
<Breadcrumb.Item href={`/courses/${this.props.match.params.coursesId}/shixun_homeworks/${this.props.match.params.main_id}`}>实训作业</Breadcrumb.Item> <Breadcrumb.Item href={`/classrooms/${this.props.match.params.coursesId}/shixun_homeworks/${this.props.match.params.main_id}`}>实训作业</Breadcrumb.Item>
<Breadcrumb.Item>调整排序</Breadcrumb.Item> <Breadcrumb.Item>调整排序</Breadcrumb.Item>
</Breadcrumb> </Breadcrumb>
@ -260,7 +260,7 @@ class Ordering extends Component{
<div className={"item-body"}> <div className={"item-body"}>
<div className={"clearfix ds pr orderSection"}> <div className={"clearfix ds pr orderSection"}>
<p title={item.task_name} className="font-16 color-dark maxwidth865s orderfonttop" <p title={item.task_name} className="font-16 color-dark maxwidth865s orderfonttop"
href={`/courses/${this.props.match.params.coursesId}/shixun_homeworks/${item.task_id}/list?tab=0`}>{item.task_name}</p> href={`/classrooms/${this.props.match.params.coursesId}/shixun_homeworks/${item.task_id}/list?tab=0`}>{item.task_name}</p>
<p className={"color-grey panel-lightgrey mt16 "}> <p className={"color-grey panel-lightgrey mt16 "}>
<span className="topicswidth400"> <span className="topicswidth400">
<span className="topsics100 color-grey9 orderfontbom mr20 maxwidth795">{item.user_name}</span> <span className="topsics100 color-grey9 orderfontbom mr20 maxwidth795">{item.user_name}</span>

@ -39,8 +39,8 @@ class Poll extends Component{
addnametab:undefined, addnametab:undefined,
addcanner:undefined, addcanner:undefined,
addsave:undefined, addsave:undefined,
course_groups:[], course_groups:[],
chooseId:undefined, chooseId:undefined,
// 列表相关 // 列表相关
checkBoxValues:[], checkBoxValues:[],
checkAllValue:false, checkAllValue:false,
@ -196,7 +196,7 @@ class Poll extends Component{
checkBoxValues: _.difference(this.state.checkBoxValues, values) checkBoxValues: _.difference(this.state.checkBoxValues, values)
}) })
} }
} }
onCheckBoxChange = (checkedValues) => { onCheckBoxChange = (checkedValues) => {
this.setState({ this.setState({
@ -327,7 +327,7 @@ class Poll extends Component{
}) })
let{type,StudentList_value,page}=this.state let{type,StudentList_value,page}=this.state
this.InitList(type,StudentList_value,page,value); this.InitList(type,StudentList_value,page,value);
let coursesId=this.props.match.params.coursesId; let coursesId=this.props.match.params.coursesId;
let url=`/courses/${coursesId}/polls/publish_modal.json`; let url=`/courses/${coursesId}/polls/publish_modal.json`;
axios.get(url,{ axios.get(url,{
@ -509,10 +509,10 @@ class Poll extends Component{
<p className="clearfix padding30 bor-bottom-greyE"> <p className="clearfix padding30 bor-bottom-greyE">
<span className="font-18 fl color-dark-21">{polls_counts&&polls_counts.left_banner_name}</span> <span className="font-18 fl color-dark-21">{polls_counts&&polls_counts.left_banner_name}</span>
{ {
isAdmin && isAdmin &&
<li className="fr"> <li className="fr">
<p className="fl"><UseBank {...this.props} {...this.state} object_type={"poll"} useBankSuccess={this.useBankSuccess}></UseBank></p> <p className="fl"><UseBank {...this.props} {...this.state} object_type={"poll"} useBankSuccess={this.useBankSuccess}></UseBank></p>
<WordsBtn style="blue" className="font-16" to={`/courses/${coursesId}/polls/${Id}/${"new"}`}>新建</WordsBtn> <WordsBtn style="blue" className="font-16" to={`/classrooms/${coursesId}/polls/${Id}/${"new"}`}>新建</WordsBtn>
</li> </li>
} }
</p> </p>
@ -543,15 +543,15 @@ class Poll extends Component{
</div> </div>
<Spin size="large" spinning={this.state.isSpin}> <Spin size="large" spinning={this.state.isSpin}>
{ {
pollsList && pollsList.length > 0 && isAdmin && pollsList && pollsList.length > 0 && isAdmin &&
<div className="mt20 edu-back-white padding20-30"> <div className="mt20 edu-back-white padding20-30">
<div className="clearfix"> <div className="clearfix">
<Checkbox className="fl" onChange={this.onCheckAll} checked={checkAllValue}>已选 {checkBoxValues.length} 不支持跨页勾选</Checkbox> <Checkbox className="fl" onChange={this.onCheckAll} checked={checkAllValue}>已选 {checkBoxValues.length} 不支持跨页勾选</Checkbox>
<div className="studentList_operation_ul"> <div className="studentList_operation_ul">
<li className="li_line"><a className="color-grey-9" onClick={()=>this.ActionPoll("delete")}>删除</a></li> <li className="li_line"><a className="color-grey-9" onClick={()=>this.ActionPoll("delete")}>删除</a></li>
<li className="li_line"> <li className="li_line">
<ImmediatelyPublish <ImmediatelyPublish
{...this.props} {...this.props}
{...this.state} {...this.state}
style="grey" style="grey"
checkBoxValues={this.state.checkBoxValues} checkBoxValues={this.state.checkBoxValues}
@ -560,7 +560,7 @@ class Poll extends Component{
</li> </li>
<li className="li_line"> <li className="li_line">
<ImmediatelyEnd <ImmediatelyEnd
{...this.props} {...this.props}
{...this.state} {...this.state}
style="grey" style="grey"
single={true} single={true}
@ -585,9 +585,9 @@ class Poll extends Component{
{ {
pollsList && pollsList.map((item,key)=>{ pollsList && pollsList.map((item,key)=>{
return( return(
<PollListItem <PollListItem
{...this.props} {...this.props}
{...this.state} {...this.state}
courseType={course_types} courseType={course_types}
item={item} item={item}
index={key} index={key}
@ -605,17 +605,17 @@ class Poll extends Component{
pollsList && pollsList.length==0 && <NoneData></NoneData> pollsList && pollsList.length==0 && <NoneData></NoneData>
} }
{ {
course_types && polls_counts.polls_all_counts > pageSize ? course_types && polls_counts.polls_all_counts > pageSize ?
<div className="mt30 edu-txt-center pb30"> <div className="mt30 edu-txt-center pb30">
<Pagination showQuickJumper current={page} total={polls_counts && polls_counts.polls_all_counts} pageSize={pageSize} onChange={this.changePage}></Pagination> <Pagination showQuickJumper current={page} total={polls_counts && polls_counts.polls_all_counts} pageSize={pageSize} onChange={this.changePage}></Pagination>
</div> </div>
: :
"" ""
} }
</React.Fragment> </React.Fragment>
) )
} }
} }
export default Poll; export default Poll;

@ -166,7 +166,7 @@ class PollDetailIndex extends Component{
<p className="clearfix mb20"> <p className="clearfix mb20">
<WordsBtn style="grey" className="fl" to={current_user && current_user.first_category_url}>{this.props.coursedata.name}</WordsBtn> <WordsBtn style="grey" className="fl" to={current_user && current_user.first_category_url}>{this.props.coursedata.name}</WordsBtn>
<span className="color-grey-9 fl ml3 mr3">&gt;</span> <span className="color-grey-9 fl ml3 mr3">&gt;</span>
<WordsBtn style="grey" className="fl" to={`/courses/${this.props.match.params.coursesId}/polls/${user_permission && user_permission.left_banner_id}`}>问卷</WordsBtn> <WordsBtn style="grey" className="fl" to={`/classrooms/${this.props.match.params.coursesId}/polls/${user_permission && user_permission.left_banner_id}`}>问卷</WordsBtn>
<span className="color-grey-9 fl ml3 mr3">&gt;</span> <span className="color-grey-9 fl ml3 mr3">&gt;</span>
<span>问卷详情</span> <span>问卷详情</span>
</p> </p>
@ -175,7 +175,7 @@ class PollDetailIndex extends Component{
<span className="mt3 fl" style={{height:"25px"}}> <span className="mt3 fl" style={{height:"25px"}}>
<CoursesListType typelist={[`${map[pollDetail && pollDetail.polls_status]}`]} typesylename={""} /> <CoursesListType typelist={[`${map[pollDetail && pollDetail.polls_status]}`]} typesylename={""} />
</span> </span>
<WordsBtn className="fr font-16 mt2" style="grey" to={`/courses/${this.props.match.params.coursesId}/polls/${user_permission && user_permission.left_banner_id}`}>返回</WordsBtn> <WordsBtn className="fr font-16 mt2" style="grey" to={`/classrooms/${this.props.match.params.coursesId}/polls/${user_permission && user_permission.left_banner_id}`}>返回</WordsBtn>
</p> </p>
<div> <div>
<div className="clearfix edu-back-white pl30 pr30 bor-bottom-greyE"> <div className="clearfix edu-back-white pl30 pr30 bor-bottom-greyE">
@ -192,7 +192,7 @@ class PollDetailIndex extends Component{
{ {
isAdmin && isAdmin &&
<span className="fr mt22"> <span className="fr mt22">
<WordsBtn style="blue" to={`/courses/${this.props.match.params.coursesId}/polls/${this.props.match.params.pollId}/edit`} className="fl mr20 font-16">编辑问卷</WordsBtn> <WordsBtn style="blue" to={`/classrooms/${this.props.match.params.coursesId}/polls/${this.props.match.params.pollId}/edit`} className="fl mr20 font-16">编辑问卷</WordsBtn>
{/* 立即发布 */} {/* 立即发布 */}
{ {
user_permission && user_permission.poll_unpublish_count > 0 ? user_permission && user_permission.poll_unpublish_count > 0 ?
@ -247,7 +247,7 @@ class PollDetailIndex extends Component{
<span className="fr mt22 font-16"> <span className="fr mt22 font-16">
{ {
user_permission && user_permission.current_status!=3 ? user_permission && user_permission.current_status!=3 ?
<WordsBtn style="blue" to={`/courses/${this.props.match.params.coursesId}/polls/${this.props.match.params.pollId}/users/${this.props.current_user.login}`}> <WordsBtn style="blue" to={`/classrooms/${this.props.match.params.coursesId}/polls/${this.props.match.params.pollId}/users/${this.props.current_user.login}`}>
{ user_permission && user_permission.current_status ==0 ? "继续答题" : { user_permission && user_permission.current_status ==0 ? "继续答题" :
user_permission.current_status == 1 ? user_permission.current_status == 1 ?
(polls_status===1?"":"查看答题") (polls_status===1?"":"查看答题")

@ -40,15 +40,15 @@ class PollInfo extends Component{
} }
} }
componentDidMount(){ componentDidMount(){
if(this.props.current_user){ if(this.props.current_user){
this.getInfo(); this.getInfo();
} }
//window.addEventListener('scroll', this.handleScroll); //window.addEventListener('scroll', this.handleScroll);
} }
// 滚动定位 // 滚动定位
handleScroll=()=>{ handleScroll=()=>{
if(parseInt(window.scrollY)>230){ if(parseInt(window.scrollY)>230){
@ -113,11 +113,11 @@ class PollInfo extends Component{
let txt=Object.assign({}, this.state.inputArray[parseInt(arr[1])]); let txt=Object.assign({}, this.state.inputArray[parseInt(arr[1])]);
let ids=item.target.value; let ids=item.target.value;
let list=txt.answersList.filter(element => element.answer_id == ids); let list=txt.answersList.filter(element => element.answer_id == ids);
this.postAnswer(arr[0],ids,list[0].answer_text=="其他"?txt.text:"",arr[1]); this.postAnswer(arr[0],ids,list[0].answer_text=="其他"?txt.text:"",arr[1]);
} }
//选中选择题(多选题)选项保存 //选中选择题(多选题)选项保存
ChangeOptionMuntil=(a_id,q_id,key)=>{ ChangeOptionMuntil=(a_id,q_id,key)=>{
let ind=Object.assign({}, this.state.inputArray[parseInt(key)]); let ind=Object.assign({}, this.state.inputArray[parseInt(key)]);
let count=0; let count=0;
@ -193,7 +193,7 @@ class PollInfo extends Component{
//提交主观题 //提交主观题
commitText=(key,q_id)=>{ commitText=(key,q_id)=>{
const text = Object.assign({}, this.state.inputArray[key]).text; const text = Object.assign({}, this.state.inputArray[key]).text;
let url='/poll_questions/'+q_id+'/poll_votes.json?'; let url='/poll_questions/'+q_id+'/poll_votes.json?';
const ans=Object.assign({}, this.state.question_answered[key]); const ans=Object.assign({}, this.state.question_answered[key]);
@ -221,7 +221,7 @@ class PollInfo extends Component{
console.log(error); console.log(error);
}) })
} }
} }
// 提交 // 提交
@ -259,7 +259,7 @@ class PollInfo extends Component{
} }
} }
cancelSubmit=()=>{ cancelSubmit=()=>{
this.setState({ this.setState({
modalsType:false, modalsType:false,
@ -268,7 +268,7 @@ class PollInfo extends Component{
}) })
} }
sureSubmit=()=>{ sureSubmit=()=>{
let pollId=this.props.match.params.pollId; let pollId=this.props.match.params.pollId;
let url=`/polls/${pollId}/commit_poll.json` let url=`/polls/${pollId}/commit_poll.json`
@ -280,7 +280,7 @@ class PollInfo extends Component{
modalsTopval:"", modalsTopval:"",
modalsBottomval:"" modalsBottomval:""
}) })
window.location.href=`/courses/${this.props.match.params.coursesId}/polls/${pollId}/detail` window.location.href=`/classrooms/${this.props.match.params.coursesId}/polls/${pollId}/detail`
} }
}).catch((error)=>{ }).catch((error)=>{
console.log(error); console.log(error);
@ -317,18 +317,18 @@ class PollInfo extends Component{
<p className="clearfix mb20"> <p className="clearfix mb20">
<WordsBtn style="grey" className="fl" to={current_user && current_user.first_category_url}>{courseName}</WordsBtn> <WordsBtn style="grey" className="fl" to={current_user && current_user.first_category_url}>{courseName}</WordsBtn>
<span className="color-grey-9 fl ml3 mr3">&gt;</span> <span className="color-grey-9 fl ml3 mr3">&gt;</span>
<WordsBtn style="grey" className="fl" to={`/courses/${this.props.match.params.coursesId}/polls/${poll && poll.left_banner_id}`}>问卷</WordsBtn> <WordsBtn style="grey" className="fl" to={`/classrooms/${this.props.match.params.coursesId}/polls/${poll && poll.left_banner_id}`}>问卷</WordsBtn>
<span className="color-grey-9 fl ml3 mr3">&gt;</span> <span className="color-grey-9 fl ml3 mr3">&gt;</span>
<WordsBtn style="grey" to={`/courses/${coursesId}/polls/${this.props.match.params.pollId}/detail`} className="fl mr3">问卷详情</WordsBtn>&gt; <WordsBtn style="grey" to={`/classrooms/${coursesId}/polls/${this.props.match.params.pollId}/detail`} className="fl mr3">问卷详情</WordsBtn>&gt;
<span className="ml3">{question_types&&question_types.user_name}</span> <span className="ml3">{question_types&&question_types.user_name}</span>
</p> </p>
<p className="clearfix mb20"> <p className="clearfix mb20">
<span className="color-grey-3 font-24 fl task-hide break-word" style={{maxWidth:"900px",lineHeight:"30px"}}>{poll && poll.polls_name}</span> <span className="color-grey-3 font-24 fl task-hide break-word" style={{maxWidth:"900px",lineHeight:"30px"}}>{poll && poll.polls_name}</span>
<CoursesListType typelist={[`${statudmap[poll && poll.poll_status]}`]} typesylename={""} /> <CoursesListType typelist={[`${statudmap[poll && poll.poll_status]}`]} typesylename={""} />
{ {
isAdmin || (poll && poll.user_poll_status == 1) ? <WordsBtn className="fr font-16 mt5" style="grey" to={`/courses/${coursesId}/polls/${this.props.match.params.pollId}/detail`}>返回</WordsBtn> :'' isAdmin || (poll && poll.user_poll_status == 1) ? <WordsBtn className="fr font-16 mt5" style="grey" to={`/classrooms/${coursesId}/polls/${this.props.match.params.pollId}/detail`}>返回</WordsBtn> :''
} }
</p> </p>
{ {
poll && poll.polls_description && poll && poll.polls_description &&
@ -353,7 +353,7 @@ class PollInfo extends Component{
<span className="color-grey-9">主观题{question_types &&question_types.q_mains}</span> <span className="color-grey-9">主观题{question_types &&question_types.q_mains}</span>
} }
</p> </p>
<div className={ questionPanelFixed==true ? "questionsfixed":"questionsNo"}> <div className={ questionPanelFixed==true ? "questionsfixed":"questionsNo"}>
<p className="clearfix pl20"> <p className="clearfix pl20">
<span className="mr40 answered">已答</span> <span className="mr40 answered">已答</span>
@ -383,7 +383,7 @@ class PollInfo extends Component{
<div className="pl30 pr30 mt30 mb10 clearfix"> <div className="pl30 pr30 mt30 mb10 clearfix">
<span className="color-blue fl font-16">{item.question.question_number}{map[item.question.question_type]}</span> <span className="color-blue fl font-16">{item.question.question_number}{map[item.question.question_type]}</span>
{ item.question.is_necessary==1 ? <span className="mustAnswer fl ml10 mr10 mt5">必答</span>:<span className="mustAnswer fl ml10 mr10 mt5"></span> } { item.question.is_necessary==1 ? <span className="mustAnswer fl ml10 mr10 mt5">必答</span>:<span className="mustAnswer fl ml10 mr10 mt5"></span> }
{ item.question.question_type == 2 && item.question.min_choices && item.question.max_choices ? { item.question.question_type == 2 && item.question.min_choices && item.question.max_choices ?
<span className="color-grey-9 font-14 fl mt2"> <span className="color-grey-9 font-14 fl mt2">
{ {
item.question.min_choices == item.question.max_choices ? "可选"+item.question.max_choices+"项" : item.question.min_choices == item.question.max_choices ? "可选"+item.question.max_choices+"项" :
@ -399,7 +399,7 @@ class PollInfo extends Component{
}}>{item.question.question_title}</span></p> }}>{item.question.question_title}</span></p>
{ {
//单选 //单选
item.question.question_type==1 && item.question.question_type==1 &&
<Radio.Group disabled={isAdmin || (isStudent && poll && poll.user_poll_status == 1)?true:false} className="answerList" defaultValue={item.question.poll_answer_ids[0]} name={[item.question.id,key]} onChange={this.ChangeOptionSingle}> <Radio.Group disabled={isAdmin || (isStudent && poll && poll.user_poll_status == 1)?true:false} className="answerList" defaultValue={item.question.poll_answer_ids[0]} name={[item.question.id,key]} onChange={this.ChangeOptionSingle}>
{ {
item.question.answers && item.question.answers.map((i,k)=>{ item.question.answers && item.question.answers.map((i,k)=>{
@ -415,11 +415,11 @@ class PollInfo extends Component{
return( return(
<React.Fragment> <React.Fragment>
{ {
j.id == item.question.id ? j.id == item.question.id ?
<Input type="text" className="otherTxt" autoComplete="off" value={j.text && j.text} name={key} <Input type="text" className="otherTxt" autoComplete="off" value={j.text && j.text} name={key}
onInput={this.blurTxt} onInput={this.blurTxt}
onBlur={(e)=>this.saveInputAndAnswer(e,i.answer_id,item.question.id,key,item.question.question_type)} onBlur={(e)=>this.saveInputAndAnswer(e,i.answer_id,item.question.id,key,item.question.question_type)}
/> />
: "" : ""
} }
</React.Fragment> </React.Fragment>
@ -437,12 +437,12 @@ class PollInfo extends Component{
} }
{ {
//多选 //多选
item.question.question_type==2 && item.question.question_type==2 &&
<Checkbox.Group <Checkbox.Group
onChange={(value)=>this.ChangeOptionMuntil(value,item.question.id,key)} onChange={(value)=>this.ChangeOptionMuntil(value,item.question.id,key)}
disabled={isAdmin || (isStudent && poll && poll.user_poll_status == 1)?true:false} disabled={isAdmin || (isStudent && poll && poll.user_poll_status == 1)?true:false}
defaultValue={item.question.poll_answer_ids} defaultValue={item.question.poll_answer_ids}
className="answerList" className="answerList"
name={key}> name={key}>
{ {
item.question.answers && item.question.answers.map((i,k)=>{ item.question.answers && item.question.answers.map((i,k)=>{
@ -458,11 +458,11 @@ class PollInfo extends Component{
return( return(
<React.Fragment> <React.Fragment>
{ {
j.id == item.question.id ? j.id == item.question.id ?
<Input type="text" className="otherTxt" autoComplete="off" value={j.text && j.text} name={key} <Input type="text" className="otherTxt" autoComplete="off" value={j.text && j.text} name={key}
onInput={this.blurTxt} onInput={this.blurTxt}
onBlur={(e)=>this.saveInputAndAnswer(e,i.answer_id,item.question.id,key,item.question.question_type)} onBlur={(e)=>this.saveInputAndAnswer(e,i.answer_id,item.question.id,key,item.question.question_type)}
/> />
: "" : ""
} }
</React.Fragment> </React.Fragment>
@ -480,14 +480,14 @@ class PollInfo extends Component{
} }
{ {
//主观题 //主观题
item.question.question_type==3 && item.question.question_type==3 &&
<div className="mt10 pl30 pr30 pb20"> <div className="mt10 pl30 pr30 pb20">
{ {
inputArray && inputArray.map((j,k)=>{ inputArray && inputArray.map((j,k)=>{
return( return(
<React.Fragment> <React.Fragment>
{ {
j.id == item.question.id ? j.id == item.question.id ?
<textarea placeholder="在此填入答案" disabled={isAdmin || (isStudent && poll && poll.user_poll_status == 1) ? true:false} value={j.text && j.text} className="winput-100-130" name={key} onInput={this.blurTxt} onBlur={()=>this.commitText(key,item.question.id)}></textarea> <textarea placeholder="在此填入答案" disabled={isAdmin || (isStudent && poll && poll.user_poll_status == 1) ? true:false} value={j.text && j.text} className="winput-100-130" name={key} onInput={this.blurTxt} onBlur={()=>this.commitText(key,item.question.id)}></textarea>
: "" : ""
} }
@ -497,7 +497,7 @@ class PollInfo extends Component{
} }
</div> </div>
} }
</div> </div>
) )
}) })
@ -505,7 +505,7 @@ class PollInfo extends Component{
</div> </div>
</div> </div>
{ {
isStudent && poll && poll.user_poll_status == 0 ? isStudent && poll && poll.user_poll_status == 0 ?
<div className="mt30 mb50"> <div className="mt30 mb50">
<a type="primary" className="defalutSubmitbtn" onClick={this.submitPoll}>提交</a> <a type="primary" className="defalutSubmitbtn" onClick={this.submitPoll}>提交</a>
</div> </div>
@ -516,4 +516,4 @@ class PollInfo extends Component{
) )
} }
} }
export default PollInfo; export default PollInfo;

@ -37,19 +37,19 @@ class PollListItem extends Component{
render(){ render(){
let{item,checkBox,courseType,index}=this.props; let{item,checkBox,courseType,index}=this.props;
let {coursesId}=this.props.match.params; let {coursesId}=this.props.match.params;
const IsAdmin =this.props.isAdmin(); const IsAdmin =this.props.isAdmin();
const isStudent = this.props.isStudent(); const isStudent = this.props.isStudent();
const isNotMember = this.props.isNotMember(); const isNotMember = this.props.isNotMember();
const isAdminOrStudent = this.props.isAdminOrStudent(); const isAdminOrStudent = this.props.isAdminOrStudent();
let t= item.end_time ? moment(item.end_time) - moment() : 0; let t= item.end_time ? moment(item.end_time) - moment() : 0;
let canNotLink = !isAdminOrStudent && item.lock_status == 0 let canNotLink = !isAdminOrStudent && item.lock_status == 0
return( return(
<div className="workList_Item polllisthover" style={{cursor : IsAdmin ? "pointer" : "default",padding:"30px" }} onClick={() => window.$(`.pollitem${index} input`).click() }> <div className="workList_Item polllisthover" style={{cursor : IsAdmin ? "pointer" : "default",padding:"30px" }} onClick={() => window.$(`.pollitem${index} input`).click() }>
{ {
IsAdmin && IsAdmin &&
<span className={`pollitem${index} fl mr12`}> <span className={`pollitem${index} fl mr12`}>
{checkBox} {checkBox}
</span> </span>
@ -59,10 +59,10 @@ class PollListItem extends Component{
{ canNotLink ? { canNotLink ?
<span className="fl font-16 font-bd mt2 color-grey-3 task-hide pointer" style={{"maxWidth":"600px"}} title={courseType.user_permission == 0?"私有属性,非课堂成员不能访问":item.polls_name}>{item.polls_name}</span> <span className="fl font-16 font-bd mt2 color-grey-3 task-hide pointer" style={{"maxWidth":"600px"}} title={courseType.user_permission == 0?"私有属性,非课堂成员不能访问":item.polls_name}>{item.polls_name}</span>
: :
<a onClick={()=>this.toDetailPage(`/courses/${coursesId}/polls/${item.id}/detail`)} className="fl font-16 font-bd mt2 color-grey-3 task-hide pointer" style={{"maxWidth":"600px"}} title={item.polls_name}>{item.polls_name}</a> <a onClick={()=>this.toDetailPage(`/classrooms/${coursesId}/polls/${item.id}/detail`)} className="fl font-16 font-bd mt2 color-grey-3 task-hide pointer" style={{"maxWidth":"600px"}} title={item.polls_name}>{item.polls_name}</a>
} }
{ {
item.lock_status === 0 ? item.lock_status === 0 ?
<Tooltip title={"私有属性,非课堂成员不能访问"} placement="bottom"> <Tooltip title={"私有属性,非课堂成员不能访问"} placement="bottom">
<i className="iconfont icon-guansuo color-grey-c ml10 font-16 fl"></i> <i className="iconfont icon-guansuo color-grey-c ml10 font-16 fl"></i>
</Tooltip> </Tooltip>
@ -70,7 +70,7 @@ class PollListItem extends Component{
} }
<CoursesListType typelist={[polls_status[`${item.polls_status}`]]} typesylename={""}></CoursesListType> <CoursesListType typelist={[polls_status[`${item.polls_status}`]]} typesylename={""}></CoursesListType>
{ {
isStudent && ((item.polls_status == 1 && (item.current_status ==0 ||item.current_status ==2)) || (item.polls_status==3 && item.current_status==2)) ? isStudent && ((item.polls_status == 1 && (item.current_status ==0 ||item.current_status ==2)) || (item.polls_status==3 && item.current_status==2)) ?
<span className="edu-filter-btn edu-filter-btn-84B6EB ml15 fl typestyle">未提交</span>:"" <span className="edu-filter-btn edu-filter-btn-84B6EB ml15 fl typestyle">未提交</span>:""
} }
</p> </p>
@ -88,11 +88,11 @@ class PollListItem extends Component{
<span className="mr20 fl mt3">创建于{moment(item.created_at).fromNow()}</span> <span className="mr20 fl mt3">创建于{moment(item.created_at).fromNow()}</span>
} }
{ {
item.polls_status ==1 && item.publish_time !=null && item.polls_status ==1 && item.publish_time !=null &&
<span className="mr20 fl mt3">将发布于{moment(item.publish_time).format(dataformat)}</span> <span className="mr20 fl mt3">将发布于{moment(item.publish_time).format(dataformat)}</span>
} }
{ {
item.polls_status ==2 && item.publish_time !=null && item.polls_status ==2 && item.publish_time !=null &&
<Tooltip title="提交剩余时间"> <Tooltip title="提交剩余时间">
<span className="mr20 fl mt3">{"提交剩余时间:"+formatDuring(t)}</span> <span className="mr20 fl mt3">{"提交剩余时间:"+formatDuring(t)}</span>
</Tooltip> </Tooltip>
@ -100,7 +100,7 @@ class PollListItem extends Component{
{ {
isStudent ? <WordsBtn style="blue" targets={item.current_status == 2||item.current_status == 0?undefined:'_blank'} className="fr font-16 ml20" to={`/courses/${coursesId}/polls/${item.id}/users/${this.props.current_user.login}`}> isStudent ? <WordsBtn style="blue" targets={item.current_status == 2||item.current_status == 0?undefined:'_blank'} className="fr font-16 ml20" to={`/classrooms/${coursesId}/polls/${item.id}/users/${this.props.current_user.login}`}>
{ {
@ -114,14 +114,14 @@ class PollListItem extends Component{
} }
</WordsBtn>:"" </WordsBtn>:""
} }
{ isStudent ?canNotLink ?"": <WordsBtn style="blue" className="font-16 fr " onClick={()=>this.toDetailPage(`/courses/${coursesId}/polls/${item.id}/detail`)} >查看详情</WordsBtn>:""} { isStudent ?canNotLink ?"": <WordsBtn style="blue" className="font-16 fr " onClick={()=>this.toDetailPage(`/classrooms/${coursesId}/polls/${item.id}/detail`)} >查看详情</WordsBtn>:""}
{ {
IsAdmin && IsAdmin &&
<ul className="fr"> <ul className="fr">
{ canNotLink ?"": <WordsBtn style="blue" className="font-16" onClick={()=>this.toDetailPage(`/courses/${coursesId}/polls/${item.id}/detail`)} >查看详情</WordsBtn>} { canNotLink ?"": <WordsBtn style="blue" className="font-16" onClick={()=>this.toDetailPage(`/classrooms/${coursesId}/polls/${item.id}/detail`)} >查看详情</WordsBtn>}
<WordsBtn style="blue" className="font-16 ml20" to={`/courses/${coursesId}/polls/${item.id}/${"edit"}`}>编辑</WordsBtn> <WordsBtn style="blue" className="font-16 ml20" to={`/classrooms/${coursesId}/polls/${item.id}/${"edit"}`}>编辑</WordsBtn>
<WordsBtn style="blue" className="ml20 font-16" to={`/courses/${coursesId}/polls/${item.id}/detail?tab=3`}>设置</WordsBtn> <WordsBtn style="blue" className="ml20 font-16" to={`/classrooms/${coursesId}/polls/${item.id}/detail?tab=3`}>设置</WordsBtn>
</ul> </ul>
} }
</p> </p>
@ -130,4 +130,4 @@ class PollListItem extends Component{
) )
} }
} }
export default PollListItem export default PollListItem

@ -2326,7 +2326,7 @@ class Listofworksstudentone extends Component {
userids: e.myid, userids: e.myid,
}) })
window.open(`/courses/${this.state.props.match.params.coursesId}/shixun_homeworks/${e.myid}/shixun_work_report`, '_blank'); window.open(`/classrooms/${this.state.props.match.params.coursesId}/shixun_homeworks/${e.myid}/shixun_work_report`, '_blank');
// this.viewtraining(e.myid); // this.viewtraining(e.myid);
} }
viewtraining = (userids) => { viewtraining = (userids) => {
@ -3015,7 +3015,7 @@ class Listofworksstudentone extends Component {
userids: data.myid, userids: data.myid,
}) })
// this.viewtrainingt(e.myid); // this.viewtrainingt(e.myid);
window.open(`/courses/${this.state.props.match.params.coursesId}/shixun_homeworks/${data.myid}/shixun_work_report`, '_blank'); window.open(`/classrooms/${this.state.props.match.params.coursesId}/shixun_homeworks/${data.myid}/shixun_work_report`, '_blank');
} }
// 查看学员实训信息 // 查看学员实训信息
Viewstudenttraininginformationt = (e) => { Viewstudenttraininginformationt = (e) => {
@ -3025,7 +3025,7 @@ class Listofworksstudentone extends Component {
userids: e.myid, userids: e.myid,
}) })
// this.viewtrainingt(e.myid); // this.viewtrainingt(e.myid);
window.open(`/courses/${this.state.props.match.params.coursesId}/shixun_homeworks/${e.myid}/shixun_work_report`, '_blank'); window.open(`/classrooms/${this.state.props.match.params.coursesId}/shixun_homeworks/${e.myid}/shixun_work_report`, '_blank');
} }
// 关闭调分 // 关闭调分
cancelModulationModels = () => { cancelModulationModels = () => {

@ -756,7 +756,7 @@ class ShixunStudentWork extends Component {
width: '178px', width: '178px',
render: (text, record) => ( render: (text, record) => (
<span> <span>
<a onClick={()=>this.Viewstudenttraininginformation("/courses/"+this.props.match.params.coursesId+"/"+this.state.shixuntypes+"/"+this.props.match.params.homeworkid+"/review_detail/"+record.operating)} >查看</a> <a onClick={()=>this.Viewstudenttraininginformation("/classrooms/"+this.props.match.params.coursesId+"/"+this.state.shixuntypes+"/"+this.props.match.params.homeworkid+"/review_detail/"+record.operating)} >查看</a>
</span> </span>
) )
}, },
@ -1050,7 +1050,7 @@ export default ShixunStudentWork;
// jobsettingsdata&& jobsettingsdata.data === undefined ? "" // jobsettingsdata&& jobsettingsdata.data === undefined ? ""
// : jobsettingsdata&& jobsettingsdata.data.commit_des === null || jobsettingsdata&& jobsettingsdata.data.commit_des === undefined ? "" : // : jobsettingsdata&& jobsettingsdata.data.commit_des === null || jobsettingsdata&& jobsettingsdata.data.commit_des === undefined ? "" :
// <a className="fr color-blue font-16" // <a className="fr color-blue font-16"
// href={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${ jobsettingsdata&& jobsettingsdata.data === undefined ? "" : jobsettingsdata&& jobsettingsdata.data.id}/commitsummary/${this.state.props.match.params.homeworkid}`}>{ jobsettingsdata&& jobsettingsdata.data.commit_des}</a> // href={`/classrooms/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${ jobsettingsdata&& jobsettingsdata.data === undefined ? "" : jobsettingsdata&& jobsettingsdata.data.id}/commitsummary/${this.state.props.match.params.homeworkid}`}>{ jobsettingsdata&& jobsettingsdata.data.commit_des}</a>
// } // }
// { jobsettingsdata&&jobsettingsdata.data === undefined ? "" : <Startshixuntask // { jobsettingsdata&&jobsettingsdata.data === undefined ? "" : <Startshixuntask
// {...this.props} // {...this.props}

@ -145,7 +145,7 @@ class ShixunWorkReport extends Component {
} }
goback = () => { goback = () => {
this.props.history.replace(`/courses/${this.props.match.params.coursesId}/shixun_homeworks/${this.state.data.homework_common_id}/list?tab=0`); this.props.history.replace(`/classrooms/${this.props.match.params.coursesId}/shixun_homeworks/${this.state.data.homework_common_id}/list?tab=0`);
} }
setupdalist=(challenge_score,overall_appraisal,work_score)=>{ setupdalist=(challenge_score,overall_appraisal,work_score)=>{
@ -354,11 +354,11 @@ class ShixunWorkReport extends Component {
<span className={"color-grey-9"}> {data&&data.course_name}</span> <span className={"color-grey-9"}> {data&&data.course_name}</span>
</a> </a>
<span className="color-grey-9 fl ml3 mr3">&gt;</span> <span className="color-grey-9 fl ml3 mr3">&gt;</span>
<a className="btn colorgrey fl hovercolorblue " href={"/courses/"+this.props.match.params.coursesId+"/"+this.state.shixuntypes+"/"+category_id}> <a className="btn colorgrey fl hovercolorblue " href={"/classrooms/"+this.props.match.params.coursesId+"/"+this.state.shixuntypes+"/"+category_id}>
<span className={"color-grey-9"}>{data===undefined?"":data.category===null?"":data.category.category_name}</span> <span className={"color-grey-9"}>{data===undefined?"":data.category===null?"":data.category.category_name}</span>
</a> </a>
<span className="color-grey-9 fl ml3 mr3">&gt;</span> <span className="color-grey-9 fl ml3 mr3">&gt;</span>
<a href={"/courses/"+this.props.match.params.coursesId+"/"+this.state.shixuntypes+"/"+homework_common_id+"/list?tab=0"} className="fl color-grey-9">作业详情</a> <a href={"/classrooms/"+this.props.match.params.coursesId+"/"+this.state.shixuntypes+"/"+homework_common_id+"/list?tab=0"} className="fl color-grey-9">作业详情</a>
<span className="color-grey-9 fl ml3 mr3">&gt;</span> <span className="color-grey-9 fl ml3 mr3">&gt;</span>
<WordsBtn className="fl">{data&&data.username}</WordsBtn> <WordsBtn className="fl">{data&&data.username}</WordsBtn>
</p> </p>

@ -313,15 +313,15 @@ class ShixunhomeWorkItem extends Component{
`}</style> `}</style>
<h6> <h6>
{/*to={`/courses/${this.props.match.params.coursesId}/${discussMessage.homework_id}/jobsettings`}*/} {/*to={`/classrooms/${this.props.match.params.coursesId}/${discussMessage.homework_id}/jobsettings`}*/}
{ {
this.props.isAdmin?<a onClick={()=>this.hrefjumpskip("/courses/"+this.props.match.params.coursesId+"/"+this.state.shixuntypes+"/"+discussMessage.homework_id+"/list?tab=0")} this.props.isAdmin?<a onClick={()=>this.hrefjumpskip("/classrooms/"+this.props.match.params.coursesId+"/"+this.state.shixuntypes+"/"+discussMessage.homework_id+"/list?tab=0")}
title={discussMessage.name} title={discussMessage.name}
className="fl mt3 font-16 font-bd color-dark maxwidth333">{discussMessage.name}</a>:"" className="fl mt3 font-16 font-bd color-dark maxwidth333">{discussMessage.name}</a>:""
} }
{ {
this.props.isStudent? <a onClick={()=>this.hrefjumpskip(`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${discussMessage.homework_id}/list?tab=0`)} this.props.isStudent? <a onClick={()=>this.hrefjumpskip(`/classrooms/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${discussMessage.homework_id}/list?tab=0`)}
title={discussMessage.name} title={discussMessage.name}
className="fl mt3 font-16 font-bd color-dark maxwidth333">{discussMessage.name}</a>:"" className="fl mt3 font-16 font-bd color-dark maxwidth333">{discussMessage.name}</a>:""
} }
@ -329,7 +329,7 @@ class ShixunhomeWorkItem extends Component{
{ {
this.props.isNotMember===true? this.props.discussMessage.private_icon===true? this.props.isNotMember===true? this.props.discussMessage.private_icon===true?
<span className="fl mt3 font-16 font-bd color-dark maxwidth333 pointer" title={"私有属性,非课堂成员不能访问"}>{discussMessage.name}</span> <span className="fl mt3 font-16 font-bd color-dark maxwidth333 pointer" title={"私有属性,非课堂成员不能访问"}>{discussMessage.name}</span>
: <a onClick={()=>this.hrefjumpskip(`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${discussMessage.homework_id}/list?tab=0`)} : <a onClick={()=>this.hrefjumpskip(`/classrooms/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${discussMessage.homework_id}/list?tab=0`)}
title={discussMessage.name} title={discussMessage.name}
className="fl mt3 font-16 font-bd color-dark maxwidth333">{discussMessage.name}</a>:"" className="fl mt3 font-16 font-bd color-dark maxwidth333">{discussMessage.name}</a>:""
} }
@ -367,7 +367,7 @@ class ShixunhomeWorkItem extends Component{
</style> </style>
{/*to={`/courses/${this.props.match.params.coursesId}/${discussMessage.homework_id}/jobsettings`}*/} {/*to={`/classrooms/${this.props.match.params.coursesId}/${discussMessage.homework_id}/jobsettings`}*/}
@ -379,8 +379,8 @@ class ShixunhomeWorkItem extends Component{
{this.props.isAdminOrCreator()?<a onClick={(event)=>this.editname(discussMessage.name,discussMessage.homework_id,event)} className={"ml20 btn colorblue font-16 fontweight400 "}>重命名</a>:""} {this.props.isAdminOrCreator()?<a onClick={(event)=>this.editname(discussMessage.name,discussMessage.homework_id,event)} className={"ml20 btn colorblue font-16 fontweight400 "}>重命名</a>:""}
{/*<WordsBtn className="btn colorblue ml20 font-16" to={`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${discussMessage.homework_id}/settings?tab=3`} > 设置</WordsBtn>*/} {/*<WordsBtn className="btn colorblue ml20 font-16" to={`/classrooms/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${discussMessage.homework_id}/settings?tab=3`} > 设置</WordsBtn>*/}
<WordsBtn className="btn colorblue font-16 ml15 fontweight400 " to={`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${discussMessage.homework_id}/settings?tab=3`} > 设置</WordsBtn> <WordsBtn className="btn colorblue font-16 ml15 fontweight400 " to={`/classrooms/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${discussMessage.homework_id}/settings?tab=3`} > 设置</WordsBtn>
</span>:""} </span>:""}
@ -391,15 +391,15 @@ class ShixunhomeWorkItem extends Component{
</WordsBtn>:"":"":"":"" </WordsBtn>:"":"":"":""
} }
{ this.props.isAdmin?<a onClick={()=>this.hrefjumpskip("/courses/"+this.props.match.params.coursesId+"/"+this.state.shixuntypes+"/"+discussMessage.homework_id+"/list?tab=0")} className="btn colorblue font-16 fontweight400 mr20 fr">作品列表</a>:""} { this.props.isAdmin?<a onClick={()=>this.hrefjumpskip("/classrooms/"+this.props.match.params.coursesId+"/"+this.state.shixuntypes+"/"+discussMessage.homework_id+"/list?tab=0")} className="btn colorblue font-16 fontweight400 mr20 fr">作品列表</a>:""}
{ {
this.props.isStudent? <a onClick={()=>this.hrefjumpskip("/courses/"+this.props.match.params.coursesId+"/"+this.state.shixuntypes+"/"+discussMessage.homework_id+"/list?tab=0")} className="btn colorblue font-16 fontweight400 mr20 fr mt2">作品列表</a>:"" this.props.isStudent? <a onClick={()=>this.hrefjumpskip("/classrooms/"+this.props.match.params.coursesId+"/"+this.state.shixuntypes+"/"+discussMessage.homework_id+"/list?tab=0")} className="btn colorblue font-16 fontweight400 mr20 fr mt2">作品列表</a>:""
} }
{ {
this.props.isNotMember===true? this.props.discussMessage.private_icon===true?"" this.props.isNotMember===true? this.props.discussMessage.private_icon===true?""
:<a onClick={()=>this.hrefjumpskip("/courses/"+this.props.match.params.coursesId+"/"+this.state.shixuntypes+"/"+discussMessage.homework_id+"/list?tab=0")} className="btn colorblue font-16 fontweight400 mr20 fr">作品列表</a>:"" :<a onClick={()=>this.hrefjumpskip("/classrooms/"+this.props.match.params.coursesId+"/"+this.state.shixuntypes+"/"+discussMessage.homework_id+"/list?tab=0")} className="btn colorblue font-16 fontweight400 mr20 fr">作品列表</a>:""
} }
@ -504,7 +504,7 @@ export default ShixunhomeWorkItem;
// //
// let coursesId=this.props.coursesId; // let coursesId=this.props.coursesId;
// let taskid=this.props.taskid; // let taskid=this.props.taskid;
// let url="/courses/"+coursesId+"/graduation_tasks/relate_project.json"; // let url="/classrooms/"+coursesId+"/graduation_tasks/relate_project.json";
// axios.post(url,{ // axios.post(url,{
// project_id:taskid // project_id:taskid
// }).then((result)=>{ // }).then((result)=>{
@ -528,4 +528,4 @@ export default ShixunhomeWorkItem;
// this.setState({ // this.setState({
// visible:true // visible:true
// }) // })
// } // }

@ -198,7 +198,7 @@ class ShixunWorkModal extends Component{
// message:"提示", // message:"提示",
// description: response.data.message // description: response.data.message
// }); // });
window.location.href=`/courses/${this.props.match.params.coursesId}/shixun_homeworks/${this.props.match.params.homeworkid}/student_work?tab=2`; window.location.href=`/classrooms/${this.props.match.params.coursesId}/shixun_homeworks/${this.props.match.params.homeworkid}/student_work?tab=2`;
}else if(response.data.status === -1){ }else if(response.data.status === -1){
notification.open({ notification.open({
message:"提示", message:"提示",
@ -350,4 +350,4 @@ export default ShixunWorkModal;
// </li> // </li>
// </div> // </div>
// //
// : // :

@ -219,7 +219,7 @@ class TraineetraininginformationModal extends Component {
<span className="ml10 " style={{"text-align": "left","color":'#29BD8B'}} >经验值<span style={{"color":'#29BD8B'}}> {this.props.experience=== undefined?"0" :this.props.experience}/</span><span style={{"color":'#29BD8B'}}>{this.props.viewtrainingdata === undefined ? "" : this.props.viewtrainingdata.shixun_score}</span></span> <span className="ml10 " style={{"text-align": "left","color":'#29BD8B'}} >经验值<span style={{"color":'#29BD8B'}}> {this.props.experience=== undefined?"0" :this.props.experience}/</span><span style={{"color":'#29BD8B'}}>{this.props.viewtrainingdata === undefined ? "" : this.props.viewtrainingdata.shixun_score}</span></span>
</div> </div>
{/*<Button type="primary" className="ml30" >实训报告</Button>*/} {/*<Button type="primary" className="ml30" >实训报告</Button>*/}
<Button type="primary" target="_blank" className="lh38 fr" style={{"text-align": "center","width": "100px",color: "#fff"}} href={`/courses/${this.props.coursesId}/shixun_homeworks/${this.props.viewtrainingdata.work_id}/shixun_work_report`}> <Button type="primary" target="_blank" className="lh38 fr" style={{"text-align": "center","width": "100px",color: "#fff"}} href={`/classrooms/${this.props.coursesId}/shixun_homeworks/${this.props.viewtrainingdata.work_id}/shixun_work_report`}>
实训报告 实训报告
</Button> </Button>
{/*这里到时候要做判断*/} {/*这里到时候要做判断*/}
@ -394,4 +394,4 @@ class TraineetraininginformationModal extends Component {
} }
} }
export default TraineetraininginformationModal; export default TraineetraininginformationModal;

@ -616,7 +616,7 @@ export default Workquestionandanswer;
{/* {this.props.isAdmin() ?*/} {/* {this.props.isAdmin() ?*/}
{/* this.state.code_review === true || jobsettingsdata === undefined ? [""] : jobsettingsdata.data.homework_status[0] === "未发布" ? "" :*/} {/* this.state.code_review === true || jobsettingsdata === undefined ? [""] : jobsettingsdata.data.homework_status[0] === "未发布" ? "" :*/}
{/* <a*/} {/* <a*/}
{/* // to={`/courses/${this.state.props.match.params.coursesId}/${this.state.props.match.params.homeworkid}/student_work`}*/} {/* // to={`/classrooms/${this.state.props.match.params.coursesId}/${this.state.props.match.params.homeworkid}/student_work`}*/}
{/* onClick={(e)=>this.ChangeTab(2)}>*/} {/* onClick={(e)=>this.ChangeTab(2)}>*/}
{/* 代码查重</a> : ""}*/} {/* 代码查重</a> : ""}*/}
@ -672,11 +672,11 @@ export default Workquestionandanswer;
{/* jobsettingsdata&& jobsettingsdata.data === undefined ? ""*/} {/* jobsettingsdata&& jobsettingsdata.data === undefined ? ""*/}
{/* : jobsettingsdata&& jobsettingsdata.data.commit_des === null || jobsettingsdata&& jobsettingsdata.data.commit_des === undefined ? "" :*/} {/* : jobsettingsdata&& jobsettingsdata.data.commit_des === null || jobsettingsdata&& jobsettingsdata.data.commit_des === undefined ? "" :*/}
{/* <a className="fr color-blue font-16"*/} {/* <a className="fr color-blue font-16"*/}
{/* href={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${ jobsettingsdata&& jobsettingsdata.data === undefined ? "" : jobsettingsdata&& jobsettingsdata.data.id}/commitsummary/${this.state.props.match.params.homeworkid}`}>{ jobsettingsdata&& jobsettingsdata.data.commit_des}</a>*/} {/* href={`/classrooms/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${ jobsettingsdata&& jobsettingsdata.data === undefined ? "" : jobsettingsdata&& jobsettingsdata.data.id}/commitsummary/${this.state.props.match.params.homeworkid}`}>{ jobsettingsdata&& jobsettingsdata.data.commit_des}</a>*/}
{/* }*/} {/* }*/}
{/* { jobsettingsdata&&jobsettingsdata.data === undefined ? "" : <Startshixuntask*/} {/* { jobsettingsdata&&jobsettingsdata.data === undefined ? "" : <Startshixuntask*/}
{/* {...this.props}*/} {/* {...this.props}*/}
{/* data={ jobsettingsdata&& jobsettingsdata.data}*/} {/* data={ jobsettingsdata&& jobsettingsdata.data}*/}
{/* />}*/} {/* />}*/}
{/* </div>*/} {/* </div>*/}
{/*</div>*/} {/*</div>*/}

@ -419,6 +419,7 @@ class Statistics extends Component{
} }
{ {
this.props.isAdmin()===true? this.props.isAdmin()===true?
// 这里是文件下载 不能替换路由
<a className={"ml20 ant-btn-link"} onClick={()=>this.derivefun(this.state.activeKey==="1"?`/courses/${this.props.match.params.coursesId}/export_member_scores_excel.xlsx`:`/courses/${this.props.match.params.coursesId}/export_member_act_score.xlsx`)}>导出</a> <a className={"ml20 ant-btn-link"} onClick={()=>this.derivefun(this.state.activeKey==="1"?`/courses/${this.props.match.params.coursesId}/export_member_scores_excel.xlsx`:`/courses/${this.props.match.params.coursesId}/export_member_act_score.xlsx`)}>导出</a>
:"" :""
} }

@ -437,7 +437,7 @@ class CourseSupports extends Component {
Supportssum:true Supportssum:true
}) })
return return
} }
if(editnum>1||editnum===0){ if(editnum>1||editnum===0){
this.setState({ this.setState({
// Supportstype:true, // Supportstype:true,
@ -624,7 +624,7 @@ class CourseSupports extends Component {
</div> </div>
<div className="padding20-30" id="training_objective_contents"> <div className="padding20-30" id="training_objective_contents">
<span className="fl SystemParameters" >毕业要求指标点<a href={`/ecs/major_schools/${this.props.match.params.major_school_id}/years/${this.props.match.params.ec_year_id}/graduation_requirement`}><span className="Systemnum">{data.count}</span></a></span> <span className="fl SystemParameters" >毕业要求指标点<a href={`/ecs/major_schools/${this.props.match.params.major_school_id}/years/${this.props.match.params.ec_year_id}/graduation_requirement`}><span className="Systemnum">{data.count}</span></a></span>
<span className="fl ml20 SystemParameters">课程体系<a href={`/ecs/major_schools/${this.props.match.params.major_school_id}/years/${this.props.match.params.ec_year_id}/courses/ec_course_support_setting/1`}><span className="Systemnum">{data.course_count}</span></a></span> <span className="fl ml20 SystemParameters">课程体系<a href={`/ecs/major_schools/${this.props.match.params.major_school_id}/years/${this.props.match.params.ec_year_id}/classrooms/ec_course_support_setting/1`}><span className="Systemnum">{data.course_count}</span></a></span>
</div> </div>
</div> </div>
@ -655,7 +655,7 @@ class CourseSupports extends Component {
item.course_supports.map((t,kes)=>{ item.course_supports.map((t,kes)=>{
return( return(
<span key={kes} className="column-1" <span key={kes} className="column-1"
style={{ style={{
display:Editkey!=key?"block":'none', display:Editkey!=key?"block":'none',
marginRight: '-1px' marginRight: '-1px'
@ -681,7 +681,7 @@ class CourseSupports extends Component {
<div className="left operationalter"> <div className="left operationalter">
{this.props.year&&this.props.year.can_manager===false?"":<a className="editSubentry" title="编辑"> {this.props.year&&this.props.year.can_manager===false?"":<a className="editSubentry" title="编辑">
<i className="iconfont icon-bianjidaibeijing color-green" id={item.id} subindex={item.graduation_requirement_position+"-"+item.position} onClick={this.EditSupportCourse.bind(this,key)}></i> <i className="iconfont icon-bianjidaibeijing color-green" id={item.id} subindex={item.graduation_requirement_position+"-"+item.position} onClick={this.EditSupportCourse.bind(this,key)}></i>
</a>} </a>}
</div> </div>
</div> </div>

@ -10,7 +10,7 @@ import Loadable from 'react-loadable';
import Loading from "../../../Loading"; import Loading from "../../../Loading";
const { Step } = Steps; const { Step } = Steps;
const steps = ["培养目标", "毕业要求", "培养目标VS毕业要求", "毕业要求VS通用标准", "学生", "课程体系", "课程体系VS毕业要求", "达成度评价结果"]; const steps = ["培养目标", "毕业要求", "培养目标VS毕业要求", "毕业要求VS通用标准", "学生", "课程体系", "课程体系VS毕业要求", "达成度评价结果"];
const stepTypes = ["training_objectives", "graduation_requirement", "requirement_vs_objective", "requirement_vs_standard", "students", "courses", "requirement_vs_courses", "reach_calculation_info"]; const stepTypes = ["training_objectives", "graduation_requirement", "requirement_vs_objective", "requirement_vs_standard", "students", "classrooms", "requirement_vs_courses", "reach_calculation_info"];
const EcStudentList=Loadable({ const EcStudentList=Loadable({
loader: () => import('../subroute/ecStudentList/EcStudentList'), loader: () => import('../subroute/ecStudentList/EcStudentList'),
loading: Loading, loading: Loading,
@ -83,7 +83,7 @@ class EcSetting extends React.Component {
let type = stepTypes[stepIndex]; let type = stepTypes[stepIndex];
this.setState({ stepIndex: stepIndex }); this.setState({ stepIndex: stepIndex });
// if(type==="courses"){ // if(type==="classrooms"){
// this.props.history.push(`/ecs/major_schools/${majorId}/years/${yearId}/${type}/ec_course_support_setting/1`); // this.props.history.push(`/ecs/major_schools/${majorId}/years/${yearId}/${type}/ec_course_support_setting/1`);
// }else { // }else {
this.props.history.push(`/ecs/major_schools/${majorId}/years/${yearId}/${type}`); this.props.history.push(`/ecs/major_schools/${majorId}/years/${yearId}/${type}`);
@ -149,15 +149,15 @@ class EcSetting extends React.Component {
{/* 毕业要求对通用标准的支撑 */} {/* 毕业要求对通用标准的支撑 */}
<Route extra path='/ecs/major_schools/:majorId/years/:yearId/requirement_vs_standard' <Route extra path='/ecs/major_schools/:majorId/years/:yearId/requirement_vs_standard'
render={ (props) => (<RequirementVsStandard {...this.props} {...props} {...this.state} />) }></Route> render={ (props) => (<RequirementVsStandard {...this.props} {...props} {...this.state} />) }></Route>
{/*学生*/} {/*学生*/}
<Route extra path='/ecs/major_schools/:majorId/years/:yearId/students' <Route extra path='/ecs/major_schools/:majorId/years/:yearId/students'
render={ (props) => (<EcStudentList {...this.props} {...props} {...this.state} />) }></Route> render={ (props) => (<EcStudentList {...this.props} {...props} {...this.state} />) }></Route>
{/*课程体系*/} {/*课程体系*/}
<Route extra path='/ecs/major_schools/:majorId/years/:yearId/courses/subpage' <Route extra path='/ecs/major_schools/:majorId/years/:yearId/classrooms/subpage'
render={ (props) => (<Curriculum {...this.props} {...props} {...this.state} />) }></Route> render={ (props) => (<Curriculum {...this.props} {...props} {...this.state} />) }></Route>
{/*课程体系资源子页面Subpage*/} {/*课程体系资源子页面Subpage*/}
<Route extra path='/ecs/major_schools/:majorId/years/:yearId/courses' <Route extra path='/ecs/major_schools/:majorId/years/:yearId/classrooms'
render={ (props) => (<CurriculumSubpage {...this.props} {...props} {...this.state} />) }></Route> render={ (props) => (<CurriculumSubpage {...this.props} {...props} {...this.state} />) }></Route>
{/*课程体系VS毕业要求*/} {/*课程体系VS毕业要求*/}
<Route extra path='/ecs/major_schools/:major_school_id/years/:ec_year_id/requirement_vs_courses' <Route extra path='/ecs/major_schools/:major_school_id/years/:ec_year_id/requirement_vs_courses'
@ -175,4 +175,4 @@ class EcSetting extends React.Component {
} }
} }
export default EcSetting export default EcSetting

@ -235,19 +235,19 @@ class Curriculum extends Component {
<Switch> <Switch>
{/*Curriculumtwo 测试用*/} {/*Curriculumtwo 测试用*/}
{/*课程目标*/} {/*课程目标*/}
<Route extra path='/ecs/major_schools/:majorId/years/:yearId/courses/subpage/:type/1' <Route extra path='/ecs/major_schools/:majorId/years/:yearId/classrooms/subpage/:type/1'
render={ (props) => (<EcCourseSupportSetting {...this.props} {...props} {...this.state} Ontitine={(i)=>this.Ontitine(i)} />) }></Route> render={ (props) => (<EcCourseSupportSetting {...this.props} {...props} {...this.state} Ontitine={(i)=>this.Ontitine(i)} />) }></Route>
{/*课程考核方式与数据来源*/} {/*课程考核方式与数据来源*/}
<Route extra path='/ecs/major_schools/:majorId/years/:yearId/courses/subpage/:type/2' <Route extra path='/ecs/major_schools/:majorId/years/:yearId/classrooms/subpage/:type/2'
render={ (props) => (<Curriculumtwo {...this.props} {...props} {...this.state} Ontitine={(i)=>this.Ontitine(i)}/>) }></Route> render={ (props) => (<Curriculumtwo {...this.props} {...props} {...this.state} Ontitine={(i)=>this.Ontitine(i)}/>) }></Route>
{/*成绩等级设置*/} {/*成绩等级设置*/}
<Route extra path='/ecs/major_schools/:majorId/years/:yearId/courses/subpage/:type/3' <Route extra path='/ecs/major_schools/:majorId/years/:yearId/classrooms/subpage/:type/3'
render={ (props) => (<Curriculumtwo {...this.props} {...props} {...this.state} Ontitine={(i)=>this.Ontitine(i)}/>) }></Route> render={ (props) => (<Curriculumtwo {...this.props} {...props} {...this.state} Ontitine={(i)=>this.Ontitine(i)}/>) }></Route>
{/*4课程目标评价方法*/ } {/*4课程目标评价方法*/ }
<Route extra path='/ecs/major_schools/:majorId/years/:yearId/courses/subpage/:type/4' <Route extra path='/ecs/major_schools/:majorId/years/:yearId/classrooms/subpage/:type/4'
render={ (props) => (<EcCourseEvaluationsbottom {...this.props} {...props} {...this.state} Ontitine={(i)=>this.Ontitine(i)}/>) }></Route> render={ (props) => (<EcCourseEvaluationsbottom {...this.props} {...props} {...this.state} Ontitine={(i)=>this.Ontitine(i)}/>) }></Route>
{/*5课程达成评价结果*/} {/*5课程达成评价结果*/}
<Route extra path='/ecs/major_schools/:majorId/years/:yearId/courses/subpage/:type/5' <Route extra path='/ecs/major_schools/:majorId/years/:yearId/classrooms/subpage/:type/5'
render={ (props) => (<EcCompletionCalculation {...this.props} {...props} {...this.state} Ontitine={(i)=>this.Ontitine(i)} triggerRef={this.bindRef}/>) }></Route> render={ (props) => (<EcCompletionCalculation {...this.props} {...props} {...this.state} Ontitine={(i)=>this.Ontitine(i)} triggerRef={this.bindRef}/>) }></Route>
</Switch> </Switch>
</div> </div>
@ -257,4 +257,4 @@ class Curriculum extends Component {
} }
export default Curriculum; export default Curriculum;

@ -16,7 +16,7 @@ class CurriculumSubpage extends Component {
console.log(this.props.match.params); console.log(this.props.match.params);
} }
Curriculumstructure=()=>{ Curriculumstructure=()=>{
this.props.history.push(`/ecs/major_schools/${this.props.match.params.majorId}/years/${this.props.match.params.yearId}/courses/subpage/ec_course_support_setting/1`); this.props.history.push(`/ecs/major_schools/${this.props.match.params.majorId}/years/${this.props.match.params.yearId}/classrooms/subpage/ec_course_support_setting/1`);
} }
@ -32,4 +32,4 @@ class CurriculumSubpage extends Component {
} }
export default CurriculumSubpage; export default CurriculumSubpage;

@ -36,7 +36,7 @@ class Jointheclass extends Component {
this.props.showNotification(result.data.message); this.props.showNotification(result.data.message);
this.props.ysljoinmodalCanceltwo(); this.props.ysljoinmodalCanceltwo();
if(cousestype===1){ if(cousestype===1){
window.open(`/courses/${id}/informs`) window.open(`/classrooms/${id}/informs`)
} }
}else { }else {
this.props.showNotification(result.data.message); this.props.showNotification(result.data.message);

@ -102,16 +102,16 @@ debugger
var rurls=""; var rurls="";
if(this.state.yslbanksMenu.category==="normal"){ if(this.state.yslbanksMenu.category==="normal"){
//普通作业 //普通作业
rurls=`/courses/${this.state.Radiolist}/common_homeworks/${result.data.task_ids}/setting`; rurls=`/classrooms/${this.state.Radiolist}/common_homeworks/${result.data.task_ids}/setting`;
}else if(this.state.yslbanksMenu.category==="group"){ }else if(this.state.yslbanksMenu.category==="group"){
//分组作业 //分组作业
rurls=`/courses/${this.state.Radiolist}/group_homeworks/${result.data.task_ids}/setting`; rurls=`/classrooms/${this.state.Radiolist}/group_homeworks/${result.data.task_ids}/setting`;
}else if(this.state.yslbanksMenu.category==="exercise"){ }else if(this.state.yslbanksMenu.category==="exercise"){
// 试卷 // 试卷
rurls=`/courses/${this.state.Radiolist}/exercises/${result.data.task_ids}/student_exercise_list?tab=3`; rurls=`/classrooms/${this.state.Radiolist}/exercises/${result.data.task_ids}/student_exercise_list?tab=3`;
}else if(this.state.yslbanksMenu.category==="poll") { }else if(this.state.yslbanksMenu.category==="poll") {
//问卷 //问卷
rurls=`/courses/${this.state.Radiolist}/polls/${result.data.task_ids}/detail?tab=3` rurls=`/classrooms/${this.state.Radiolist}/polls/${result.data.task_ids}/detail?tab=3`
} }
window.open(rurls,'_blank'); window.open(rurls,'_blank');
}catch (e) { }catch (e) {
@ -124,16 +124,16 @@ debugger
var rurls=""; var rurls="";
if(this.props.category==="normal"){ if(this.props.category==="normal"){
//普通作业 //普通作业
rurls=`/courses/${this.state.Radiolist}/common_homeworks/${result.data.category_id}`; rurls=`/classrooms/${this.state.Radiolist}/common_homeworks/${result.data.category_id}`;
}else if(this.props.category==="group"){ }else if(this.props.category==="group"){
//分组作业 //分组作业
rurls=`/courses/${this.state.Radiolist}/group_homeworks/${result.data.category_id}`; rurls=`/classrooms/${this.state.Radiolist}/group_homeworks/${result.data.category_id}`;
}else if(this.props.category==="exercise"){ }else if(this.props.category==="exercise"){
// 试卷 // 试卷
rurls=`/courses/${this.state.Radiolist}/exercises/${result.data.category_id}`; rurls=`/classrooms/${this.state.Radiolist}/exercises/${result.data.category_id}`;
}else if(this.props.category==="poll") { }else if(this.props.category==="poll") {
//问卷 //问卷
rurls=`/courses/${this.state.Radiolist}/polls/${result.data.category_id}` rurls=`/classrooms/${this.state.Radiolist}/polls/${result.data.category_id}`
} }
window.open(rurls,'_blank'); window.open(rurls,'_blank');
}catch (e) { }catch (e) {
@ -231,6 +231,6 @@ debugger
</div> </div>
) )
} }
} }
export default SendTopics; export default SendTopics;

@ -658,7 +658,7 @@ class DetailTop extends Component{
if(item.course_identity<4){ if(item.course_identity<4){
return( return(
<Tooltip placement="bottom" title={"编辑课堂"} key={key}> <Tooltip placement="bottom" title={"编辑课堂"} key={key}>
<a href={`/courses/${item.course_id}/newgolds/settings`} target={"_blank"}> <a href={`/classrooms/${item.course_id}/newgolds/settings`} target={"_blank"}>
<i className="iconfont icon-bianji1 newbianji1"></i> <i className="iconfont icon-bianji1 newbianji1"></i>
</a> </a>
</Tooltip> </Tooltip>
@ -878,4 +878,4 @@ class DetailTop extends Component{
) )
} }
} }
export default DetailTop; export default DetailTop;

@ -26,9 +26,9 @@ class OpenCourse extends Component {
console.log(this.props.match.params.pathId) console.log(this.props.match.params.pathId)
if(value===0){ if(value===0){
window.open(`/courses/news/${this.props.match.params.pathId}/newgold/0 `); window.open(`/classrooms/news/${this.props.match.params.pathId}/newgold/0 `);
}else{ }else{
window.open(`/courses/news/${this.props.match.params.pathId}/newgold/1`); window.open(`/classrooms/news/${this.props.match.params.pathId}/newgold/1`);
} }
this.props.OpenCourseCancel(); this.props.OpenCourseCancel();
} }
@ -97,4 +97,4 @@ class OpenCourse extends Component {
} }
} }
export default OpenCourse; export default OpenCourse;

@ -262,7 +262,7 @@ class NewHeader extends Component {
}) })
if (submitapplicationssum === 0) { if (submitapplicationssum === 0) {
if (submitapplicationsvaluedata != undefined) { if (submitapplicationsvaluedata != undefined) {
window.location.href = "/courses/" + submitapplicationsvaluedata; window.location.href = "/classrooms/" + submitapplicationsvaluedata;
} }
} else if (submitapplicationssum === 1) { } else if (submitapplicationssum === 1) {
if (submitapplicationsvaluedata != undefined) { if (submitapplicationsvaluedata != undefined) {
@ -672,7 +672,7 @@ class NewHeader extends Component {
return true return true
} else if (url.startsWith('/paths') && match.path.startsWith('/paths')) { } else if (url.startsWith('/paths') && match.path.startsWith('/paths')) {
return true return true
} else if (url.startsWith('/courses') && match.path.startsWith('/courses')) { } else if (url.startsWith('/classrooms') && match.path.startsWith('/classrooms')) {
return true return true
} else if (url.startsWith('/competitions') && match.path.startsWith('/competitions')) { } else if (url.startsWith('/competitions') && match.path.startsWith('/competitions')) {
return true return true
@ -732,7 +732,7 @@ class NewHeader extends Component {
activeShixuns = true; activeShixuns = true;
} else if (match.path.startsWith('/paths')) { } else if (match.path.startsWith('/paths')) {
activePaths = true; activePaths = true;
} else if (match.path.startsWith('/courses')) { } else if (match.path.startsWith('/classrooms')) {
coursestype = true; coursestype = true;
} else if (match.path.startsWith('/crowdsourcing')) { } else if (match.path.startsWith('/crowdsourcing')) {
activePackages = true; activePackages = true;
@ -782,7 +782,7 @@ class NewHeader extends Component {
if (this.props && this.props.mygetHelmetapi != null) { if (this.props && this.props.mygetHelmetapi != null) {
let shixun = "/shixuns"; let shixun = "/shixuns";
let paths = "/paths"; let paths = "/paths";
let courses = "/courses"; let courses = "/classrooms";
this.props.mygetHelmetapi.navbar.map((item, key) => { this.props.mygetHelmetapi.navbar.map((item, key) => {
var reg = RegExp(item.link); var reg = RegExp(item.link);
if (shixun.match(reg)) { if (shixun.match(reg)) {
@ -995,10 +995,10 @@ class NewHeader extends Component {
<Link to={this.props.Headertop === undefined ? "" : '/paths'}>实践课程</Link> <Link to={this.props.Headertop === undefined ? "" : '/paths'}>实践课程</Link>
</li> </li>
{/*<li><a href={this.props.Headertop===undefined?"":'/courses'}>课堂</a></li>*/} {/*<li><a href={this.props.Headertop===undefined?"":'/classrooms'}>课堂</a></li>*/}
<li className={`${coursestype === true ? 'pr active' : 'pr'}`}> <li className={`${coursestype === true ? 'pr active' : 'pr'}`}>
{/*<a href={this.props.Headertop===undefined?"":this.props.Headertop.course_url}>课堂</a>*/} {/*<a href={this.props.Headertop===undefined?"":this.props.Headertop.course_url}>课堂</a>*/}
<Link to={this.props.Headertop === undefined ? "" : '/courses'}>教学课堂</Link> <Link to={this.props.Headertop === undefined ? "" : '/classrooms'}>教学课堂</Link>
</li> </li>
<li className={`${activeShixuns === true ? 'pr active' : 'pr'}`}> <li className={`${activeShixuns === true ? 'pr active' : 'pr'}`}>
<Link to="/shixuns">实训项目</Link> <Link to="/shixuns">实训项目</Link>
@ -1185,7 +1185,7 @@ class NewHeader extends Component {
<div className="overPart"></div> <div className="overPart"></div>
<ul className={coursestypes === true && this.props.user && this.props.user.main_site === false ? "fl headwith100b edu-txt-center pr ul-leftline" : "fl with50 edu-txt-center pr ul-leftline"}> <ul className={coursestypes === true && this.props.user && this.props.user.main_site === false ? "fl headwith100b edu-txt-center pr ul-leftline" : "fl with50 edu-txt-center pr ul-leftline"}>
{this.props.current_user && this.props.current_user.user_identity === "学生" ? "" : coursestypes === false ? {this.props.current_user && this.props.current_user.user_identity === "学生" ? "" : coursestypes === false ?
<li><a onClick={(url) => this.getUser("/courses/new")}>{this.props.user && this.props.user.main_site === false ? "新建课堂" : "新建教学课堂"}</a></li> : "" <li><a onClick={(url) => this.getUser("/classrooms/new")}>{this.props.user && this.props.user.main_site === false ? "新建课堂" : "新建教学课堂"}</a></li> : ""
} }
{shixuntype === true ? "" : {shixuntype === true ? "" :
<li><a onClick={(url) => this.getUser("/shixuns/new", "newshixuns")}>新建实训项目</a></li> <li><a onClick={(url) => this.getUser("/shixuns/new", "newshixuns")}>新建实训项目</a></li>
@ -1210,7 +1210,7 @@ class NewHeader extends Component {
<Certifiedprofessional {...this.props} {...this.state} ModalCancelsy={this.ModalCancelsy} /> <Certifiedprofessional {...this.props} {...this.state} ModalCancelsy={this.ModalCancelsy} />
{/* /courses/join_course_multi_role */} {/* /classrooms/join_course_multi_role */}
{this.props.user && this.props.user.main_site === true ? <li> {this.props.user && this.props.user.main_site === true ? <li>
<a onClick={this.tojoinitem}>加入开发项目</a> <a onClick={this.tojoinitem}>加入开发项目</a>
</li> : ""} </li> : ""}

@ -162,7 +162,7 @@ export function TPMIndexHOC(WrappedComponent) {
document.title="实训项目"; document.title="实训项目";
}else if(this.props.match.path==="/paths"){ }else if(this.props.match.path==="/paths"){
document.title="实践课程"; document.title="实践课程";
}else if(this.props.match.path==="/courses"){ }else if(this.props.match.path==="/classrooms"){
document.title="教学课堂"; document.title="教学课堂";
} }
@ -176,7 +176,7 @@ export function TPMIndexHOC(WrappedComponent) {
// document.title="EduCoder-IT实践教学平台_信息技术类精品课程网_大学生MOOC平台"; // document.title="EduCoder-IT实践教学平台_信息技术类精品课程网_大学生MOOC平台";
// }else if(this.props.match.path==="/paths"){ // }else if(this.props.match.path==="/paths"){
// document.title="实践课程_项目实战开发_web前端开发实训_web后端开发实战_人工智能技术-EduCoder"; // document.title="实践课程_项目实战开发_web前端开发实训_web后端开发实战_人工智能技术-EduCoder";
// }else if(this.props.match.path==="/courses"){ // }else if(this.props.match.path==="/classrooms"){
// document.title="实训项目_php后端开发_app前端开发_java_python实训_C语言入门课程-EduCoder"; // document.title="实训项目_php后端开发_app前端开发_java_python实训_C语言入门课程-EduCoder";
// }else if(this.props.match.path==="/competitions"){ // }else if(this.props.match.path==="/competitions"){
// document.title="在线竞赛_计算机应用大赛_编程大赛_大学生设计大赛_全国高校绿色计算大赛-EduCoder"; // document.title="在线竞赛_计算机应用大赛_编程大赛_大学生设计大赛_全国高校绿色计算大赛-EduCoder";
@ -402,7 +402,7 @@ export function TPMIndexHOC(WrappedComponent) {
let courseId; let courseId;
let query = this.props.location.pathname; let query = this.props.location.pathname;
const type = query.split('/'); const type = query.split('/');
if (type[1] == 'courses' && type[2]) { if (type[1] == 'classrooms' && type[2]) {
courseId = parseInt(type[2]) courseId = parseInt(type[2])
// url += `?course_id=${courseId}` // url += `?course_id=${courseId}`
} }
@ -466,7 +466,7 @@ export function TPMIndexHOC(WrappedComponent) {
let courseId; let courseId;
let query = this.props.location.pathname; let query = this.props.location.pathname;
const type = query.split('/'); const type = query.split('/');
if (type[1] == 'courses' && type[2]) { if (type[1] == 'classrooms' && type[2]) {
courseId = parseInt(type[2]) courseId = parseInt(type[2])
// url += `?course_id=${courseId}` // url += `?course_id=${courseId}`
} }

@ -672,7 +672,7 @@ class Newshixuns extends Component {
} }
) )
this.sendhideModaly() this.sendhideModaly()
// this.props.history.push(`/courses/${cid}/graduation_topics`); // this.props.history.push(`/classrooms/${cid}/graduation_topics`);
// } // }
} }
}catch (e) { }catch (e) {
@ -859,7 +859,7 @@ class Newshixuns extends Component {
// // const { id } = response.data; // // const { id } = response.data;
// // if (id) { // // if (id) {
// this.props.showNotification('提交成功!'); // this.props.showNotification('提交成功!');
// // this.props.history.push(`/courses/${cid}/graduation_topics`); // // this.props.history.push(`/classrooms/${cid}/graduation_topics`);
// // } // // }
// } // }
// }) // })

@ -1,142 +1,142 @@
const $ = window.$; const $ = window.$;
$(function(){ $(function(){
//实训首页筛选的移入和点击事件 //实训首页筛选的移入和点击事件
$(".shaiItem").hover(function(){ $(".shaiItem").hover(function(){
var hei=parseInt($(".shaiAllItem").height())-2; var hei=parseInt($(".shaiAllItem").height())-2;
$(this).find(".subshaicontent").css("top",hei); $(this).find(".subshaicontent").css("top",hei);
$(this).find(".subshaicontent").show(); $(this).find(".subshaicontent").show();
},function(){ },function(){
$(this).find(".subshaicontent").hide(); $(this).find(".subshaicontent").hide();
}); });
$(".shaiItem").live("click",function(){ $(".shaiItem").live("click",function(){
$(".shaiItem").removeClass("active"); $(".shaiItem").removeClass("active");
$(this).addClass("active"); $(this).addClass("active");
$(".subshaicontent").hide(); $(".subshaicontent").hide();
}); });
$(".subshaicontent").live("click", function(event){ $(".subshaicontent").live("click", function(event){
$(".subshaicontent").hide(); $(".subshaicontent").hide();
event.stopPropagation(); event.stopPropagation();
}); });
//最新、最热 //最新、最热
$(".bestChoose").click(function(){ $(".bestChoose").click(function(){
$(".bestChoose").removeClass("active"); $(".bestChoose").removeClass("active");
$(this).addClass("active"); $(this).addClass("active");
}) })
//实训路径选择导航条 //实训路径选择导航条
$(".path-nav li a").live("click",function(){ $(".path-nav li a").live("click",function(){
$(".path-nav li").removeClass("active"); $(".path-nav li").removeClass("active");
$(this).parent().addClass("active"); $(this).parent().addClass("active");
}) })
}); });
//隐藏我的学习 //隐藏我的学习
function clickControl(item, type){ function clickControl(item, type){
var wid=$(item).width(); var wid=$(item).width();
var wid1=$(".controlring").width(); var wid1=$(".controlring").width();
var hidden_course = 1; var hidden_course = 1;
if($(".controlring").css("left")=="1px"){ if($(".controlring").css("left")=="1px"){
$(".controlring").animate({left:parseInt(wid-wid1-1)+"px"}); $(".controlring").animate({left:parseInt(wid-wid1-1)+"px"});
$(".controlblue").animate({width:wid+"px"}); $(".controlblue").animate({width:wid+"px"});
$("input[name='hidden_learn']").val('1'); $("input[name='hidden_learn']").val('1');
}else{ }else{
$(".controlring").animate({left:"1px"}); $(".controlring").animate({left:"1px"});
$(".controlblue").animate({width:"0px"}); $(".controlblue").animate({width:"0px"});
$("input[name='hidden_learn']").val(''); $("input[name='hidden_learn']").val('');
hidden_course = 0; hidden_course = 0;
} }
if(type == "l_shixun"){ if(type == "l_shixun"){
$("#shixun_search_condition").submit(); $("#shixun_search_condition").submit();
} else{ } else{
$.get("/courses?select="+$("#select_type").val()+"&order="+$("#select_order").val()+"&hidden="+hidden_course); $.get("/classrooms?select="+$("#select_type").val()+"&order="+$("#select_order").val()+"&hidden="+hidden_course);
} }
} }
// 清空条件 // 清空条件
function clear_style(){ function clear_style(){
$("#shixun_search_condition").find('input[type=hidden]').each(function() { $("#shixun_search_condition").find('input[type=hidden]').each(function() {
$(this).val(''); $(this).val('');
}); });
} }
// 精选实训的搜索 #type参数( status实训状态 diff实训难度 search实训搜索 order最新最热排序) // 精选实训的搜索 #type参数( status实训状态 diff实训难度 search实训搜索 order最新最热排序)
function filter_search(values, type){ function filter_search(values, type){
switch(type){ switch(type){
case "status": case "status":
$("input[name='status']").val(values); $("input[name='status']").val(values);
break; break;
case "diff": case "diff":
$("input[name='diff']").val(values); $("input[name='diff']").val(values);
break; break;
case "search": case "search":
$("input[name='search']").val(values); $("input[name='search']").val(values);
break; break;
} }
$("#shixun_search_condition").submit(); $("#shixun_search_condition").submit();
} }
// 点击实训体系名称 # type参数rep体系大类别 sub体系子类别 tags 实训标签; order: 排序) // 点击实训体系名称 # type参数rep体系大类别 sub体系子类别 tags 实训标签; order: 排序)
// # name参数 列表显示使用 // # name参数 列表显示使用
// # values参数 赋值给表单的值 // # values参数 赋值给表单的值
$(".shixun_repertoire").live("click", function(event){ $(".shixun_repertoire").live("click", function(event){
var type = $(this).attr("data-type"); var type = $(this).attr("data-type");
var name = $(this).attr("data-name"); var name = $(this).attr("data-name");
var values = $(this).attr("data-values"); var values = $(this).attr("data-values");
if(type != 'order'){ if(type != 'order'){
$(".subshaicontent a").removeClass("active"); $(".subshaicontent a").removeClass("active");
$(".shaiItem").removeClass("active"); $(".shaiItem").removeClass("active");
$("input[name='repertoire'], input[name='sub_repertoire'], input[name='tag_repertoire']").val(''); $("input[name='repertoire'], input[name='sub_repertoire'], input[name='tag_repertoire']").val('');
} }
$(this).closest(".shaiItem").addClass("active"); $(this).closest(".shaiItem").addClass("active");
$(".subshaicontent").hide(); $(".subshaicontent").hide();
$("#search_name").html(name); $("#search_name").html(name);
switch(type){ switch(type){
case "rep": case "rep":
$("input[name='repertoire']").val(values); $("input[name='repertoire']").val(values);
$("#shixun_search_input").val(""); $("#shixun_search_input").val("");
$("input[name='search']").val(""); $("input[name='search']").val("");
break; break;
case "sub": case "sub":
$("input[name='sub_repertoire']").val(values); $("input[name='sub_repertoire']").val(values);
break; break;
case "tag": case "tag":
$("input[name='tag_repertoire']").val(values); $("input[name='tag_repertoire']").val(values);
break; break;
case "order": case "order":
var $sort = $("input[name='sort']"); var $sort = $("input[name='sort']");
var oldValue = $("input[name='order']").val(); var oldValue = $("input[name='order']").val();
$("input[name='order']").val(values); $("input[name='order']").val(values);
var newValue = $("input[name='order']").val(); var newValue = $("input[name='order']").val();
if(oldValue != newValue){ if(oldValue != newValue){
$("input[name='sort']").val("desc"); $("input[name='sort']").val("desc");
}else { }else {
if($sort.val() == "desc"){ if($sort.val() == "desc"){
$sort.val("asc"); $sort.val("asc");
}else{ }else{
$sort.val("desc"); $sort.val("desc");
} }
} }
break; break;
} }
$(this).addClass("active"); // 因为order需要判断样式因此写在switch之后 $(this).addClass("active"); // 因为order需要判断样式因此写在switch之后
$("#shixun_search_condition").submit(); $("#shixun_search_condition").submit();
event.stopPropagation(); event.stopPropagation();
}); });
// 实训首页回车搜索 // 实训首页回车搜索
$("#shixun_search_input").live("keyup", function(e){ $("#shixun_search_input").live("keyup", function(e){
// 兼容FF和IE和Opera // 兼容FF和IE和Opera
var theEvent = e || window.event; var theEvent = e || window.event;
var code = theEvent.keyCode || theEvent.which || theEvent.charCode; var code = theEvent.keyCode || theEvent.which || theEvent.charCode;
if (code == 13) { if (code == 13) {
//回车执行查询 //回车执行查询
filter_search($(this).val(), "search"); filter_search($(this).val(), "search");
} }
}); });

@ -893,7 +893,7 @@ class LoginRegisterComponent extends Component {
} }
// this.props.history.push(`/courses/${this.props.match.params.coursesId}/exercises/${this.props.match.params.Id}/student_exercise_list?tab=`+e.key) // this.props.history.push(`/classrooms/${this.props.match.params.coursesId}/exercises/${this.props.match.params.Id}/student_exercise_list?tab=`+e.key)
} }
loginonkeyup =(e)=>{ loginonkeyup =(e)=>{

@ -60,7 +60,7 @@ class Infos extends Component{
type:0, type:0,
login:undefined, login:undefined,
isRenders:false, isRenders:false,
moduleName:"courses", moduleName:"classrooms",
next_gold:undefined next_gold:undefined
} }
} }

@ -40,7 +40,7 @@ class InfosBanner extends Component{
if(this.props&&this.props.mygetHelmetapi!=null){ if(this.props&&this.props.mygetHelmetapi!=null){
let shixun="/shixuns"; let shixun="/shixuns";
let paths="/paths"; let paths="/paths";
let courses="/courses"; let courses="/classrooms";
this.props.mygetHelmetapi.navbar.map((item,key)=>{ this.props.mygetHelmetapi.navbar.map((item,key)=>{
var reg = RegExp(item.link); var reg = RegExp(item.link);
if(shixun.match(reg)){ if(shixun.match(reg)){
@ -117,9 +117,9 @@ class InfosBanner extends Component{
</div> </div>
</div> </div>
<div className="userNav"> <div className="userNav">
{coursestypes===true?"":<li className={`${moduleName == 'courses' ||moduleName == undefined ? 'active' : '' }`}> {coursestypes===true?"":<li className={`${moduleName == 'classrooms' ||moduleName == undefined ? 'active' : '' }`}>
<Link <Link
onClick={() => this.setState({moduleName: 'courses'})} onClick={() => this.setState({moduleName: 'classrooms'})}
to={`/users/${username}/courses`}>教学课堂</Link> to={`/users/${username}/courses`}>教学课堂</Link>
</li>} </li>}
{shixuntype===true?"":<li className={`${moduleName == 'shixuns' ? 'active' : '' }`}> {shixuntype===true?"":<li className={`${moduleName == 'shixuns' ? 'active' : '' }`}>
@ -163,4 +163,4 @@ class InfosBanner extends Component{
) )
} }
} }
export default InfosBanner; export default InfosBanner;

@ -313,8 +313,8 @@ class InfosCourse extends Component{
{/* 289 */} {/* 289 */}
{ {
page == 1 && is_current && !category && page == 1 && is_current && !category &&
this.props.current_user && this.props.current_user.user_identity != "学生" ? this.props.current_user && this.props.current_user.user_identity != "学生" ?
<Create href={"/courses/new"} name={"新建课堂"} index="1"></Create> : "" <Create href={"/classrooms/new"} name={"新建课堂"} index="1"></Create> : ""
} }
{ {
(!data || (data && data.courses.length === 0)) && (category || (!category && this.props.current_user && this.props.current_user.user_identity == "学生")) && <NoneData></NoneData> (!data || (data && data.courses.length === 0)) && (category || (!category && this.props.current_user && this.props.current_user.user_identity == "学生")) && <NoneData></NoneData>

@ -1,190 +1,190 @@
import React, { Component } from 'react'; import React, { Component } from 'react';
import {Link} from 'react-router-dom'; import {Link} from 'react-router-dom';
import {Tooltip,Menu} from 'antd'; import {Tooltip,Menu} from 'antd';
import {getImageUrl} from 'educoder'; import {getImageUrl} from 'educoder';
import "./usersInfo.css" import "./usersInfo.css"
import "../../courses/css/members.css" import "../../courses/css/members.css"
import "../../courses/css/Courses.css" import "../../courses/css/Courses.css"
class banner_out extends Component{ class banner_out extends Component{
constructor(props){ constructor(props){
super(props); super(props);
} }
render(){ render(){
let { let {
data , data ,
is_current, is_current,
is_edit, is_edit,
sign, sign,
type, type,
followed, followed,
id, id,
login, login,
moduleName, moduleName,
next_gold next_gold
}=this.props; }=this.props;
let {username}= this.props.match.params; let {username}= this.props.match.params;
return( return(
<div className="user-main-half"> <div className="user-main-half">
<div className="user-headImg"></div> <div className="user-headImg"></div>
<div className="user-headCon"> <div className="user-headCon">
<div className="pr" style={{"min-height": "465px"}}> <div className="pr" style={{"min-height": "465px"}}>
<div className="educontent pt80 clearfix edu-txt-center"> <div className="educontent pt80 clearfix edu-txt-center">
<div className="inline"> <div className="inline">
<div className="fl headtab"> <div className="fl headtab">
<span>{is_current ? "我":"TA"}的经验值</span> <span>{is_current ? "我":"TA"}的经验值</span>
<a style={{ cursor: 'default' }} <a style={{ cursor: 'default' }}
// href={`${this.props.Headertop && this.props.Headertop.old_url}/users/${username}/user_experience`} // href={`${this.props.Headertop && this.props.Headertop.old_url}/users/${username}/user_experience`}
>{data && data.experience}</a> >{data && data.experience}</a>
</div> </div>
<em className="v-h-line fl"></em> <em className="v-h-line fl"></em>
<div className="fl headtab"> <div className="fl headtab">
<span>{is_current ? "我":"TA"}的金币</span> <span>{is_current ? "我":"TA"}的金币</span>
<a style={{ cursor: 'default' }} <a style={{ cursor: 'default' }}
// href={`${this.props.Headertop && this.props.Headertop.old_url}/users/${username}/user_grade`} // href={`${this.props.Headertop && this.props.Headertop.old_url}/users/${username}/user_grade`}
id="user_code">{data && data.grade}</a> id="user_code">{data && data.grade}</a>
</div> </div>
<div className="headphoto mt14"> <div className="headphoto mt14">
<img alt="头像" id="user_avatar_show" nhname="avatar_image" src={data && `${getImageUrl('images/'+data.avatar_url)}`}/> <img alt="头像" id="user_avatar_show" nhname="avatar_image" src={data && `${getImageUrl('images/'+data.avatar_url)}`}/>
</div> </div>
<div className="fl headtab"> <div className="fl headtab">
<span>{is_current ? "我":"TA"}的粉丝</span> <span>{is_current ? "我":"TA"}的粉丝</span>
<a style={{ cursor: 'default' }} <a style={{ cursor: 'default' }}
// href={`${this.props.Headertop && this.props.Headertop.old_url}/users/${username}/user_fanslist`} // href={`${this.props.Headertop && this.props.Headertop.old_url}/users/${username}/user_fanslist`}
id="user_h_fan_count">{data && data.fan_count}</a> id="user_h_fan_count">{data && data.fan_count}</a>
</div> </div>
<em className="v-h-line fl"></em> <em className="v-h-line fl"></em>
<div className="fl headtab"> <div className="fl headtab">
<span>{is_current ? "我":"TA"}的关注</span> <span>{is_current ? "我":"TA"}的关注</span>
<a style={{ cursor: 'default' }} <a style={{ cursor: 'default' }}
// href={`${this.props.Headertop && this.props.Headertop.old_url}/users/${username}/user_watchlist`} // href={`${this.props.Headertop && this.props.Headertop.old_url}/users/${username}/user_watchlist`}
>{data && data.follow_count}</a> >{data && data.follow_count}</a>
</div> </div>
<span className="clearfix"></span> <span className="clearfix"></span>
<span className="myName">{data && data.name}</span> <span className="myName">{data && data.name}</span>
</div> </div>
</div> </div>
<div className="educontent mt10 clearfix edu-txt-center"> <div className="educontent mt10 clearfix edu-txt-center">
<div className="inline"> <div className="inline">
{ {
data && is_current == false && data.identity =="学生" ? "" : <span className="mypost fl mr10">{data && data.identity}</span> data && is_current == false && data.identity =="学生" ? "" : <span className="mypost fl mr10">{data && data.identity}</span>
} }
<a <a
// href={is_current ? `${this.props.Headertop && this.props.Headertop.old_url}/account/authentication` :"javascript:void(0)"} // href={is_current ? `${this.props.Headertop && this.props.Headertop.old_url}/account/authentication` :"javascript:void(0)"}
// target="_blank" // target="_blank"
className={is_current ? "ringauto fl" :"ringauto fl cdefault"}> className={is_current ? "ringauto fl" :"ringauto fl cdefault"}>
<Tooltip placement='bottom' title={ data && data.authentication ?"已实名认证":"未实名认证"}> <Tooltip placement='bottom' title={ data && data.authentication ?"已实名认证":"未实名认证"}>
<i className={ data && data.authentication ? "iconfont icon-shenfenrenzheng font-13 color-blue":"iconfont icon-shenfenrenzheng font-13 color-grey-9"}></i> <i className={ data && data.authentication ? "iconfont icon-shenfenrenzheng font-13 color-blue":"iconfont icon-shenfenrenzheng font-13 color-grey-9"}></i>
</Tooltip> </Tooltip>
</a> </a>
<a <a
// href={is_current ? `${this.props.Headertop && this.props.Headertop.old_url}/account/professional_certification` :"javascript:void(0)"} // href={is_current ? `${this.props.Headertop && this.props.Headertop.old_url}/account/professional_certification` :"javascript:void(0)"}
// target="_blank" // target="_blank"
className={is_current ? "ringauto fl" :"ringauto fl cdefault"}> className={is_current ? "ringauto fl" :"ringauto fl cdefault"}>
<Tooltip placement='bottom' title={ data && data.professional_certification ?"已职业认证":"未职业认证"}> <Tooltip placement='bottom' title={ data && data.professional_certification ?"已职业认证":"未职业认证"}>
<i className={ data && data.professional_certification ? "iconfont icon-zhiyerenzheng font-13 color-blue":"iconfont icon-zhiyerenzheng font-13 color-grey-9"}></i> <i className={ data && data.professional_certification ? "iconfont icon-zhiyerenzheng font-13 color-blue":"iconfont icon-zhiyerenzheng font-13 color-grey-9"}></i>
</Tooltip> </Tooltip>
</a> </a>
<a <a
// href={is_current ? `${this.props.Headertop && this.props.Headertop.old_url}/account/change_or_bind?type=phone` :"javascript:void(0)"} // href={is_current ? `${this.props.Headertop && this.props.Headertop.old_url}/account/change_or_bind?type=phone` :"javascript:void(0)"}
// target="_blank" // target="_blank"
className={is_current ? "ringauto fl" :"ringauto fl cdefault"}> className={is_current ? "ringauto fl" :"ringauto fl cdefault"}>
<Tooltip placement='bottom' title={ data && data.phone_binded ?"已手机认证":"未手机认证"}> <Tooltip placement='bottom' title={ data && data.phone_binded ?"已手机认证":"未手机认证"}>
<i className={ data && data.phone_binded ? "iconfont icon-shoujirenzheng font-13 color-blue":"iconfont icon-shoujirenzheng font-13 color-grey-9"}></i> <i className={ data && data.phone_binded ? "iconfont icon-shoujirenzheng font-13 color-blue":"iconfont icon-shoujirenzheng font-13 color-grey-9"}></i>
</Tooltip> </Tooltip>
</a> </a>
<a <a
// href={is_current ? `${this.props.Headertop && this.props.Headertop.old_url}/my/account` :"javascript:void(0)"} // href={is_current ? `${this.props.Headertop && this.props.Headertop.old_url}/my/account` :"javascript:void(0)"}
// target="_blank" // target="_blank"
className={is_current ? "ringauto fl" :"ringauto fl cdefault"}> className={is_current ? "ringauto fl" :"ringauto fl cdefault"}>
<Tooltip placement='bottom' title={ data && data.email_binded ?"已邮箱认证":"未邮箱认证"}> <Tooltip placement='bottom' title={ data && data.email_binded ?"已邮箱认证":"未邮箱认证"}>
<i className={ data && data.email_binded ? "iconfont icon-youxiangrenzheng font-13 color-blue":"iconfont icon-youxiangrenzheng font-13 color-grey-9"}></i> <i className={ data && data.email_binded ? "iconfont icon-youxiangrenzheng font-13 color-blue":"iconfont icon-youxiangrenzheng font-13 color-grey-9"}></i>
</Tooltip> </Tooltip>
</a> </a>
{/* <!--学院管理员身份--> */} {/* <!--学院管理员身份--> */}
{ {
data && data.college_identifier && data && data.college_identifier &&
<a <a
// href={`${this.props.Headertop && this.props.Headertop.old_url}/colleges/${data.college_identifier}/statistics`} target="_blank" // href={`${this.props.Headertop && this.props.Headertop.old_url}/colleges/${data.college_identifier}/statistics`} target="_blank"
className={is_current ? "ringauto fl" :"ringauto fl cdefault"}> className={is_current ? "ringauto fl" :"ringauto fl cdefault"}>
<Tooltip placement='bottom' title="学院管理员"> <Tooltip placement='bottom' title="学院管理员">
<i className="iconfont icon-chengyuanguanli font-12 color-blue" data-tip-down="学院管理员"></i> <i className="iconfont icon-chengyuanguanli font-12 color-blue" data-tip-down="学院管理员"></i>
</Tooltip> </Tooltip>
</a> </a>
} }
</div> </div>
</div> </div>
<div className="mt15 educontent clearfix edu-txt-center"> <div className="mt15 educontent clearfix edu-txt-center">
<p className="mb20" style={{"height": "28px"}}> <p className="mb20" style={{"height": "28px"}}>
{ {
is_edit && is_current ? is_edit && is_current ?
<input type="text" id="mysign" class="mysign-input" placeholder="请输入您的个性签名" style={{height:"20px"}} value={sign} onInput={this.inputSign} onBlur={this.savemysign}/> <input type="text" id="mysign" class="mysign-input" placeholder="请输入您的个性签名" style={{height:"20px"}} value={sign} onInput={this.inputSign} onBlur={this.savemysign}/>
: :
is_current ? is_current ?
<a className="mysign-span" onClick={this.editmysign} style={{"display": "block"}}>{sign || "这家伙很懒,什么都没留下~"}</a> <a className="mysign-span" onClick={this.editmysign} style={{"display": "block"}}>{sign || "这家伙很懒,什么都没留下~"}</a>
: :
<span className="mysign-span" style={{"display": "block","cursor":"default"}}>{sign || "这家伙很懒,什么都没留下~"}</span> <span className="mysign-span" style={{"display": "block","cursor":"default"}}>{sign || "这家伙很懒,什么都没留下~"}</span>
} }
</p> </p>
{ {
is_current ? is_current ?
<div className="inline"> <div className="inline">
{ {
data && data.attendance_signed ? data && data.attendance_signed ?
<React.Fragment> <React.Fragment>
<span className="user_default_btn user_grey_btn mb5">已签到</span> <span className="user_default_btn user_grey_btn mb5">已签到</span>
<p id="attendance_notice" className="none font-12 color-grey-6" style={{"display":"block"}}>明日签到&nbsp;<font className="color-orange">+{next_gold}</font>&nbsp;</p> <p id="attendance_notice" className="none font-12 color-grey-6" style={{"display":"block"}}>明日签到&nbsp;<font className="color-orange">+{next_gold}</font>&nbsp;</p>
</React.Fragment> </React.Fragment>
: :
<a herf="javascript:void(0);" onClick={this.props.signFor} id="attendance" className="user_default_btn user_orange_btn fl mb15">签到</a> <a herf="javascript:void(0);" onClick={this.props.signFor} id="attendance" className="user_default_btn user_orange_btn fl mb15">签到</a>
// <a herf="javascript:void(0);" onClick={this.trialapplications} id="authentication_apply" className="user_default_btn user_private_btn fl ml15">试用申请</a> // <a herf="javascript:void(0);" onClick={this.trialapplications} id="authentication_apply" className="user_default_btn user_private_btn fl ml15">试用申请</a>
} }
</div> </div>
: :
<div className="inline"> <div className="inline">
<a href="javascript:void(0);" onClick={this.props.followPerson} className="user_default_btn user_watch_btn user_private_btn fl mr20">{followed ? "取消关注":"关注"}</a> <a href="javascript:void(0);" onClick={this.props.followPerson} className="user_default_btn user_watch_btn user_private_btn fl mr20">{followed ? "取消关注":"关注"}</a>
<a href={`${this.props.Headertop && this.props.Headertop.old_url}/messages/${login}/message_detail?target_ids=${id}`} className="user_default_btn user_private_btn fl">私信</a> <a href={`${this.props.Headertop && this.props.Headertop.old_url}/messages/${login}/message_detail?target_ids=${id}`} className="user_default_btn user_private_btn fl">私信</a>
</div> </div>
} }
</div> </div>
<div className="edu-txt-center navInfo"> <div className="edu-txt-center navInfo">
<div className="inline"> <div className="inline">
<li className={`${moduleName == 'courses' ||moduleName == undefined ? 'active' : '' }`}> <li className={`${moduleName == 'classrooms' ||moduleName == undefined ? 'active' : '' }`}>
<Link <Link
onClick={() => this.setState({moduleName: 'courses'})} onClick={() => this.setState({moduleName: 'classrooms'})}
to={`/users/${username}/courses`}>课堂</Link> to={`/users/${username}/courses`}>课堂</Link>
</li> </li>
<li className={`${moduleName == 'shixuns' ? 'active' : '' }`}> <li className={`${moduleName == 'shixuns' ? 'active' : '' }`}>
<Link <Link
onClick={() => this.setState({moduleName: 'shixuns'})} onClick={() => this.setState({moduleName: 'shixuns'})}
to={`/users/${username}/shixuns`}>实训</Link> to={`/users/${username}/shixuns`}>实训</Link>
</li> </li>
<li className={`${moduleName == 'paths' ? 'active' : '' }`}> <li className={`${moduleName == 'paths' ? 'active' : '' }`}>
<Link <Link
onClick={() => this.setState({moduleName: 'paths'})} onClick={() => this.setState({moduleName: 'paths'})}
to={`/users/${username}/paths`}>实践课程</Link> to={`/users/${username}/paths`}>实践课程</Link>
</li> </li>
<li className={`${moduleName == 'projects' ? 'active' : '' }`}> <li className={`${moduleName == 'projects' ? 'active' : '' }`}>
<Link <Link
onClick={() => this.setState({moduleName: 'projects'})} onClick={() => this.setState({moduleName: 'projects'})}
to={`/users/${username}/projects`}>开发项目</Link> to={`/users/${username}/projects`}>开发项目</Link>
</li> </li>
<li className={`${moduleName == 'package' ? 'active' : '' }`}> <li className={`${moduleName == 'package' ? 'active' : '' }`}>
<Link <Link
onClick={() => this.setState({moduleName: 'package'})} onClick={() => this.setState({moduleName: 'package'})}
to={`/users/${username}/package`}>众包</Link> to={`/users/${username}/package`}>众包</Link>
</li> </li>
{/*{ data && data.identity!="学生" && <li> <a href={`${this.props.Headertop && this.props.Headertop.old_url}/users/${username}?type=m_bank`}>题库</a></li>}*/} {/*{ data && data.identity!="学生" && <li> <a href={`${this.props.Headertop && this.props.Headertop.old_url}/users/${username}?type=m_bank`}>题库</a></li>}*/}
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
) )
} }
} }
export default banner_out; export default banner_out;

@ -1,5 +1,5 @@
import React, { useState, useEffect, useContext, memo } from 'react'; import React, { useState, useEffect, useContext, memo } from 'react';
import { Progress, Input, Tooltip } from 'antd' import { Progress, Input, Tooltip , Spin } from 'antd'
import { getUrl2, isDev, CBreadcrumb, ActionBtn, ThemeContext } from 'educoder' import { getUrl2, isDev, CBreadcrumb, ActionBtn, ThemeContext } from 'educoder'
import axios from 'axios' import axios from 'axios'
import moment from 'moment' import moment from 'moment'
@ -20,7 +20,7 @@ let _clipboard = null;
const clipboardMap = {} const clipboardMap = {}
function VideoInReviewItem (props) { function VideoInReviewItem (props) {
const theme = useContext(ThemeContext); const theme = useContext(ThemeContext);
const { history, file_url, cover_url, title, created_at, published_at, isReview, id const { history, file_url , play_url , cover_url , transcoded , title, created_at, published_at, isReview, id
, onEditVideo, onMaskClick, getCopyText, showNotification,vv,play_duration,operation , deleteVideo , moveVideo ,link} = props; , onEditVideo, onMaskClick, getCopyText, showNotification,vv,play_duration,operation , deleteVideo , moveVideo ,link} = props;
useEffect(()=> { useEffect(()=> {
if (!isReview) { if (!isReview) {
@ -44,24 +44,26 @@ function VideoInReviewItem (props) {
function toUpload() { function toUpload() {
history.push(`/users/${username}/videos/upload`) history.push(`/users/${username}/videos/upload`)
} }
const imgUrl = (!transcoded && !link) ? defaultImg : (cover_url || defaultImg);
return ( return (
<div className={`${isReview ? 'videoInReviewItem' : 'nItem'} videoItem`}> <div className={`${isReview ? 'videoInReviewItem' : 'nItem'} videoItem`}>
<Spin tip="正在转码,请稍等..." spinning={!transcoded && !link}>
<img className="cover" src={imgUrl} alt=""></img>
{ link ?
<a href={link} target='_blank' className="otherLinkPanel">
<span className="otherLink">外链</span>
</a>
: ""
}
<img className="cover" src={cover_url || defaultImg} alt=""></img> {!isReview && <div className="mask" onClick={() => onMaskClick(props)}></div>}
{ link ? {!isReview && !link && transcoded &&
<a href={link} target='_blank' className="otherLinkPanel"> <div className="playWrap" onClick={() => onMaskClick(props)}>
<span className="otherLink">外链</span> <img className="play mp23" src={playIcon}></img>
</a> {play_duration===0?"":<div className={"play_duration"}>累计学习时长{play_duration} h</div>}
: "" </div>
} }
</Spin>
{!isReview && <div className="mask" onClick={() => onMaskClick(props)}></div>}
{!isReview && !link &&
<div className="playWrap" onClick={() => onMaskClick(props)}>
<img className="play mp23" src={playIcon}></img>
{play_duration===0?"":<div className={"play_duration"}>累计学习时长{play_duration} h</div>}
</div>
}
<div className="square-main"> <div className="square-main">
<div className="title overflowHidden1" <div className="title overflowHidden1"
title={title && title.length > 20 ? title : ''} title={title && title.length > 20 ? title : ''}
@ -106,7 +108,7 @@ function VideoInReviewItem (props) {
{ {
!link ? !link ?
<Tooltip title="复制视频地址" placement="bottom"> <Tooltip title="复制视频地址" placement="bottom">
<i className={`icon-fuzhi iconfont copybtn_item_${id}`} data-clipboard-text={getCopyText(file_url, cover_url)}></i> <i className={`icon-fuzhi iconfont copybtn_item_${id}`} data-clipboard-text={getCopyText((play_url || file_url), cover_url)}></i>
</Tooltip>:"" </Tooltip>:""
} }

@ -6,7 +6,7 @@ import okIcon from './images/ok_border.png'
function VideoProtocol (props) { function VideoProtocol (props) {
const username = props.match.params.username const username = props.match.params.username
const { search } = props.history.location; const { search } = props.history.location;
const courseId = search && search.split("=")[1]; const courseId = search && search.split("=")[1];
return ( return (
<div className={`educontent videoProtocol`}> <div className={`educontent videoProtocol`}>
@ -14,7 +14,7 @@ function VideoProtocol (props) {
className="mb26 mt16" className="mb26 mt16"
separator=" > " separator=" > "
items={[ items={[
{ to: `${courseId?`/courses/${courseId}/course_videos?open=new`:`/users/${username}/videos/upload`}`, name: '视频上传'}, { to: `${courseId?`/classrooms/${courseId}/course_videos?open=new`:`/users/${username}/videos/upload`}`, name: '视频上传'},
{ name: '内容上传协议'} { name: '内容上传协议'}
]} ]}
></CBreadcrumb> ></CBreadcrumb>
@ -128,7 +128,7 @@ function VideoProtocol (props) {
<p className="p_child_paragraph"> <p className="p_child_paragraph">
4.6.5 其他EduCoder平台认为是符合整体服务需求的特殊情形 4.6.5 其他EduCoder平台认为是符合整体服务需求的特殊情形
</p> </p>
<div className="subTitle"> <div className="subTitle">
违约视频的处理原则    违约视频的处理原则   
</div> </div>
@ -141,7 +141,7 @@ function VideoProtocol (props) {
<p className="p_paragraph"> <p className="p_paragraph">
5.3 EduCoder平台有权启动必要的刑事及民事法律程序维护EduCoder平台的合法权益追究违法用户的法律责任 5.3 EduCoder平台有权启动必要的刑事及民事法律程序维护EduCoder平台的合法权益追究违法用户的法律责任
</p> </p>
<div className="subTitle"> <div className="subTitle">
协议修改    协议修改   
</div> </div>

@ -57,9 +57,12 @@ function VideoUploadList (props) {
} }
function onUploadChange (e) { function onUploadChange (e) {
var file = e.target.files[0] var file = e.target.files[0];
setLoading(true);
if (!file) { if (!file) {
// alert("请先选择需要上传的文件!") // alert("请先选择需要上传的文件!")
setLoading(false);
return return
} }
// avi、flv、f4v、m4v、mov、mp4、rmvb、swf、webm // avi、flv、f4v、m4v、mov、mp4、rmvb、swf、webm
@ -71,6 +74,7 @@ function VideoUploadList (props) {
&& file.name.indexOf('.webm') == -1 && file.name.indexOf('.webm') == -1
) { ) {
showNotification(`不支持的视频格式`) showNotification(`不支持的视频格式`)
setLoading(false);
clearInput() clearInput()
return; return;
} }
@ -79,7 +83,8 @@ function VideoUploadList (props) {
}else if (file.size >(parseInt(MAX_FILE_SIZE) * 1024 * 1024)) { }else if (file.size >(parseInt(MAX_FILE_SIZE) * 1024 * 1024)) {
// 超过500m TODO // 超过500m TODO
clearInput() clearInput();
setLoading(false);
showNotification(`视频大小超过${MAX_FILE_SIZE}M`) showNotification(`视频大小超过${MAX_FILE_SIZE}M`)
return; return;
} }
@ -91,7 +96,8 @@ function VideoUploadList (props) {
} }
}) })
if (gotTheSameFileName) { if (gotTheSameFileName) {
clearInput() clearInput();
setLoading(false);
showNotification(`你不能上传同一个视频文件名称,请重新选择。`) showNotification(`你不能上传同一个视频文件名称,请重新选择。`)
return; return;
} }
@ -106,7 +112,6 @@ function VideoUploadList (props) {
// 重新创建 才会用最新的 dispatch // 重新创建 才会用最新的 dispatch
create: !uploader, create: !uploader,
addFileSuccess: (uploadInfo) => { addFileSuccess: (uploadInfo) => {
setLoading(true);
const file = uploadInfo.file; const file = uploadInfo.file;
console.log('addFileSuccess', uploadInfo) console.log('addFileSuccess', uploadInfo)
// const newvideos = [...videos, { // const newvideos = [...videos, {
@ -435,9 +440,10 @@ function VideoUploadList (props) {
>继续添加</ActionBtn>} >继续添加</ActionBtn>}
<div className={`description ${noUploads ? 'noUploads' : ''}`}> <div className={`description ${noUploads ? 'noUploads' : ''}`}>
<div className="">视频大小不支持断点续传单个视频文件最大500M单次最多支持3个视频文件上传 </div> <div class="description ">
<div className="">视频规格aviflvf4vm4vmovmp4rmvbswfwebm </div> <div>上传说明目前不支持断点续传单个视频文件最大限制500M单次最多支持3个视频文件上传 </div>
<div className="">温馨提示请勿上传违法视频平台将为每一个视频分配一个地址您可以通过引用该地址将视频使用在实训项目等模块</div> <div>视频规格aviflvf4vm4vmovmp4rmvbswfwebm </div>
<div>温馨提示<span class="color-orange-tip">为了更好播放的体验建议您优先上传MP4格式如果您是自己录制视频建议您保存的时候将视频编码设置为AVC(H264)</span></div></div>
</div> </div>
{!noUploads && <React.Fragment> {!noUploads && <React.Fragment>

Loading…
Cancel
Save