Merge remote-tracking branch 'origin/dev_aliyun' into dev_aliyun

dev_oauth
杨树明 5 years ago
commit 6af98b311f

@ -1238,7 +1238,7 @@ class CoursesController < ApplicationController
tip_exception("开始时间不能为空") if params[:start_date].blank? tip_exception("开始时间不能为空") if params[:start_date].blank?
tip_exception("结束时间不能为空") if params[:end_date].blank? tip_exception("结束时间不能为空") if params[:end_date].blank?
tip_exception("结束时间必须晚于开始时间") if strf_date(params[:end_date]) <= strf_date(params[:start_date]) tip_exception("结束时间必须晚于开始时间") if strf_date(params[:end_date]) <= strf_date(params[:start_date])
tip_exception("开始时间和结束时间不能与往期开课时间重叠") if @course.nil? && @subject.max_course_end_date && strf_date(params[:start_date]) <= strf_date(@subject.max_course_end_date) tip_exception("开始时间和结束时间不能早于往期开课时间") if @course.nil? && @subject.max_course_end_date && strf_date(params[:start_date]) <= strf_date(@subject.max_course_end_date)
validate_start_end_date if @course.present? validate_start_end_date if @course.present?
tip_exception("开放课堂必须包含公告栏和在线学习模块") unless params[:course_module_types].include?("announcement") && params[:course_module_types].include?("online_learning") tip_exception("开放课堂必须包含公告栏和在线学习模块") unless params[:course_module_types].include?("announcement") && params[:course_module_types].include?("online_learning")
end end

@ -8,7 +8,7 @@ json.question_banks @question_banks do |question_bank|
json.is_public question_bank.is_public json.is_public question_bank.is_public
json.quotes_count question_bank.quotes json.quotes_count question_bank.quotes
json.creator_name question_bank.user.name json.creator_name question_bank.user.name
json.course_list_name question_bank.course_list.name json.course_list_name question_bank.course_list&.name
json.updated_at question_bank.updated_at json.updated_at question_bank.updated_at
json.solve_count @solve_count_map.fetch(question_bank.id, 0) json.solve_count @solve_count_map.fetch(question_bank.id, 0)
end end

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

@ -185,7 +185,7 @@ class Bullsubdirectory extends Component{
</div> </div>
<div className="yslclear"></div> <div className="yslclear"></div>
</div> </div>
<div id="MakedownHTML"className={"markdown-body fonttext yslmtopcg yslminHeigth markdownysltext"} dangerouslySetInnerHTML={{__html: markdownToHTML(mydescription).replace(/▁/g, "▁▁▁")}}/> <div id="MakedownHTML"className="markdown-body fonttext yslmtopcg yslminHeigth markdownysltext" dangerouslySetInnerHTML={{__html: markdownToHTML(mydescription).replace(/▁/g, "▁▁▁")}}/>
</div> </div>
<div className="bor-bottom-greyE mr25 ml25"></div> <div className="bor-bottom-greyE mr25 ml25"></div>
</div> </div>

@ -59,18 +59,20 @@
padding-top: 31px; padding-top: 31px;
padding-left: 25px; padding-left: 25px;
font-size: 16px; font-size: 16px;
color: #333333; color: #05101A;
text-align: left; text-align: left;
font-weight:bold;
} }
.markdownysltext{ .markdownysltext{
font-size: 14px; font-size: 14px;
color: #999999; color: #333333;
} }
.fudonyingxiangysl{ .fudonyingxiangysl{
width: 100%; width: 100%;
} }
.yslbianji{ .yslbianji{
padding-top: 31px; padding-top: 31px;
} }
.yslmaxheigth80{ .yslmaxheigth80{
max-height: 80px; max-height: 80px;

@ -92,8 +92,8 @@ class PollListItem extends Component{
{ {
IsAdmin && IsAdmin &&
<ul className="fr"> <ul className="fr">
<WordsBtn style="blue" className="mr20 font-16" to={`/courses/${coursesId}/polls/${item.id}/detail?tab=3`}>设置</WordsBtn>
<WordsBtn style="blue" className="font-16" to={`/courses/${coursesId}/polls/${item.id}/${"edit"}`}>编辑</WordsBtn> <WordsBtn style="blue" className="font-16" 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>
</ul> </ul>
} }
</p> </p>

@ -0,0 +1,214 @@
import React, { Component } from 'react';
import {BrowserRouter as Router,Route,Switch} from 'react-router-dom';
import { Breadcrumb } from 'antd';
import { SnackbarHOC } from 'educoder';
import { TPMIndexHOC } from '../../../tpm/TPMIndexHOC';
import { CNotificationHOC } from '../../../courses/common/CNotificationHOC'
import "../usersInfo.css"
import "../../../courses/css/members.css"
import "../../../courses/css/Courses.css"
import Loadable from 'react-loadable';
import Loading from '../../../../Loading';
// 毕设选题
const GtopicBanks = Loadable({
loader: () => import('./GtopicBanks'),
loading: Loading,
})
const BanksTabIndex = Loadable({
loader: () => import('./BanksTabIndex'),
loading: Loading,
})
const GtopicBanksEdit = Loadable({
loader: () => import('./GtopicBanksEdit'),
loading: Loading,
})
const HomeworkBanksEdit = Loadable({
loader: () => import('./HomeworkBanksEdit'),
loading: Loading,
});
const ExerciseBanksEdit = Loadable({
loader: () => import('./ExerciseBanksEdit'),
loading: Loading,
});
//普通作业题库详情
const Generaljobbankdetails =Loadable({
loader: () => import('../../../courses/questionbank/Generaljobbankdetails'),
loading: Loading,
});
//分组作业题库详情
const GroupjobbankPage =Loadable({
loader: () => import('../../../courses/groupjobbank/GroupjobbankPage'),
loading: Loading,
});
//毕设选题详情
const CompletetopicdePage =Loadable({
loader: () => import('../../../courses/comtopicdetails/CompletetopicdePage'),
loading: Loading,
});
//毕设任务详情
const Completetaskpage =Loadable({
loader: () => import('../../../courses/completetaskdetails/Completetaskpage'),
loading: Loading,
});
//问卷编辑
const PollNewQuestbank =Loadable({
loader: () => import('../../../courses/poll/PollNewQuestbank'),
loading: Loading,
});
const GtaskBanksEdit = Loadable({
loader: () => import('./GtaskBanksEdit'),
loading: Loading,
})
class BanksIndex extends Component{
constructor(props){
super(props);
this.state={
crumbData:undefined
}
}
initPublic = (crumbData) =>{
this.setState({
crumbData
})
}
render(){
let { crumbData }=this.state
const common = {
initPublic:this.initPublic
}
return(
<div className="newMain">
<div className="educontent">
{
crumbData &&
<Breadcrumb separator=">" className="breadcrumb mt22">
<Breadcrumb.Item href="/users/innov/topics/personal">题库</Breadcrumb.Item>
{
crumbData.crumbArray && crumbData.crumbArray.map((item,key)=>{
return(
<Breadcrumb.Item key={key} href={item.to || ""}>{item.content}</Breadcrumb.Item>
)
})
}
</Breadcrumb>
}
{
crumbData &&
<p className="clearfix mt10 mb10 ">
<span className="fl font-24 color-grey-3 task-hide lineh-30" style={{maxWidth:'800px'}}>{crumbData && crumbData.title}</span>
<span className="bank_is_public">{crumbData.is_public == true ? '公开':'私有'}</span>
</p>
}
<Switch {...this.props}>
{/*毕设任务编辑*/}
<Route path='/banks/gtask/:workId/edit'
render={
(props) => {
return (<GtaskBanksEdit {...this.props} {...props} {...this.state} {...common}/>)
}
}></Route>
<Route path='/banks/normal/:workId/edit'
render={
(props) => {
return (<HomeworkBanksEdit {...this.props} {...props} {...this.state} {...common}
isGroup={false}
/>)
}
}></Route>
<Route path='/banks/group/:workId/edit'
render={
(props) => {
return (<HomeworkBanksEdit {...this.props} {...props} {...this.state} {...common}
isGroup={true}
/>)
}
}></Route>
<Route path='/banks/exercise/:Id/edit'
render={
(props) => {
return (<ExerciseBanksEdit {...this.props} {...props} {...this.state} {...common}
/>)
}
}></Route>
<Route path='/banks/gtopic/:bankId/edit'
render={
(props) => {
return (<GtopicBanksEdit {...this.props} {...props} {...this.state} {...common}/>)
}
}></Route>
{/*题库问卷编辑详情*/}
<Route path="/banks/poll/:workid/edit"
render={
(props) => (<PollNewQuestbank {...this.props} {...props} {...this.state} {...common} />)
}
></Route>
<Route path='/banks/poll/:bankId'
render={
(props) => {
return (<BanksTabIndex {...this.props} {...props} {...this.state} {...common} />)
}
}></Route>
{/*毕设任务题库详情*/}
<Route path="/banks/gtask/:workid"
render={
(props) => (<Completetaskpage {...this.props} {...props} {...this.state} {...common} />)
}
></Route>
{/*毕设内容题库详情*/}
<Route path="/banks/gtopic/:workid"
render={
(props) => (<CompletetopicdePage {...this.props} {...props} {...this.state} {...common}/>)
}
></Route>
{/*分组作业题库详情*/}
<Route path="/banks/group/:workid"
render={
(props) => (<GroupjobbankPage {...this.props} {...props} {...this.state} {...common} />)
}
></Route>
{/* 普通作业题库详情*/}
<Route path="/banks/normal/:workid"
render={
(props) => (<Generaljobbankdetails {...this.props} {...props} {...this.state} {...common} />)
}
></Route>
</Switch>
</div>
</div>
)
}
}
export default CNotificationHOC() ( SnackbarHOC() ( TPMIndexHOC(BanksIndex) ));
// <Route path='/banks/gtopic/:bankId'
// render={
// (props) => {
// return (<BanksTabIndex {...this.props} {...props} {...this.state} {...common}/>)
// }
// }></Route>
Loading…
Cancel
Save