-
+
<%= link_to "/users/#{user.login}", target: '_blank' do %>
- <%= overflow_hidden_span user.login, width: 100 %>
- <% end %>
-
-
- <%= link_to edit_admins_user_path(user) do %>
<%= overflow_hidden_span user.real_name, width: 100 %>
<% end %>
@@ -35,6 +29,8 @@
<%= user.experience.to_i %>
<%= user.grade.to_i %>
+ <%= link_to '编辑', edit_admins_user_path(user), class: 'action' %>
+
<%= javascript_void_link('奖励', class: 'action reward-grade-action', data: { toggle: 'modal', target: '.admin-users-reward-grade-modal', id: user.id }) %>
<%= javascript_void_link '解锁', class: 'action unlock-action', data: { id: user.id, confirm: '确认解锁吗?' }, style: user.locked? ? '' : 'display: none;' %>
diff --git a/config/locales/apply_user_authentications/zh-CN.yml b/config/locales/apply_user_authentications/zh-CN.yml
new file mode 100644
index 000000000..e886c2695
--- /dev/null
+++ b/config/locales/apply_user_authentications/zh-CN.yml
@@ -0,0 +1,7 @@
+zh-CN:
+ apply_user_authentication:
+ status:
+ '0': '待处理'
+ '1': '已同意'
+ '2': '已拒绝'
+ '3': '已撤销'
\ No newline at end of file
diff --git a/config/routes.rb b/config/routes.rb
index 5ed8ecd69..4fc660a45 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -753,7 +753,7 @@ Rails.application.routes.draw do
get :contrast, on: :collection
end
- resources :users, only: [:index, :edit, :update] do
+ resources :users, only: [:index, :edit, :update, :destroy] do
member do
post :reward_grade
post :lock
@@ -761,6 +761,19 @@ Rails.application.routes.draw do
post :active
end
end
+
+ resources :identity_authentications, only: [:index] do
+ member do
+ post :agree
+ post :refuse
+ end
+ end
+ resources :professional_authentications, only: [:index] do
+ member do
+ post :agree
+ post :refuse
+ end
+ end
end
#git 认证回调
diff --git a/public/react/config/webpack.config.dev.js b/public/react/config/webpack.config.dev.js
index 510bcaa4f..f126bc363 100644
--- a/public/react/config/webpack.config.dev.js
+++ b/public/react/config/webpack.config.dev.js
@@ -30,7 +30,8 @@ module.exports = {
// You may want 'eval' instead if you prefer to see the compiled output in DevTools.
// See the discussion in https://github.com/facebookincubator/create-react-app/issues/343.s
// devtool: "cheap-module-eval-source-map",
- // 开启调试
+ // 开启调试
+ devtool: "source-map", // 开启调试
// These are the "entry points" to our application.
// This means they will be the "root" imports that are included in JS bundle.
// The first two entry points enable "hot" CSS and auto-refreshes for JS.
diff --git a/public/react/scripts/build.js b/public/react/scripts/build.js
index 022e8074f..269304764 100644
--- a/public/react/scripts/build.js
+++ b/public/react/scripts/build.js
@@ -195,7 +195,29 @@ function generateNewIndexJsp() {
let cdnHost = 'https://shixun.educoder.net'
cdnHost = 'https://ali-cdn.educoder.net'
cdnHost = ''
- var result = data.replace('/js/js_min_all.js', `${cdnHost}/react/build/js/js_min_all.js?v=${newVersion}`)
+
+
+ var mainRegex = /
+ `
+ var jsMinAllRegex = /
+ var result = data
+ .replace(jsMinAllRegex, code)
+ // .replace('/js/js_min_all.js', `${cdnHost}/react/build/js/js_min_all.js?v=${newVersion}`)
// .replace('/js/js_min_all_2.js', `${cdnHost}/react/build/js/js_min_all_2.js?v=${newVersion}`)
// ${cdnHost} 加了cdn后,这个文件里的字体文件加载会有跨域的报错 ../fonts/fontawesome-webfont.eot
@@ -204,10 +226,11 @@ function generateNewIndexJsp() {
.replace('/css/iconfont.css', `${cdnHost}/react/build/css/iconfont.css?v=${newVersion}`)
.replace(/\/js\/create_kindeditor.js/g, `${cdnHost}/react/build/js/create_kindeditor.js?v=${newVersion}`)
+ .replace(mainRegex, '')
// .replace('/react/build/./static/css/main', `${cdnHost}/react/build/./static/css/main`)
// .replace('/react/build/./static/js/main', `${cdnHost}/react/build/./static/js/main`)
- .replace(/https:\/\/testeduplus2.educoder.net/g, '');
+ // .replace(/https:\/\/testeduplus2.educoder.net/g, '');
// .replace(/http:\/\/testbdweb.educoder.net/g, '');
// .replace('/css/css_min_all.css', '/react/build/css/css_min_all.css');
diff --git a/public/react/src/App.css b/public/react/src/App.css
index a6f1d45e7..2b3d8d08c 100644
--- a/public/react/src/App.css
+++ b/public/react/src/App.css
@@ -55,6 +55,10 @@ html, body {
.markdown-body p {
white-space: pre-wrap;
}
+/* https://www.educoder.net/courses/2346/group_homeworks/34405/question */
+.renderAsHtml.markdown-body p {
+ white-space: inherit;
+}
/* resize */
.editormd .CodeMirror {
border-right: none !important;
diff --git a/public/react/src/App.js b/public/react/src/App.js
index e6f55f5d2..b40af3e0b 100644
--- a/public/react/src/App.js
+++ b/public/react/src/App.js
@@ -1,4 +1,5 @@
import React, {Component} from 'react';
+import './public-path';
import logo from './logo.svg';
import './App.css';
import {LocaleProvider} from 'antd'
diff --git a/public/react/src/common/TextUtil.js b/public/react/src/common/TextUtil.js
index 4c83131f1..74cdef3e6 100644
--- a/public/react/src/common/TextUtil.js
+++ b/public/react/src/common/TextUtil.js
@@ -9,6 +9,7 @@ export function markdownToHTML(oldContent, selector) {
window.$('#md_div').html('')
// markdown to html
if (selector && oldContent && oldContent.startsWith('{
return(
-
+
{
item.is_pdf && item.is_pdf == true ?
- {item.title}
+ 30 }>
+ {item.title}
+
:
- {item.title}
+ 30 }>
+ {item.title}
+
}
{item.filesize}
diff --git a/public/react/src/modules/courses/Resource/Fileslistitem.js b/public/react/src/modules/courses/Resource/Fileslistitem.js
index 925bcc817..b06ab3dc1 100644
--- a/public/react/src/modules/courses/Resource/Fileslistitem.js
+++ b/public/react/src/modules/courses/Resource/Fileslistitem.js
@@ -129,12 +129,16 @@ class Fileslistitem extends Component{
.catch(function (error) {
console.log(error);
});
- }
+ }
+
+ eventStop = (event) =>{
+ event.stopPropagation()
+ }
render(){
const { checkBox,
- discussMessage,
+ discussMessage,index
} = this.props;
return(
@@ -190,9 +194,9 @@ class Fileslistitem extends Component{
white-space:nowrap
}
`}
-
diff --git a/public/react/src/modules/courses/boards/BoardsNew.js b/public/react/src/modules/courses/boards/BoardsNew.js
index b02f6a73f..0b27ea8b8 100644
--- a/public/react/src/modules/courses/boards/BoardsNew.js
+++ b/public/react/src/modules/courses/boards/BoardsNew.js
@@ -337,6 +337,17 @@ class BoardsNew extends Component{
}
+
+
)}
@@ -365,10 +376,15 @@ class BoardsNew extends Component{
dropdownRender={menu => (
{menu}
-
-
this.refs['addDirModal'].open()}>
- 添加目录
-
+ {
+ isAdmin &&
+
+
+ this.refs['addDirModal'].open()}>
+ 添加目录
+
+
+ }
)}
>
diff --git a/public/react/src/modules/courses/boards/TopicDetail.js b/public/react/src/modules/courses/boards/TopicDetail.js
index 432c597ee..542157bfb 100644
--- a/public/react/src/modules/courses/boards/TopicDetail.js
+++ b/public/react/src/modules/courses/boards/TopicDetail.js
@@ -24,7 +24,7 @@ import '../../forums/RightSection.css'
import './TopicDetail.css'
import '../common/courseMessage.css'
import { Pagination, Tooltip } from 'antd'
-import { bytesToSize, ConditionToolTip, markdownToHTML, MarkdownToHtml } from 'educoder'
+import { bytesToSize, ConditionToolTip, markdownToHTML, MarkdownToHtml , setImagesUrl } from 'educoder'
import SendToCourseModal from '../coursesPublic/modal/SendToCourseModal'
import CBreadcrumb from '../common/CBreadcrumb'
import { generateComments, generateChildComments, _findById, handleContentBeforeCreateNew, addNewComment
@@ -57,6 +57,7 @@ class TopicDetail extends Component {
pageCount: 1,
comments: [],
goldRewardDialogOpen: false,
+ author:undefined
}
}
componentDidMount() {
@@ -85,7 +86,8 @@ class TopicDetail extends Component {
memo: Object.assign({}, {
...response.data.data,
replies_count: response.data.data.total_replies_count
- }, {...this.state.memo})
+ }, {...this.state.memo}),
+ author:response.data.data.author
}, () => {
})
@@ -514,7 +516,7 @@ class TopicDetail extends Component {
render() {
const { match, history } = this.props
const { recommend_shixun, current_user,author_info } = this.props;
- const { memo, comments, hasMoreComments, goldRewardDialogOpen, pageCount, total_count } = this.state;
+ const { memo, comments, hasMoreComments, goldRewardDialogOpen, pageCount, total_count , author } = this.state;
const messageId = match.params.topicId
if (this.state.memoLoading || !current_user) {
return
@@ -599,51 +601,54 @@ class TopicDetail extends Component {
}
-
-
{moment(memo.created_on).fromNow()} 发布
-
-
-
-
-
-
-
- {/* { current_user.admin &&
-
-
-
- } */}
-
-
-
- {memo.visits || '1'}
-
-
- { !!memo.total_replies_count &&
-
-
-
- { memo.total_replies_count }
-
-
- }
- {!!memo.praises_count &&
-
-
-
- { memo.praises_count }
+
+
+
+
+ {author && author.name}
+ {moment(memo.created_on).fromNow()} 发布
+
+
+
+
+ {/* { current_user.admin &&
+
+
-
+ } */}
+
+
+
+ {memo.visits || '1'}
+
+
+ { !!memo.total_replies_count &&
+
+
+
+ { memo.total_replies_count }
+
+
}
-
-
+ {!!memo.total_praises_count &&
+
+
+
+ { memo.total_praises_count }
+
+
+ }
+
+
+
+
diff --git a/public/react/src/modules/courses/busyWork/CommonWorkAppraise.js b/public/react/src/modules/courses/busyWork/CommonWorkAppraise.js
index 3a7e25fcd..ae40fedda 100644
--- a/public/react/src/modules/courses/busyWork/CommonWorkAppraise.js
+++ b/public/react/src/modules/courses/busyWork/CommonWorkAppraise.js
@@ -15,7 +15,7 @@ import WorkDetailPageHeader from './common/WorkDetailPageHeader'
import CommonWorkAppraiseReply from './reply/CommonWorkAppraiseReply'
import Example from './TestHooks'
import CommonWorkAppraiseReviseAttachments from './CommonWorkAppraiseReviseAttachments'
-
+import LeaderIcon from './common/LeaderIcon'
const { Option} = Select;
const CheckboxGroup = Checkbox.Group;
const confirm = Modal.confirm;
@@ -88,6 +88,14 @@ class CommonWorkAppraise extends Component{
console.log(error)
})
}
+ componentDidUpdate(prevProps, prevState) {
+ if (this.props.match.params.studentWorkId != prevProps.match.params.studentWorkId) {
+ this.getWork();
+ this.getReviseAttachments()
+ this.commonWorkAppraiseReply && this.commonWorkAppraiseReply.fetchAllComments()
+ }
+ }
+
componentDidMount() {
this.getWork();
this.getReviseAttachments()
@@ -156,12 +164,13 @@ class CommonWorkAppraise extends Component{
attachments, homework_id, project_info, work_members, is_evaluation,
description, update_user_name, update_time, commit_time, author_name,
revise_attachments, revise_reason, atta_update_user, atta_update_time, atta_update_user_login,
- Modalstype,Modalstopval,ModalCancel,ModalSave,loadtype
+ Modalstype,Modalstopval,ModalCancel,ModalSave,loadtype, is_leader_work
} =this.state;
let courseId=this.props.match.params.coursesId;
let category_id=this.props.match.params.category_id;
let studentWorkId=this.props.match.params.studentWorkId;
+ const isAdmin = this.props.isAdmin()
return(
- 其他组员
+ 全部组员
-
- {work_members.map((item, index) => {
- return item.user_name + ' '
- })}
+
+
+ 当前组员:{author_name} {is_leader_work && }
+
+
+
}
@@ -266,6 +290,7 @@ class CommonWorkAppraise extends Component{
{/* task_type={datalist&&datalist.task_type} */}
{this.commonWorkAppraiseReply = ref}}
>
diff --git a/public/react/src/modules/courses/busyWork/CommonWorkList.js b/public/react/src/modules/courses/busyWork/CommonWorkList.js
index 528aa1d9e..28e54fff3 100644
--- a/public/react/src/modules/courses/busyWork/CommonWorkList.js
+++ b/public/react/src/modules/courses/busyWork/CommonWorkList.js
@@ -15,7 +15,7 @@ import WorkDetailPageHeader from './common/WorkDetailPageHeader'
import PublishRightnow from './PublishRightnow'
import ModulationModal from "../coursesPublic/ModulationModal";
import AccessoryModal from "../coursesPublic/AccessoryModal";
-
+import LeaderIcon from './common/LeaderIcon'
const { Option} = Select;
const CheckboxGroup = Checkbox.Group;
const confirm = Modal.confirm;
@@ -97,7 +97,12 @@ function buildColumns(that, student_works, studentData) {
}} title={text && text.length > 5 ? text : ''}>
{/*
*/}
- {text}
+ {record.is_leader ?
+
+ : {text} }
),
}]
diff --git a/public/react/src/modules/courses/busyWork/NewWork.js b/public/react/src/modules/courses/busyWork/NewWork.js
index ca79e8ac5..525e13922 100644
--- a/public/react/src/modules/courses/busyWork/NewWork.js
+++ b/public/react/src/modules/courses/busyWork/NewWork.js
@@ -389,6 +389,17 @@ class NewWork extends Component{
{/* onSubmit={this.handleSubmit} */}
+
+
)}
-
-
+
+
{homework_name}
{/* {homework_name} */}
- {category &&
返回 }
+ {category &&
返回 }
{this.props.update_atta &&
diff --git a/public/react/src/modules/courses/busyWork/commonWork.js b/public/react/src/modules/courses/busyWork/commonWork.js
index f9c34cfcf..d5ac0be68 100644
--- a/public/react/src/modules/courses/busyWork/commonWork.js
+++ b/public/react/src/modules/courses/busyWork/commonWork.js
@@ -143,7 +143,9 @@ class commonWork extends Component{
this.setState({
order:e.key==="all"?"":e.key,
page:1,
- isSpin:true
+ isSpin:true,
+ checkBoxValues:[],
+ checkAll:false
})
let {search}=this.state;
this.getList(1,search,e.key==="all"?"":e.key);
diff --git a/public/react/src/modules/courses/coursesPublic/NoneData.js b/public/react/src/modules/courses/coursesPublic/NoneData.js
index 73406ab5c..35d7a5271 100644
--- a/public/react/src/modules/courses/coursesPublic/NoneData.js
+++ b/public/react/src/modules/courses/coursesPublic/NoneData.js
@@ -1,5 +1,5 @@
import React, { Component } from 'react';
-import {getImageUrl} from 'educoder';
+import { getImageUrl , getUrl } from 'educoder';
class NoneData extends Component{
constructor(props) {
@@ -9,7 +9,20 @@ class NoneData extends Component{
const { style } = this.props;
return(
-
+
+
暂时还没有相关数据哦!
)
diff --git a/public/react/src/modules/courses/coursesPublic/modal/SendToCourseModal.js b/public/react/src/modules/courses/coursesPublic/modal/SendToCourseModal.js
index af3fc1a30..c4c306a12 100644
--- a/public/react/src/modules/courses/coursesPublic/modal/SendToCourseModal.js
+++ b/public/react/src/modules/courses/coursesPublic/modal/SendToCourseModal.js
@@ -1,209 +1,209 @@
-import React, { Component } from "react";
-import { Modal, Checkbox, Input, Spin} from "antd";
-import axios from 'axios'
-import ModalWrapper from "../../common/ModalWrapper"
-import InfiniteScroll from 'react-infinite-scroller';
-
-const Search = Input.Search
-const pageCount = 15;
-class SendToCourseModal extends Component{
- constructor(props){
- super(props);
- this.state={
- checkBoxValues: [],
- course_lists: [],
- course_lists_after_filter: [],
- searchValue: '',
- hasMore: true,
- loading: false,
- page: 1
- }
- }
- fetchCourseList = (arg_page) => {
- const page = arg_page || this.state.page;
- // search=''&
- let url = `/courses/mine.json?page=${page}&page_size=${pageCount}`
- const searchValue = this.state.searchValue.trim()
- if (searchValue) {
- url += `&search=${searchValue}`
- }
- this.setState({ loading: true })
- axios.get(url, {
- })
- .then((response) => {
- if (!response.data.data || response.data.data.length == 0) {
- this.setState({
- course_lists: page == 1 ? [] : this.state.course_lists,
- page,
- loading: false,
- hasMore: false,
- })
- } else {
- this.setState({
- course_lists: page == 1 ? response.data.data : this.state.course_lists.concat(response.data.data),
- course_lists_after_filter: response.data.data,
- page,
- loading: false,
- hasMore: response.data.data.length == pageCount
- })
- }
-
- })
- .catch(function (error) {
- console.log(error);
- });
- }
- componentDidMount() {
- setTimeout(() => {
- this.fetchCourseList()
- }, 500)
-
- }
- setVisible = (visible) => {
- this.refs.modalWrapper.setVisible(visible)
- if (visible == false) {
- this.setState({
- checkBoxValues: []
- })
- }
- }
-
- onSendOk = () => {
- if (!this.state.checkBoxValues || this.state.checkBoxValues.length == 0) {
- this.props.showNotification('请先选择要发送至的课堂')
- return;
- }
- if(this.props.url==="/files/bulk_send.json"){
- axios.post("/files/bulk_send.json", {
- course_id:this.props.match.params.coursesId,
- ids: this.props.selectedMessageIds,
- to_course_ids: this.state.checkBoxValues
- })
- .then((response) => {
- if (response.data.status == 0) {
- this.setVisible(false)
- this.props.gobackonSend(response.data.message)
- }
- })
- .catch(function (error) {
- console.log(error);
- });
- }else{
- const bid = this.props.match.params.boardId
- const url = `/boards/${bid}/messages/bulk_send.json`
- axios.post(url, {
- ids: this.props.selectedMessageIds,
- to_course_ids: this.state.checkBoxValues
- })
- .then((response) => {
- if (response.data.status == 0) {
- this.setVisible(false)
- this.props.showNotification('发送成功')
- }
- })
- .catch(function (error) {
- console.log(error);
- });
- }
-
- }
-
- onOk = () => {
- const { course_lists, checkBoxValues } = this.state
- this.onSendOk()
- // this.props.onOk && this.props.onOk(checkBoxValues)
-
- // this.refs.modalWrapper.setVisible(false)
- }
-
- onCheckBoxChange = (checkBoxValues) => {
- this.setState({
- checkBoxValues: checkBoxValues
- })
- }
-
- onSearchChange = (e) => {
- this.setState({
- searchValue: e.target.value
- })
- }
- handleInfiniteOnLoad = () => {
- console.log('loadmore...')
- this.fetchCourseList(this.state.page + 1)
- }
-
- onSearch = () => {
- // const course_lists_after_filter = this.state.course_lists.filter( item => item.name.indexOf(this.state.searchValue) != -1 )
- // this.setState({ course_lists_after_filter })
- this.fetchCourseList(1)
- }
- render(){
- const { course_lists, checkBoxValues, searchValue, loading, hasMore } = this.state
- const { moduleName } = this.props
- return(
-
-
- 选择的{moduleName}发送到指定课堂
-
-
-
-
- {/* https://github.com/CassetteRocks/react-infinite-scroller/issues/70 */}
-
-
-
-
- { course_lists && course_lists.map( course => {
- return (
-
-
- {course.name}
-
- )
- }) }
-
- {loading && hasMore && (
-
-
-
- )}
- {/* TODO */}
- {/* {
- !hasMore && 没有更多了。。
- } */}
-
-
-
-
- )
- }
-}
-export default SendToCourseModal;
-
-
+import React, { Component } from "react";
+import { Modal, Checkbox, Input, Spin} from "antd";
+import axios from 'axios'
+import ModalWrapper from "../../common/ModalWrapper"
+import InfiniteScroll from 'react-infinite-scroller';
+
+const Search = Input.Search
+const pageCount = 15;
+class SendToCourseModal extends Component{
+ constructor(props){
+ super(props);
+ this.state={
+ checkBoxValues: [],
+ course_lists: [],
+ course_lists_after_filter: [],
+ searchValue: '',
+ hasMore: true,
+ loading: false,
+ page: 1
+ }
+ }
+ fetchCourseList = (arg_page) => {
+ const page = arg_page || this.state.page;
+ // search=''&
+ let url = `/courses/mine.json?page=${page}&page_size=${pageCount}`
+ const searchValue = this.state.searchValue.trim()
+ if (searchValue) {
+ url += `&search=${searchValue}`
+ }
+ this.setState({ loading: true })
+ axios.get(url, {
+ })
+ .then((response) => {
+ if (!response.data.data || response.data.data.length == 0) {
+ this.setState({
+ course_lists: page == 1 ? [] : this.state.course_lists,
+ page,
+ loading: false,
+ hasMore: false,
+ })
+ } else {
+ this.setState({
+ course_lists: page == 1 ? response.data.data : this.state.course_lists.concat(response.data.data),
+ course_lists_after_filter: response.data.data,
+ page,
+ loading: false,
+ hasMore: response.data.data.length == pageCount
+ })
+ }
+
+ })
+ .catch(function (error) {
+ console.log(error);
+ });
+ }
+ componentDidMount() {
+ setTimeout(() => {
+ this.fetchCourseList()
+ }, 500)
+
+ }
+ setVisible = (visible) => {
+ this.refs.modalWrapper.setVisible(visible)
+ if (visible == false) {
+ this.setState({
+ checkBoxValues: []
+ })
+ }
+ }
+
+ onSendOk = () => {
+ if (!this.state.checkBoxValues || this.state.checkBoxValues.length == 0) {
+ this.props.showNotification('请先选择要发送至的课堂')
+ return;
+ }
+ if(this.props.url==="/files/bulk_send.json"){
+ axios.post("/files/bulk_send.json", {
+ course_id:this.props.match.params.coursesId,
+ ids: this.props.selectedMessageIds,
+ to_course_ids: this.state.checkBoxValues
+ })
+ .then((response) => {
+ if (response.data.status == 0) {
+ this.setVisible(false)
+ this.props.gobackonSend(response.data.message)
+ }
+ })
+ .catch(function (error) {
+ console.log(error);
+ });
+ }else{
+ const bid = this.props.match.params.boardId
+ const url = `/boards/${bid}/messages/bulk_send.json`
+ axios.post(url, {
+ ids: this.props.selectedMessageIds,
+ to_course_ids: this.state.checkBoxValues
+ })
+ .then((response) => {
+ if (response.data.status == 0) {
+ this.setVisible(false)
+ this.props.showNotification('发送成功')
+ }
+ })
+ .catch(function (error) {
+ console.log(error);
+ });
+ }
+
+ }
+
+ onOk = () => {
+ const { course_lists, checkBoxValues } = this.state
+ this.onSendOk()
+ // this.props.onOk && this.props.onOk(checkBoxValues)
+
+ // this.refs.modalWrapper.setVisible(false)
+ }
+
+ onCheckBoxChange = (checkBoxValues) => {
+ this.setState({
+ checkBoxValues: checkBoxValues
+ })
+ }
+
+ onSearchChange = (e) => {
+ this.setState({
+ searchValue: e.target.value
+ })
+ }
+ handleInfiniteOnLoad = () => {
+ console.log('loadmore...')
+ this.fetchCourseList(this.state.page + 1)
+ }
+
+ onSearch = () => {
+ // const course_lists_after_filter = this.state.course_lists.filter( item => item.name.indexOf(this.state.searchValue) != -1 )
+ // this.setState({ course_lists_after_filter })
+ this.fetchCourseList(1)
+ }
+ render(){
+ const { course_lists, checkBoxValues, searchValue, loading, hasMore } = this.state
+ const { moduleName } = this.props
+ return(
+
+
+ 选择的{moduleName}发送到指定课堂
+
+
+
+
+ {/* https://github.com/CassetteRocks/react-infinite-scroller/issues/70 */}
+
+
+
+
+ { course_lists && course_lists.map( course => {
+ return (
+
+
+ {course.name}
+
+ )
+ }) }
+
+ {loading && hasMore && (
+
+
+
+ )}
+ {/* TODO */}
+ {/* {
+ !hasMore && 没有更多了。。
+ } */}
+
+
+
+
+ )
+ }
+}
+export default SendToCourseModal;
+
+
diff --git a/public/react/src/modules/courses/css/members.css b/public/react/src/modules/courses/css/members.css
index ff6f0d99d..df3f884d9 100644
--- a/public/react/src/modules/courses/css/members.css
+++ b/public/react/src/modules/courses/css/members.css
@@ -1,80 +1,80 @@
-.studentList_operation_ul{
- color: #999;
- font-size: 12px;
- float: right;
- margin-top: 2px;
-}
-.studentList_operation_ul li{
- float: left;
- padding:0px 20px;
- position: relative;
- cursor: pointer;
- flex: 0 0 26px;
- line-height: 26px;
-}
-.studentList_operation_ul li.li_line:after{
- position: absolute;
- content: '';
- width: 1px;
- height: 12px;
- background-color: #EDEDED;
- right: 0px;
- top:6px;
-}
-.studentList_operation_ul li:last-child{
- padding-right: 0px;
-}
-.studentList_operation_ul li:last-child:after{
- width: 0px;
-}
-
-/* 基础的下拉列表、列如排序等 */
-.drop_down_normal li{
- padding: 0px 20px;
- height: 34px;
- line-height: 34px;
- min-width: 96px;
- color: #333;
- font-size: 14px;
- cursor: pointer;
- width: 100%;
-}
-
-.stu_table table{
- line-height: 1.2;
-}
-.stu_table .classesName{
- display: block;
- max-width: 428px;
-}
-.stu_table .ant-table-thead > tr > th{
- padding:21px 16px;
- border-bottom: none;
-}
-.stu_table .ant-table-tbody tr:last-child td{
- border-bottom: none;
-}
-.stu_table table .ant-table-tbody > tr:hover:not(.ant-table-expanded-row) > td{
- background-color: #fff;
-}
-
-.stu_head{
- padding-bottom: 15px;
-}
-.ant-modal-body{
- padding:30px 40px;
-}
-.color-dark-21{
- color: #212121;
-}
-.tabletd {
- background-color:#E6F7FF;
-}
-
-.yslminheigth{
- min-height: 20px;
-}
-
-.yslminheigths{
- min-height: 21px;
+.studentList_operation_ul{
+ color: #999;
+ font-size: 12px;
+ float: right;
+ margin-top: 2px;
+}
+.studentList_operation_ul li{
+ float: left;
+ padding:0px 20px;
+ position: relative;
+ cursor: pointer;
+ flex: 0 0 26px;
+ line-height: 26px;
+}
+.studentList_operation_ul li.li_line:after{
+ position: absolute;
+ content: '';
+ width: 1px;
+ height: 12px;
+ background-color: #EDEDED;
+ right: 0px;
+ top:6px;
+}
+.studentList_operation_ul li:last-child{
+ padding-right: 0px;
+}
+.studentList_operation_ul li:last-child:after{
+ width: 0px;
+}
+
+/* 基础的下拉列表、列如排序等 */
+.drop_down_normal li{
+ padding: 0px 20px;
+ height: 34px;
+ line-height: 34px;
+ min-width: 96px;
+ color: #333;
+ font-size: 14px;
+ cursor: pointer;
+ width: 100%;
+}
+
+.stu_table table{
+ line-height: 1.2;
+}
+.stu_table .classesName{
+ display: block;
+ max-width: 428px;
+}
+.stu_table .ant-table-thead > tr > th{
+ padding:21px 16px;
+ border-bottom: none;
+}
+.stu_table .ant-table-tbody tr:last-child td{
+ border-bottom: none;
+}
+.stu_table table .ant-table-tbody > tr:hover:not(.ant-table-expanded-row) > td{
+ background-color: #fff;
+}
+
+.stu_head{
+ padding-bottom: 15px;
+}
+.ant-modal-body{
+ padding:30px 40px;
+}
+.color-dark-21{
+ color: #212121;
+}
+.tabletd {
+ background-color:#E6F7FF;
+}
+
+.yslminheigth{
+ min-height: 20px;
+}
+
+.yslminheigths{
+ min-height: 21px;
}
\ No newline at end of file
diff --git a/public/react/src/modules/courses/exercise/Exercise.js b/public/react/src/modules/courses/exercise/Exercise.js
index c905c641f..83227fb5a 100644
--- a/public/react/src/modules/courses/exercise/Exercise.js
+++ b/public/react/src/modules/courses/exercise/Exercise.js
@@ -572,7 +572,7 @@ class Exercise extends Component{
{...this.props}
{...this.state}
item={item}
- key={key}
+ index={key}
onItemClick={this.onItemClick}
checkBox={ }
diff --git a/public/react/src/modules/courses/exercise/ExerciseListItem.js b/public/react/src/modules/courses/exercise/ExerciseListItem.js
index b5af9ebbd..77bb01d04 100644
--- a/public/react/src/modules/courses/exercise/ExerciseListItem.js
+++ b/public/react/src/modules/courses/exercise/ExerciseListItem.js
@@ -52,17 +52,17 @@ class ExerciseListItem extends Component{
})
}
render(){
- let{item,checkBox}=this.props;
+ let{item,checkBox,index}=this.props;
let {coursesId,Id}=this.props.match.params
const IsAdmin =this.props.isAdmin();
const IsStudent =this.props.isStudent();
// console.log(this.props.current_user.user_id)
return(
- this.props.onItemClick(this.props.item)}>
+
this.props.onItemClick(this.props.item)}>
{
- IsAdmin &&
-
+ IsAdmin &&
+
{checkBox}
}
@@ -96,20 +96,20 @@ class ExerciseListItem extends Component{
{/* {item.exercise_name}*/}
{
- this.props.isAdmin()? {item.exercise_name} :""
+ to={`/courses/${coursesId}/exercises/${item.id}/student_exercise_list?tab=0`}>{item.exercise_name}:""
}
{
this.props.isStudent()?
- {item.exercise_name} :""
+ {item.exercise_name}:""
}
{
this.props.isNotMember()? item.lock_status === 0 ?
{item.exercise_name}
- : {item.exercise_name} :""
+ : {item.exercise_name}:""
}
{
@@ -165,8 +165,8 @@ class ExerciseListItem extends Component{
{ IsAdmin && }
@@ -193,7 +193,7 @@ class ExerciseListItem extends Component{
}
diff --git a/public/react/src/modules/courses/exercise/ExerciseNew.js b/public/react/src/modules/courses/exercise/ExerciseNew.js
index cbde30a5e..017fff71e 100644
--- a/public/react/src/modules/courses/exercise/ExerciseNew.js
+++ b/public/react/src/modules/courses/exercise/ExerciseNew.js
@@ -481,8 +481,19 @@ class ExerciceNew extends Component{
max: 20, message: '最大限制为20个字符',
}],
})( */}
-
+ {
+ `
+ .exercicenewinputysl .ant-input{
+ border-right: none !important;
+ height: 40px !important;
+ }
+
+ `
+ }
+
+
{/* )} */}
diff --git a/public/react/src/modules/courses/exercise/ExerciseReviewAndAnswer.js b/public/react/src/modules/courses/exercise/ExerciseReviewAndAnswer.js
index cdbc7218b..f38ad7435 100644
--- a/public/react/src/modules/courses/exercise/ExerciseReviewAndAnswer.js
+++ b/public/react/src/modules/courses/exercise/ExerciseReviewAndAnswer.js
@@ -541,6 +541,18 @@ class ExerciseReviewAndAnswer extends Component{
.inputNumber30 .ant-input-number-input-wrap .ant-input-number-input{
height: 28px;
}
+ .setRadioStyle{
+ width:100%;
+ cursor:pointer;
+ }
+ .setRadioStyle span:last-child{
+ flex:1;
+ display:flex;
+ }
+ .setRadioStyle .ant-radio,.setRadioStyle .ant-checkbox{
+ height:16px;
+ margin-top:2px;
+ }
`}
{/*
*/}
-
+
{
questionType.question_choices && questionType.question_choices.map((item,key)=>{
let prefix = `${tagArray[key]}.`
return(
- {prefix}
- {/* */}
- {/* */}
-
+
+ {prefix}
+
+
)
})
diff --git a/public/react/src/modules/courses/exercise/question/single.js b/public/react/src/modules/courses/exercise/question/single.js
index a879bad74..5156019d4 100644
--- a/public/react/src/modules/courses/exercise/question/single.js
+++ b/public/react/src/modules/courses/exercise/question/single.js
@@ -40,18 +40,18 @@ class single extends Component{
let isJudge = questionType.question_type == 2
return(
-
+
{
questionType.question_choices && questionType.question_choices.map((item,key)=>{
let prefix = isJudge ? undefined : `${tagArray[key]}.`
return(
-
- {prefix}
- {/* */}
- {/* */}
-
+
+
+ {prefix}
+
+
)
})
diff --git a/public/react/src/modules/courses/gradinforms/Bullsubdirectory.js b/public/react/src/modules/courses/gradinforms/Bullsubdirectory.js
index c7f773190..ebfd2d51b 100644
--- a/public/react/src/modules/courses/gradinforms/Bullsubdirectory.js
+++ b/public/react/src/modules/courses/gradinforms/Bullsubdirectory.js
@@ -218,11 +218,19 @@ class Bullsubdirectory extends Component{
*
+
diff --git a/public/react/src/modules/courses/gradinforms/Eduinforms.js b/public/react/src/modules/courses/gradinforms/Eduinforms.js
index f847c87d3..10beb4507 100644
--- a/public/react/src/modules/courses/gradinforms/Eduinforms.js
+++ b/public/react/src/modules/courses/gradinforms/Eduinforms.js
@@ -287,11 +287,19 @@ class Eduinforms extends Component{
*
+
diff --git a/public/react/src/modules/courses/graduation/tasks/GraduateTaskItem.js b/public/react/src/modules/courses/graduation/tasks/GraduateTaskItem.js
index d30944ef0..92a4832db 100644
--- a/public/react/src/modules/courses/graduation/tasks/GraduateTaskItem.js
+++ b/public/react/src/modules/courses/graduation/tasks/GraduateTaskItem.js
@@ -151,16 +151,12 @@ class GraduateTaskItem extends Component{
coursesId,
categoryid,
taskid,
-
+ index,
+ isAdmin
} = this.props;
- // console.log(discussMessage)
-
-
-
-
return(
-
+
window.$(`.taskitem${index} input`).click() }>
- { checkBox }
-
+
+ { checkBox }
+
{/*
style={{borderTop:data===undefined?"":data.course_identity<4?'1px solid #EBEBEB':'1px solid transparent'}}
*/}
diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTasksedit.js b/public/react/src/modules/courses/graduation/tasks/GraduationTasksedit.js
index 42a128719..869295c59 100644
--- a/public/react/src/modules/courses/graduation/tasks/GraduationTasksedit.js
+++ b/public/react/src/modules/courses/graduation/tasks/GraduationTasksedit.js
@@ -375,11 +375,21 @@ class GraduationTasksedit extends Component{
(选择确认后,无法修改)
-
+
{getFieldDecorator('name', {
rules: [{ required: true, message: "请输入标题" }],
- })( )}
+ })( )}
diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTasksnew.js b/public/react/src/modules/courses/graduation/tasks/GraduationTasksnew.js
index 7c499430a..fae87fb65 100644
--- a/public/react/src/modules/courses/graduation/tasks/GraduationTasksnew.js
+++ b/public/react/src/modules/courses/graduation/tasks/GraduationTasksnew.js
@@ -377,15 +377,23 @@ class GraduationTasksnew extends Component {
margin-top: 0px;
margin-bottom: 0px;
}
+ .yslgts .ant-input{
+ border-right: none !important;
+ height: 40px !important;
+ }
`
}
{getFieldDecorator('name', {
rules: [{required: true, message: "不能为空"}],
- })( )}
+ })(
+
+
+
+ )}
diff --git a/public/react/src/modules/courses/graduation/tasks/index.js b/public/react/src/modules/courses/graduation/tasks/index.js
index 464e01ea0..5f8aec607 100644
--- a/public/react/src/modules/courses/graduation/tasks/index.js
+++ b/public/react/src/modules/courses/graduation/tasks/index.js
@@ -364,7 +364,7 @@ class GraduationTasks extends Component{
}
- PaginationTask=(page)=>{
+ PaginationTask=(page)=>{
let {search,order,selectpage,checkAllValue,checkBoxValues}=this.state;
let selectpagetype=selectpage===page?true:false
@@ -393,7 +393,9 @@ class GraduationTasks extends Component{
this.setState({
order: e.key,
- isSpin:true
+ isSpin:true,
+ checkBoxValues:[],
+ checkAllValue:false
});
let newkey=e.key;
@@ -676,7 +678,7 @@ class GraduationTasks extends Component{
// }
secondRowLeft={
-
+
共{all_count}个毕设任务
已发布:{this.state.published_count}个
未发布:{this.state.unpublished_count}个
@@ -738,7 +740,7 @@ class GraduationTasks extends Component{
{ tasks&&tasks.map((item, index) => {
// console.log(item)
return (
-
this.onItemClick(item)}>
+
diff --git a/public/react/src/modules/courses/graduation/topics/GraduateTopicDetailInfo.js b/public/react/src/modules/courses/graduation/topics/GraduateTopicDetailInfo.js
index 0c76cd9de..9ba334421 100644
--- a/public/react/src/modules/courses/graduation/topics/GraduateTopicDetailInfo.js
+++ b/public/react/src/modules/courses/graduation/topics/GraduateTopicDetailInfo.js
@@ -6,7 +6,7 @@ import '../style.css'
import axios from "axios";
import GraduateTopicReply from './GraduateTopicReply'
-import { ConditionToolTip,MarkdownToHtml } from 'educoder'
+import { ConditionToolTip , MarkdownToHtml , AttachmentList } from 'educoder'
const $=window.$;
const type={1: "设计",2: "论文", 3: "创作"}
@@ -60,9 +60,10 @@ class GraduateTopicDetailTable extends Component{
{
topicInfo && topicInfo.attachment_list.length>0 &&
- {
+ {/* {
topicInfo.attachment_list.map((item,key)=>{
return(
+
30 }>
@@ -72,7 +73,8 @@ class GraduateTopicDetailTable extends Component{
)
})
- }
+ } */}
+
}
diff --git a/public/react/src/modules/courses/graduation/topics/GraduateTopicItem.js b/public/react/src/modules/courses/graduation/topics/GraduateTopicItem.js
index dfa5b5b74..7d504090f 100644
--- a/public/react/src/modules/courses/graduation/topics/GraduateTopicItem.js
+++ b/public/react/src/modules/courses/graduation/topics/GraduateTopicItem.js
@@ -47,7 +47,7 @@ class GraduateTopicItem extends Component{
}
-
+
window.$(`.topicItem${index} input`).click() }>
- { isAdmin ? checkBox : ""}
+ { isAdmin ?
{checkBox} : ""}
+
)}
diff --git a/public/react/src/modules/courses/members/modal/AddStudentModal.js b/public/react/src/modules/courses/members/modal/AddStudentModal.js
index 217bc8332..de95bc741 100644
--- a/public/react/src/modules/courses/members/modal/AddStudentModal.js
+++ b/public/react/src/modules/courses/members/modal/AddStudentModal.js
@@ -1,288 +1,288 @@
-import React, { Component } from "react";
-import { Modal, Checkbox, Input, Spin, Select, Divider } from "antd";
-import axios from 'axios'
-import ModalWrapper from "../../common/ModalWrapper"
-import InfiniteScroll from 'react-infinite-scroller';
-import { ROLE_TEACHER_NUM, ROLE_ASSISTANT_NUM } from '../common'
-import NoneData from '../../coursesPublic/NoneData'
-import { ConditionToolTip, ThemeContext } from 'educoder'
-import SchoolSelect from '../../coursesPublic/form/SchoolSelect'
-
-const Option = Select.Option;
-const pageCount = 15;
-class AddStudentModal extends Component{
- constructor(props){
- super(props);
- this.state={
- checkBoxValues: [],
- users: [],
- hasMore: true,
- loading: false,
- courseGroup: '',
- page: 1,
- isSpin:false
- }
- }
- fetchMemberList = (arg_page) => {
- const courseId = this.props.match.params.coursesId
- const page = arg_page || this.state.page;
- const { name, school_name } = this.state
- let url = `/courses/${courseId}/search_users.json?page=${page}&limit=${pageCount}&school_name=${school_name || ''}&name=${name || ''}`
- this.setState({ loading: true })
- axios.get(url)
- .then((response) => {
- if (!response.data.users || response.data.users.length == 0) {
- this.setState({
- users: page == 1 ? response.data.users : this.state.users,
- page,
- loading: false,
- hasMore: false,
- })
- } else {
- this.setState({
- users: page == 1 ? response.data.users : this.state.users.concat(response.data.users),
- page,
- loading: false,
- hasMore: response.data.users.length == pageCount
- })
- }
-
- })
- .catch(function (error) {
- console.log(error);
- });
- }
- componentDidMount() {
-
-
- }
- fetchOptions = () => {
- // add_teacher_popup
- const courseId = this.props.match.params.coursesId
-
- let url = `/courses/${courseId}/all_course_groups.json`
-
- axios.get(url, {
- })
- .then((response) => {
- if (response.data.course_groups && response.data.course_groups.length) {
- this.setState({
- course_groups: response.data.course_groups,
- courseGroup: response.data.course_groups[0].id
- })
- } else {
- // showNotification('')
- }
- })
- .catch(function (error) {
- console.log(error);
- });
- }
- setVisible = (visible) => {
- if (visible) {
- this.setState({school_name: this.props.user.user_school})
- this.fetchMemberList()
- this.fetchOptions()
- }
- this.refs.modalWrapper.setVisible(visible)
- if (visible == false) {
- this.setState({
- checkBoxValues: []
- })
- }
- }
-
- onSendOk = () => {
-
- if(!this.state.checkBoxValues || this.state.checkBoxValues.length == 0) {
- this.props.showNotification('请从列表中先选择用户。')
- return;
- }
- this.setState({
- isSpin:true
- })
- const courseId = this.props.match.params.coursesId
- const url = `/courses/${courseId}/add_students_by_search.json`
- const params = {
- "user_ids": this.state.checkBoxValues
- }
- const { courseGroup } = this.state
- if (courseGroup) {
- params.course_group_id = courseGroup
- }
- axios.post(url, params)
- .then((response) => {
- if (response.data.status == 0) {
- this.setVisible(false)
- this.props.showNotification('添加成功')
- this.props.addStudentSuccess && this.props.addStudentSuccess(params)
- this.setState({
- isSpin:false
- })
- }
- })
- .catch(function (error) {
- console.log(error);
- });
- }
-
- onOk = () => {
- this.onSendOk()
- }
-
- onCheckBoxChange = (checkBoxValues) => {
- this.setState({
- checkBoxValues: checkBoxValues
- })
- }
-
- handleInfiniteOnLoad = () => {
- this.fetchMemberList(this.state.page + 1)
- }
-
- onSearch = () => {
- this.fetchMemberList(1)
- }
- handleCourseGroupChange = (value) => {
- this.setState({
- courseGroup: value
- })
- }
- render(){
- const { users, checkBoxValues, loading, hasMore, name, school_name
- , courseGroup, course_groups,isSpin } = this.state
- const { moduleName } = this.props
- let theme = this.context;
- return(
-
-
-
- {/* */}
-
-
-
-
- {'姓名'}
- {'学号'}
- {'单位'}
- {''}
-
-
-
- { loading || users.length ?
- {/* https://github.com/CassetteRocks/react-infinite-scroller/issues/70 */}
-
-
-
-
- { users.map( candidate => {
- return (
-
-
-
- 12 }>
-
- { candidate.name ?
-
- { candidate.name }
- : }
-
-
-
-
- 12 }>
- {candidate.student_id || ' '}
-
-
- {candidate.school_name}
- {candidate.added ? '已加入' : ''}
-
-
- )
- }) }
-
- {loading && hasMore && (
-
-
-
- )}
-
-
-
- {course_groups && course_groups.length &&
- 所选学生分班至(选填):
-
- { course_groups.map((item) => {
- return {item.name}
- })}
-
-
}
-
: }
-
-
- )
- }
-}
-
-AddStudentModal.contextType = ThemeContext;
-export default AddStudentModal;
+import React, { Component } from "react";
+import { Modal, Checkbox, Input, Spin, Select, Divider } from "antd";
+import axios from 'axios'
+import ModalWrapper from "../../common/ModalWrapper"
+import InfiniteScroll from 'react-infinite-scroller';
+import { ROLE_TEACHER_NUM, ROLE_ASSISTANT_NUM } from '../common'
+import NoneData from '../../coursesPublic/NoneData'
+import { ConditionToolTip, ThemeContext } from 'educoder'
+import SchoolSelect from '../../coursesPublic/form/SchoolSelect'
+
+const Option = Select.Option;
+const pageCount = 15;
+class AddStudentModal extends Component{
+ constructor(props){
+ super(props);
+ this.state={
+ checkBoxValues: [],
+ users: [],
+ hasMore: true,
+ loading: false,
+ courseGroup: '',
+ page: 1,
+ isSpin:false
+ }
+ }
+ fetchMemberList = (arg_page) => {
+ const courseId = this.props.match.params.coursesId
+ const page = arg_page || this.state.page;
+ const { name, school_name } = this.state
+ let url = `/courses/${courseId}/search_users.json?page=${page}&limit=${pageCount}&school_name=${school_name || ''}&name=${name || ''}`
+ this.setState({ loading: true })
+ axios.get(url)
+ .then((response) => {
+ if (!response.data.users || response.data.users.length == 0) {
+ this.setState({
+ users: page == 1 ? response.data.users : this.state.users,
+ page,
+ loading: false,
+ hasMore: false,
+ })
+ } else {
+ this.setState({
+ users: page == 1 ? response.data.users : this.state.users.concat(response.data.users),
+ page,
+ loading: false,
+ hasMore: response.data.users.length == pageCount
+ })
+ }
+
+ })
+ .catch(function (error) {
+ console.log(error);
+ });
+ }
+ componentDidMount() {
+
+
+ }
+ fetchOptions = () => {
+ // add_teacher_popup
+ const courseId = this.props.match.params.coursesId
+
+ let url = `/courses/${courseId}/all_course_groups.json`
+
+ axios.get(url, {
+ })
+ .then((response) => {
+ if (response.data.course_groups && response.data.course_groups.length) {
+ this.setState({
+ course_groups: response.data.course_groups,
+ courseGroup: response.data.course_groups[0].id
+ })
+ } else {
+ // showNotification('')
+ }
+ })
+ .catch(function (error) {
+ console.log(error);
+ });
+ }
+ setVisible = (visible) => {
+ if (visible) {
+ this.setState({school_name: this.props.user.user_school})
+ this.fetchMemberList()
+ this.fetchOptions()
+ }
+ this.refs.modalWrapper.setVisible(visible)
+ if (visible == false) {
+ this.setState({
+ checkBoxValues: []
+ })
+ }
+ }
+
+ onSendOk = () => {
+
+ if(!this.state.checkBoxValues || this.state.checkBoxValues.length == 0) {
+ this.props.showNotification('请从列表中先选择用户。')
+ return;
+ }
+ this.setState({
+ isSpin:true
+ })
+ const courseId = this.props.match.params.coursesId
+ const url = `/courses/${courseId}/add_students_by_search.json`
+ const params = {
+ "user_ids": this.state.checkBoxValues
+ }
+ const { courseGroup } = this.state
+ if (courseGroup) {
+ params.course_group_id = courseGroup
+ }
+ axios.post(url, params)
+ .then((response) => {
+ if (response.data.status == 0) {
+ this.setVisible(false)
+ this.props.showNotification('添加成功')
+ this.props.addStudentSuccess && this.props.addStudentSuccess(params)
+ this.setState({
+ isSpin:false
+ })
+ }
+ })
+ .catch(function (error) {
+ console.log(error);
+ });
+ }
+
+ onOk = () => {
+ this.onSendOk()
+ }
+
+ onCheckBoxChange = (checkBoxValues) => {
+ this.setState({
+ checkBoxValues: checkBoxValues
+ })
+ }
+
+ handleInfiniteOnLoad = () => {
+ this.fetchMemberList(this.state.page + 1)
+ }
+
+ onSearch = () => {
+ this.fetchMemberList(1)
+ }
+ handleCourseGroupChange = (value) => {
+ this.setState({
+ courseGroup: value
+ })
+ }
+ render(){
+ const { users, checkBoxValues, loading, hasMore, name, school_name
+ , courseGroup, course_groups,isSpin } = this.state
+ const { moduleName } = this.props
+ let theme = this.context;
+ return(
+
+
+
+ {/* */}
+
+
+
+
+ {'姓名'}
+ {'学号'}
+ {'单位'}
+ {''}
+
+
+
+ { loading || users.length ?
+ {/* https://github.com/CassetteRocks/react-infinite-scroller/issues/70 */}
+
+
+
+
+ { users.map( candidate => {
+ return (
+
+
+
+ 12 }>
+
+ { candidate.name ?
+
+ { candidate.name }
+ : }
+
+
+
+
+ 12 }>
+ {candidate.student_id || ' '}
+
+
+ {candidate.school_name}
+ {candidate.added ? '已加入' : ''}
+
+
+ )
+ }) }
+
+ {loading && hasMore && (
+
+
+
+ )}
+
+
+
+ {course_groups && course_groups.length &&
+ 所选学生分班至(选填):
+
+ { course_groups.map((item) => {
+ return {item.name}
+ })}
+
+
}
+
: }
+
+
+ )
+ }
+}
+
+AddStudentModal.contextType = ThemeContext;
+export default AddStudentModal;
diff --git a/public/react/src/modules/courses/members/modal/AddTeacherModal.js b/public/react/src/modules/courses/members/modal/AddTeacherModal.js
index 21902a782..b397f7838 100644
--- a/public/react/src/modules/courses/members/modal/AddTeacherModal.js
+++ b/public/react/src/modules/courses/members/modal/AddTeacherModal.js
@@ -1,355 +1,355 @@
-import React, { Component } from "react";
-import { Modal, Checkbox, Input, Spin, Select, Divider, Icon } from "antd";
-import axios from 'axios'
-import ModalWrapper from "../../common/ModalWrapper"
-import InfiniteScroll from 'react-infinite-scroller';
-import { ROLE_TEACHER_NUM, ROLE_ASSISTANT_NUM } from '../common'
-import { ConditionToolTip, ActionBtn } from 'educoder'
-import NoneData from '../../coursesPublic/NoneData'
-import AddGraduationGroupModal from './AddGraduationGroupModal'
-import SchoolSelect from '../../coursesPublic/form/SchoolSelect'
-
-const Option = Select.Option;
-const pageCount = 15;
-let timeout, currentValue
-class AddTeacherModal extends Component{
- constructor(props){
- super(props);
- this.state={
- school_names: [],
- checkBoxValues: [],
- candidates: [],
- hasMore: true,
- loading: false,
- page: 1
- }
- }
- fetchMemberList = (arg_page) => {
- const courseId = this.props.match.params.coursesId
- const page = arg_page || this.state.page;
- const { name, school_name } = this.state
- let url = `/courses/${courseId}/search_teacher_candidate.json`
- this.setState({ loading: true })
- axios.post(url, {
- page: page,
- limit: pageCount,
- school_name: school_name || '',
- name: name || ''
- })
- .then((response) => {
- if (!response.data.candidates || response.data.candidates.length == 0) {
- this.setState({
- candidates: page == 1 ? response.data.candidates : this.state.candidates,
- page,
- loading: false,
- hasMore: false,
- })
- } else {
- this.setState({
- candidates: page == 1 ? response.data.candidates : this.state.candidates.concat(response.data.candidates),
- page,
- loading: false,
- hasMore: response.data.candidates.length == pageCount
- })
- }
-
- })
- .catch(function (error) {
- console.log(error);
- });
- }
- componentDidMount() {
-
-
- }
- onAddGraduationGroupOk = () => {
- this.fetchOptions()
- }
- fetchOptions = () => {
- // add_teacher_popup
- const courseId = this.props.match.params.coursesId
-
- let url = `/courses/${courseId}/add_teacher_popup.json`
-
- axios.get(url, {
- })
- .then((response) => {
-
- if (response.data.school_name) {
- this.setState({
- school_name: response.data.school_name
- }, () => this.fetchMemberList())
- } else {
- this.fetchMemberList()
-
- }
- if (response.data.graduation_groups) {
- this.setState({
- graduation_groups: response.data.graduation_groups
- })
- }
- if (response.data.course_groups) {
- this.setState({
- course_groups: response.data.course_groups
- })
- }
-
- })
- .catch(function (error) {
- console.log(error);
- });
- }
- setVisible = (visible) => {
- if (visible) {
- this.fetchOptions()
- }
- this.refs.modalWrapper.setVisible(visible)
- if (visible == false) {
- this.setState({
- checkBoxValues: []
- })
- }
- }
-
- onSendOk = () => {
- const courseId = this.props.match.params.coursesId
- const url = `/courses/${courseId}/add_teacher.json`
- if (this.state.checkBoxValues.length == 0) {
- this.props.showNotification('请先在下面列表中选择要添加教师的成员')
- return
- }
- const params = {
- "user_list": this.state.checkBoxValues.map (item => { return { 'user_id': item }}) ,
- // "graduation_group_id": "2",
- // "course_group_id": "820",
- "role": this.props.isTeacher ? ROLE_TEACHER_NUM : ROLE_ASSISTANT_NUM
- }
- const { graduationGroup, courseGroup } = this.state
- if (graduationGroup) {
- params.graduation_group_id = graduationGroup
- }
- if (courseGroup) {
- params.course_group_id = courseGroup
- }
- axios.post(url, params)
- .then((response) => {
- if (response.data.status == 0) {
- this.setVisible(false)
- this.props.showNotification('添加成功')
- this.props.addTeacherSuccess && this.props.addTeacherSuccess(params)
- }
- })
- .catch(function (error) {
- console.log(error);
- });
- }
-
- onOk = () => {
- this.onSendOk()
- }
-
- onCheckBoxChange = (checkBoxValues) => {
- this.setState({
- checkBoxValues: checkBoxValues
- })
- }
-
- handleInfiniteOnLoad = () => {
- this.fetchMemberList(this.state.page + 1)
- }
-
- onSearch = () => {
- this.fetchMemberList(1)
- }
- handleGradationGroupChange = (value) => {
- this.setState({
- graduationGroup: value
- })
- }
- handleCourseGroupChange = (value) => {
- this.setState({
- courseGroup: value
- })
- }
- onOrgNameChange = (value) => {
- // console.log('school_name: ', value)
- this.setState({ school_name: value })
- }
-
- hasGraduationModule = () => {
- const { course_modules } = this.props;
- const result = course_modules && course_modules.filter( item => {
- return item.type == 'graduation'
- })
- return result && result.length > 0
- }
-
- render(){
- const { candidates, checkBoxValues, loading, hasMore, name, school_name, school_names
- , graduationGroup, graduation_groups, courseGroup, course_groups } = this.state
- const { moduleName } = this.props
-
- return(
-
-
-
-
- {/* graduation_groups && !!graduation_groups.length */}
-
-
-
-
- {'姓名'}
- {'昵称'}
- {'单位'}
- {''}
-
-
- { loading || candidates.length ?
- {/* https://github.com/CassetteRocks/react-infinite-scroller/issues/70 */}
-
-
-
-
- { candidates && candidates.map( candidate => {
- return (
-
-
-
- {/* "color":"#4c4c4c" */}
- 12 }>
-
- {candidate.name}
-
-
-
-
- 12 }>
- {candidate.nickname || ' '}
-
-
- {candidate.school_name}
- {candidate.added ? '已加入' : ''}
-
-
- )
- }) }
-
- {loading && hasMore && (
-
-
-
- )}
-
-
-
-
: }
-
- { this.hasGraduationModule() &&
-
添加至答辩组:
-
(
-
- {menu}
-
- {/*
{ debugger; this.refs['addGraduationGroupModal'].setVisible(true) }}
- >添加答辩组 */}
-
{ debugger; this.refs['addGraduationGroupModal'].setVisible(true) }}
- >
- 添加答辩组
-
-
- )}
- >
- { graduation_groups && graduation_groups.map((item) => {
- return {item.name}
- })}
-
-
}
-
- { course_groups && !!course_groups.length &&
- 管理权限:
-
- { course_groups && course_groups.map((item) => {
- return {item.name}
- })}
-
-
}
-
-
- )
- }
-}
-export default AddTeacherModal;
+import React, { Component } from "react";
+import { Modal, Checkbox, Input, Spin, Select, Divider, Icon } from "antd";
+import axios from 'axios'
+import ModalWrapper from "../../common/ModalWrapper"
+import InfiniteScroll from 'react-infinite-scroller';
+import { ROLE_TEACHER_NUM, ROLE_ASSISTANT_NUM } from '../common'
+import { ConditionToolTip, ActionBtn } from 'educoder'
+import NoneData from '../../coursesPublic/NoneData'
+import AddGraduationGroupModal from './AddGraduationGroupModal'
+import SchoolSelect from '../../coursesPublic/form/SchoolSelect'
+
+const Option = Select.Option;
+const pageCount = 15;
+let timeout, currentValue
+class AddTeacherModal extends Component{
+ constructor(props){
+ super(props);
+ this.state={
+ school_names: [],
+ checkBoxValues: [],
+ candidates: [],
+ hasMore: true,
+ loading: false,
+ page: 1
+ }
+ }
+ fetchMemberList = (arg_page) => {
+ const courseId = this.props.match.params.coursesId
+ const page = arg_page || this.state.page;
+ const { name, school_name } = this.state
+ let url = `/courses/${courseId}/search_teacher_candidate.json`
+ this.setState({ loading: true })
+ axios.post(url, {
+ page: page,
+ limit: pageCount,
+ school_name: school_name || '',
+ name: name || ''
+ })
+ .then((response) => {
+ if (!response.data.candidates || response.data.candidates.length == 0) {
+ this.setState({
+ candidates: page == 1 ? response.data.candidates : this.state.candidates,
+ page,
+ loading: false,
+ hasMore: false,
+ })
+ } else {
+ this.setState({
+ candidates: page == 1 ? response.data.candidates : this.state.candidates.concat(response.data.candidates),
+ page,
+ loading: false,
+ hasMore: response.data.candidates.length == pageCount
+ })
+ }
+
+ })
+ .catch(function (error) {
+ console.log(error);
+ });
+ }
+ componentDidMount() {
+
+
+ }
+ onAddGraduationGroupOk = () => {
+ this.fetchOptions()
+ }
+ fetchOptions = () => {
+ // add_teacher_popup
+ const courseId = this.props.match.params.coursesId
+
+ let url = `/courses/${courseId}/add_teacher_popup.json`
+
+ axios.get(url, {
+ })
+ .then((response) => {
+
+ if (response.data.school_name) {
+ this.setState({
+ school_name: response.data.school_name
+ }, () => this.fetchMemberList())
+ } else {
+ this.fetchMemberList()
+
+ }
+ if (response.data.graduation_groups) {
+ this.setState({
+ graduation_groups: response.data.graduation_groups
+ })
+ }
+ if (response.data.course_groups) {
+ this.setState({
+ course_groups: response.data.course_groups
+ })
+ }
+
+ })
+ .catch(function (error) {
+ console.log(error);
+ });
+ }
+ setVisible = (visible) => {
+ if (visible) {
+ this.fetchOptions()
+ }
+ this.refs.modalWrapper.setVisible(visible)
+ if (visible == false) {
+ this.setState({
+ checkBoxValues: []
+ })
+ }
+ }
+
+ onSendOk = () => {
+ const courseId = this.props.match.params.coursesId
+ const url = `/courses/${courseId}/add_teacher.json`
+ if (this.state.checkBoxValues.length == 0) {
+ this.props.showNotification('请先在下面列表中选择要添加教师的成员')
+ return
+ }
+ const params = {
+ "user_list": this.state.checkBoxValues.map (item => { return { 'user_id': item }}) ,
+ // "graduation_group_id": "2",
+ // "course_group_id": "820",
+ "role": this.props.isTeacher ? ROLE_TEACHER_NUM : ROLE_ASSISTANT_NUM
+ }
+ const { graduationGroup, courseGroup } = this.state
+ if (graduationGroup) {
+ params.graduation_group_id = graduationGroup
+ }
+ if (courseGroup) {
+ params.course_group_id = courseGroup
+ }
+ axios.post(url, params)
+ .then((response) => {
+ if (response.data.status == 0) {
+ this.setVisible(false)
+ this.props.showNotification('添加成功')
+ this.props.addTeacherSuccess && this.props.addTeacherSuccess(params)
+ }
+ })
+ .catch(function (error) {
+ console.log(error);
+ });
+ }
+
+ onOk = () => {
+ this.onSendOk()
+ }
+
+ onCheckBoxChange = (checkBoxValues) => {
+ this.setState({
+ checkBoxValues: checkBoxValues
+ })
+ }
+
+ handleInfiniteOnLoad = () => {
+ this.fetchMemberList(this.state.page + 1)
+ }
+
+ onSearch = () => {
+ this.fetchMemberList(1)
+ }
+ handleGradationGroupChange = (value) => {
+ this.setState({
+ graduationGroup: value
+ })
+ }
+ handleCourseGroupChange = (value) => {
+ this.setState({
+ courseGroup: value
+ })
+ }
+ onOrgNameChange = (value) => {
+ // console.log('school_name: ', value)
+ this.setState({ school_name: value })
+ }
+
+ hasGraduationModule = () => {
+ const { course_modules } = this.props;
+ const result = course_modules && course_modules.filter( item => {
+ return item.type == 'graduation'
+ })
+ return result && result.length > 0
+ }
+
+ render(){
+ const { candidates, checkBoxValues, loading, hasMore, name, school_name, school_names
+ , graduationGroup, graduation_groups, courseGroup, course_groups } = this.state
+ const { moduleName } = this.props
+
+ return(
+
+
+
+
+ {/* graduation_groups && !!graduation_groups.length */}
+
+
+
+
+ {'姓名'}
+ {'昵称'}
+ {'单位'}
+ {''}
+
+
+ { loading || candidates.length ?
+ {/* https://github.com/CassetteRocks/react-infinite-scroller/issues/70 */}
+
+
+
+
+ { candidates && candidates.map( candidate => {
+ return (
+
+
+
+ {/* "color":"#4c4c4c" */}
+ 12 }>
+
+ {candidate.name}
+
+
+
+
+ 12 }>
+ {candidate.nickname || ' '}
+
+
+ {candidate.school_name}
+ {candidate.added ? '已加入' : ''}
+
+
+ )
+ }) }
+
+ {loading && hasMore && (
+
+
+
+ )}
+
+
+
+
: }
+
+ { this.hasGraduationModule() &&
+
添加至答辩组:
+
(
+
+ {menu}
+
+ {/*
{ debugger; this.refs['addGraduationGroupModal'].setVisible(true) }}
+ >添加答辩组 */}
+
{ debugger; this.refs['addGraduationGroupModal'].setVisible(true) }}
+ >
+ 添加答辩组
+
+
+ )}
+ >
+ { graduation_groups && graduation_groups.map((item) => {
+ return {item.name}
+ })}
+
+
}
+
+ { course_groups && !!course_groups.length &&
+ 管理权限:
+
+ { course_groups && course_groups.map((item) => {
+ return {item.name}
+ })}
+
+
}
+
+
+ )
+ }
+}
+export default AddTeacherModal;
diff --git a/public/react/src/modules/courses/members/modal/CreateGroupByImportModal.js b/public/react/src/modules/courses/members/modal/CreateGroupByImportModal.js
index 54c0df912..d5e77da9d 100644
--- a/public/react/src/modules/courses/members/modal/CreateGroupByImportModal.js
+++ b/public/react/src/modules/courses/members/modal/CreateGroupByImportModal.js
@@ -13,12 +13,15 @@ class CreateGroupByImportModal extends Component{
constructor(props){
super(props);
this.state={
- errorTip:undefined
}
}
-
+ fetchMemberList = (arg_page) => {
+ }
+ componentDidMount() {
+
+
+ }
onSendOk = () => {
-
const courseId = this.props.match.params.coursesId
let url = `/courses/${courseId}/create_group_by_importing_file.json`
@@ -109,7 +112,7 @@ class CreateGroupByImportModal extends Component{
render(){
const { candidates, checkBoxValues, loading, hasMore, name, school_name, school_names
- , graduationGroup, graduation_groups, courseGroup, course_groups , fileList , errorTip } = this.state
+ , graduationGroup, graduation_groups, courseGroup, course_groups , fileList } = this.state
const { moduleName } = this.props
const props = {
@@ -129,18 +132,15 @@ class CreateGroupByImportModal extends Component{
onOk={this.onOk}
className="createGroupByImport"
>
-
-
-
-
- 点击或拖拽文件到这里上传
-
- 单个文件最大150MB
-
-
-
- {errorTip}
-
+
+
+
+
+ 点击或拖拽文件到这里上传
+
+ 单个文件最大150MB
+
+
)
}
diff --git a/public/react/src/modules/courses/new/CoursesNew.js b/public/react/src/modules/courses/new/CoursesNew.js
index b87b4e81d..8c68dd4c5 100644
--- a/public/react/src/modules/courses/new/CoursesNew.js
+++ b/public/react/src/modules/courses/new/CoursesNew.js
@@ -44,7 +44,9 @@ class CoursesNew extends Component {
fetching:false,
boolxinjian:false,
checkboxgroup:undefined,
- checkbofrup:["shixun_homework","common_homework","group_homework","exercise","attachment","course_group","graduation","poll","board"],
+ checkbofrup:[{module_type:"shixun_homework",module_name:"实训作业"},{module_type:"common_homework",module_name:"普通作业"},{module_type:"group_homework",module_name:"分组作业"}
+ ,{module_type:"exercise",module_name:"试卷"},{module_type:"poll",module_name:"问卷"},{module_type:"graduation",module_name:"毕业设计"}
+ ,{module_type:"board",module_name:"讨论"},{module_type:"attachment",module_name:"资源"},{module_type:"course_group",module_name:"分班"}],
checkbofrups:[],
}
}
@@ -78,32 +80,22 @@ class CoursesNew extends Component {
is_public: data.is_public === 1 ? true : false,
Realnamecertification: data.authentication,
Professionalcertification:data.professional_certification,
-
+ checkbofrups:data.course_modules,
});
try {
- var datasysl=[];
- var dataysl2=[];
- var dataysl3=[];
- var checkbofrup =this.state.checkbofrup;
- dataysl2=data.course_module_types;
- datasysl=checkbofrup;
- for (var k=0;k
{
console.log(error);
@@ -450,6 +442,7 @@ class CoursesNew extends Component {
search: value
}
}).then((result)=>{
+ if(result){
if (result.data.status===0) {
this.setState({
searchlistscholl: result.data.school_names,
@@ -461,6 +454,7 @@ class CoursesNew extends Component {
})
}
}
+ }
}).catch((error)=>{
console.log(error)
})
@@ -469,7 +463,7 @@ class CoursesNew extends Component {
this.applyForAddOrgForm.setVisible(true)
}
render() {
- let {datatime,school,searchlistscholl,checkboxgroup} = this.state;
+ let {datatime,school,searchlistscholl,checkbofrups} = this.state;
const {getFieldDecorator} = this.props.form;
const propsWithoutForm = Object.assign({}, this.props)
delete propsWithoutForm.form
@@ -699,27 +693,9 @@ class CoursesNew extends Component {
this.props.match.params.coursesId != undefined?
{
- checkboxgroup===undefined?"":checkboxgroup.length===0?"":checkboxgroup.map((item,key)=>{
+ checkbofrups===undefined?"":checkbofrups.length===0?"":checkbofrups.map((item,key)=>{
return(
- item ==="shixun_homework"?
- 实训作业
- :item ==="common_homework"?
- 普通作业
- :item ==="group_homework"?
- 分组作业
- :item ==="exercise"?
- 试卷
- :item ==="attachment"?
- 资源
- :item ==="course_group"?
- 分班
- :item ==="graduation"?
- 毕业设计
- :item ==="poll"?
- 问卷
- :item ==="board"?
- 讨论
- :""
+ {item.module_name}
)
})
}
@@ -729,16 +705,13 @@ class CoursesNew extends Component {
实训作业
普通作业
分组作业
- 试卷
- 资源
- 分班
毕业设计
+ 试卷
问卷
+ 资源
讨论
+ 分班
-
-
-
)}
diff --git a/public/react/src/modules/courses/new/Goldsubject.js b/public/react/src/modules/courses/new/Goldsubject.js
index 7214f46a8..ee1d3b9c7 100644
--- a/public/react/src/modules/courses/new/Goldsubject.js
+++ b/public/react/src/modules/courses/new/Goldsubject.js
@@ -50,7 +50,12 @@ class Goldsubject extends Component {
subject_id:"",
start_date:"",
Whethertocreateanewclassroom:true,
-
+ checkbofrup:[
+ {module_type:"announcement",module_name:"公告栏"},{module_type:"online_learning",module_name:"在线学习"}
+ ,{module_type:"shixun_homework",module_name:"实训作业"},{module_type:"common_homework",module_name:"普通作业"}
+ ,{module_type:"exercise",module_name:"试卷"},{module_type:"poll",module_name:"问卷"}
+ ,{module_type:"attachment",module_name:"资源"},{module_type:"board",module_name:"讨论"},{module_type:"course_group",module_name:"分班"},],
+ checkbofrups:[],
}
}
// disabledEndDate= endValue => {
@@ -139,7 +144,20 @@ class Goldsubject extends Component {
course_module_types: data.course_module_types,
school:data.school,
Whethertocreateanewclassroom:false,
+ checkbofrups:data.course_modules,
});
+
+ try {
+ if(data.course_modules===undefined||data.course_modules.length===0){
+ this.setState({
+ checkbofrups:this.state.checkbofrup,
+ });
+ }
+ }catch (e) {
+ this.setState({
+ checkbofrups:this.state.checkbofrup,
+ });
+ }
this.handleSearchschool(data.school);
}).catch((error) => {
console.log(error);
@@ -591,7 +609,7 @@ class Goldsubject extends Component {
this.applyForAddOrgForm.setVisible(true)
}
render() {
- let {datatime,datatimetwo,school,searchlistscholl,Whethertocreateanewclassroom} = this.state;
+ let {datatime,datatimetwo,school,searchlistscholl,Whethertocreateanewclassroom,checkbofrups} = this.state;
const {getFieldDecorator} = this.props.form;
const propsWithoutForm = Object.assign({}, this.props)
delete propsWithoutForm.form
@@ -860,6 +878,25 @@ class Goldsubject extends Component {
"announcement","online_learning","shixun_homework","common_homework",
],
})(
+ this.props.match.params.coursesId != undefined?
+
+ {
+ checkbofrups===undefined?"":checkbofrups.length===0?"":checkbofrups.map((item,key)=>{
+ return(
+ item.module_type==="announcement"?
+ 公告栏
+ :
+ item.module_type==="online_learning"?
+ 在线学习
+ :
+ item.module_type==="graduation"?"":
+ item.module_type==="group_homework"?"":
+ {item.module_name}
+ )
+ })
+ }
+
+ :
公告栏
在线学习
diff --git a/public/react/src/modules/courses/poll/Poll.js b/public/react/src/modules/courses/poll/Poll.js
index 7b00fa4a5..a01c142a4 100644
--- a/public/react/src/modules/courses/poll/Poll.js
+++ b/public/react/src/modules/courses/poll/Poll.js
@@ -288,6 +288,7 @@ class Poll extends Component{
})
let{type,StudentList_value}=this.state
this.InitList(type,StudentList_value,1);
+ this.props.updataleftNavfun();
}
}).catch((error)=>{
console.log(error);
@@ -595,7 +596,7 @@ class Poll extends Component{
{...this.state}
courseType={course_types}
item={item}
- key={key}
+ index={key}
onItemClick={this.onItemClick}
checkBox={ this.onItemClick(item)}> }
>
diff --git a/public/react/src/modules/courses/poll/PollListItem.js b/public/react/src/modules/courses/poll/PollListItem.js
index 6a4f9b84e..9e8153e97 100644
--- a/public/react/src/modules/courses/poll/PollListItem.js
+++ b/public/react/src/modules/courses/poll/PollListItem.js
@@ -16,7 +16,7 @@ class PollListItem extends Component{
super(props);
}
render(){
- let{item,checkBox,courseType}=this.props;
+ let{item,checkBox,courseType,index}=this.props;
let {coursesId}=this.props.match.params;
const IsAdmin =this.props.isAdmin();
@@ -28,10 +28,10 @@ class PollListItem extends Component{
let canNotLink = !isAdminOrStudent && item.lock_status == 0
return(
- this.props.onItemClick(this.props.item)}>
+
this.props.onItemClick(this.props.item)}>
{
IsAdmin &&
-
+
{checkBox}
}
diff --git a/public/react/src/modules/courses/poll/PollNew.js b/public/react/src/modules/courses/poll/PollNew.js
index 48bc69c79..27194e5e0 100644
--- a/public/react/src/modules/courses/poll/PollNew.js
+++ b/public/react/src/modules/courses/poll/PollNew.js
@@ -2529,14 +2529,24 @@ class PollNew extends Component {
{/*suffix={String(addonAfter)}*/}
+
+ className="searchViewAfter yslpollls">
{
+ // 实训详情,阻止冒泡
+ stopPro = (event) => {
+ event.stopPropagation()
+ }
+
+ editname = (name,id,event) => {
this.setState({
ModalsRenametype:true,
NavmodalValue:name,
Navmodalname:"重命名",
url:`/homework_commons/${id}/alter_name.json`
})
+ event.stopPropagation()
}
cannerNavmoda=()=>{
this.setState({
@@ -157,88 +163,74 @@ class ShixunhomeWorkItem extends Component{
const { checkBox,
discussMessage,
- taskid,
+ taskid,index
} = this.props;
- //
-
- // allow_late: true //是否开启补交
-
- // homework_id: 9250
-
- // shixun_identifier: "25ykhpvl"
-
- //
- // console.log("this.props.isAdmin");
-
-
return(
-
- {this.state.ModalsRenametype===true?
-
this.cannerNavmoda()}
- />
- :""}
-
-
-
- {visible===true? :""}
-
-
-
-
-
-
-
-
-
本实训的开启时间:{shixunsmessage} 开启时间之前不能挑战
-
-
-
- {/**/}
- {/*知道了 */}
- {/*
*/}
-
-
+
+ {
+ this.state.ModalsRenametype===true?
+ this.cannerNavmoda()}
+ />
+ :""}
+
+ {visible===true? :""}
+
+
+
+
+
+
+
+
本实训的开启时间:{shixunsmessage} 开启时间之前不能挑战
+
+
+
+ {/**/}
+ {/*知道了 */}
+ {/*
*/}
+
+ window.$(`.shixunitem${index} input`).click() } >
- {this.props.isAdmin?checkBox:""}
+ {this.props.isAdmin?
+
{checkBox}
+ :
+ ""
+ }
+
)
}
}
diff --git a/public/react/src/modules/courses/shixunHomework/shixunHomework.js b/public/react/src/modules/courses/shixunHomework/shixunHomework.js
index 9ff27bf5d..fbebdf4b3 100644
--- a/public/react/src/modules/courses/shixunHomework/shixunHomework.js
+++ b/public/react/src/modules/courses/shixunHomework/shixunHomework.js
@@ -587,6 +587,8 @@ class ShixunHomework extends Component{
let {Coursename,page}=this.state;
this.setState({
order: e.key,
+ checkBoxValues:[],
+ checkedtype:false,
isSpin:true
});
let newkey=e.key;
@@ -1029,8 +1031,8 @@ class ShixunHomework extends Component{
- {datas&&datas.category_name===undefined||datas&&datas.category_name===null?datas&&datas.main_category_name:datas&&datas.category_name+" 作业列表"}
- {/* 实训作业 */}
+ {/*{datas&&datas.category_name===undefined||datas&&datas.category_name===null?datas&&datas.main_category_name:datas&&datas.category_name+" 作业列表"} */}
+ 实训作业
{this.props.isAdmin()===true?datas&&datas.category_name===undefined||datas&&datas.category_name===null?
@@ -1175,6 +1177,7 @@ class ShixunHomework extends Component{
isClassManagement={this.props.isClassManagement()}
checkBox={this.props.isAdmin()? :""}
match={this.props.match}
+ index={index}
coursedata={this.props.coursedata}
coursupdata={()=>this.homeworkupdatalist(Coursename,page,order)}
course_identity={datas.course_identity}
diff --git a/public/react/src/modules/page/MainContentContainer.js b/public/react/src/modules/page/MainContentContainer.js
index 3214fe5d5..f50ec9d21 100644
--- a/public/react/src/modules/page/MainContentContainer.js
+++ b/public/react/src/modules/page/MainContentContainer.js
@@ -224,12 +224,15 @@ class MainContentContainer extends Component {
}
componentDidUpdate(prevProps, prevState, snapshot) {
- const { game } = this.props
+ const { game, challenge } = this.props
if (game && prevProps.game
&& prevProps.game.identifier !== game.identifier) {
// 切换关卡时,停止轮训
this.oldGameIdentifier = prevProps.game.identifier;
+ this.doFileUpdateRequestOnCodeMirrorBlur(prevProps)
+ } else if (challenge && (challenge.pathIndex || prevProps.challenge.pathIndex) && challenge.pathIndex != prevProps.challenge.pathIndex) {
+ this.doFileUpdateRequestOnCodeMirrorBlur(prevProps)
}
}
@@ -386,8 +389,8 @@ class MainContentContainer extends Component {
}
- doFileUpdateRequestOnCodeMirrorBlur = () => {
- var fileUpdatePromise = this.doFileUpdateRequest(true)
+ doFileUpdateRequestOnCodeMirrorBlur = (props) => {
+ var fileUpdatePromise = this.doFileUpdateRequest(true, undefined, props)
if (fileUpdatePromise) {
fileUpdatePromise.then((resData) => {
if (resData.status === -1) { // 保存文件出现异常
@@ -496,7 +499,8 @@ class MainContentContainer extends Component {
}
// forTest true 是评测时触发的file_update
- doFileUpdateRequest(checkIfCodeChanged, forTest) {
+ doFileUpdateRequest(checkIfCodeChanged, forTest, props) {
+ const _props = props || this.props;
const { codeStatus } = this.state;
if (!forTest && codeStatus !== UPDATED) { // 已修改状态才能保存
return;
@@ -521,7 +525,7 @@ class MainContentContainer extends Component {
})
return null;
}
- const { challenge, output_sets, onRunCodeTestFinish, myshixun } = this.props
+ const { challenge, output_sets, onRunCodeTestFinish, myshixun } = _props
// var url = `${locationPath}/file_update?path=${encodeURIComponent(challenge.path)}`
var url = `/myshixuns/${myshixun.identifier}/update_file.json`
diff --git a/public/react/src/modules/page/layers/ImageLayerOfCommentHOC.js b/public/react/src/modules/page/layers/ImageLayerOfCommentHOC.js
index 50072c627..d19aa03ec 100644
--- a/public/react/src/modules/page/layers/ImageLayerOfCommentHOC.js
+++ b/public/react/src/modules/page/layers/ImageLayerOfCommentHOC.js
@@ -37,6 +37,8 @@ export function ImageLayerOfCommentHOC(options = {}) {
}
// jQuery._data( $('.newMain')[0], "events" )
componentDidMount() {
+ this.props.wrappedComponentRef && this.props.wrappedComponentRef(this.refs['wrappedComponentRef'])
+
// commentsDelegateParent #game_left_contents #tab_con_4
setTimeout(() => {
$(options.parentSelector || ".commentsDelegateParent")
@@ -60,7 +62,7 @@ export function ImageLayerOfCommentHOC(options = {}) {
-
+
)
diff --git a/public/react/src/modules/tpm/shixuns/shixunCss/shixunCard.css b/public/react/src/modules/tpm/shixuns/shixunCss/shixunCard.css
index f3c4a30da..4470aaec1 100644
--- a/public/react/src/modules/tpm/shixuns/shixunCss/shixunCard.css
+++ b/public/react/src/modules/tpm/shixuns/shixunCss/shixunCard.css
@@ -1,45 +1,45 @@
-.ml350 {
- margin-left: 40%;
-}
-
-.ml32 {
- margin-left: 32%;
-}
-
-.square-Item{
- /*min-height: 324px;*/
-}
-.square-img{
- min-height: 210px;
-}
-.task-hide{
- margin-bottom: 0em;
-}
-.backFAFAFA{
- background:#FAFAFA;
-}
-
-.demo {
- width: 500px;
- background-color: #0dcecb;
- text-align: center;
- padding:50px;
-}
-.next-loading {
- margin-bottom: 5px;
- width:100%;
-}
-
-.next-rating-overlay .next-icon{
- color: #FFA800!important;
-}
-
-.custom-pagination {
- display: inline-block;
- margin-left: 10px;
-}
-
-.ml425{
- margin-left:42.5%;
- margin-top:20px;
+.ml350 {
+ margin-left: 40%;
+}
+
+.ml32 {
+ margin-left: 32%;
+}
+
+.square-Item{
+ /*min-height: 324px;*/
+}
+.square-img{
+ min-height: 210px;
+}
+.task-hide{
+ margin-bottom: 0em;
+}
+.backFAFAFA{
+ background:#FAFAFA;
+}
+
+.demo {
+ width: 500px;
+ background-color: #0dcecb;
+ text-align: center;
+ padding:50px;
+}
+.next-loading {
+ margin-bottom: 5px;
+ width:100%;
+}
+
+.next-rating-overlay .next-icon{
+ color: #FFA800!important;
+}
+
+.custom-pagination {
+ display: inline-block;
+ margin-left: 10px;
+}
+
+.ml425{
+ margin-left:42.5%;
+ margin-top:20px;
}
\ No newline at end of file
diff --git a/public/react/src/modules/user/LoginRegisterComponent.js b/public/react/src/modules/user/LoginRegisterComponent.js
index 48e1af926..5a569192c 100644
--- a/public/react/src/modules/user/LoginRegisterComponent.js
+++ b/public/react/src/modules/user/LoginRegisterComponent.js
@@ -1103,6 +1103,10 @@ class LoginRegisterComponent extends Component {
right: 12px;
height: 20px;
}
+ .ant-input{
+ border-right: none !important;
+ height: 40px !important;
+ }
`
}
@@ -1112,7 +1116,7 @@ class LoginRegisterComponent extends Component {
autoComplete="new-password"
onClick={this.changeType}
value={this.state.passwords} onChange={this.passwordonChanges}
- suffix={
+ addonAfter={
this.Showandhide(key)}>
}>
diff --git a/public/react/src/modules/user/account/AccountBasicEdit.js b/public/react/src/modules/user/account/AccountBasicEdit.js
index cb6941070..27aae8893 100644
--- a/public/react/src/modules/user/account/AccountBasicEdit.js
+++ b/public/react/src/modules/user/account/AccountBasicEdit.js
@@ -492,7 +492,17 @@ class AccountBasic extends Component {
}
`}
基本信息
-
+
{String(nameLength)}/{MAX_NICKNAME_LENGTH}
}>
)}
-
+
this.showOrHide(showRealName)}>
}>
diff --git a/public/react/src/modules/user/usersInfo/InfosBank.js b/public/react/src/modules/user/usersInfo/InfosBank.js
index 8adc7ba50..2abc15220 100644
--- a/public/react/src/modules/user/usersInfo/InfosBank.js
+++ b/public/react/src/modules/user/usersInfo/InfosBank.js
@@ -1,249 +1,249 @@
-import React, { Component } from 'react';
-import {Pagination,Spin,Checkbox,Modal} from 'antd';
-import moment from 'moment';
-import axios from 'axios';
-import NoneData from '../../courses/coursesPublic/NoneData'
-import {getImageUrl} from 'educoder';
-import "./usersInfo.css"
-import Modals from '../../modals/Modals'
-
-const dateFormat ="YYYY-MM-DD HH:mm"
-class InfosBank extends Component{
- constructor(props){
- super(props);
- this.state={
- category:"common",
- type:"publicly",
- page:1,
- per_page:16,
- sort_by:"updated_at",
- CoursesId:undefined,
-
- totalCount:undefined,
- data:undefined,
- isSpin:false,
-
- dialogOpen:false,
- modalsTopval:undefined,
- modalsBottomval:undefined,
- modalSave:undefined
- }
- }
-
- componentDidMount=()=>{
- this.setState({
- isSpin:true
- })
- let{category,type,page,sort_by,CoursesId}=this.state;
- this.getCourses(category,type,page,sort_by,CoursesId);
- }
-
- getCourses=(category,type,page,sort_by,CoursesId)=>{
- let url=`/users/${this.props.match.params.username}/question_banks.json`;
- axios.get((url),{params:{
- category,
- type,
- page,
- sort_by,
- per_page:category && page ==1?17:16,
- course_list_id:CoursesId
- }}).then((result)=>{
- if(result){
- this.setState({
- totalCount:result.data.count,
- data:result.data,
- isSpin:false
- })
- }
- }).catch((error)=>{
- console.log(error);
- })
- }
-
- //切换种类
- changeCategory=(cate)=>{
- this.setState({
- category:cate,
- page:1,
- isSpin:true
- })
- let{type,sort_by,CoursesId}=this.state;
- this.getCourses(cate,type,1,sort_by,CoursesId);
- }
- //切换状态
- changeType=(type)=>{
- this.setState({
- type:type,
- page:1,
- isSpin:true
- })
- let{category,sort_by,CoursesId}=this.state;
- this.getCourses(category,type,1,sort_by,CoursesId);
- }
- //切换页数
- changePage=(page)=>{
- this.setState({
- page,
- isSpin:true
- })
- let{category,type,sort_by,CoursesId}=this.state;
- this.getCourses(category,type,page,sort_by,CoursesId);
- }
-
- // 进入课堂
- turnToCourses=(url)=>{
- this.props.history.push(url);
- }
-
- // 切换排序方式
- changeOrder= (sort)=>{
- this.setState({
- sort_by:sort,
- isSpin:true
- })
- let{category,type,page,CoursesId}=this.state;
- this.getCourses(category,type,page,sort,CoursesId);
- }
-
- changeCourseListId =(CoursesId)=>{
- this.setState({
- CoursesId,
- isSpin:true
- })
- let{category,type,sort,page}=this.state;
- this.getCourses(category,type,page,sort,CoursesId);
- }
-
- //设为公开/删除
- setPublic=(index)=>{
- this.setState({
- dialogOpen:true,
- modalsTopval:index==1?"您确定要公开吗?":"确定要删除该题吗?",
- modalsBottomval:index==1?"公开后不能重设为私有":"",
- modalSave:()=>this.sureOperation(index)
- })
- }
- // 确定--设为公开/删除
- sureOperation=()=>{
-
- }
-
- //弹框隐藏
- handleDialogClose=()=>{
- this.setState({
- dialogOpen:false
- })
- }
-
- render(){
- let{
- category,
- type,
- page,
- data,
- totalCount,
- sort_by,
- isSpin,
- CoursesId,
- dialogOpen,
- modalsTopval,
- modalsBottomval,modalSave
- } = this.state;
- let isStudent = this.props.isStudent();
- let is_current=this.props.is_current;
- return(
-
-
-
-
-
-
-
-
- this.changeCourseListId()}>
- 全部
-
- {
- data && data.course_list && data.course_list.map((item,key)=>{
- return(
- this.changeCourseListId(`${item.id}`)}>
- {item.name}
-
- )
- })
- }
-
-
-
-
- 共参与{totalCount}个题库
-
-
- {sort_by=="updated_at"?"时间最新":sort_by=="name"?"作业名称":"贡献者"}
-
- this.changeOrder("updated_at")}>时间最新
- this.changeOrder("name")}>作业名称
- this.changeOrder("contributor")}>贡献者
-
-
-
-
-
- {
- !data || data.question_banks.length==0 &&
- }
- {
- data && data.question_banks && data.question_banks.map((item,key)=>{
- return(
-
- )
- })
- }
-
- {
- totalCount > 15 &&
-
- }
-
-
- )
- }
-}
+import React, { Component } from 'react';
+import {Pagination,Spin,Checkbox,Modal} from 'antd';
+import moment from 'moment';
+import axios from 'axios';
+import NoneData from '../../courses/coursesPublic/NoneData'
+import {getImageUrl} from 'educoder';
+import "./usersInfo.css"
+import Modals from '../../modals/Modals'
+
+const dateFormat ="YYYY-MM-DD HH:mm"
+class InfosBank extends Component{
+ constructor(props){
+ super(props);
+ this.state={
+ category:"common",
+ type:"publicly",
+ page:1,
+ per_page:16,
+ sort_by:"updated_at",
+ CoursesId:undefined,
+
+ totalCount:undefined,
+ data:undefined,
+ isSpin:false,
+
+ dialogOpen:false,
+ modalsTopval:undefined,
+ modalsBottomval:undefined,
+ modalSave:undefined
+ }
+ }
+
+ componentDidMount=()=>{
+ this.setState({
+ isSpin:true
+ })
+ let{category,type,page,sort_by,CoursesId}=this.state;
+ this.getCourses(category,type,page,sort_by,CoursesId);
+ }
+
+ getCourses=(category,type,page,sort_by,CoursesId)=>{
+ let url=`/users/${this.props.match.params.username}/question_banks.json`;
+ axios.get((url),{params:{
+ category,
+ type,
+ page,
+ sort_by,
+ per_page:category && page ==1?17:16,
+ course_list_id:CoursesId
+ }}).then((result)=>{
+ if(result){
+ this.setState({
+ totalCount:result.data.count,
+ data:result.data,
+ isSpin:false
+ })
+ }
+ }).catch((error)=>{
+ console.log(error);
+ })
+ }
+
+ //切换种类
+ changeCategory=(cate)=>{
+ this.setState({
+ category:cate,
+ page:1,
+ isSpin:true
+ })
+ let{type,sort_by,CoursesId}=this.state;
+ this.getCourses(cate,type,1,sort_by,CoursesId);
+ }
+ //切换状态
+ changeType=(type)=>{
+ this.setState({
+ type:type,
+ page:1,
+ isSpin:true
+ })
+ let{category,sort_by,CoursesId}=this.state;
+ this.getCourses(category,type,1,sort_by,CoursesId);
+ }
+ //切换页数
+ changePage=(page)=>{
+ this.setState({
+ page,
+ isSpin:true
+ })
+ let{category,type,sort_by,CoursesId}=this.state;
+ this.getCourses(category,type,page,sort_by,CoursesId);
+ }
+
+ // 进入课堂
+ turnToCourses=(url)=>{
+ this.props.history.push(url);
+ }
+
+ // 切换排序方式
+ changeOrder= (sort)=>{
+ this.setState({
+ sort_by:sort,
+ isSpin:true
+ })
+ let{category,type,page,CoursesId}=this.state;
+ this.getCourses(category,type,page,sort,CoursesId);
+ }
+
+ changeCourseListId =(CoursesId)=>{
+ this.setState({
+ CoursesId,
+ isSpin:true
+ })
+ let{category,type,sort,page}=this.state;
+ this.getCourses(category,type,page,sort,CoursesId);
+ }
+
+ //设为公开/删除
+ setPublic=(index)=>{
+ this.setState({
+ dialogOpen:true,
+ modalsTopval:index==1?"您确定要公开吗?":"确定要删除该题吗?",
+ modalsBottomval:index==1?"公开后不能重设为私有":"",
+ modalSave:()=>this.sureOperation(index)
+ })
+ }
+ // 确定--设为公开/删除
+ sureOperation=()=>{
+
+ }
+
+ //弹框隐藏
+ handleDialogClose=()=>{
+ this.setState({
+ dialogOpen:false
+ })
+ }
+
+ render(){
+ let{
+ category,
+ type,
+ page,
+ data,
+ totalCount,
+ sort_by,
+ isSpin,
+ CoursesId,
+ dialogOpen,
+ modalsTopval,
+ modalsBottomval,modalSave
+ } = this.state;
+ let isStudent = this.props.isStudent();
+ let is_current=this.props.is_current;
+ return(
+
+
+
+
+
+
+
+
+ this.changeCourseListId()}>
+ 全部
+
+ {
+ data && data.course_list && data.course_list.map((item,key)=>{
+ return(
+ this.changeCourseListId(`${item.id}`)}>
+ {item.name}
+
+ )
+ })
+ }
+
+
+
+
+ 共参与{totalCount}个题库
+
+
+ {sort_by=="updated_at"?"时间最新":sort_by=="name"?"作业名称":"贡献者"}
+
+ this.changeOrder("updated_at")}>时间最新
+ this.changeOrder("name")}>作业名称
+ this.changeOrder("contributor")}>贡献者
+
+
+
+
+
+ {
+ !data || data.question_banks.length==0 &&
+ }
+ {
+ data && data.question_banks && data.question_banks.map((item,key)=>{
+ return(
+
+ )
+ })
+ }
+
+ {
+ totalCount > 15 &&
+
+ }
+
+
+ )
+ }
+}
export default InfosBank;
\ No newline at end of file
diff --git a/public/react/src/modules/user/usersInfo/InfosBanner.js b/public/react/src/modules/user/usersInfo/InfosBanner.js
index 92dd4f1d2..08bea57ed 100644
--- a/public/react/src/modules/user/usersInfo/InfosBanner.js
+++ b/public/react/src/modules/user/usersInfo/InfosBanner.js
@@ -1,115 +1,122 @@
-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"
-
-import banner from '../../../images/account/infobanner.png'
-
-class InfosBanner extends Component{
- constructor(props){
- super(props);
- }
- render(){
- let {
- data ,
- id,
- login,
- moduleName,
- current_user,
- }=this.props;
- let is_current=this.props.is_current;
- let {username}= this.props.match.params;
- let {pathname}=this.props.location;
- moduleName=pathname.split("/")[3];
- return(
-
-
-
-
-
-
- {data && data.name}
- {
- data && is_current == false && data.identity =="学生" ? "" :
- {data && data.identity}
- }
-
-
-
-
-
-
-
-
-
-
-
-
-
- {
- is_current ?
-
- {
- data && data.attendance_signed ?
- 已签到
- :
- 签到
- }
-
- :
-
- 私信
-
- }
-
-
-
-
- this.setState({moduleName: 'courses'})}
- to={`/users/${username}/courses`}>翻转课堂
-
-
- this.setState({moduleName: 'shixuns'})}
- to={`/users/${username}/shixuns`}>实训项目
-
-
- this.setState({moduleName: 'paths'})}
- to={`/users/${username}/paths`}>实践课程
-
-
- this.setState({moduleName: 'projects'})}
- to={`/users/${username}/projects`}>开发项目
-
-
- this.setState({moduleName: 'package'})}
- to={`/users/${username}/package`}>众包
-
- {((is_current && current_user && current_user.is_teacher ) || current_user && current_user.admin)
- &&
- this.setState({moduleName: 'videos'})}
- to={`/users/${username}/videos`}>视频
- }
-
-
-
- )
- }
-}
+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"
+
+import { LinkAfterLogin } from 'educoder'
+
+class InfosBanner extends Component{
+ constructor(props){
+ super(props);
+ }
+ render(){
+ let {
+ data ,
+ id,
+ login,
+ moduleName,
+ current_user,
+ }=this.props;
+ let is_current=this.props.is_current;
+ let {username}= this.props.match.params;
+ let {pathname}=this.props.location;
+ moduleName=pathname.split("/")[3];
+ return(
+
+
+
+
+
+
+ {data && data.name}
+ {
+ data && is_current == false && data.identity =="学生" ? "" :
+ {data && data.identity}
+ }
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {
+ is_current ?
+
+ {
+ data && data.attendance_signed ?
+ 已签到
+ :
+ 签到
+ }
+
+ :
+
+
+ 私信
+
+
+ }
+
+
+
+
+ this.setState({moduleName: 'courses'})}
+ to={`/users/${username}/courses`}>翻转课堂
+
+
+ this.setState({moduleName: 'shixuns'})}
+ to={`/users/${username}/shixuns`}>开发社区
+
+
+ this.setState({moduleName: 'paths'})}
+ to={`/users/${username}/paths`}>实践课程
+
+
+ this.setState({moduleName: 'projects'})}
+ to={`/users/${username}/projects`}>项目
+
+
+ this.setState({moduleName: 'package'})}
+ to={`/users/${username}/package`}>众包
+
+ {((is_current && current_user && current_user.is_teacher ) || current_user && current_user.admin)
+ &&
+ this.setState({moduleName: 'videos'})}
+ to={`/users/${username}/videos`}>视频
+ }
+
+
+
+ )
+ }
+}
export default InfosBanner;
\ No newline at end of file
diff --git a/public/react/src/modules/user/usersInfo/InfosCourse.js b/public/react/src/modules/user/usersInfo/InfosCourse.js
index c4c1c77e0..bc401d4d7 100644
--- a/public/react/src/modules/user/usersInfo/InfosCourse.js
+++ b/public/react/src/modules/user/usersInfo/InfosCourse.js
@@ -130,7 +130,7 @@ class InfosCourse extends Component{
this.props.current_user && this.props.current_user.user_identity != "学生" ? : ""
}
{
- (!data || data.courses.length==0) && (!is_current || (this.props.current_user && this.props.current_user.user_identity === "学生" )) &&
+ (!data || (data && data.courses.length==0)) && category &&
}
{
data && data.courses && data.courses.map((item,key)=>{
diff --git a/public/react/src/modules/user/usersInfo/InfosPath.js b/public/react/src/modules/user/usersInfo/InfosPath.js
index cb02ed604..554d8380f 100644
--- a/public/react/src/modules/user/usersInfo/InfosPath.js
+++ b/public/react/src/modules/user/usersInfo/InfosPath.js
@@ -152,7 +152,7 @@ class InfosPath extends Component{
this.props.current_user && this.props.current_user.user_identity != "学生" ? :""
}
{
- (!data || data.subjects.length==0) && (!is_current || (this.props.current_user && this.props.current_user.user_identity === "学生" )) &&
+ (!data || (data && data.subjects.length==0)) && category &&
}
{
data && data.subjects && data.subjects.map((item,key)=>{
diff --git a/public/react/src/modules/user/usersInfo/InfosProject.js b/public/react/src/modules/user/usersInfo/InfosProject.js
index 2018f7b73..5aea5117b 100644
--- a/public/react/src/modules/user/usersInfo/InfosProject.js
+++ b/public/react/src/modules/user/usersInfo/InfosProject.js
@@ -125,7 +125,7 @@ class InfosProject extends Component{
:""
}
{
- (!data || data.projects.length==0) && (!is_current || (this.props.current_user && this.props.current_user.user_identity === "学生" )) &&
+ (!data || (data && data.projects.length==0)) && category &&
}
{
data && data.projects && data.projects.map((item,key)=>{
diff --git a/public/react/src/modules/user/usersInfo/InfosShixun.js b/public/react/src/modules/user/usersInfo/InfosShixun.js
index 94ef3c29b..4799626a9 100644
--- a/public/react/src/modules/user/usersInfo/InfosShixun.js
+++ b/public/react/src/modules/user/usersInfo/InfosShixun.js
@@ -1,14 +1,11 @@
import React, { Component } from 'react';
-import { SnackbarHOC } from 'educoder';
-import {BrowserRouter as Router,Route,Switch} from 'react-router-dom';
-import {Tooltip,Menu,Pagination,Spin} from 'antd';
-import Loadable from 'react-loadable';
-import Loading from '../../../Loading';
+
+import { Pagination , Spin } from 'antd';
+
import NoneData from '../../courses/coursesPublic/NoneData'
import axios from 'axios';
-import {getImageUrl,setImagesUrl} from 'educoder';
-import { TPMIndexHOC } from '../../tpm/TPMIndexHOC';
-import { CNotificationHOC } from '../../courses/common/CNotificationHOC'
+import { setImagesUrl } from 'educoder';
+
import "./usersInfo.css"
import Create from './publicCreatNew'
@@ -115,7 +112,7 @@ class InfosShixun extends Component{
totalCount,
isSpin
} = this.state;
- let isStudent = this.props.isStudent();
+
let is_current=this.props.is_current;
return(
@@ -157,20 +154,18 @@ class InfosShixun extends Component{
{
- page == 1 && is_current && !category && this.props.current_user && this.props.current_user.user_identity != "学生" ?
+ page == 1 && is_current && !category && this.props.current_user && this.props.current_user.user_identity != "学生" ?
:""
}
{
- (!data || data.shixuns.length==0) && (!is_current || (this.props.current_user && this.props.current_user.user_identity === "学生" )) &&
+ (!data || (data && data.shixuns.length==0)) && category &&
}
{
data && data.shixuns && data.shixuns.map((item,key)=>{
return(
-
+
标题:
- {String(title.length)}/{MAX_LENGTH}
}
- className="titleInput"
+ className="titleInput titleInputysl"
>
diff --git a/public/react/src/public-path.js b/public/react/src/public-path.js
new file mode 100644
index 000000000..d154b8ad7
--- /dev/null
+++ b/public/react/src/public-path.js
@@ -0,0 +1,6 @@
+/*global __webpack_public_path__ */
+if (window.location.host == 'pre-newweb.educoder.net') {
+ __webpack_public_path__ = 'http://testali-cdn.educoder.net/react/build/'
+} else if (window.location.host == 'www.educoder.net') {
+ __webpack_public_path__ = 'https://ali-newweb.educoder.net/react/build/'
+}
\ No newline at end of file