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

courseware
daiao 5 years ago
commit 4220be6be0

@ -374,6 +374,7 @@ class StudentWorksController < ApplicationController
new_score.comment = params[:comment] if params[:comment] && params[:comment].strip != "" new_score.comment = params[:comment] if params[:comment] && params[:comment].strip != ""
new_score.user_id = current_user.id new_score.user_id = current_user.id
new_score.student_work_id = @work.id new_score.student_work_id = @work.id
new_score.homework_common_id = @work.homework_common_id
# 如果作品是未提交的状态则更新为已提交 # 如果作品是未提交的状态则更新为已提交
if @user_course_identity < Course::STUDENT && !new_score.score.nil? && @work.work_status == 0 if @user_course_identity < Course::STUDENT && !new_score.score.nil? && @work.work_status == 0
@ -553,8 +554,10 @@ class StudentWorksController < ApplicationController
# 分数不为空的历史评阅都置为失效 # 分数不为空的历史评阅都置为失效
@work.student_works_scores.where.not(score: nil).update_all(is_invalid: 1) @work.student_works_scores.where.not(score: nil).update_all(is_invalid: 1)
reviewer_role = @user_course_identity == Course::ASSISTANT_PROFESSOR ? 2 : 1 reviewer_role = @user_course_identity == Course::ASSISTANT_PROFESSOR ? 2 : 1
new_score = StudentWorksScore.new(student_work_id: @work.id, score: params[:score].to_f, comment: "使用调分功能调整了作业最终成绩:#{params[:comment]}", new_score = StudentWorksScore.new(student_work_id: @work.id, score: params[:score].to_f,
user_id: current_user.id, reviewer_role: reviewer_role, is_ultimate: 1) comment: "使用调分功能调整了作业最终成绩:#{params[:comment]}",
homework_common_id: @work.homework_common_id, user_id: current_user.id,
reviewer_role: reviewer_role, is_ultimate: 1)
new_score.save! new_score.save!
# 如果作品是未提交的状态则更新为已提交 # 如果作品是未提交的状态则更新为已提交
@ -844,7 +847,7 @@ class StudentWorksController < ApplicationController
def add_score_to_member student_work, homework, new_score def add_score_to_member student_work, homework, new_score
student_works = homework.student_works.where("group_id = #{student_work.group_id} and id != #{student_work.id} and ultimate_score = 0") student_works = homework.student_works.where("group_id = #{student_work.group_id} and id != #{student_work.id} and ultimate_score = 0")
student_works.each do |st_work| student_works.each do |st_work|
st_score = StudentWorksScore.new(user_id: new_score.user_id, score: new_score.score, st_score = StudentWorksScore.new(user_id: new_score.user_id, score: new_score.score, homework_common_id: homework.id,
reviewer_role: new_score.reviewer_role, comment: new_score.comment) reviewer_role: new_score.reviewer_role, comment: new_score.comment)
score = StudentWorksScore.where(user_id: new_score.user_id, student_work_id: st_work.id, reviewer_role: new_score.reviewer_role).last score = StudentWorksScore.where(user_id: new_score.user_id, student_work_id: st_work.id, reviewer_role: new_score.reviewer_role).last

@ -6,6 +6,7 @@ class HomeworkCommon < ApplicationRecord
has_many :student_works, -> { where(is_delete: 0) } has_many :student_works, -> { where(is_delete: 0) }
has_many :score_student_works, -> { where("is_delete = 0 and work_status != 0").order("work_score desc") }, class_name: "StudentWork" has_many :score_student_works, -> { where("is_delete = 0 and work_status != 0").order("work_score desc") }, class_name: "StudentWork"
has_one :homework_detail_manual, dependent: :destroy has_one :homework_detail_manual, dependent: :destroy
has_many :student_works_scores
# 分组作业的设置 # 分组作业的设置
has_one :homework_detail_group, dependent: :destroy has_one :homework_detail_group, dependent: :destroy

@ -46,7 +46,17 @@ class StudentWork < ApplicationRecord
# 匿评次数 # 匿评次数
def student_comment_num def student_comment_num
homework_common.homework_detail_manual.comment_status > 2 ? self.student_works_scores.select{|score| score.reviewer_role == 3}.group_by(&:user_id).count : 0 homework_common.homework_detail_manual.comment_status > 2 && work_status > 0 ? self.student_works_scores.select{|score| score.reviewer_role == 3}.group_by(&:user_id).count : 0
end
# 学生评阅作品数
def user_comment_num
if homework_common.homework_detail_manual.comment_status > 2 && work_status > 0
count = homework_common.student_works_scores.select{|score| score.reviewer_role == 3 && score.user_id == user_id}.group_by(&:student_work_id).count
else
count = 0
end
count
end end
# 匿评申诉总条数 # 匿评申诉总条数

@ -2,6 +2,7 @@ class StudentWorksScore < ApplicationRecord
#appeal_status: 0正常1申诉中2撤销申诉3申诉成功4申诉被拒绝5申诉失效 #appeal_status: 0正常1申诉中2撤销申诉3申诉成功4申诉被拒绝5申诉失效
belongs_to :student_work belongs_to :student_work
belongs_to :user belongs_to :user
belongs_to :homework_common, optional: true
has_many :journals_for_messages, -> { order('created_on desc') }, as: :jour, dependent: :destroy has_many :journals_for_messages, -> { order('created_on desc') }, as: :jour, dependent: :destroy
has_one :student_works_scores_appeal, dependent: :destroy has_one :student_works_scores_appeal, dependent: :destroy
has_many :tidings, as: :container, dependent: :destroy has_many :tidings, as: :container, dependent: :destroy

@ -63,6 +63,7 @@ elsif @user_course_identity == Course::STUDENT
if @homework.anonymous_comment if @homework.anonymous_comment
json.student_comment_count @work.student_comment_num json.student_comment_count @work.student_comment_num
json.user_comment_count @work.user_comment_num
json.absence_penalty @work.absence_penalty json.absence_penalty @work.absence_penalty
end end
@ -147,7 +148,8 @@ elsif @homework.homework_type == "group" || @homework.homework_type == "normal"
# 作品匿评条数 # 作品匿评条数
if @homework.anonymous_comment if @homework.anonymous_comment
json.student_comment_count @homework_detail_manual.comment_status > 2 ? work.student_comment_num : 0 json.student_comment_count @homework_detail_manual.comment_status > 2 && work.work_status > 0 ? work.student_comment_num : 0
json.user_comment_count @homework_detail_manual.comment_status > 2 && work.work_status > 0 ? work.user_comment_num : 0
json.absence_penalty work.absence_penalty json.absence_penalty work.absence_penalty
end end

@ -0,0 +1,5 @@
class AddHomeworkCommonIdToStudentWorksScore < ActiveRecord::Migration[5.2]
def change
add_column :student_works_scores, :homework_common_id, :integer, default: 0, index: true
end
end

@ -0,0 +1,7 @@
class MigrateStudentWorksScoreHomework < ActiveRecord::Migration[5.2]
def change
StudentWorksScore.includes(:student_work).find_each do |score|
score.update_column("homework_common_id", score.student_work&.homework_common_id)
end
end
end

@ -247,8 +247,8 @@ class CommonWorkDetailIndex extends Component{
`}</style> `}</style>
{current_user && <CBreadcrumb items={[ {current_user && <CBreadcrumb items={[
{ to: current_user&&current_user.first_category_url , name: course_name}, { to: current_user&&current_user.first_category_url , name: course_name},
{ to: `/courses/${courseId}/${moduleEngName}/${category_id}`, name: category_name }, { to: `/classrooms/${courseId}/${moduleEngName}/${category_id}`, name: category_name },
window.location.pathname.indexOf('appraise') == -1 ? { } : { to: `/courses/${courseId}/${moduleEngName}/${workId}/list`, name: '作业详情' }, window.location.pathname.indexOf('appraise') == -1 ? { } : { to: `/classrooms/${courseId}/${moduleEngName}/${workId}/list`, name: '作业详情' },
// 1. 与上一条联动当匿评他人作品时TA人作品的作者真实姓名切换为“匿名” // 1. 与上一条联动当匿评他人作品时TA人作品的作者真实姓名切换为“匿名”
window.location.pathname.indexOf('appraise') == -1 ? { name: '作业详情' } : { name: author_name }, window.location.pathname.indexOf('appraise') == -1 ? { name: '作业详情' } : { name: author_name },
// window.location.pathname.indexOf('appraise') == -1 ? { } : { to: `/courses/${courseId}/${moduleEngName}/${workId}/list`, name: '作品列表' }, // window.location.pathname.indexOf('appraise') == -1 ? { } : { to: `/courses/${courseId}/${moduleEngName}/${workId}/list`, name: '作品列表' },
@ -296,20 +296,20 @@ class CommonWorkDetailIndex extends Component{
<Link <Link
onClick={() => this.setState({moduleName: '作品列表'})} onClick={() => this.setState({moduleName: '作品列表'})}
className={`${isListModule ? 'active' : '' } `} className={`${isListModule ? 'active' : '' } `}
to={`/courses/${courseId}/${moduleEngName}/${workId}/list`}>作品列表</Link> to={`/classrooms/${courseId}/${moduleEngName}/${workId}/list`}>作品列表</Link>
<Link <Link
onClick={() => this.setState({moduleName: '作业描述'})} onClick={() => this.setState({moduleName: '作业描述'})}
className={`${childModuleName == '作业描述' ? 'active' : '' } `} className={`${childModuleName == '作业描述' ? 'active' : '' } `}
to={`/courses/${courseId}/${moduleEngName}/${workId}/question`}>作业描述</Link> to={`/classrooms/${courseId}/${moduleEngName}/${workId}/question`}>作业描述</Link>
{view_answer == true && <Link {view_answer == true && <Link
onClick={() => this.setState({moduleName: '参考答案'})} onClick={() => this.setState({moduleName: '参考答案'})}
className={`${childModuleName == '参考答案' ? 'active' : '' } `} className={`${childModuleName == '参考答案' ? 'active' : '' } `}
to={`/courses/${courseId}/${moduleEngName}/${workId}/answer`}>参考答案</Link>} to={`/classrooms/${courseId}/${moduleEngName}/${workId}/answer`}>参考答案</Link>}
<Link <Link
onClick={() => this.setState({moduleName: '设置'})} onClick={() => this.setState({moduleName: '设置'})}
className={`${childModuleName == '设置' ? 'active' : '' } `} className={`${childModuleName == '设置' ? 'active' : '' } `}
style={{paddingLeft:this.props.isAdmin()?'38px':'20px'}} style={{paddingLeft:this.props.isAdmin()?'38px':'20px'}}
to={`/courses/${courseId}/${moduleEngName}/${workId}/setting`}>{this.props.isAdmin()?"设置":"得分规则"}</Link> to={`/classrooms/${courseId}/${moduleEngName}/${workId}/setting`}>{this.props.isAdmin()?"设置":"得分规则"}</Link>
{/* { this.props.tabRightComponents } */} {/* { this.props.tabRightComponents } */}

@ -51,9 +51,9 @@ export function RouteHOC(options = {}) {
const topicId = _courseId.topicId const topicId = _courseId.topicId
const workId = _courseId.workId const workId = _courseId.workId
const courseId = _courseId.coursesId const courseId = _courseId.coursesId
this.props.history.push(`/courses/${courseId}/boards/${workId}/messages/${topicId}`) this.props.history.push(`/classrooms/${courseId}/boards/${workId}/messages/${topicId}`)
} else { } else {
this.props.history.push(`/courses/${_courseId}/boards/${workId}/messages/${topicId}`) this.props.history.push(`/classrooms/${_courseId}/boards/${workId}/messages/${topicId}`)
} }
} }
@ -62,9 +62,9 @@ export function RouteHOC(options = {}) {
if (typeof _courseId == "object") { if (typeof _courseId == "object") {
const workId = _courseId.workId const workId = _courseId.workId
const courseId = _courseId.coursesId const courseId = _courseId.coursesId
this.props.history.push(`/courses/${courseId}/${secondName}/${_workId || workId}/edit`) this.props.history.push(`/classrooms/${courseId}/${secondName}/${_workId || workId}/edit`)
} else { } else {
this.props.history.push(`/courses/${_courseId}/${secondName}/${_workId}/edit`) this.props.history.push(`/classrooms/${_courseId}/${secondName}/${_workId}/edit`)
} }
} }
toWorkDetailPage = (_courseId, _workId, _studentWorkId) => { toWorkDetailPage = (_courseId, _workId, _studentWorkId) => {
@ -73,9 +73,9 @@ export function RouteHOC(options = {}) {
const workId = _courseId.workId const workId = _courseId.workId
const courseId = _courseId.coursesId const courseId = _courseId.coursesId
const studentWorkId = _courseId.studentWorkId const studentWorkId = _courseId.studentWorkId
window.open(`/courses/${courseId}/${secondName}/${_workId || workId}/${_studentWorkId || studentWorkId}/appraise`); window.open(`/classrooms/${courseId}/${secondName}/${_workId || workId}/${_studentWorkId || studentWorkId}/appraise`);
} else { } else {
window.open(`/courses/${_courseId}/${secondName}/${_workId}/${_studentWorkId}/appraise`); window.open(`/classrooms/${_courseId}/${secondName}/${_workId}/${_studentWorkId}/appraise`);
} }
} }
toWorkDetailPage2 = (e, _courseId, _workId, _studentWorkId) => { toWorkDetailPage2 = (e, _courseId, _workId, _studentWorkId) => {
@ -86,23 +86,23 @@ export function RouteHOC(options = {}) {
const workId = _courseId.workId const workId = _courseId.workId
const courseId = _courseId.coursesId const courseId = _courseId.coursesId
const studentWorkId = _courseId.studentWorkId const studentWorkId = _courseId.studentWorkId
window.open(`/courses/${courseId}/${secondName}/${_workId || workId}/${_studentWorkId || studentWorkId}/appraise`); window.open(`/classrooms/${courseId}/${secondName}/${_workId || workId}/${_studentWorkId || studentWorkId}/appraise`);
} else { } else {
window.open(`/courses/${_courseId}/${secondName}/${_workId}/${_studentWorkId}/appraise`); window.open(`/classrooms/${_courseId}/${secondName}/${_workId}/${_studentWorkId}/appraise`);
} }
} }
toNewPage = (courseId) => { toNewPage = (courseId) => {
const secondName = this.getModuleName() const secondName = this.getModuleName()
this.props.history.push(`/courses/${courseId.coursesId}/${secondName}/${courseId.category_id}/new`) this.props.history.push(`/classrooms/${courseId.coursesId}/${secondName}/${courseId.category_id}/new`)
} }
toListPage = (_courseId, _workId) => { toListPage = (_courseId, _workId) => {
const secondName = this.getModuleName() const secondName = this.getModuleName()
if (typeof _courseId == "object") { if (typeof _courseId == "object") {
const workId = _courseId.workId const workId = _courseId.workId
const courseId = _courseId.coursesId const courseId = _courseId.coursesId
this.props.history.push(`/courses/${courseId}/${secondName}/${_workId || workId}`) this.props.history.push(`/classrooms/${courseId}/${secondName}/${_workId || workId}`)
} else { } else {
this.props.history.push(`/courses/${_courseId}/${secondName}${_workId ? '/' + _workId : ''}`) this.props.history.push(`/classrooms/${_courseId}/${secondName}${_workId ? '/' + _workId : ''}`)
} }
} }
@ -113,9 +113,9 @@ export function RouteHOC(options = {}) {
const workId = _courseId.workId const workId = _courseId.workId
const courseId = _courseId.coursesId const courseId = _courseId.coursesId
const studentWorkId = _courseId.studentWorkId const studentWorkId = _courseId.studentWorkId
this.props.history.push(`/courses/${courseId}/${secondName}/${_workId || workId}/${isEdit? `${_studentWorkId || studentWorkId}/post_edit` : 'post'}`) this.props.history.push(`/classrooms/${courseId}/${secondName}/${_workId || workId}/${isEdit? `${_studentWorkId || studentWorkId}/post_edit` : 'post'}`)
} else { } else {
this.props.history.push(`/courses/${_courseId}/${secondName}/${_workId}/${isEdit? `${_studentWorkId}/post_edit` : 'post'}`) this.props.history.push(`/classrooms/${_courseId}/${secondName}/${_workId}/${isEdit? `${_studentWorkId}/post_edit` : 'post'}`)
} }
} }
toWorkListPage = (_courseId, _workId) => { toWorkListPage = (_courseId, _workId) => {
@ -123,9 +123,9 @@ export function RouteHOC(options = {}) {
if (typeof _courseId == "object") { if (typeof _courseId == "object") {
const workId = _courseId.workId const workId = _courseId.workId
const courseId = _courseId.coursesId const courseId = _courseId.coursesId
this.props.history.push(`/courses/${courseId}/${secondName}/${_workId || workId}/list`) this.props.history.push(`/classrooms/${courseId}/${secondName}/${_workId || workId}/list`)
} else { } else {
this.props.history.push(`/courses/${_courseId}/${secondName}/${_workId}/list`) this.props.history.push(`/classrooms/${_courseId}/${secondName}/${_workId}/list`)
} }
} }
toWorkAnswerPage = (_courseId, _workId) => { toWorkAnswerPage = (_courseId, _workId) => {
@ -133,9 +133,9 @@ export function RouteHOC(options = {}) {
if (typeof _courseId == "object") { if (typeof _courseId == "object") {
const workId = _courseId.workId const workId = _courseId.workId
const courseId = _courseId.coursesId const courseId = _courseId.coursesId
this.props.history.push(`/courses/${courseId}/${secondName}/${workId}/answer`) this.props.history.push(`/classrooms/${courseId}/${secondName}/${workId}/answer`)
} else { } else {
this.props.history.push(`/courses/${_courseId}/${secondName}/${_workId}/answer`) this.props.history.push(`/classrooms/${_courseId}/${secondName}/${_workId}/answer`)
} }
} }
@ -144,9 +144,9 @@ export function RouteHOC(options = {}) {
if (typeof _courseId == "object") { if (typeof _courseId == "object") {
const workId = _workId || _courseId.workId const workId = _workId || _courseId.workId
const courseId = _courseId.coursesId const courseId = _courseId.coursesId
this.props.history.push(`/courses/${courseId}/${secondName}/${workId}/question`) this.props.history.push(`/classrooms/${courseId}/${secondName}/${workId}/question`)
} else { } else {
this.props.history.push(`/courses/${_courseId}/${secondName}/${_workId}/question`) this.props.history.push(`/classrooms/${_courseId}/${secondName}/${_workId}/question`)
} }
} }
@ -155,9 +155,9 @@ export function RouteHOC(options = {}) {
if (typeof _courseId == "object") { if (typeof _courseId == "object") {
const workId = _courseId.workId const workId = _courseId.workId
const courseId = _courseId.coursesId const courseId = _courseId.coursesId
this.props.history.push(`/courses/${courseId}/${secondName}/${_workId || workId}/setting`) this.props.history.push(`/classrooms/${courseId}/${secondName}/${_workId || workId}/setting`)
} else { } else {
this.props.history.push(`/courses/${_courseId}/${secondName}/${_workId}/setting`) this.props.history.push(`/classrooms/${_courseId}/${secondName}/${_workId}/setting`)
} }
} }

@ -88,7 +88,7 @@ class GraduateTopicDetail extends Component{
} }
}) })
} }
render(){ render(){
let { let {
tableData, tableData,
@ -114,7 +114,7 @@ class GraduateTopicDetail extends Component{
<p className="clearfix mb20 lineh-25"> <p className="clearfix mb20 lineh-25">
<span className="color-grey-3 font-24 fl task-hide" style={{lineHeight:"25px",maxWidth:"900px"}}>{tableData && tableData.graduation_topic_name}</span> <span className="color-grey-3 font-24 fl task-hide" style={{lineHeight:"25px",maxWidth:"900px"}}>{tableData && tableData.graduation_topic_name}</span>
<span className="fl mt1" style={{height:"25px"}}><CoursesListType typelist={[`${tableData && tableData.status_name}`]} typesylename={""} /></span> <span className="fl mt1" style={{height:"25px"}}><CoursesListType typelist={[`${tableData && tableData.status_name}`]} typesylename={""} /></span>
<WordsBtn className="fr font-16 mt1" style="grey" to={`/courses/${tableData.course_id}/graduation_topics/${tableData.graduation_id}`}>返回</WordsBtn> <WordsBtn className="fr font-16 mt1" style="grey" to={`/classrooms/${tableData.course_id}/graduation_topics/${tableData.graduation_id}`}>返回</WordsBtn>
</p> </p>
<div> <div>
<div className="clearfix edu-back-white bor-bottom-greyE" > <div className="clearfix edu-back-white bor-bottom-greyE" >
@ -141,7 +141,7 @@ class GraduateTopicDetail extends Component{
tab && tab==1&& tab && tab==1&&
<div> <div>
<div className="minH-560 edu-back-white"> <div className="minH-560 edu-back-white">
<DetailTable {...this.props} {...this.state} tableData={tableData} page={tablePage} getDetailList={this.getDetailList}></DetailTable> <DetailTable {...this.props} {...this.state} tableData={tableData} page={tablePage} getDetailList={this.getDetailList}></DetailTable>
</div> </div>
{ {
tableData && tableData.users_count>tablePageSize && tableData && tableData.users_count>tablePageSize &&
@ -161,4 +161,4 @@ class GraduateTopicDetail extends Component{
) )
} }
} }
export default GraduateTopicDetail; export default GraduateTopicDetail;

@ -10,9 +10,9 @@ class GraduateTopicItem extends Component{
constructor(props){ constructor(props){
super(props); super(props);
} }
editTopic=(topicId)=>{ editTopic=(topicId)=>{
let courseId=this.props.match.params.coursesId; let courseId=this.props.match.params.coursesId;
this.props.history.push(`/courses/${courseId}/graduation_topics/${topicId}/edit`); this.props.history.push(`/classrooms/${courseId}/graduation_topics/${topicId}/edit`);
} }
toDetailPage=(topicId)=>{ toDetailPage=(topicId)=>{
@ -32,7 +32,7 @@ class GraduateTopicItem extends Component{
// } // }
let courseId=this.props.match.params.coursesId; let courseId=this.props.match.params.coursesId;
this.props.history.push(`/courses/${courseId}/graduation_topics/${topicId}/detail`); this.props.history.push(`/classrooms/${courseId}/graduation_topics/${topicId}/detail`);
} }
render(){ render(){
const { checkBox, discussMessage, index,chooseTopic, const { checkBox, discussMessage, index,chooseTopic,
@ -107,17 +107,17 @@ class GraduateTopicItem extends Component{
<i className="iconfont icon-guansuo color-grey-c ml10 font-16 fl mt4"></i> <i className="iconfont icon-guansuo color-grey-c ml10 font-16 fl mt4"></i>
</Tooltip> </Tooltip>
:"" :""
} }
<CoursesListType typelist={[map[`${discussMessage.status}`]]} typesylename={""} /> <CoursesListType typelist={[map[`${discussMessage.status}`]]} typesylename={""} />
</h6> </h6>
<div className="cl"></div> <div className="cl"></div>
<p className="color-grey mt20 clearfix"> <p className="color-grey mt20 clearfix">
<span className="fl mr40 mt1"> <span className="fl mr40 mt1">
<Tooltip title="指导老师" placement="bottom"> <Tooltip title="指导老师" placement="bottom">
<span className="color-grey3">{discussMessage.author}</span> <span className="color-grey3">{discussMessage.author}</span>
</Tooltip> </Tooltip>
</span> </span>
<span className="fl mr20 color-grey-9 mt1">{discussMessage.selected_count} 已选</span> <span className="fl mr20 color-grey-9 mt1">{discussMessage.selected_count} 已选</span>
<span className="fl color-grey-9 mt1">{discussMessage.confirmation_count} 已确认</span> <span className="fl color-grey-9 mt1">{discussMessage.confirmation_count} 已确认</span>
<span className="fr"> <span className="fr">
@ -136,13 +136,13 @@ class GraduateTopicItem extends Component{
isStudent && data.user_selected == true && discussMessage.user_topic_status==0 && isStudent && data.user_selected == true && discussMessage.user_topic_status==0 &&
<WordsBtn onClick={()=>chooseTopic(`${discussMessage.id}`,index,true)} style="blue" className="font-16 mr20"> <WordsBtn onClick={()=>chooseTopic(`${discussMessage.id}`,index,true)} style="blue" className="font-16 mr20">
取消选题 取消选题
</WordsBtn> </WordsBtn>
} }
{ {
isStudent && data.user_selected==false && (discussMessage.user_topic_status == null || discussMessage.user_topic_status == 2) && isStudent && data.user_selected==false && (discussMessage.user_topic_status == null || discussMessage.user_topic_status == 2) &&
<WordsBtn onClick={()=>chooseTopic(`${discussMessage.id}`,index,false)} style="blue" className="font-16 mr20"> <WordsBtn onClick={()=>chooseTopic(`${discussMessage.id}`,index,false)} style="blue" className="font-16 mr20">
选题 选题
</WordsBtn> </WordsBtn>
} }
@ -154,4 +154,4 @@ class GraduateTopicItem extends Component{
) )
} }
} }
export default GraduateTopicItem; export default GraduateTopicItem;

@ -81,7 +81,7 @@ class GraduateTopicNew extends Component{
this.getTeacherList(); this.getTeacherList();
}else{ }else{
this.getEditInfo(); this.getEditInfo();
} }
} }
//编辑,信息显示 //编辑,信息显示
@ -162,8 +162,8 @@ class GraduateTopicNew extends Component{
if (response.status == 200) { if (response.status == 200) {
const { id } = response.data; const { id } = response.data;
if (id) { if (id) {
this.props.showNotification('保存成功!'); this.props.showNotification('保存成功!');
this.props.history.push(`/courses/${cid}/graduation_topics/${this.state.left_banner_id}`); this.props.history.push(`/classrooms/${cid}/graduation_topics/${this.state.left_banner_id}`);
} }
} }
}).catch(function (error) { }).catch(function (error) {
@ -177,7 +177,7 @@ class GraduateTopicNew extends Component{
return item.response.id return item.response.id
}) })
} }
axios.post(url, { axios.post(url, {
graduation_topic:{ graduation_topic:{
...values, ...values,
@ -189,8 +189,8 @@ class GraduateTopicNew extends Component{
if (response.data) { if (response.data) {
const { id } = response.data; const { id } = response.data;
if (id) { if (id) {
this.props.showNotification('提交成功!'); this.props.showNotification('提交成功!');
this.props.history.push(`/courses/${cid}/graduation_topics/${this.state.left_banner_id}`); this.props.history.push(`/classrooms/${cid}/graduation_topics/${this.state.left_banner_id}`);
} }
} }
}) })
@ -246,7 +246,7 @@ class GraduateTopicNew extends Component{
const { status } = response.data; const { status } = response.data;
if (status == 0) { if (status == 0) {
console.log('--- success') console.log('--- success')
this.setState((state) => { this.setState((state) => {
const index = state.fileList.indexOf(file); const index = state.fileList.indexOf(file);
const newFileList = state.fileList.slice(); const newFileList = state.fileList.slice();
@ -335,13 +335,13 @@ class GraduateTopicNew extends Component{
<p className="clearfix mb20 mt10"> <p className="clearfix mb20 mt10">
<WordsBtn style="grey" className="fl" to={current_user&&current_user.first_category_url}>{course_name}</WordsBtn> <WordsBtn style="grey" className="fl" to={current_user&&current_user.first_category_url}>{course_name}</WordsBtn>
<span className="color-grey-9 fl ml3 mr3">&gt;</span> <span className="color-grey-9 fl ml3 mr3">&gt;</span>
<WordsBtn style="grey" className="fl" to={`/courses/${coursesId}/graduation_topics/${left_banner_id}`}>{left_banner_name}</WordsBtn> <WordsBtn style="grey" className="fl" to={`/classrooms/${coursesId}/graduation_topics/${left_banner_id}`}>{left_banner_name}</WordsBtn>
<span className="color-grey-9 fl ml3 mr3">&gt;</span> <span className="color-grey-9 fl ml3 mr3">&gt;</span>
<span>{topicId==undefined?"新建":"编辑"}</span> <span>{topicId==undefined?"新建":"编辑"}</span>
</p> </p>
<div className="clearfix mb20 lineh-25"> <div className="clearfix mb20 lineh-25">
<p className="fl color-black summaryname">{topicId==undefined?"新建":"编辑"}毕设选题</p> <p className="fl color-black summaryname">{topicId==undefined?"新建":"编辑"}毕设选题</p>
<Link to={`/courses/${coursesId}/graduation_topics/${left_banner_id}`} className="color-grey-6 fr font-16">返回</Link> <Link to={`/classrooms/${coursesId}/graduation_topics/${left_banner_id}`} className="color-grey-6 fr font-16">返回</Link>
</div> </div>
<Form {...formItemLayout} onSubmit={this.handleSubmit}> <Form {...formItemLayout} onSubmit={this.handleSubmit}>
@ -546,7 +546,7 @@ class GraduateTopicNew extends Component{
</Form.Item> </Form.Item>
</div> </div>
</div> </div>
<style>{` <style>{`
.courseForm .flexBlock.formBlock { .courseForm .flexBlock.formBlock {
@ -566,7 +566,7 @@ class GraduateTopicNew extends Component{
min-width:125px!important; min-width:125px!important;
} }
`}</style> `}</style>
<div className="createPage" style={{"borderBottom":"none"}}> <div className="createPage" style={{"borderBottom":"none"}}>
<Form.Item <Form.Item
@ -615,7 +615,7 @@ class GraduateTopicNew extends Component{
<City ></City> <City ></City>
)} )}
</Form.Item> </Form.Item>
</div> </div>
<Form.Item> <Form.Item>
<div className="clearfix mt30 mb30"> <div className="clearfix mt30 mb30">
@ -632,4 +632,4 @@ class GraduateTopicNew extends Component{
const WrappedGraduateTopicNew = Form.create({ name: 'topicPostWorksNew' })(GraduateTopicNew); const WrappedGraduateTopicNew = Form.create({ name: 'topicPostWorksNew' })(GraduateTopicNew);
// RouteHOC() // RouteHOC()
export default (WrappedGraduateTopicNew); export default (WrappedGraduateTopicNew);

@ -6,7 +6,7 @@ import axios from 'axios'
import { WordsBtn, trigger, on, off, getUrl, downloadFile , sortDirections } from 'educoder' import { WordsBtn, trigger, on, off, getUrl, downloadFile , sortDirections } from 'educoder'
import ClipboardJS from 'clipboard' import ClipboardJS from 'clipboard'
import './studentsList.css'; import './studentsList.css';
/** /**
角色数组, CREATOR: 创建者, PROFESSOR: 教师, ASSISTANT_PROFESSOR: 助教, STUDENT: 学生 角色数组, CREATOR: 创建者, PROFESSOR: 教师, ASSISTANT_PROFESSOR: 助教, STUDENT: 学生
course_members_count: 0 course_members_count: 0
id: 2441 id: 2441
@ -19,7 +19,7 @@ const clipboardMap = {}
function CourseGroupListTable(props) { function CourseGroupListTable(props) {
const [serachValue, setSerachValue] = useState('') const [serachValue, setSerachValue] = useState('')
const courseId = props.match.params.coursesId const courseId = props.match.params.coursesId
useEffect(() => { useEffect(() => {
const course_groups = props.course_groups const course_groups = props.course_groups
@ -31,7 +31,7 @@ function CourseGroupListTable(props) {
let _clipboard = new ClipboardJS(`.copyBtn_${id}`); let _clipboard = new ClipboardJS(`.copyBtn_${id}`);
_clipboard.on('success', (e) => { _clipboard.on('success', (e) => {
props.showNotification('复制成功') props.showNotification('复制成功')
}); });
clipboardMap[id] = _clipboard clipboardMap[id] = _clipboard
}) })
return () => { return () => {
@ -70,7 +70,7 @@ function CourseGroupListTable(props) {
{name}</WordsBtn> {name}</WordsBtn>
} }
}, },
{ {
title: '学生成员', title: '学生成员',
dataIndex: 'course_members_count', dataIndex: 'course_members_count',
@ -122,8 +122,8 @@ function CourseGroupListTable(props) {
<div>点击复制邀请码</div> <div>点击复制邀请码</div>
</div> </div>
}> }>
<WordsBtn data-clipboard-text={record.invite_code} <WordsBtn data-clipboard-text={record.invite_code}
className={`copyBtn_${record.id} codeBtnStyle codeBtn_yellow ml10`} style={''}>复制</WordsBtn> className={`copyBtn_${record.id} codeBtnStyle codeBtn_yellow ml10`} style={''}>复制</WordsBtn>
</Tooltip> </Tooltip>
} }
</React.Fragment> </React.Fragment>
@ -152,17 +152,17 @@ function CourseGroupListTable(props) {
render: (none, record, index) => { render: (none, record, index) => {
return <React.Fragment> return <React.Fragment>
{!isCourseEnd && isAdmin && <WordsBtn style2={{ marginRight: '12px' }} onClick={() => onDelete(record)} style={'grey'}>删除分班</WordsBtn>} {!isCourseEnd && isAdmin && <WordsBtn style2={{ marginRight: '12px' }} onClick={() => onDelete(record)} style={'grey'}>删除分班</WordsBtn>}
{isStudent && <WordsBtn style2={{ marginRight: '12px' }} onClick={() => addToDir(record)} style={''}>加入分班</WordsBtn>} {isStudent && <WordsBtn style2={{ marginRight: '12px' }} onClick={() => addToDir(record)} style={''}>加入分班</WordsBtn>}
<WordsBtn onClick={() => onGoDetail(record)} style={''} className="color-dark">查看</WordsBtn> <WordsBtn onClick={() => onGoDetail(record)} style={''} className="color-dark">查看</WordsBtn>
</React.Fragment> </React.Fragment>
} }
}) })
return columns return columns
} }
const doAddToDir = async (record) => { const doAddToDir = async (record) => {
const courseId = props.match.params.coursesId const courseId = props.match.params.coursesId
const url = `/courses/${courseId}/join_course_group.json` const url = `/courses/${courseId}/join_course_group.json`
const course_group_id = record.id const course_group_id = record.id
@ -177,12 +177,12 @@ function CourseGroupListTable(props) {
} }
const addToDir = (record) => { const addToDir = (record) => {
props.confirm({ props.confirm({
content: `是否确认加入分班: ${record.name}?`, content: `是否确认加入分班: ${record.name}?`,
okText: '确认', okText: '确认',
cancelText: '取消', cancelText: '取消',
onOk: () => { onOk: () => {
doAddToDir(record) doAddToDir(record)
}, },
@ -191,7 +191,7 @@ function CourseGroupListTable(props) {
}, },
}); });
} }
function onDelete(record) { function onDelete(record) {
props.confirm({ props.confirm({
content: <div> content: <div>
@ -212,12 +212,12 @@ function CourseGroupListTable(props) {
}) })
.catch(function (error) { .catch(function (error) {
console.log(error); console.log(error);
}); });
} }
}) })
} }
function onGoDetail(record) { function onGoDetail(record) {
props.history.push(`/courses/${courseId}/course_groups/${record.id}`) props.history.push(`/classrooms/${courseId}/course_groups/${record.id}`)
} }
// 停用和启用邀请码 // 停用和启用邀请码
function changeInviteCode(id,flag){ function changeInviteCode(id,flag){
@ -249,7 +249,7 @@ function CourseGroupListTable(props) {
const isSuperAdmin = props.isSuperAdmin(); const isSuperAdmin = props.isSuperAdmin();
const isStudent = props.isStudent() const isStudent = props.isStudent()
const isNotMember = props.isNotMember() const isNotMember = props.isNotMember()
const isParent = true; const isParent = true;
const isCourseEnd= props.isCourseEnd(); const isCourseEnd= props.isCourseEnd();
@ -273,8 +273,8 @@ function CourseGroupListTable(props) {
`}</style> `}</style>
{/* onChange={onTableChange} */} {/* onChange={onTableChange} */}
<Table columns={columns} dataSource={dataSource} pagination={false} className="groupListTable"></Table> <Table columns={columns} dataSource={dataSource} pagination={false} className="groupListTable"></Table>
</React.Fragment> </React.Fragment>
) )
} }
export default CourseGroupListTable export default CourseGroupListTable

@ -309,7 +309,7 @@ class PollDetailTabFirst extends Component{
width:120, width:120,
render:(operation,item,index)=>{ render:(operation,item,index)=>{
return( return(
item.status == 1 ? <WordsBtn style="blue" targets={"_blank"} to={`/courses/${this.props.match.params.coursesId}/polls/${this.props.match.params.pollId}/users/${item.login}`}>查看</WordsBtn>:<span className="color-grey-9">--</span> item.status == 1 ? <WordsBtn style="blue" targets={"_blank"} to={`/classrooms/${this.props.match.params.coursesId}/polls/${this.props.match.params.pollId}/users/${item.login}`}>查看</WordsBtn>:<span className="color-grey-9">--</span>
) )
} }
}]; }];

@ -107,7 +107,7 @@ class CommitSummary extends Component{
// console.log(JSON.stringify(result)) // console.log(JSON.stringify(result))
// message.success(result.data.message); // message.success(result.data.message);
// 这里以前是学生 // 这里以前是学生
this.props.history.push(`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${this.props.match.params.homeworkid}/list?tab=0`); this.props.history.push(`/classrooms/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${this.props.match.params.homeworkid}/list?tab=0`);
} }
}).catch((error) => { }).catch((error) => {
console.log(error) console.log(error)
@ -201,7 +201,7 @@ class CommitSummary extends Component{
<Button type="primary" htmlType="submit" className="defalutSubmitbtn fl mr20" > <Button type="primary" htmlType="submit" className="defalutSubmitbtn fl mr20" >
提交 提交
</Button> </Button>
<a className="defalutCancelbtn fl" href={`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${this.props.match.params.homeworkid}/list?tab=0`}>取消</a> <a className="defalutCancelbtn fl" href={`/classrooms/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${this.props.match.params.homeworkid}/list?tab=0`}>取消</a>
</div> </div>
</Form.Item> </Form.Item>
</Form> </Form>

@ -190,7 +190,7 @@ class ShixunHomeworkPage extends Component {
// console.log(this.props) // console.log(this.props)
let {jobsettingsdatapage}=this.state let {jobsettingsdatapage}=this.state
this.props.history.replace(`/courses/${this.props.match.params.coursesId}/${jobsettingsdatapage === undefined ? "" : jobsettingsdatapage.data.category.main === 1 ? "shixun_homeworks" :"shixun_homework"}/${jobsettingsdatapage === undefined ? "" : jobsettingsdatapage.data.category.category_id === undefined ? "" : jobsettingsdatapage.data.category.category_id}`); this.props.history.replace(`/classrooms/${this.props.match.params.coursesId}/${jobsettingsdatapage === undefined ? "" : jobsettingsdatapage.data.category.main === 1 ? "shixun_homeworks" :"shixun_homework"}/${jobsettingsdatapage === undefined ? "" : jobsettingsdatapage.data.category.category_id === undefined ? "" : jobsettingsdatapage.data.category.category_id}`);
} }
Akeyreviewit=()=>{ Akeyreviewit=()=>{
@ -264,7 +264,7 @@ class ShixunHomeworkPage extends Component {
<span className="color-grey-9 fl ml3 mr3">&gt;</span> <span className="color-grey-9 fl ml3 mr3">&gt;</span>
<a <a
className=" btn colorgrey fl hovercolorblue " className=" btn colorgrey fl hovercolorblue "
href={`/courses/${this.props.match.params.coursesId}/${jobsettingsdatapage === undefined ? "" : jobsettingsdatapage.data.category.main === 1 ? "shixun_homeworks" :"shixun_homework"}/${jobsettingsdatapage === undefined ? "" : jobsettingsdatapage.data.category.category_id === undefined ? "" : jobsettingsdatapage.data.category.category_id}`}>{jobsettingsdatapage === undefined ? "" : jobsettingsdatapage.data.category.category_name}</a> href={`/classrooms/${this.props.match.params.coursesId}/${jobsettingsdatapage === undefined ? "" : jobsettingsdatapage.data.category.main === 1 ? "shixun_homeworks" :"shixun_homework"}/${jobsettingsdatapage === undefined ? "" : jobsettingsdatapage.data.category.category_id === undefined ? "" : jobsettingsdatapage.data.category.category_id}`}>{jobsettingsdatapage === undefined ? "" : jobsettingsdatapage.data.category.category_name}</a>
<span className="color-grey-9 fl ml3 mr3">&gt;</span> <span className="color-grey-9 fl ml3 mr3">&gt;</span>
<WordsBtn className="fl">作业详情</WordsBtn> <WordsBtn className="fl">作业详情</WordsBtn>
</p> </p>
@ -381,7 +381,7 @@ class ShixunHomeworkPage extends Component {
{this.state.view_report === true ? <Link className="fr color-blue font-16" target={"_blank"} {this.state.view_report === true ? <Link className="fr color-blue font-16" target={"_blank"}
to={`/courses/${this.props.match.params.coursesId}/${jobsettingsdatapage === undefined ? "" : jobsettingsdatapage.data.category.main === 1 ? "shixun_homeworks" :"shixun_homework"}/${teacherdatapage&&teacherdatapage.work_id}/shixun_work_report`}> to={`/classrooms/${this.props.match.params.coursesId}/${jobsettingsdatapage === undefined ? "" : jobsettingsdatapage.data.category.main === 1 ? "shixun_homeworks" :"shixun_homework"}/${teacherdatapage&&teacherdatapage.work_id}/shixun_work_report`}>
查看实训报告 查看实训报告
</Link> : ""} </Link> : ""}
{ {
@ -389,7 +389,7 @@ class ShixunHomeworkPage extends Component {
: teacherdatapage.commit_des === null || teacherdatapage.commit_des === undefined ? "" : : teacherdatapage.commit_des === null || teacherdatapage.commit_des === undefined ? "" :
<a className="fr color-blue font-16" <a className="fr color-blue font-16"
target={"_blank"} target={"_blank"}
href={`/courses/${this.props.match.params.coursesId}/${jobsettingsdatapage === undefined ? "" : jobsettingsdatapage.data.category.main === 1 ? "shixun_homeworks" :"shixun_homework"}/${teacherdatapage === undefined ? "" : teacherdatapage.id}/commitsummary/${this.props.match.params.homeworkid}`}>{teacherdatapage.commit_des}</a> href={`/classrooms/${this.props.match.params.coursesId}/${jobsettingsdatapage === undefined ? "" : jobsettingsdatapage.data.category.main === 1 ? "shixun_homeworks" :"shixun_homework"}/${teacherdatapage === undefined ? "" : teacherdatapage.id}/commitsummary/${this.props.match.params.homeworkid}`}>{teacherdatapage.commit_des}</a>
} }
{teacherdatapage === undefined ? "" :teacherdatapage&&teacherdatapage.shixun_status>1&&teacherdatapage&&teacherdatapage.time_status<5?<Startshixuntask {teacherdatapage === undefined ? "" :teacherdatapage&&teacherdatapage.shixun_status>1&&teacherdatapage&&teacherdatapage.time_status<5?<Startshixuntask
{...this.props} {...this.props}

@ -91,7 +91,7 @@ class ShixunWorkDetails extends Component {
// } // }
// this.props.history.goBack() // this.props.history.goBack()
// "/courses/1545/shixun_homeworks/15220/list?tab=2" // "/courses/1545/shixun_homeworks/15220/list?tab=2"
this.props.history.replace(`/courses/${this.props.match.params.coursesId}/shixun_homeworks/${this.props.match.params.homeworkid}/list?tab=2`); this.props.history.replace(`/classrooms/${this.props.match.params.coursesId}/shixun_homeworks/${this.props.match.params.homeworkid}/list?tab=2`);
} }
render() { render() {
let{data}=this.state; let{data}=this.state;
@ -105,13 +105,13 @@ class ShixunWorkDetails extends Component {
<div className="educontent"> <div className="educontent">
<p className="clearfix mt20"> <p className="clearfix mt20">
<a className="fl color-grey-9 btn colorgrey hovercolorblue" <a className="fl color-grey-9 btn colorgrey hovercolorblue"
href={`/courses/${data&&data.course_id}/shixun_homeworks/${data&&data.homework_common_id}`} href={`/classrooms/${data&&data.course_id}/shixun_homeworks/${data&&data.homework_common_id}`}
> >
<a className={"color-grey-9"} >{data&&data.course_name}</a> <a className={"color-grey-9"} >{data&&data.course_name}</a>
</a> </a>
<span className="color-grey-9 fl ml3 mr3">&gt;</span> <span className="color-grey-9 fl ml3 mr3">&gt;</span>
<a className="btn colorgrey fl hovercolorblue grey" <a className="btn colorgrey fl hovercolorblue grey"
href={`/courses/${data&&data.course_id}/shixun_homeworks/${data&&data.homework_common_id}/list?tab=0`} href={`/classrooms/${data&&data.course_id}/shixun_homeworks/${data&&data.homework_common_id}/list?tab=0`}
// to={"/courses/"+data&&data.course_id+"/"+this.state.shixuntypes+"/"+data&&data.homework_common_id} // to={"/courses/"+data&&data.course_id+"/"+this.state.shixuntypes+"/"+data&&data.homework_common_id}
> >
<span className={"color-grey-9"}>实训作业</span> <span className={"color-grey-9"}>实训作业</span>

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

@ -193,32 +193,32 @@ class MessagSub extends Component {
return; return;
case 'JoinCourse' : case 'JoinCourse' :
// 课堂详情页 :id = // 课堂详情页 :id =
return window.open(`/courses/${item.belong_container_id}/teachers`) return window.open(`/classrooms/${item.belong_container_id}/teachers`)
case 'StudentJoinCourse': case 'StudentJoinCourse':
// 课堂详情页 :id = container_id // 课堂详情页 :id = container_id
if (item.tiding_type === 'Apply') { if (item.tiding_type === 'Apply') {
return window.open(`/courses/${item.belong_container_id}/teachers`); return window.open(`/classrooms/${item.belong_container_id}/teachers`);
} }
if (item.tiding_type === 'System') { if (item.tiding_type === 'System') {
//教学案例详情 :id = container_id //教学案例详情 :id = container_id
return window.open(`/courses/${item.belong_container_id}/students`); return window.open(`/classrooms/${item.belong_container_id}/students`);
} }
case 'DealCourse': case 'DealCourse':
// 课堂详情页 :id = container_id // 课堂详情页 :id = container_id
return window.open(`/courses/${item.belong_container_id}/shixun_homeworks/${item.container_id}`) return window.open(`/classrooms/${item.belong_container_id}/shixun_homeworks/${item.container_id}`)
case 'TeacherJoinCourse': case 'TeacherJoinCourse':
// 课堂详情页 :id = container_id // 课堂详情页 :id = container_id
return window.open(`/courses/${item.belong_container_id}/shixun_homeworks/${item.container_id}`) return window.open(`/classrooms/${item.belong_container_id}/shixun_homeworks/${item.container_id}`)
case 'Course' : case 'Course' :
// 课堂详情页 :id = container_id // 课堂详情页 :id = container_id
if (item.tiding_type === "Delete") { if (item.tiding_type === "Delete") {
return; return;
} }
return window.open(`/courses/${item.belong_container_id}/shixun_homeworks/${item.container_id}`) return window.open(`/classrooms/${item.belong_container_id}/shixun_homeworks/${item.container_id}`)
case 'ArchiveCourse' : case 'ArchiveCourse' :
// 课堂详情页 :id = container_id // 课堂详情页 :id = container_id
return window.open(`/courses/${item.belong_container_id}/shixun_homeworks/${item.container_id}`) return window.open(`/classrooms/${item.belong_container_id}/shixun_homeworks/${item.container_id}`)
case "Shixun" : case "Shixun" :
return window.open(`/shixuns/${item.identifier}/challenges`) return window.open(`/shixuns/${item.identifier}/challenges`)
case "Subject" : case "Subject" :
@ -234,33 +234,33 @@ class MessagSub extends Component {
//学生作业页 homework = parent_container_id //学生作业页 homework = parent_container_id
if (item.homework_type === "normal") { if (item.homework_type === "normal") {
//普通作业 //普通作业
return window.open(`/courses/${item.belong_container_id}/common_homeworks/${item.parent_container_id}/question`) return window.open(`/classrooms/${item.belong_container_id}/common_homeworks/${item.parent_container_id}/question`)
} }
if (item.homework_type === "group") { if (item.homework_type === "group") {
//分组作业 //分组作业
return window.open(`/courses/${item.belong_container_id}/group_homeworks/${item.parent_container_id}/question`) return window.open(`/classrooms/${item.belong_container_id}/group_homeworks/${item.parent_container_id}/question`)
} }
if (item.homework_type === "practice") { if (item.homework_type === "practice") {
//实训作业 //实训作业
return window.open(`/courses/${item.belong_container_id}/shixun_homeworks/${item.parent_container_id}/list?tab=1`) return window.open(`/classrooms/${item.belong_container_id}/shixun_homeworks/${item.parent_container_id}/list?tab=1`)
} }
return ""; return "";
case "GraduationTopic" : case "GraduationTopic" :
// 毕业目标页 parent_container_id // 毕业目标页 parent_container_id
return window.open(`/courses/${item.belong_container_id}/graduation_topics/${item.parent_container_id}/detail`) return window.open(`/classrooms/${item.belong_container_id}/graduation_topics/${item.parent_container_id}/detail`)
case "StudentWorksScore" : case "StudentWorksScore" :
//学生作业页 //学生作业页
if (item.homework_type === "normal") { if (item.homework_type === "normal") {
//普通作业 //普通作业
return window.open(`/courses/${item.belong_container_id}/common_homeworks/${item.parent_container_id}/question`) return window.open(`/classrooms/${item.belong_container_id}/common_homeworks/${item.parent_container_id}/question`)
} }
if (item.homework_type === "group") { if (item.homework_type === "group") {
//分组作业 //分组作业
return window.open(`/courses/${item.belong_container_id}/group_homeworks/${item.parent_container_id}/question`) return window.open(`/classrooms/${item.belong_container_id}/group_homeworks/${item.parent_container_id}/question`)
} }
if (item.homework_type === "practice") { if (item.homework_type === "practice") {
//实训作业 //实训作业
return window.open(`/courses/${item.belong_container_id}/shixun_homeworks/${item.parent_container_id}/list?tab=1`) return window.open(`/classrooms/${item.belong_container_id}/shixun_homeworks/${item.parent_container_id}/list?tab=1`)
} }
return ""; return "";
} }
@ -314,109 +314,109 @@ class MessagSub extends Component {
//记得跳评阅页面 //记得跳评阅页面
default : default :
// 课堂-试卷列表详情 :id = container_id // 课堂-试卷列表详情 :id = container_id
return window.open(`/courses/${item.belong_container_id}/exercises/${item.container_id}/student_exercise_list?tab=0`); return window.open(`/classrooms/${item.belong_container_id}/exercises/${item.container_id}/student_exercise_list?tab=0`);
} }
case 'StudentGraduationTopic' : case 'StudentGraduationTopic' :
//课堂-毕业选题详情 :id = parent_container_id //课堂-毕业选题详情 :id = parent_container_id
return window.open(`/courses/${item.belong_container_id}/graduation_topics/${item.parent_container_id}/detail`) return window.open(`/classrooms/${item.belong_container_id}/graduation_topics/${item.parent_container_id}/detail`)
case 'DealStudentTopicSelect' : case 'DealStudentTopicSelect' :
//课堂-毕业选题详情 :id = parent_container_id //课堂-毕业选题详情 :id = parent_container_id
return window.open(`/courses/${item.belong_container_id}/graduation_topics/${item.parent_container_id}/detail`) return window.open(`/classrooms/${item.belong_container_id}/graduation_topics/${item.parent_container_id}/detail`)
case 'GraduationTask' : case 'GraduationTask' :
//课堂-毕业任务页 :id = container_id //课堂-毕业任务页 :id = container_id
return window.open(`/courses/${item.belong_container_id}/graduation_tasks/${item.container_id}`) return window.open(`/classrooms/${item.belong_container_id}/graduation_tasks/${item.container_id}`)
case "GraduationWork" : case "GraduationWork" :
//课堂-毕业xx页 :id = container_id //课堂-毕业xx页 :id = container_id
return window.open(`/courses/${item.belong_container_id}/graduation_tasks/${item.container_id}`) return window.open(`/classrooms/${item.belong_container_id}/graduation_tasks/${item.container_id}`)
case "GraduationWorkScore" : case "GraduationWorkScore" :
// 课堂-毕业xx页 :id = parent_container_id // 课堂-毕业xx页 :id = parent_container_id
return window.open(`/courses/${item.belong_container_id}/graduation_tasks/${item.parent_container_id}`) return window.open(`/classrooms/${item.belong_container_id}/graduation_tasks/${item.parent_container_id}`)
case "HomeworkCommon" : case "HomeworkCommon" :
switch (item.parent_container_type) { switch (item.parent_container_type) {
case "AnonymousCommentFail" : case "AnonymousCommentFail" :
// 课堂-作业列表 homework = container_id // 课堂-作业列表 homework = container_id
if (item.homework_type === "normal") { if (item.homework_type === "normal") {
//普通作业 //普通作业
return window.open(`/courses/${item.belong_container_id}/common_homeworks/${item.parent_container_id}/list`) return window.open(`/classrooms/${item.belong_container_id}/common_homeworks/${item.parent_container_id}/list`)
} }
if (item.homework_type === "group") { if (item.homework_type === "group") {
//分组作业 //分组作业
return window.open(`/courses/${item.belong_container_id}/group_homeworks/${item.parent_container_id}/list`) return window.open(`/classrooms/${item.belong_container_id}/group_homeworks/${item.parent_container_id}/list`)
} }
if (item.homework_type === "practice") { if (item.homework_type === "practice") {
//实训作业 //实训作业
return window.open(`/courses/${item.belong_container_id}/shixun_homeworks/${item.parent_container_id}/list?tab=0`) return window.open(`/classrooms/${item.belong_container_id}/shixun_homeworks/${item.parent_container_id}/list?tab=0`)
} }
case "HomeworkPublish" : case "HomeworkPublish" :
if (item.homework_type === "normal") { if (item.homework_type === "normal") {
//普通作业 //普通作业
return window.open(`/courses/${item.belong_container_id}/common_homeworks/${item.parent_container_id}/list`) return window.open(`/classrooms/${item.belong_container_id}/common_homeworks/${item.parent_container_id}/list`)
} }
if (item.homework_type === "group") { if (item.homework_type === "group") {
//分组作业 //分组作业
return window.open(`/courses/${item.belong_container_id}/group_homeworks/${item.parent_container_id}/list`) return window.open(`/classrooms/${item.belong_container_id}/group_homeworks/${item.parent_container_id}/list`)
} }
if (item.homework_type === "practice") { if (item.homework_type === "practice") {
//实训作业 //实训作业
return window.open(`/courses/${item.belong_container_id}/shixun_homeworks/${item.parent_container_id}/list?tab=0`) return window.open(`/classrooms/${item.belong_container_id}/shixun_homeworks/${item.parent_container_id}/list?tab=0`)
} }
case "AnonymousAppeal" : case "AnonymousAppeal" :
if (item.homework_type === "normal") { if (item.homework_type === "normal") {
//普通作业 //普通作业
return window.open(`/courses/${item.belong_container_id}/common_homeworks/${item.parent_container_id}/list`) return window.open(`/classrooms/${item.belong_container_id}/common_homeworks/${item.parent_container_id}/list`)
} }
if (item.homework_type === "group") { if (item.homework_type === "group") {
//分组作业 //分组作业
return window.open(`/courses/${item.belong_container_id}/group_homeworks/${item.parent_container_id}/list`) return window.open(`/classrooms/${item.belong_container_id}/group_homeworks/${item.parent_container_id}/list`)
} }
if (item.homework_type === "practice") { if (item.homework_type === "practice") {
//实训作业 //实训作业
return window.open(`/courses/${item.belong_container_id}/shixun_homeworks/${item.parent_container_id}/list?tab=0`) return window.open(`/classrooms/${item.belong_container_id}/shixun_homeworks/${item.parent_container_id}/list?tab=0`)
} }
default : default :
// 课堂-作业列表 homework = container_id // 课堂-作业列表 homework = container_id
if (item.homework_type === "normal") { if (item.homework_type === "normal") {
//普通作业 //普通作业
return window.open(`/courses/${item.belong_container_id}/common_homeworks/${item.parent_container_id}/list`) return window.open(`/classrooms/${item.belong_container_id}/common_homeworks/${item.parent_container_id}/list`)
} }
if (item.homework_type === "group") { if (item.homework_type === "group") {
//分组作业 //分组作业
return window.open(`/courses/${item.belong_container_id}/group_homeworks/${item.parent_container_id}/list`) return window.open(`/classrooms/${item.belong_container_id}/group_homeworks/${item.parent_container_id}/list`)
} }
if (item.homework_type === "practice") { if (item.homework_type === "practice") {
//实训作业 //实训作业
return window.open(`/courses/${item.belong_container_id}/shixun_homeworks/${item.parent_container_id}/list?tab=0`) return window.open(`/classrooms/${item.belong_container_id}/shixun_homeworks/${item.parent_container_id}/list?tab=0`)
} }
} }
case "StudentWork" : case "StudentWork" :
//课堂-作业 :id = container_id //课堂-作业 :id = container_id
if (item.homework_type === "normal") { if (item.homework_type === "normal") {
//普通作业 //普通作业
return window.open(`/courses/${item.belong_container_id}/common_homeworks/${item.parent_container_id}/${item.container_id}/appraise`) return window.open(`/classrooms/${item.belong_container_id}/common_homeworks/${item.parent_container_id}/${item.container_id}/appraise`)
} }
if (item.homework_type === "group") { if (item.homework_type === "group") {
//分组作业/courses/1208/group_homeworks/22373/1219130/appraise //分组作业/courses/1208/group_homeworks/22373/1219130/appraise
return window.open(`/courses/${item.belong_container_id}/group_homeworks/${item.parent_container_id}/${item.container_id}/appraise`) return window.open(`/classrooms/${item.belong_container_id}/group_homeworks/${item.parent_container_id}/${item.container_id}/appraise`)
} }
if (item.homework_type === "practice") { if (item.homework_type === "practice") {
//实训作业 //实训作业
return window.open(`/courses/${item.belong_container_id}/shixun_homeworks/${item.parent_container_id}/list?tab=0`) return window.open(`/classrooms/${item.belong_container_id}/shixun_homeworks/${item.parent_container_id}/list?tab=0`)
} }
case "StudentWorksScore" : case "StudentWorksScore" :
//课堂-作业 :id = parent_container_id //课堂-作业 :id = parent_container_id
// if(item.homework_type==="normal"){ // if(item.homework_type==="normal"){
// //普通作业 // //普通作业
// return window.open(`/courses/${item.belong_container_id}/common_homeworks/${item.parent_container_id}/list`) // return window.open(`/classrooms/${item.belong_container_id}/common_homeworks/${item.parent_container_id}/list`)
// } // }
// if(item.homework_type==="group"){ // if(item.homework_type==="group"){
// //分组作业 // //分组作业
// return window.open(`/courses/${item.belong_container_id}/group_homeworks/${item.parent_container_id}/list`) // return window.open(`/classrooms/${item.belong_container_id}/group_homeworks/${item.parent_container_id}/list`)
// } // }
// if(item.homework_type==="practice"){ // if(item.homework_type==="practice"){
// //实训作业 // //实训作业
// return window.open(`/courses/${item.belong_container_id}/shixun_homeworks/${item.parent_container_id}/list?tab=0`) // return window.open(`/classrooms/${item.belong_container_id}/shixun_homeworks/${item.parent_container_id}/list?tab=0`)
// } // }
return window.open(`/courses/${item.belong_container_id}/common_homeworks/${item.trigger_user.id}/${item.parent_container_id}/appraise`); return window.open(`/classrooms/${item.belong_container_id}/common_homeworks/${item.trigger_user.id}/${item.parent_container_id}/appraise`);
case "StudentWorksScoresAppeal" : case "StudentWorksScoresAppeal" :
// if(item.homework_type==="normal"){ // if(item.homework_type==="normal"){
@ -425,13 +425,13 @@ class MessagSub extends Component {
// } // }
// if(item.homework_type==="group"){ // if(item.homework_type==="group"){
// //分组作业 // //分组作业
// return window.open(`/courses/${item.belong_container_id}/group_homeworks/${item.parent_container_id}/list`) // return window.open(`/classrooms/${item.belong_container_id}/group_homeworks/${item.parent_container_id}/list`)
// } // }
// if(item.homework_type==="practice"){ // if(item.homework_type==="practice"){
// //实训作业 // //实训作业
// return window.open(`/courses/${item.belong_container_id}/shixun_homeworks/${item.parent_container_id}/list?tab=0`) // return window.open(`/classrooms/${item.belong_container_id}/shixun_homeworks/${item.parent_container_id}/list?tab=0`)
// } // }
return window.open(`/courses/${item.belong_container_id}/common_homeworks/${item.trigger_user.id}/${item.parent_container_id}/appraise`); return window.open(`/classrooms/${item.belong_container_id}/common_homeworks/${item.trigger_user.id}/${item.parent_container_id}/appraise`);
case "ChallengeWorkScore" : case "ChallengeWorkScore" :
return ''; return '';
case "SendMessage" : case "SendMessage" :
@ -488,30 +488,30 @@ class MessagSub extends Component {
} }
return ''; return '';
case "PublicCourseStart": case "PublicCourseStart":
return window.open(`/courses/${item.container_id}/informs`); return window.open(`/classrooms/${item.container_id}/informs`);
case "SubjectStartCourse": case "SubjectStartCourse":
return window.open(`/paths/${item.container_id}`); return window.open(`/paths/${item.container_id}`);
case "ResubmitStudentWork": case "ResubmitStudentWork":
if (item.homework_type === "normal") { if (item.homework_type === "normal") {
//普通作业 //普通作业
return window.open(`/courses/${item.belong_container_id}/common_homeworks/${item.parent_container_id}/${item.container_id}/appraise`); return window.open(`/classrooms/${item.belong_container_id}/common_homeworks/${item.parent_container_id}/${item.container_id}/appraise`);
} }
if (item.homework_type === "group") { if (item.homework_type === "group") {
//分组作业 //分组作业
return window.open(`/courses/${item.belong_container_id}/group_homeworks/${item.parent_container_id}/${item.container_id}/appraise`); return window.open(`/classrooms/${item.belong_container_id}/group_homeworks/${item.parent_container_id}/${item.container_id}/appraise`);
} }
case "AdjustScore": case "AdjustScore":
//belong_container_id course的id //belong_container_id course的id
if (item.homework_type === "normal") { if (item.homework_type === "normal") {
//普通作业 //普通作业
return window.open(`/courses/${item.belong_container_id}/common_homeworks/${item.parent_container_id}`); return window.open(`/classrooms/${item.belong_container_id}/common_homeworks/${item.parent_container_id}`);
} }
if (item.homework_type === "group") { if (item.homework_type === "group") {
//分组作业 //分组作业
return window.open(`/courses/${item.belong_container_id}/group_homeworks/${item.parent_container_id}`); return window.open(`/classrooms/${item.belong_container_id}/group_homeworks/${item.parent_container_id}`);
} }
case 'LiveLink': case 'LiveLink':
return window.open(`/courses/${item.belong_container_id}/course_videos?open=live`); return window.open(`/classrooms/${item.belong_container_id}/course_videos?open=live`);
case 'Hack': case 'Hack':
if (item.extra && item.parent_container_type !== 'HackDelete') { if (item.extra && item.parent_container_type !== 'HackDelete') {
return window.open(`/problems/${item.extra}/edit`); return window.open(`/problems/${item.extra}/edit`);

Loading…
Cancel
Save