dev_forum
hjm 5 years ago
parent 034e725fd1
commit aab2c160e5

@ -38,7 +38,8 @@ class NewWork extends Component{
} }
} }
fetchCourseData = (courseId) => { fetchCourseData = (courseId) => {
const url = `/courses/${courseId}/homework_commons/new.json?type=1` const isGroup = this.props.isGroup()
const url = `/courses/${courseId}/homework_commons/new.json?type=${isGroup ? 3 : 1}`
axios.get(url, { axios.get(url, {
}) })
.then((response) => { .then((response) => {
@ -369,7 +370,8 @@ class NewWork extends Component{
</p> */} </p> */}
<CBreadcrumb items={[ <CBreadcrumb items={[
{ to: `/courses/${courseId}`, name: this.state.course_name}, { to: `/courses/${courseId}`, name: this.state.course_name},
{ to: `/courses/${courseId}/${moduleEngName}/${category && category.category_id ? category.category_id : ''}`, name: moduleName }, { to: `/courses/${courseId}/${moduleEngName}/${category && category.category_id ? category.category_id : ''}`
, name: category && category.category_name },
{ name: `${ this.isEdit ? '编辑' : '新建'}` } { name: `${ this.isEdit ? '编辑' : '新建'}` }
]}></CBreadcrumb> ]}></CBreadcrumb>

Loading…
Cancel
Save