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

courseware
caicai8 5 years ago
commit a6f222934f

@ -55,32 +55,32 @@ module CoursesHelper
return nil if mod.blank? or course.blank?
case mod.module_type
when "announcement"
"/courses/#{course.id}/informs"
"/classrooms/#{course.id}/informs"
when "online_learning"
"/courses/#{course.id}/online_learning"
"/classrooms/#{course.id}/online_learning"
when "shixun_homework"
"/courses/#{course.id}/shixun_homeworks/#{mod.id}"
"/classrooms/#{course.id}/shixun_homeworks/#{mod.id}"
when "common_homework"
"/courses/#{course.id}/common_homeworks/#{mod.id}"
"/classrooms/#{course.id}/common_homeworks/#{mod.id}"
when "group_homework"
"/courses/#{course.id}/group_homeworks/#{mod.id}"
"/classrooms/#{course.id}/group_homeworks/#{mod.id}"
when "graduation"
"/courses/#{course.id}/graduation_topics/#{mod.id}"
"/classrooms/#{course.id}/graduation_topics/#{mod.id}"
when "exercise"
"/courses/#{course.id}/exercises/#{mod.id}"
"/classrooms/#{course.id}/exercises/#{mod.id}"
when "poll"
"/courses/#{course.id}/polls/#{mod.id}"
"/classrooms/#{course.id}/polls/#{mod.id}"
when "attachment"
"/courses/#{course.id}/files/#{mod.id}"
"/classrooms/#{course.id}/files/#{mod.id}"
when "board"
course_board = course.course_board
"/courses/#{course.id}/boards/#{course_board.id}"
"/classrooms/#{course.id}/boards/#{course_board.id}"
when "course_group"
"/courses/#{course.id}/course_groups"
"/classrooms/#{course.id}/course_groups"
when "statistics"
"/courses/#{course.id}/statistics"
"/classrooms/#{course.id}/statistics"
when "video"
"/courses/#{course.id}/course_videos"
"/classrooms/#{course.id}/course_videos"
end
end
@ -88,17 +88,17 @@ module CoursesHelper
def category_url category, course
case category.category_type
when "shixun_homework"
"/courses/#{course.id}/shixun_homework/#{category.id}"
"/classrooms/#{course.id}/shixun_homework/#{category.id}"
when "graduation"
if category.name == "毕设选题"
"/courses/#{course.id}/graduation_topics/#{category.course_module_id}"
"/classrooms/#{course.id}/graduation_topics/#{category.course_module_id}"
else
"/courses/#{course.id}/graduation_tasks/#{category.course_module_id}"
"/classrooms/#{course.id}/graduation_tasks/#{category.course_module_id}"
end
when "attachment"
"/courses/#{course.id}/file/#{category.id}"
"/classrooms/#{course.id}/file/#{category.id}"
when "video"
"/courses/#{course.id}/course_video/#{category.id}"
"/classrooms/#{course.id}/course_video/#{category.id}"
end
end
@ -147,7 +147,7 @@ module CoursesHelper
when "online_learning"
course.shixuns.count
when "video"
course.course_videos.count + course.live_links.count
course.videos_count + course.live_links.count
end
end
@ -296,11 +296,11 @@ module CoursesHelper
none_group_count = course.students.where(course_group_id: 0).size
group_info << {category_id: 0, category_name: "未分班", position: course.course_groups.pluck(:position).max.to_i + 1,
category_count: none_group_count, category_type: false,
second_category_url: "/courses/#{@course.id}/course_groups/0"}
second_category_url: "/classrooms/#{@course.id}/course_groups/0"}
course.course_groups.each do |course_group|
group_info << {category_id: course_group.id, category_name: course_group.name, position: course_group.position,
category_count: course_group.course_members_count, category_type: false,
second_category_url: "/courses/#{@course.id}/course_groups/#{course_group.id}"}
second_category_url: "/classrooms/#{@course.id}/course_groups/#{course_group.id}"}
end
end
group_info

@ -160,6 +160,10 @@ class Course < ApplicationRecord
students.find_by(user_id: user_id)&.course_group_name
end
def videos_count
course_videos.where(video_id: videos.where("transcoded = 1 or videos.user_id = #{User.current.id}").pluck(:id))
.or(course_videos.where(course_videos: {is_link: true})).size
end
def teacher_group(user_id)
data =

@ -38,7 +38,7 @@
</p>
<p style="color:#333; ">
您参与的课堂:<%= @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>
<div style="text-align: center; margin-top:40px;">
<span style="font-weight: normal;color:#666;">

@ -6,6 +6,8 @@ namespace :video_transcode do
if v.uuid && !v.transcoded && !v.file_url.include?('.mp4') && !AliyunVod::Service.get_meta_code_info(v.uuid).start_with?("h264", "h265")
p "--- Start submit video trans code #{v.uuid}"
AliyunVod::Service.submit_transcode_job(v.uuid, 'a0277c5c0c7458458e171b0cee6ebf5e')
else
v.update(transcoded: true)
end
end
end

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

@ -693,7 +693,7 @@ class App extends Component {
}
></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> */}

@ -29,7 +29,7 @@ class College extends Component {
align: 'center',
className: "edu-txt-center font-14 maxnamewidth247",
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={{
maxWidth:'220px',
color:'#007bff',

@ -254,15 +254,15 @@ class CompetitionCommon extends Component{
if(url===undefined){
let {data,signupdata}=this.state;
// if(signupdata.enrolled===true){
// this.props.history.replace(`/courses/${data.course_id}`);
// this.props.history.replace(`/classrooms/${data.course_id}`);
// }else{ }
if (data.member_of_course === true) {
// this.props.history.replace(`/courses/${data.course_id}`);
window.open(`/courses/${data.course_id}`)
// this.props.history.replace(`/classrooms/${data.course_id}`);
window.open(`/classrooms/${data.course_id}`)
} else {
// 以学生身份调用加入课堂 进入课堂首页
let url = "/courses/apply_to_join_course.json"
let url = "/classrooms/apply_to_join_course.json"
axios.post(url, {
invite_code: data.invite_code,
student: 1
@ -271,7 +271,7 @@ class CompetitionCommon extends Component{
if (response.data.status === 0) {
// this.props.history.replace();
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" ?
<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.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.competition_status === "nearly_published" ?
<div className="gutter-box CompetitionsIndexbottomvalue Competitioncolor516"

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

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

@ -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={
(props) => (<CommonWork {...this.props} {...props} {...this.state} />)
}
></Route>
{/* 作品列表 */}
<Route path="/courses/:coursesId/group_homeworks/:category_id"
<Route path="/classrooms/:coursesId/group_homeworks/:category_id"
render={
(props) => (<CommonWork {...this.props} {...props} {...this.state} />)
}
></Route>
<Route exact path="/courses/:coursesId/boards/:boardId"
<Route exact path="/classrooms/:coursesId/boards/:boardId"
render={
(props) => (<Boards {...this.props} {...props} {...this.state} />)
}
></Route>
{/*视频列表*/}
<Route path="/courses/:coursesId/course_video/:videoId"
<Route path="/classrooms/:coursesId/course_video/:videoId"
render={
(props) => (<CourseVideo {...this.props} {...props} {...this.state} />)
}
></Route>
<Route path="/courses/:coursesId/course_videos"
<Route path="/classrooms/:coursesId/course_videos"
render={
(props) => (<CourseVideo {...this.props} {...props} {...this.state} />)
}
></Route>
<Route path="/courses/:coursesId/teachers"
<Route path="/classrooms/:coursesId/teachers"
render={
(props) => (<TeacherList updatabanners={()=>this.updatabanners()} {...this.props} {...props} {...this.state} />)
}
></Route>
{/* 学生列表*/}
<Route path="/courses/:coursesId/students"
<Route path="/classrooms/:coursesId/students"
render={
(props) => (<StudentsList {...this.props} {...props} {...this.state} />)
}
></Route>
<Route path="/courses/:coursesId/course_groups/:course_group_id"
<Route path="/classrooms/:coursesId/course_groups/:course_group_id"
render={
(props) => (<StudentsList {...this.props} {...props} {...this.state} />)
}
></Route>
<Route path="/courses/:coursesId/course_groups"
<Route path="/classrooms/:coursesId/course_groups"
render={
(props) => (<CourseGroupList {...this.props} {...props} {...this.state} />)
}
></Route>
<Route path="/courses/:coursesId/exercises/:Id"
<Route path="/classrooms/:coursesId/exercises/:Id"
render={
(props) => (<Exercise {...this.props} {...props} {...this.state} />)
}
></Route>
<Route path="/courses/:coursesId/polls/:Id"
<Route path="/classrooms/:coursesId/polls/:Id"
render={
(props) => (<Poll {...this.props} {...props} {...this.state} />)
}
></Route>
{/* <Route path="/courses/:coursesId/file/:Id"
{/* <Route path="/classrooms/:coursesId/file/:Id"
render={
(props) => (<Resourcelist {...this.props} {...props} {...this.state} />)
}
></Route> */}
{/* 实训作业子页面*/}
<Route path="/courses/:coursesId/shixun_homework/:category_id"
<Route path="/classrooms/:coursesId/shixun_homework/:category_id"
render={
(props) => (<ShixunHomework {...this.props} {...props} {...this.state} />)
}
@ -302,7 +302,7 @@ class ListPageIndex extends Component{
{/*课堂统计列表2019.10.29 */}
<Route path="/courses/:coursesId/statistics"
<Route path="/classrooms/:coursesId/statistics"
render={
(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={
(props) => (<Eduinforms {...this.props} {...props} {...this.state} />)
}
></Route>
{/*在线学习*/}
<Route
path="/courses/:coursesId/online_learning"
path="/classrooms/:coursesId/online_learning"
render={
(props) => (<Elearning {...this.props} {...props} {...this.state} comyslElearning={(i)=>this.comyslElearning(i)} />)
}
>
</Route>
{/* 实训作业页面*/}
<Route path="/courses/:coursesId/shixun_homeworks/:main_id"
<Route path="/classrooms/:coursesId/shixun_homeworks/:main_id"
render={
(props) => (<ShixunHomework {...this.props} {...props} {...this.state} />)
}
></Route>
<Route path="/courses/:coursesId/files/:main_id"
<Route path="/classrooms/:coursesId/files/:main_id"
render={
(props) => (<Resourcelist {...this.props} {...props} {...this.state} />)
}
></Route>
<Route path="/courses/:coursesId/file/:Id"
<Route path="/classrooms/:coursesId/file/:Id"
render={
(props) => (<Resourcelist {...this.props} {...props} {...this.state} />)
}
></Route>
<Route path="/courses/:coursesId/graduation_topics/:Id"
<Route path="/classrooms/:coursesId/graduation_topics/:Id"
render={
(props) => (<GraduationTopics {...this.props} {...props} {...this.state} />)
}></Route>
<Route path="/courses/:coursesId/graduation_tasks/:Id"
<Route path="/classrooms/:coursesId/graduation_tasks/:Id"
render={
(props) => (<GraduationTasks {...this.props} {...props} {...this.state} />)
}
></Route>
{/* 默认 */}
<Route path="/courses/:coursesId"
<Route path="/classrooms/:coursesId"
render={
(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 ?
(bools === true ?
<a
// href={"/courses/" + coursesId + "/graduation/graduation_tasks/" + categoryid + "/" + taskid + "/list"}
// href={"/classrooms/" + coursesId + "/graduation/graduation_tasks/" + categoryid + "/" + taskid + "/list"}
onClick={() => this.showfiles(discussMessage)}
title={discussMessage.title}
className="fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.title}</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)}
title={discussMessage.title}
className="fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.title}</a>

@ -65,13 +65,13 @@ class BoardsNew extends Component{
});
}
componentDidMount = () => {
const topicId = this.props.match.params.topicId
const isEdit = !!topicId
this.isEdit = isEdit
const boardId = this.props.match.params.boardId
this.fetchBoards()
if (isEdit) {
@ -99,7 +99,7 @@ class BoardsNew extends Component{
status: 'done'
}
})
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
})
}
axios.post(url, {
...values,
email_notify:this.state.isemail_notify,
@ -224,7 +224,7 @@ class BoardsNew extends Component{
const { status } = response.data;
if (status == 0) {
console.log('--- success')
this.setState((state) => {
const index = state.fileList.indexOf(file);
const newFileList = state.fileList.slice();
@ -328,13 +328,13 @@ class BoardsNew extends Component{
<div className="edu-class-container edu-position courseForm">
<CBreadcrumb items={[
{ 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 ? '帖子编辑' : '帖子新建'}
]}></CBreadcrumb>
<p className="clearfix mt20 mb20">
<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}>
返回
</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>
</span></Tooltip>:"":""}
{ isAdmin &&
{ isAdmin &&
<React.Fragment>
{getFieldDecorator('sticky', {
valuePropName: 'checked',
@ -375,7 +375,7 @@ class BoardsNew extends Component{
label="标题"
className="topicTitle "
>
{getFieldDecorator('subject', {
rules: [{
required: true, message: '请输入标题',
@ -400,7 +400,7 @@ class BoardsNew extends Component{
<div>
{menu}
{
isAdmin && !isCourseEnd &&
isAdmin && !isCourseEnd &&
<React.Fragment>
<Divider style={{ margin: '4px 0' }} />
<div style={{ padding: '8px', cursor: 'pointer' }} onMouseDown={() => this.refs['addDirModal'].open()}>
@ -464,7 +464,7 @@ class BoardsNew extends Component{
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>
)}
</Form.Item>
@ -476,13 +476,13 @@ class BoardsNew extends Component{
(单个文件150M以内)
</Upload>
</div>
<Form.Item>
<div className="clearfix mt30 mb30">
<Button type="primary" htmlType="submit" className="defalutSubmitbtn fl mr20">提交</Button>
<a className="defalutCancelbtn fl"
onClick={() => this.isEdit ?
this.props.toDetailPage(Object.assign({}, this.props.match.params, {'coursesId': course_id})) :
<a className="defalutCancelbtn fl"
onClick={() => this.isEdit ?
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>
</div>
</Form.Item>
@ -494,4 +494,4 @@ class BoardsNew extends Component{
}
const WrappedBoardsNew = Form.create({ name: 'boardsNew' })(BoardsNew);
export default RouteHOC()(WrappedBoardsNew);
export default RouteHOC()(WrappedBoardsNew);

@ -555,7 +555,7 @@ class TopicDetail extends Component {
`}</style>
<CBreadcrumb className={'independent'} items={[
{ 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: '帖子详情'}
]}></CBreadcrumb>

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

@ -419,53 +419,53 @@ class CommonWorkDetailIndex extends Component{
{/* --------------------------------------------------------------------- */}
{/* 作业设置 */}
{/* http://localhost:3007/courses/1309/homework/9300/setting */}
<Route exact path="/courses/:coursesId/common_homeworks/:workId/setting"
{/* http://localhost:3007/classrooms/1309/homework/9300/setting */}
<Route exact path="/classrooms/:coursesId/common_homeworks/:workId/setting"
render={
(props) => (<CommonWorkSetting {...this.props} {...props} {...this.state} {...commonHandler}/>)
}
></Route>
{/* 作品列表 */}
<Route exact path="/courses/:coursesId/common_homeworks/:workId/list"
<Route exact path="/classrooms/:coursesId/common_homeworks/:workId/list"
render={
(props) => (<CommonWorkList ref="commonWorkList" triggerRef={this.bindRef} {...this.props} {...props} {...this.state} {...commonHandler}/>)
}
></Route>
{/* 作业问答 */}
<Route exact path="/courses/:coursesId/common_homeworks/:workId/question"
<Route exact path="/classrooms/:coursesId/common_homeworks/:workId/question"
render={
(props) => (<CommonWorkQuestion {...this.props} {...props} {...this.state} {...commonHandler}/>)
}
></Route>
<Route exact path="/courses/:coursesId/common_homeworks/:workId/answer"
<Route exact path="/classrooms/:coursesId/common_homeworks/:workId/answer"
render={
(props) => (<CommonWorkAnswer {...this.props} {...props} {...this.state} {...commonHandler}/>)
}
></Route>
<Route exact path="/courses/:coursesId/group_homeworks/:workId/setting"
<Route exact path="/classrooms/:coursesId/group_homeworks/:workId/setting"
render={
(props) => (<CommonWorkSetting {...this.props} {...props} {...this.state} {...commonHandler}/>)
}
></Route>
{/* 作品列表 */}
<Route exact path="/courses/:coursesId/group_homeworks/:workId/list"
<Route exact path="/classrooms/:coursesId/group_homeworks/:workId/list"
render={
(props) => (<CommonWorkList triggerRef={this.bindRef} {...this.props} {...props} {...this.state} {...commonHandler}/>)
}
></Route>
{/* 作业问答 */}
<Route exact path="/courses/:coursesId/group_homeworks/:workId/question"
<Route exact path="/classrooms/:coursesId/group_homeworks/:workId/question"
render={
(props) => (<CommonWorkQuestion {...this.props} {...props} {...this.state} {...commonHandler}/>)
}
></Route>
<Route exact path="/courses/:coursesId/group_homeworks/:workId/answer"
<Route exact path="/classrooms/:coursesId/group_homeworks/:workId/answer"
render={
(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",
// "delete": true
// }
// ]
// ]
// response.data.revise_reason = 'qweqweqweqe';
// revise_reason revise_attachments 传给modal
// attach to fileList
const fileList = response.data.revise_attachments.map(item => {
@ -174,12 +174,12 @@ class CommonWorkItem extends Component{
>{item.name}</a>}
{/* 只有非课堂成员且作业是私有的情况下才会为true */}
{
item.private_icon===true ?
item.private_icon===true ?
(<Tooltip title={"私有属性,非课堂成员不能访问"} placement="bottom" >
<i className="iconfont icon-guansuo color-grey-c ml10 font-16 fl"></i>
</Tooltip>) : ""
}
<span className="fl">
<CoursesListType typelist={item.status} />
</span>
@ -204,7 +204,7 @@ class CommonWorkItem extends Component{
{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.status_time!="" &&
item.status_time!="" &&
<span className="mr20 fl">{item.status_time}</span>
@ -219,12 +219,12 @@ class CommonWorkItem extends Component{
<WordsBtn style="blue" className={"fl font-16 ml28"}
onClick={ canNotLink ? () => {} : () => this.onItemClick(item)}
>查看详情</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.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>
</div>}
{
//
//
isStudent &&
<li className="fr">
<WordsBtn style="blue" className={"fl font-16"}
@ -232,34 +232,34 @@ class CommonWorkItem extends Component{
>查看详情</WordsBtn>
{ //
item.work_status && item.work_status.indexOf('关联项目') != -1 &&
item.work_status && item.work_status.indexOf('关联项目') != -1 &&
<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.openConnectionProject(item)}>关联项目</WordsBtn>
</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>
}
{ //
item.work_status && item.work_status.indexOf('提交作品') != -1 &&
<WordsBtn style="blue" className="fl font-16 ml28" onClick={() => this.props.toWorkPostPage(this.props.match.params, item.homework_id)}>提交作品</WordsBtn>
item.work_status && item.work_status.indexOf('提交作品') != -1 &&
<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 &&
<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 &&
<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 &&
<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>
<AccessoryModal
{...this.props}
@ -270,14 +270,14 @@ class CommonWorkItem extends Component{
Cancel={this.Cancelvisible}
setupdate={this.setupdate}
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>
}
{
//
{
//
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> }
@ -287,7 +287,7 @@ class CommonWorkItem extends Component{
</p>
</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>
</Tooltip> }
{/* 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"}
onMouseDown={(e) => that.props.toWorkDetailPage2(e, courseId, workId, record.id)}
onClick={() => that.props.toWorkDetailPage(courseId, workId, record.id)}>{isAdmin ? '评阅' : '查看'}</a>
@ -378,7 +378,7 @@ const orderMap = {
student_id: 'asc',
}
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{
constructor(props){

@ -44,7 +44,7 @@ function handleDateString (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{
constructor(props){
@ -82,16 +82,16 @@ class CommonWorkSetting extends Component{
<div className={"educontent mb20"}>
<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>
<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>任务详情</span>
</p>
<div style={{ width:'100%',height:'75px'}} >
<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>
<CoursesListType
typelist={["已开启补交"]}
@ -104,17 +104,17 @@ class CommonWorkSetting extends Component{
<div className="mt10 clearfix edu-back-white poll_list pl20">
<Link
className="active"
to={"/courses/"+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={"/courses/"+courseId+"/graduation/graduation_tasks/"+category_id+"/"+task_Id+"/questions"}>参考答案</Link>
to={"/classrooms/"+courseId+"/graduation/graduation_tasks/"+category_id+"/"+task_Id+"/list"}>作品列表</Link>
<Link to={"/classrooms/"+courseId+"/graduation/graduation_tasks/"+category_id+"/"+task_Id+"/questions"}>作业描述</Link>
<Link to={"/classrooms/"+courseId+"/graduation/graduation_tasks/"+category_id+"/"+task_Id+"/questions"}>参考答案</Link>
<Link
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.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>

@ -130,7 +130,7 @@ class CommonWorkPost extends Component{
setedit=(workId)=>{
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('保存成功')
}else{
}
this.props.history.push(`/courses/${coursesId}/${moduleName}/${workId}/${studentWorkId}/appraise`)
this.props.history.push(`/classrooms/${coursesId}/${moduleName}/${workId}/${studentWorkId}/appraise`)
}
}).catch((error) => {
@ -251,7 +251,7 @@ class CommonWorkPost extends Component{
).then((response) => {
if(response.status===200) {
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.setState({
// Modalstype:true,
@ -644,10 +644,10 @@ render(){
<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>
<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>
{/*<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>*/}
{/*</WordsBtn>*/}

@ -475,7 +475,7 @@ class CommonWorkSetting extends Component{
homepublish=()=>{
// let task_Id=this.props.match.params.task_Id;
// 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,{
// task_ids:[task_Id],
@ -843,7 +843,7 @@ class CommonWorkSetting extends Component{
// const coursesId = this.props.match.params.coursesId;
// 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,{
// task_ids:[task_Id],
// all_check:0
@ -1531,7 +1531,7 @@ class CommonWorkSetting extends Component{
<Button type="primary" htmlType="submit" className="defalutSubmitbtn fl mr20"
onClick={this.onSubmit}
>提交</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>
</div>:""}

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

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

@ -167,7 +167,7 @@ class NewWork extends Component{
<div className="educontent mt20 mb50">
<CBreadcrumb items={[
{ 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: `${ this.isEdit ? '编辑' : '新建'}` }
]}></CBreadcrumb>
@ -204,4 +204,4 @@ class NewWork extends Component{
}
}
export default NewWork;
export default NewWork;

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

@ -57,7 +57,7 @@ class CoursesBanner extends Component {
componentDidMount() {
this.onloadupdatabanner()
on('updatabanner', this.updatabanner)
if(this.props.match.path==="/courses/:coursesId"){
if(this.props.match.path==="/classrooms/:coursesId"){
if(this.props.user!=undefined){
this.props.history.push(this.props.user.first_category_url)
}
@ -77,7 +77,7 @@ class CoursesBanner extends Component {
}
componentDidUpdate(prevProps) {
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){
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`
axios.post(url).then((response) => {
if(response!==undefined){
window.location.href = "/courses/" + response.data.new_course_id+"/students";
window.location.href = "/classrooms/" + response.data.new_course_id+"/students";
return
}
this.modalCancel();
// window.location.href = "/courses/" + response.data.new_course_id;
// window.location.href = "/classrooms/" + response.data.new_course_id;
}).catch( (error)=> {
this.modalCancel();
@ -450,7 +450,7 @@ class CoursesBanner extends Component {
}
postsettings=()=>{
window.location.href = "/courses/" + this.props.match.params.coursesId + "/settings";
window.location.href = "/classrooms/" + this.props.match.params.coursesId + "/settings";
};
postsettingstwo=()=>{
// var ids =1;
@ -463,7 +463,7 @@ class CoursesBanner extends Component {
// }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">
{coursedata.teacher_applies_count===undefined?"":coursedata.teacher_applies_count>0?
<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={{
color:"#FFA804"
}}>
待审批
</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"}>{coursedata.teacher_count}</span>
</span>
@ -763,7 +763,7 @@ background:rgba(204,204,204,0.2) !important;
<Breadcrumb.Item
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>
</Breadcrumb.Item>
@ -775,7 +775,7 @@ background:rgba(204,204,204,0.2) !important;
</Breadcrumb>
{/*<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-white fl font-16 bannerurli">{coursedata.teacher_count}</span>*/}
@ -783,7 +783,7 @@ background:rgba(204,204,204,0.2) !important;
{/*</li>*/}
{/*<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={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"){
this.updasaveNavmoda()
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"){
this.updasaveNavmoda()
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"){
@ -565,7 +565,7 @@ class Coursesleftnav extends Component{
if(positiontype==="course_groups"){
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={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}>
<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}

@ -161,7 +161,7 @@ class CoursesHome extends Component {
</div>
{user && user.user_identity !== '学生' ?
<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>
</Fragment> : null
}
@ -190,4 +190,4 @@ class CoursesHome extends Component {
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){
this.props.hideAddcoursestype();
}
window.location.href ="/courses/"+course_id+"/students";
window.location.href ="/classrooms/"+course_id+"/students";
}
}
submitasyns=(course_id)=>{
window.location.href ="/courses/"+course_id+"/students";
window.location.href ="/classrooms/"+course_id+"/students";
}
submittojoinclass=()=>{
@ -266,7 +266,7 @@ class Addcourses extends Component{
if(response.data.status===0){
// https://www.trustie.net/issues/22365
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;
}
notification.open({

@ -237,7 +237,7 @@ class Ecerciseallbackagain extends Component{
>
<a style={{"textAlign": "left"}}
className="task-hide color-grey-name"
href={`/users/${item.user_id}/courses`}
href={`/users/${item.user_id}/classrooms`}
target={'_blank'}
title={item.user_name}
>{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?
<li className="fr">
<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>:""
}
@ -502,7 +502,7 @@ class Exercise extends Component{
<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_published_counts}</span>
<span>未发布{exercises_counts && exercises_counts.exercises_unpublish_counts}</span>
<span>未发布{exercises_counts && exercises_counts.exercises_unpublish_counts}</span>
</p>
<div className="fr mt16 mb16 searchView">
{publicSearchs("请输入名称进行搜索",this.searchInfo,this.inputStudent,this.inputStudent)}

@ -114,22 +114,22 @@ class ExerciseListItem extends Component{
<div className="flex1 pr">
<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"
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()?
<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 ?
<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"}}>
<a className="btn colorblue font-16 ml20" onClick={()=>this.toDetailPage(`/courses/${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 ml20 font-16" to={`/courses/${coursesId}/exercises/${item.id}/student_exercise_list?tab=3`}>设置</Link>
<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={`/classrooms/${coursesId}/exercises/${item.id}/edit`}>编辑</Link>
<Link className="btn colorblue ml20 font-16" to={`/classrooms/${coursesId}/exercises/${item.id}/student_exercise_list?tab=3`}>设置</Link>
</div> }
</p>
@ -202,7 +202,7 @@ class ExerciseListItem extends Component{
{/*<li className="edu-position edu-position-hidebox">*/}
{/*<i className="fa fa-bars color-grey-b"></i>*/}
{/*<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={`*/}
{/*/courses/${coursesId}/exercises/${item.id}/student_exercise_list?tab=3`*/}
{/*}>设置</a></li>*/}
@ -216,10 +216,10 @@ class ExerciseListItem extends Component{
{
IsStudent &&
<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>
{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 ===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 ===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>:""}
<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={`/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={`/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(`/classrooms/${coursesId}/exercises/${item.id}/users/${this.props.current_user.login}`)}>开始答题</a></li>:""}
</div>
}
@ -227,7 +227,7 @@ class ExerciseListItem extends Component{
this.props.isNotMember()? item.lock_status === 0 ?
""
: <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>:""
}
@ -236,4 +236,4 @@ class ExerciseListItem extends Component{
)
}
}
export default ExerciseListItem
export default ExerciseListItem

@ -40,21 +40,21 @@ class ExerciceNew extends Component{
this.state = {
}
}
componentDidMount = () => {
}
initData = (data) => {
this.setState({left_banner_id: data.left_banner_id})
}
render() {
let { left_banner_id } = this.state;
const { current_user } = this.props
const courseId=this.props.match.params.coursesId;
const isEdit = this.isEdit;
@ -62,19 +62,19 @@ class ExerciceNew extends Component{
document.title=this.props.coursedata&&this.props.coursedata.name;
return(
<div className="newMain exerciseNew">
<div className="edu-class-container edu-position courseForm">
{ current_user && <CBreadcrumb items={[
{ 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 ? '编辑试卷' : '新建试卷'}
]}></CBreadcrumb> }
<p className="clearfix mt20 mb20">
<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()
onClick={() => this.props.history.push(`/courses/${courseId}/exercises/${left_banner_id}`)}>
onClick={() => this.props.history.push(`/classrooms/${courseId}/exercises/${left_banner_id}`)}>
返回
</a>
</p>
@ -91,4 +91,4 @@ class ExerciceNew extends Component{
}
}
// RouteHOC()
export default (ExerciceNew);
export default (ExerciceNew);

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

@ -669,7 +669,7 @@ class Studentshavecompletedthelist extends Component {
record.score_open===true?
<a style={{textAlign: "center",width:"98px"}} className="color-blue"
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>
@ -940,7 +940,7 @@ class Studentshavecompletedthelist extends Component {
:
<a style={{textAlign: "center"}} className="color-blue"
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>
@ -1163,7 +1163,7 @@ class Studentshavecompletedthelist extends Component {
:record.submitstate === "已提交"?
<a style={{textAlign: "center"}} className="color-blue"
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>
}
@ -1381,7 +1381,7 @@ class Studentshavecompletedthelist extends Component {
:record.submitstate === "已提交"?
<a style={{textAlign: "center"}} className="color-blue"
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>
}

@ -43,7 +43,7 @@ class Testpapersettinghomepage extends Component{
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(){
@ -277,10 +277,10 @@ class Testpapersettinghomepage extends Component{
// let courseId=this.props.match.params.coursesId;
// 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;
// if(courseId===undefined){
// this.props.history.push("/courses");
// this.props.history.push("/classrooms");
// }else{
// 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"}}>
<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>
<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>
<WordsBtn className="fl">试卷详情</WordsBtn>
</p>
@ -345,7 +345,7 @@ class Testpapersettinghomepage extends Component{
<CoursesListType
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>
</div>
@ -437,13 +437,13 @@ class Testpapersettinghomepage extends Component{
getsetdata={this.getsetdata}
></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?
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"
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]}
</Link>
:""}

@ -235,12 +235,12 @@ class GraduateTaskItem extends Component{
<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}
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}
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?
<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}
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> } */}
</h6>
<div className="cl"></div>
<p className="color-grey mt16 fl">
<span className="mr50">
@ -301,15 +301,15 @@ class GraduateTaskItem extends Component{
<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>
</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>
</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">
查看详情
</WordsBtn>
@ -331,7 +331,7 @@ class GraduateTaskItem extends Component{
{item==="提交作品"?
<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>
:""}
@ -339,7 +339,7 @@ class GraduateTaskItem extends Component{
{item==="补交作品"?
<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>
:""}
@ -347,7 +347,7 @@ class GraduateTaskItem extends Component{
{item==="修改作品"?
<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>
:""}
@ -355,7 +355,7 @@ class GraduateTaskItem extends Component{
{item==="查看作品"?
<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>
:""}
@ -385,7 +385,7 @@ class GraduateTaskItem extends Component{
<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>
:""}
@ -394,7 +394,7 @@ class GraduateTaskItem extends Component{
}):""}
{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">
查看详情
</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)=>{
@ -163,12 +163,12 @@ class GraduationAcross extends Component{
this.setState({
showflag:false
})
}
}
}
componentWillUnmount() {
componentWillUnmount() {
window.removeEventListener('click', this.clickOther);
}
}
getList=(page,group_ids,comment_status)=>{
let { limit }=this.state;
@ -325,8 +325,8 @@ class GraduationAcross extends Component{
}
}
render(){
let {
comment_status,
let {
comment_status,
users,
user_count,
graduation_groups,
@ -350,7 +350,7 @@ class GraduationAcross extends Component{
marginRight:'0px'
};
const rowSelection = {
// 选中行的key选中行
@ -461,7 +461,7 @@ class GraduationAcross extends Component{
<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={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></Radio>
</RadioGroup>
@ -472,7 +472,7 @@ class GraduationAcross extends Component{
<span className="fr">
<span className={"fl mt5"}><span className={"color-orange"}>分配</span>{ comment_status && comment_status == 2 ? "":""}</span>
<span className={"fl"} style={{height:"32px"}} id="selectTags">
<Select
<Select
mode="multiple"
placeholder={ comment_status && comment_status == 2 ? "请选择老师":"请选择答辩组"}
// value={AcrossTeamIds}
@ -483,10 +483,10 @@ class GraduationAcross extends Component{
dropdownRender={menu => (
<div id="selectDropdown">
{comment_status == 2 &&teachers&&teachers.length>10?<div className="padding10-20">
<Input
type='input'
value={searchValue}
onChange={this.changeSearchValue}
<Input
type='input'
value={searchValue}
onChange={this.changeSearchValue}
placeholder='请输入名称搜索'
style={{height:"30px"}}
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=()=>{
// let courseId=this.props.match.params.coursesId;
// 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;
// if(courseId===undefined){
// this.props.history.push("/courses");
// this.props.history.push("/classrooms");
// }else{
// this.props.history.push(this.props.current_user.first_category_url);
// }
// 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)=>{
@ -465,13 +465,13 @@ class GraduationTaskDetail extends Component{
<p className="clearfix mt10">
<a onClick={this.goback} className="color-grey-9 fl">{questionslist.course_name}</a>
<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-6">任务详情</span>
</p>
<div className="clearfix mt20 mb20 lineh-25 linbox">
<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>
<CoursesListType
typelist={questionslist.task_status}
@ -481,9 +481,9 @@ class GraduationTaskDetail extends Component{
<div className="stud-class-set bor-bottom-greyE">
<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 == "questions" ? "active" : ""} to={"/courses/"+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 == "list" ? "active" : ""} to={"/classrooms/"+courseId+"/graduation_tasks/"+category_id+"/detail/"+task_Id+"/list"}>任务列表</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={"/classrooms/"+courseId+"/graduation_tasks/"+category_id+"/detail/"+task_Id+"/setting?tab=3"}>设置</Link>
{/*<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>:""}*/}
@ -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)=>{
return(
<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={"/courses/"+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"} target="_blank" href={"/courses/"+courseId+"/graduation_tasks/"+ questionslist.work_id + "/appraise"}>查看作品</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={"/classrooms/"+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"+"/"+ questionslist.work_id + "/edit"}>修改作品</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"} onClick={this.AssociationItems}>关联项目</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===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() ? <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> : "" }
</div>
</div>
<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={
(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 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={
(props) => (<GraduationTaskssetting {...this.props} {...props} {...this.state} {...commom} triggerRef={this.bindRef} setend_time={(time)=>this.setend_time(time)} tab={`setting`}/>)
}
></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={
(props) => (<GraduationTasksquestions {...this.props} {...props} {...this.state} {...commom} triggerRef={this.bindRef} setend_time={(time)=>this.setend_time(time)} tab={`questions`}/>)
}></Route>
@ -579,4 +579,4 @@ class GraduationTaskDetail extends Component{
}
}
// CNotificationHOC() ( SnackbarHOC() ( TPMIndexHOC))
export default (GraduationTaskDetail) ;
export default (GraduationTaskDetail) ;

@ -104,7 +104,7 @@ class GraduationTasksSubmitedit extends Component{
// }else{
// 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){
// this.goback()
window.location.href=`/courses/${coursesIds}/graduation_tasks/${workId}/appraise`
window.location.href=`/classrooms/${coursesIds}/graduation_tasks/${workId}/appraise`
}
// if(response.status===200) {
// GraduationTasksnewtype=false;
@ -589,14 +589,14 @@ class GraduationTasksSubmitedit extends Component{
<div className={"educontent mb20"}>
<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>*/}
<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>
<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>
{/*<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>*/}
{/*</WordsBtn>*/}
<span>{this.props.current_user&&this.props.current_user.real_name} 修改作品</span>

@ -80,7 +80,7 @@ class GraduationTasksSubmitnew extends Component{
setedit=(workId)=>{
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{
// 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.data){
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"}>
<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>*/}
<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>
<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>
{/*<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>*/}
{/*</WordsBtn>*/}
<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 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;
// if(courseId===undefined){
// this.props.history.push("/courses");
// this.props.history.push("/classrooms");
// }else{
// 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">
<a onClick={this.goback} className="color-grey-9 fl">{datalist&&datalist.course_name}</a>
<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>
<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-6 fl">{datalist&&datalist.author_name}</span>
</p>

@ -98,11 +98,11 @@ class GraduationTasksedit extends Component{
// let courseId = this.props.match.params.coursesId;
// if(courseId===undefined){
// this.props.history.push("/courses");
// this.props.history.push("/classrooms");
// }else{
// 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) {
// console.log(response)
// 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.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) => {
console.log(error)
@ -366,14 +366,14 @@ class GraduationTasksedit extends Component{
<p className="clearfix mt10">
<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>
<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>
{name===""?"":
<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>
</WordsBtn>
}

@ -92,7 +92,7 @@ class GraduationTasksnew extends Component {
// this.goback();
if(response!==undefined){
// 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) => {
@ -110,12 +110,12 @@ class GraduationTasksnew extends Component {
goback = () => {
// let courseId = this.props.match.params.coursesId;
// if(courseId===undefined){
// this.props.history.push("/courses");
// this.props.history.push("/classrooms");
// }else{
// this.props.history.push(this.props.current_user.first_category_url);
// }
// 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>
<span className="color-grey-9 fl ml3 mr3">&gt;</span>
<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>{"新建"}</span>
</p>

@ -77,12 +77,12 @@ class GraduationTaskssettinglist extends Component{
// window.history.back(-1)
// let courseId=this.props.match.params.coursesId;
// if(courseId===undefined){
// this.props.history.push("/courses");
// this.props.history.push("/classrooms");
// }else{
// this.props.history.push(this.props.current_user.first_category_url);
// }
// 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=()=>{
@ -939,7 +939,7 @@ class GraduationTaskssettinglist extends Component{
{
tag.name &&
<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}
</a>
:
@ -958,7 +958,7 @@ class GraduationTaskssettinglist extends Component{
operation.map((tag,key) => {
return(
<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>
)}
):""

@ -67,16 +67,16 @@ class GraduationTasksquestions extends Component{
goback=()=>{
// let courseId=this.props.match.params.coursesId;
// 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;
// if(courseId===undefined){
// this.props.history.push("/courses");
// this.props.history.push("/classrooms");
// }else{
// this.props.history.push(this.props.current_user.first_category_url);
// }
// 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=()=>{

@ -669,7 +669,7 @@ class GraduationTasks extends Component{
{/*{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() ? <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>
</Link>
</WordsBtn> : ""}
@ -708,7 +708,7 @@ class GraduationTasks extends Component{
searchPlaceholder={"请输入名称进行搜索"}
/>
{/* <GraduateTaskItem></GraduateTaskItem>
<FilesListItem></FilesListItem> */}

@ -331,7 +331,7 @@ sureDelTopic=()=>{
// 新建
onBoardsNew=()=>{
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){
@ -416,7 +416,7 @@ onBoardsNew=()=>{
(<React.Fragment>
{/* 参考普通作业 - 题库选用 */}
{/* <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> 题库选用*/}
<WordsBtn style="blue" className="font-16" onClick={()=>this.onBoardsNew()}>新建</WordsBtn>
</React.Fragment>):""
@ -514,4 +514,4 @@ onBoardsNew=()=>{
)
}
}
export default Boards;
export default Boards;

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

@ -353,7 +353,7 @@ class studentsList extends Component{
if (params.course_group_id == course_group_id) {
this.fetchAll(1)
} 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)
}
@ -611,7 +611,7 @@ class studentsList extends Component{
.then((response) => {
if (response.data.status == 0) {
this.props.showNotification('删除成功')
this.props.history.push(`/courses/${courseId}/course_groups`)
this.props.history.push(`/classrooms/${courseId}/course_groups`)
}
})
.catch(function (error) {
@ -742,21 +742,21 @@ class studentsList extends Component{
title={isParent ? (pageType == TYPE_STUDENTS ? "全部学生" : "学生列表"):
<React.Fragment>
{
course_group_name ?
course_group_name ?
<span>
<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' }}
></i>
</Tooltip>{course_group_name}
</span>
:
<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>
</ul>
}
{isAdmin && invite_code && <React.Fragment>
<span className="color-grey-9 font-16 ml10">邀请码</span>
<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) => {
// if(this.props.match.params.coursesId===undefined){
// this.props.history.push("/courses");
// this.props.history.push("/classrooms");
// }else{
// this.props.history.push(this.props.current_user.first_category_url);
// }
@ -681,14 +681,14 @@ class CoursesNew extends Component {
<div className={"educontent mb20"}>
{/*<Breadcrumb className="mt10" separator=">">*/}
{/* <Breadcrumb.Item>*/}
{/* <a href="/courses">翻转课堂</a>*/}
{/* <a href="/classrooms">翻转课堂</a>*/}
{/* </Breadcrumb.Item>*/}
{/* <Breadcrumb.Item>{this.props.match.params.coursesId === undefined ?"新建课堂":"编辑课堂"}</Breadcrumb.Item>*/}
{/*</Breadcrumb>*/}
<p className="clearfix mb20 mt10">
<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}
</a>

@ -488,7 +488,7 @@ class Goldsubject extends Component {
window.location.href=`/paths/${subjectids}`
}else{
// 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=()=>{
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.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>
@ -260,7 +260,7 @@ class Ordering extends Component{
<div className={"item-body"}>
<div className={"clearfix ds pr orderSection"}>
<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 "}>
<span className="topicswidth400">
<span className="topsics100 color-grey9 orderfontbom mr20 maxwidth795">{item.user_name}</span>

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

@ -166,7 +166,7 @@ class PollDetailIndex extends Component{
<p className="clearfix mb20">
<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>
<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>问卷详情</span>
</p>
@ -175,7 +175,7 @@ class PollDetailIndex extends Component{
<span className="mt3 fl" style={{height:"25px"}}>
<CoursesListType typelist={[`${map[pollDetail && pollDetail.polls_status]}`]} typesylename={""} />
</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>
<div>
<div className="clearfix edu-back-white pl30 pr30 bor-bottom-greyE">
@ -192,7 +192,7 @@ class PollDetailIndex extends Component{
{
isAdmin &&
<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 ?
@ -247,7 +247,7 @@ class PollDetailIndex extends Component{
<span className="fr mt22 font-16">
{
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.current_status == 1 ?
(polls_status===1?"":"查看答题")

@ -40,15 +40,15 @@ class PollInfo extends Component{
}
}
componentDidMount(){
if(this.props.current_user){
this.getInfo();
}
//window.addEventListener('scroll', this.handleScroll);
//window.addEventListener('scroll', this.handleScroll);
}
// 滚动定位
handleScroll=()=>{
if(parseInt(window.scrollY)>230){
@ -113,11 +113,11 @@ class PollInfo extends Component{
let txt=Object.assign({}, this.state.inputArray[parseInt(arr[1])]);
let ids=item.target.value;
let list=txt.answersList.filter(element => element.answer_id == ids);
this.postAnswer(arr[0],ids,list[0].answer_text=="其他"?txt.text:"",arr[1]);
}
//选中选择题(多选题)选项保存
//选中选择题(多选题)选项保存
ChangeOptionMuntil=(a_id,q_id,key)=>{
let ind=Object.assign({}, this.state.inputArray[parseInt(key)]);
let count=0;
@ -193,7 +193,7 @@ class PollInfo extends Component{
//提交主观题
commitText=(key,q_id)=>{
const text = Object.assign({}, this.state.inputArray[key]).text;
let url='/poll_questions/'+q_id+'/poll_votes.json?';
const ans=Object.assign({}, this.state.question_answered[key]);
@ -221,7 +221,7 @@ class PollInfo extends Component{
console.log(error);
})
}
}
// 提交
@ -259,7 +259,7 @@ class PollInfo extends Component{
}
}
cancelSubmit=()=>{
this.setState({
modalsType:false,
@ -268,7 +268,7 @@ class PollInfo extends Component{
})
}
sureSubmit=()=>{
let pollId=this.props.match.params.pollId;
let url=`/polls/${pollId}/commit_poll.json`
@ -280,7 +280,7 @@ class PollInfo extends Component{
modalsTopval:"",
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)=>{
console.log(error);
@ -317,18 +317,18 @@ class PollInfo extends Component{
<p className="clearfix mb20">
<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>
<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>
<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>
</p>
<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>
<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>
{
poll && poll.polls_description &&
@ -353,7 +353,7 @@ class PollInfo extends Component{
<span className="color-grey-9">主观题{question_types &&question_types.q_mains}</span>
}
</p>
<div className={ questionPanelFixed==true ? "questionsfixed":"questionsNo"}>
<p className="clearfix pl20">
<span className="mr40 answered">已答</span>
@ -383,7 +383,7 @@ class PollInfo extends Component{
<div className="pl30 pr30 mt30 mb10 clearfix">
<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.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">
{
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_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}>
{
item.question.answers && item.question.answers.map((i,k)=>{
@ -415,11 +415,11 @@ class PollInfo extends Component{
return(
<React.Fragment>
{
j.id == item.question.id ?
<Input type="text" className="otherTxt" autoComplete="off" value={j.text && j.text} name={key}
j.id == item.question.id ?
<Input type="text" className="otherTxt" autoComplete="off" value={j.text && j.text} name={key}
onInput={this.blurTxt}
onBlur={(e)=>this.saveInputAndAnswer(e,i.answer_id,item.question.id,key,item.question.question_type)}
/>
/>
: ""
}
</React.Fragment>
@ -437,12 +437,12 @@ class PollInfo extends Component{
}
{
//多选
item.question.question_type==2 &&
<Checkbox.Group
onChange={(value)=>this.ChangeOptionMuntil(value,item.question.id,key)}
disabled={isAdmin || (isStudent && poll && poll.user_poll_status == 1)?true:false}
defaultValue={item.question.poll_answer_ids}
className="answerList"
item.question.question_type==2 &&
<Checkbox.Group
onChange={(value)=>this.ChangeOptionMuntil(value,item.question.id,key)}
disabled={isAdmin || (isStudent && poll && poll.user_poll_status == 1)?true:false}
defaultValue={item.question.poll_answer_ids}
className="answerList"
name={key}>
{
item.question.answers && item.question.answers.map((i,k)=>{
@ -458,11 +458,11 @@ class PollInfo extends Component{
return(
<React.Fragment>
{
j.id == item.question.id ?
<Input type="text" className="otherTxt" autoComplete="off" value={j.text && j.text} name={key}
onInput={this.blurTxt}
j.id == item.question.id ?
<Input type="text" className="otherTxt" autoComplete="off" value={j.text && j.text} name={key}
onInput={this.blurTxt}
onBlur={(e)=>this.saveInputAndAnswer(e,i.answer_id,item.question.id,key,item.question.question_type)}
/>
/>
: ""
}
</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">
{
inputArray && inputArray.map((j,k)=>{
return(
<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>
: ""
}
@ -497,7 +497,7 @@ class PollInfo extends Component{
}
</div>
}
</div>
)
})
@ -505,7 +505,7 @@ class PollInfo extends Component{
</div>
</div>
{
isStudent && poll && poll.user_poll_status == 0 ?
isStudent && poll && poll.user_poll_status == 0 ?
<div className="mt30 mb50">
<a type="primary" className="defalutSubmitbtn" onClick={this.submitPoll}>提交</a>
</div>
@ -516,4 +516,4 @@ class PollInfo extends Component{
)
}
}
export default PollInfo;
export default PollInfo;

@ -37,19 +37,19 @@ class PollListItem extends Component{
render(){
let{item,checkBox,courseType,index}=this.props;
let {coursesId}=this.props.match.params;
const IsAdmin =this.props.isAdmin();
const isStudent = this.props.isStudent();
const isNotMember = this.props.isNotMember();
const isAdminOrStudent = this.props.isAdminOrStudent();
let t= item.end_time ? moment(item.end_time) - moment() : 0;
let canNotLink = !isAdminOrStudent && item.lock_status == 0
return(
<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`}>
{checkBox}
</span>
@ -59,10 +59,10 @@ class PollListItem extends Component{
{ 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>
:
<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">
<i className="iconfont icon-guansuo color-grey-c ml10 font-16 fl"></i>
</Tooltip>
@ -70,7 +70,7 @@ class PollListItem extends Component{
}
<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>:""
}
</p>
@ -88,11 +88,11 @@ class PollListItem extends Component{
<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>
}
{
item.polls_status ==2 && item.publish_time !=null &&
item.polls_status ==2 && item.publish_time !=null &&
<Tooltip title="提交剩余时间">
<span className="mr20 fl mt3">{"提交剩余时间:"+formatDuring(t)}</span>
</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>:""
}
{ 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">
{ canNotLink ?"": <WordsBtn style="blue" className="font-16" onClick={()=>this.toDetailPage(`/courses/${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="ml20 font-16" to={`/courses/${coursesId}/polls/${item.id}/detail?tab=3`}>设置</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={`/classrooms/${coursesId}/polls/${item.id}/${"edit"}`}>编辑</WordsBtn>
<WordsBtn style="blue" className="ml20 font-16" to={`/classrooms/${coursesId}/polls/${item.id}/detail?tab=3`}>设置</WordsBtn>
</ul>
}
</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,
})
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);
}
viewtraining = (userids) => {
@ -3015,7 +3015,7 @@ class Listofworksstudentone extends Component {
userids: data.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) => {
@ -3025,7 +3025,7 @@ class Listofworksstudentone extends Component {
userids: 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 = () => {

@ -756,7 +756,7 @@ class ShixunStudentWork extends Component {
width: '178px',
render: (text, record) => (
<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>
)
},
@ -1050,7 +1050,7 @@ export default ShixunStudentWork;
// jobsettingsdata&& jobsettingsdata.data === undefined ? ""
// : jobsettingsdata&& jobsettingsdata.data.commit_des === null || jobsettingsdata&& jobsettingsdata.data.commit_des === undefined ? "" :
// <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
// {...this.props}

@ -145,7 +145,7 @@ class ShixunWorkReport extends Component {
}
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)=>{
@ -354,11 +354,11 @@ class ShixunWorkReport extends Component {
<span className={"color-grey-9"}> {data&&data.course_name}</span>
</a>
<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>
</a>
<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>
<WordsBtn className="fl">{data&&data.username}</WordsBtn>
</p>

@ -313,15 +313,15 @@ class ShixunhomeWorkItem extends Component{
`}</style>
<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}
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}
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?
<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}
className="fl mt3 font-16 font-bd color-dark maxwidth333">{discussMessage.name}</a>:""
}
@ -367,7 +367,7 @@ class ShixunhomeWorkItem extends Component{
</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>:""}
{/*<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 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 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={`/classrooms/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${discussMessage.homework_id}/settings?tab=3`} > 设置</WordsBtn>
</span>:""}
@ -391,15 +391,15 @@ class ShixunhomeWorkItem extends Component{
</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?""
:<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 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,{
// project_id:taskid
// }).then((result)=>{
@ -528,4 +528,4 @@ export default ShixunhomeWorkItem;
// this.setState({
// visible:true
// })
// }
// }

@ -198,7 +198,7 @@ class ShixunWorkModal extends Component{
// 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){
notification.open({
message:"提示",
@ -350,4 +350,4 @@ export default ShixunWorkModal;
// </li>
// </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>
</div>
{/*<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>
{/*这里到时候要做判断*/}
@ -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.state.code_review === true || jobsettingsdata === undefined ? [""] : jobsettingsdata.data.homework_status[0] === "未发布" ? "" :*/}
{/* <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)}>*/}
{/* 代码查重</a> : ""}*/}
@ -672,11 +672,11 @@ export default Workquestionandanswer;
{/* jobsettingsdata&& jobsettingsdata.data === undefined ? ""*/}
{/* : jobsettingsdata&& jobsettingsdata.data.commit_des === null || jobsettingsdata&& jobsettingsdata.data.commit_des === undefined ? "" :*/}
{/* <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*/}
{/* {...this.props}*/}
{/* data={ jobsettingsdata&& jobsettingsdata.data}*/}
{/* />}*/}
{/* </div>*/}
{/*</div>*/}
{/*</div>*/}

@ -419,6 +419,7 @@ class Statistics extends Component{
}
{
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>
:""
}

@ -437,7 +437,7 @@ class CourseSupports extends Component {
Supportssum:true
})
return
}
}
if(editnum>1||editnum===0){
this.setState({
// Supportstype:true,
@ -624,7 +624,7 @@ class CourseSupports extends Component {
</div>
<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 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>
@ -655,7 +655,7 @@ class CourseSupports extends Component {
item.course_supports.map((t,kes)=>{
return(
<span key={kes} className="column-1"
<span key={kes} className="column-1"
style={{
display:Editkey!=key?"block":'none',
marginRight: '-1px'
@ -681,7 +681,7 @@ class CourseSupports extends Component {
<div className="left operationalter">
{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>
</a>}
</a>}
</div>
</div>

@ -10,7 +10,7 @@ import Loadable from 'react-loadable';
import Loading from "../../../Loading";
const { Step } = Steps;
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({
loader: () => import('../subroute/ecStudentList/EcStudentList'),
loading: Loading,
@ -83,7 +83,7 @@ class EcSetting extends React.Component {
let type = stepTypes[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`);
// }else {
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'
render={ (props) => (<RequirementVsStandard {...this.props} {...props} {...this.state} />) }></Route>
{/*学生*/}
<Route extra path='/ecs/major_schools/:majorId/years/:yearId/students'
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>
{/*课程体系资源子页面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>
{/*课程体系VS毕业要求*/}
<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>
{/*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>
{/*课程考核方式与数据来源*/}
<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>
{/*成绩等级设置*/}
<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>
{/*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>
{/*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>
</Switch>
</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);
}
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.ysljoinmodalCanceltwo();
if(cousestype===1){
window.open(`/courses/${id}/informs`)
window.open(`/classrooms/${id}/informs`)
}
}else {
this.props.showNotification(result.data.message);

@ -102,16 +102,16 @@ debugger
var rurls="";
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"){
//分组作业
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"){
// 试卷
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") {
//问卷
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');
}catch (e) {
@ -124,16 +124,16 @@ debugger
var rurls="";
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"){
//分组作业
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"){
// 试卷
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") {
//问卷
rurls=`/courses/${this.state.Radiolist}/polls/${result.data.category_id}`
rurls=`/classrooms/${this.state.Radiolist}/polls/${result.data.category_id}`
}
window.open(rurls,'_blank');
}catch (e) {
@ -231,6 +231,6 @@ debugger
</div>
)
}
}
export default SendTopics;
export default SendTopics;

@ -658,7 +658,7 @@ class DetailTop extends Component{
if(item.course_identity<4){
return(
<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>
</a>
</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)
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{
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();
}
@ -97,4 +97,4 @@ class OpenCourse extends Component {
}
}
export default OpenCourse;
export default OpenCourse;

@ -199,7 +199,7 @@ class ShixunPathSearch extends Component {
}
return (
<div>
<div className='shixun-path-search-container'>
{this.state.updata === undefined ? "" : <UpgradeModals
{...this.state}
/>}

@ -1,39 +1,45 @@
.pathImg{
.pathImg {
background: #4CACFF
}
.pathIndexNav{
box-shadow:0px 4px 8px 0px rgba(0,0,0,0.04);
.pathIndexNav {
box-shadow: 0px 4px 8px 0px rgba(0, 0, 0, 0.04);
}
.pathIndexNav ul li{
.pathIndexNav ul li {
float: left;
margin-right: 10px;
}
.pathIndexNav ul li a{
.pathIndexNav ul li a {
display: block;
font-size: 15px;
color: #333333;
padding:0px 20px;
border-radius:18px;
padding: 0px 20px;
border-radius: 18px;
height: 32px;
line-height: 32px;
margin:5px 0px;
margin: 5px 0px;
}
.pathIndexNav ul li.active a,.pathIndexNav ul li:hover a{
.pathIndexNav ul li.active a,
.pathIndexNav ul li:hover a {
background: #DDECF9;
color: #4CACFF
}
/*.pathImg{*/
/*width: 100%;*/
/*height: 300px;*/
/*background-image: url(../../images/path/path.png);*/
/*background-color: #000a4f;*/
/*!* background-size: cover; *!*/
/*background-position: center;*/
/*background-repeat: no-repeat;*/
/*width: 100%;*/
/*height: 300px;*/
/*background-image: url(../../images/path/path.png);*/
/*background-color: #000a4f;*/
/*!* background-size: cover; *!*/
/*background-position: center;*/
/*background-repeat: no-repeat;*/
/*}*/
/* 首页-最新最热 */
.mainPageArray span{
.mainPageArray span {
font-size: 14px;
float: left;
background: #EBEBEB;
@ -45,13 +51,14 @@
cursor: pointer;
border-radius: 15px;
}
.mainPageArray span.active{
.mainPageArray span.active {
background: #4CACFF;
color: #fff;
}
/* path-card */
.squareCard{
.squareCard {
position: relative;
width: 280px;
margin-right: 26px;
@ -59,10 +66,12 @@
float: left;
border-radius: 6px;
}
.squareCard:nth-child(4n){
.squareCard:nth-child(4n) {
margin-right: 0px;
}
.squareCard .squareImg{
.squareCard .squareImg {
height: 175px;
width: 280px;
overflow: hidden;
@ -70,7 +79,8 @@
border-radius: 6px;
position: relative;
}
.squareCard .squareImg img{
.squareCard .squareImg img {
transition: all 1s;
-webkit-transition: all 1s;
-o-transition: all 1s;
@ -78,12 +88,13 @@
position: absolute;
top: -17.5px;
}
.squareCard .squareImg img:hover{
.squareCard .squareImg img:hover {
transform: scale(1.05);
}
/* card info */
.cardName{
.cardName {
font-size: 16px;
font-weight: 600;
height: 20px;
@ -91,16 +102,17 @@
margin-bottom: 10px;
}
.squareLine:after{
.squareLine:after {
position: absolute;
width: 1px;
height: 10px;
background: #adadad;
content: '';
right: -10px;
top:4px;
top: 4px;
}
.squareInfo{
.squareInfo {
color: #777;
font-size: 12px;
font-weight: 400;
@ -115,6 +127,7 @@
top: 12px;
z-index: 1;
}
.tag_open .tag_open_name {
display: block;
width: auto;
@ -130,11 +143,11 @@
.paragraph:hover .status_li a{
.paragraph:hover .status_li a {
display: block;
}
.newedu-filter-btn{
.newedu-filter-btn {
display: block;
float: left;
padding: 0 9px;
@ -147,7 +160,7 @@
margin-bottom: 9px;
}
.edu-filter-btn29BD8B{
.edu-filter-btn29BD8B {
display: block;
float: left;
padding: 0 9px;
@ -160,115 +173,163 @@
margin-bottom: 9px;
}
.lesson-saved-list-item{
border-bottom: none!important;
.lesson-saved-list-item {
border-bottom: none !important;
margin-bottom: 10px;
background-color: #fff;
}
.click_add{
border-top: none!important;
.click_add {
border-top: none !important;
}
.white-panel li {
border: 1px solid #fafafa !important;
}
.white-panel li.active {
border: 1px solid #4CACFF !important;
}
.white-panel li{border:1px solid #fafafa!important;}
.white-panel li.active{border:1px solid #4CACFF!important;}
/* 选择实训列表 */
.greybackHead{height: 40px;line-height: 40px;padding: 0px 20px;box-sizing: border-box;color: #676767;background-color: #eaeaea;}
.greybackHead {
height: 40px;
line-height: 40px;
padding: 0px 20px;
box-sizing: border-box;
color: #676767;
background-color: #eaeaea;
}
.mtf3{
margin-top:-3px;
.mtf3 {
margin-top: -3px;
}
.mtf5{
.mtf5 {
margin-top: -5px;
}
.color204{
color:rgba(204,204,204,1);
.color204 {
color: rgba(204, 204, 204, 1);
}
.lesson-saved-list-itemdrop{
height: 93px;
overflow: hidden;
.lesson-saved-list-itemdrop {
height: 93px;
overflow: hidden;
}
.lesson-saved-list{
position: relative;
.lesson-saved-list {
position: relative;
}
.itempositionleft{
position: absolute;
.itempositionleft {
position: absolute;
}
.itempositionright{
position: absolute;
.itempositionright {
position: absolute;
}
.ant-input{
background-color: #fafafa!important;
.ant-input {
background-color: #fafafa !important;
}
.ant-input:focus{
background-color:#ffffff!important;
.ant-input:focus {
background-color: #ffffff !important;
}
.pathNavLine{bottom: -11px;}
.pathNavLine {
bottom: -11px;
}
#shixun_operation:hover{
color:#fff !important;
#shixun_operation:hover {
color: #fff !important;
}
.cursor{
cursor: pointer;
.cursor {
cursor: pointer;
}
.paragraph_nameid:hover{
color:#4cacff !important;
.paragraph_nameid:hover {
color: #4cacff !important;
}
/* 学习统计 */
.statisticsNav{height: 100px;}
.statisticsNav ul{margin-top: 35px;}
.statisticsNav ul li{float: left;font-size: 18px;color: #4D4D4D;height: 64px;line-height: 64px;margin:0px 30px;cursor: pointer;}
.statisticsNav ul li a{color: #4D4D4D!important;}
.statisticsNav ul li.active{color: #05101A;border-bottom: 2px solid #05101A;}
.statisticsNav ul li.active a{color: #05101A!important; text-decoration: none !important;}
.statisticsNav {
height: 100px;
}
.statisticsNav ul {
margin-top: 35px;
}
.statisticsNav ul li {
float: left;
font-size: 18px;
color: #4D4D4D;
height: 64px;
line-height: 64px;
margin: 0px 30px;
cursor: pointer;
}
.statisticsNav ul li a {
color: #4D4D4D !important;
}
.next-loading{
width:100%;
}
.statisticsNav ul li.active {
color: #05101A;
border-bottom: 2px solid #05101A;
}
.paddingleft22{
text-align: left;
padding-left: 22px;
.statisticsNav ul li.active a {
color: #05101A !important;
text-decoration: none !important;
}
.paddingl5{
padding-left: 5px;
.next-loading {
width: 100%;
}
.paddingl10{
padding-left: 10px;
.paddingleft22 {
text-align: left;
padding-left: 22px;
}
.red{
color:red;
.paddingl5 {
padding-left: 5px;
}
.pl38{
padding-left: 38px;
.paddingl10 {
padding-left: 10px;
}
.ml37{
margin-left: 37px;
.red {
color: red;
}
.pl38 {
padding-left: 38px;
}
.ml37 {
margin-left: 37px;
}
.newmustlearn {
padding: 34px 25px;
text-align: center;
padding: 34px 25px;
text-align: center;
}
.color181818 {
color: #181818;
}
.color181818{
color: #181818;
.colorD5D8D6 {
color: #D5D8D6;
}
.colorD5D8D6{
color:#D5D8D6;
.shixun-path-search-container .search-keyword-container {
padding: 20px 0 0 0;
}

@ -262,7 +262,7 @@ class NewHeader extends Component {
})
if (submitapplicationssum === 0) {
if (submitapplicationsvaluedata != undefined) {
window.location.href = "/courses/" + submitapplicationsvaluedata;
window.location.href = "/classrooms/" + submitapplicationsvaluedata;
}
} else if (submitapplicationssum === 1) {
if (submitapplicationsvaluedata != undefined) {
@ -672,7 +672,7 @@ class NewHeader extends Component {
return true
} else if (url.startsWith('/paths') && match.path.startsWith('/paths')) {
return true
} else if (url.startsWith('/courses') && match.path.startsWith('/courses')) {
} else if (url.startsWith('/classrooms') && match.path.startsWith('/classrooms')) {
return true
} else if (url.startsWith('/competitions') && match.path.startsWith('/competitions')) {
return true
@ -732,7 +732,7 @@ class NewHeader extends Component {
activeShixuns = true;
} else if (match.path.startsWith('/paths')) {
activePaths = true;
} else if (match.path.startsWith('/courses')) {
} else if (match.path.startsWith('/classrooms')) {
coursestype = true;
} else if (match.path.startsWith('/crowdsourcing')) {
activePackages = true;
@ -782,7 +782,7 @@ class NewHeader extends Component {
if (this.props && this.props.mygetHelmetapi != null) {
let shixun = "/shixuns";
let paths = "/paths";
let courses = "/courses";
let courses = "/classrooms";
this.props.mygetHelmetapi.navbar.map((item, key) => {
var reg = RegExp(item.link);
if (shixun.match(reg)) {
@ -995,10 +995,10 @@ class NewHeader extends Component {
<Link to={this.props.Headertop === undefined ? "" : '/paths'}>实践课程</Link>
</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'}`}>
{/*<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 className={`${activeShixuns === true ? 'pr active' : 'pr'}`}>
<Link to="/shixuns">实训项目</Link>
@ -1185,7 +1185,7 @@ class NewHeader extends Component {
<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"}>
{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 ? "" :
<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} />
{/* /courses/join_course_multi_role */}
{/* /classrooms/join_course_multi_role */}
{this.props.user && this.props.user.main_site === true ? <li>
<a onClick={this.tojoinitem}>加入开发项目</a>
</li> : ""}

@ -162,7 +162,7 @@ export function TPMIndexHOC(WrappedComponent) {
document.title="实训项目";
}else if(this.props.match.path==="/paths"){
document.title="实践课程";
}else if(this.props.match.path==="/courses"){
}else if(this.props.match.path==="/classrooms"){
document.title="教学课堂";
}
@ -176,7 +176,7 @@ export function TPMIndexHOC(WrappedComponent) {
// document.title="EduCoder-IT实践教学平台_信息技术类精品课程网_大学生MOOC平台";
// }else if(this.props.match.path==="/paths"){
// 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";
// }else if(this.props.match.path==="/competitions"){
// document.title="在线竞赛_计算机应用大赛_编程大赛_大学生设计大赛_全国高校绿色计算大赛-EduCoder";
@ -402,7 +402,7 @@ export function TPMIndexHOC(WrappedComponent) {
let courseId;
let query = this.props.location.pathname;
const type = query.split('/');
if (type[1] == 'courses' && type[2]) {
if (type[1] == 'classrooms' && type[2]) {
courseId = parseInt(type[2])
// url += `?course_id=${courseId}`
}
@ -466,7 +466,7 @@ export function TPMIndexHOC(WrappedComponent) {
let courseId;
let query = this.props.location.pathname;
const type = query.split('/');
if (type[1] == 'courses' && type[2]) {
if (type[1] == 'classrooms' && type[2]) {
courseId = parseInt(type[2])
// url += `?course_id=${courseId}`
}

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

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

@ -40,7 +40,7 @@ class InfosBanner extends Component{
if(this.props&&this.props.mygetHelmetapi!=null){
let shixun="/shixuns";
let paths="/paths";
let courses="/courses";
let courses="/classrooms";
this.props.mygetHelmetapi.navbar.map((item,key)=>{
var reg = RegExp(item.link);
if(shixun.match(reg)){
@ -117,9 +117,9 @@ class InfosBanner extends Component{
</div>
</div>
<div className="userNav">
{coursestypes===true?"":<li className={`${moduleName == 'courses' ||moduleName == undefined ? 'active' : '' }`}>
{coursestypes===true?"":<li className={`${moduleName == 'classrooms' ||moduleName == undefined ? 'active' : '' }`}>
<Link
onClick={() => this.setState({moduleName: 'courses'})}
onClick={() => this.setState({moduleName: 'classrooms'})}
to={`/users/${username}/courses`}>教学课堂</Link>
</li>}
{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 */}
{
page == 1 && is_current && !category &&
this.props.current_user && this.props.current_user.user_identity != "学生" ?
<Create href={"/courses/new"} name={"新建课堂"} index="1"></Create> : ""
this.props.current_user && this.props.current_user.user_identity != "学生" ?
<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>

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

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

Loading…
Cancel
Save