dev_forum
hjm 5 years ago
parent f3d0424e50
commit 86172c0731

@ -16,7 +16,12 @@ class CommonWorkItem extends Component{
}
}
onItemClick = (item) => {
this.props.toWorkListPage(this.props.match.params, item.homework_id)
const isStudent = this.props.isStudent()
if (isStudent) {
this.props.toWorkQuestionPage(this.props.match.params, item.homework_id)
} else {
this.props.toWorkListPage(this.props.match.params, item.homework_id)
}
}
sendMoreAttachment = (item) => {
this.handleItem = item;

@ -129,7 +129,7 @@ export function RouteHOC(options = {}) {
toWorkQuestionPage = (_courseId, _workId) => {
const secondName = this.getModuleName()
if (typeof _courseId == "object") {
const workId = _courseId.workId
const workId = _workId || _courseId.workId
const courseId = _courseId.coursesId
this.props.history.push(`/courses/${courseId}/${secondName}/${workId}/question`)
} else {

Loading…
Cancel
Save