diff --git a/app/controllers/oauth/cas_controller.rb b/app/controllers/oauth/cas_controller.rb index d5abc8cbe..d1fa95470 100644 --- a/app/controllers/oauth/cas_controller.rb +++ b/app/controllers/oauth/cas_controller.rb @@ -3,7 +3,7 @@ class Oauth::CasController < Oauth::BaseController user, is_new_user = Oauth::CreateORFindCasUserService.call(current_user, auth_hash) successful_authentication(user) - render_ok(new_user: is_new_user) + redirect_to root_url end diff --git a/app/services/oauth/create_or_find_cas_user_service.rb b/app/services/oauth/create_or_find_cas_user_service.rb index 0b6715471..761f9da58 100644 --- a/app/services/oauth/create_or_find_cas_user_service.rb +++ b/app/services/oauth/create_or_find_cas_user_service.rb @@ -14,7 +14,7 @@ class Oauth::CreateORFindCasUserService < ApplicationService return [open_user.user, false] if open_user.persisted? - @user = User.new(login: User.generate_login('C'), type: 'User', status: User::STATUS_ACTIVE, nickname: @params['comsys_name'], lastname: @params['comsys_name']) + @user = User.new(login: User.generate_login('C'), type: 'User', status: User::STATUS_ACTIVE, lastname: @params['comsys_name']) ActiveRecord::Base.transaction do @user.save! diff --git a/public/react/src/common/util/ShareUtil.js b/public/react/src/common/util/ShareUtil.js index bd34e2edb..a85c37c4a 100644 --- a/public/react/src/common/util/ShareUtil.js +++ b/public/react/src/common/util/ShareUtil.js @@ -60,17 +60,17 @@ function requestForSignatrue (callback) { /** 实践课程 平台提供涵盖基础入门、案例实践和创新应用的完整实训项目体系,通过由浅入深的实训路径,帮助学生快速提升实战能力。 实训项目 覆盖不同专业的IT实验和实训,每周更新,无需配置本机实验环境,随时随地开启企业级真实实训。 - 翻转课堂 自动评测实训任务,支持技能统计,提供教学活动分析报告,减轻教师和助教的辅导压力,免去作业发布和批改的困扰,实时了解学生学习情况,全面提升教师施教效率和水平。 + 教学课堂 自动评测实训任务,支持技能统计,提供教学活动分析报告,减轻教师和助教的辅导压力,免去作业发布和批改的困扰,实时了解学生学习情况,全面提升教师施教效率和水平。 单个课程和实训 获取课程/实训的简介 该课程或者实训展示的缩略图 */ -export function configShareForIndex (path) { +export function configShareForIndex (path) { requestForSignatrue(() => { var shareData = { title: 'EduCoder - 首页', desc: 'Educoder是一个面向计算机类的互联网IT教育和实战平台,提供企业级工程实训,以实现工程化专业教学的自动化和智能化。高校和企业人员可以在此开展计算机实践性教学活动,将传统的知识传授和时兴的工程实战一体化。', link: host + (path || ''), - imgUrl: window.__testImageUrl + imgUrl: window.__testImageUrl || host + '/react/build/images/share_logo_icon.jpg' }; share(shareData) @@ -83,7 +83,7 @@ export function configShareForPaths () { title: 'EduCoder - 实践课程', desc: '平台提供涵盖基础入门、案例实践和创新应用的完整实训项目体系,通过由浅入深的实训路径,帮助学生快速提升实战能力。', link: `${host}/paths`, - imgUrl: window.__testImageUrl + imgUrl: window.__testImageUrl || host + '/react/build/images/share_logo_icon.jpg' }; share(shareData) @@ -97,7 +97,7 @@ export function configShareForShixuns () { title: 'EduCoder - 实训项目', desc: '覆盖不同专业的IT实验和实训,每周更新,无需配置本机实验环境,随时随地开启企业级真实实训。', link: `${host}/shixuns`, - imgUrl: window.__testImageUrl + imgUrl: window.__testImageUrl || host + '/react/build/images/share_logo_icon.jpg' }; share(shareData) @@ -108,10 +108,10 @@ export function configShareForCourses () { console.log('configShareForCourses', host) var shareData = { - title: 'EduCoder - 翻转课堂', + title: 'EduCoder - 教学课堂', desc: '自动评测实训任务,支持技能统计,提供教学活动分析报告,减轻教师和助教的辅导压力,免去作业发布和批改的困扰,实时了解学生学习情况,全面提升教师施教效率和水平。', link: `${host}/courses`, - imgUrl: window.__testImageUrl + imgUrl: window.__testImageUrl || host + '/react/build/images/share_logo_icon.jpg' }; share(shareData) @@ -127,7 +127,7 @@ export function configShareForCustom (title, desc, imgUrl, path) { title: title, desc: desc, link: path ? `${host}/${path}` : _url, - imgUrl: imgUrl || window.__testImageUrl + imgUrl: imgUrl || window.__testImageUrl || host + '/react/build/images/share_logo_icon.jpg' }; share(shareData) diff --git a/public/react/src/modules/competitions/Competition_teams/Competitionteams.js b/public/react/src/modules/competitions/Competition_teams/Competitionteams.js index be6c2e68d..ef9cf58ce 100644 --- a/public/react/src/modules/competitions/Competition_teams/Competitionteams.js +++ b/public/react/src/modules/competitions/Competition_teams/Competitionteams.js @@ -250,7 +250,7 @@ class Competitionteams extends Component{ - 翻转课堂 + 教学课堂
diff --git a/public/react/src/modules/courses/boards/TopicDetail.js b/public/react/src/modules/courses/boards/TopicDetail.js index f4df177c7..483dafe18 100644 --- a/public/react/src/modules/courses/boards/TopicDetail.js +++ b/public/react/src/modules/courses/boards/TopicDetail.js @@ -1,29 +1,15 @@ import React, { Component } from 'react'; -import { Redirect } from 'react-router'; - -import { BrowserRouter as Router, Route, Link, Switch } from "react-router-dom"; - -import PropTypes from 'prop-types'; - -import classNames from 'classnames' - import axios from 'axios' - import moment from 'moment' - import Comments from '../../comment/Comments' - -import update from 'immutability-helper' -import RewardDialog from '../../common/RewardDialog'; import {ImageLayerOfCommentHOC} from '../../page/layers/ImageLayerOfCommentHOC' - import MemoDetailMDEditor from '../../forums/MemoDetailMDEditor' import { RouteHOC } from './common.js' import '../../forums/Post.css' import '../../forums/RightSection.css' import './TopicDetail.css' import '../common/courseMessage.css' -import { Pagination, Tooltip } from 'antd' +import { Pagination, Tooltip,Button } from 'antd' import { bytesToSize, ConditionToolTip, markdownToHTML, MarkdownToHtml , setImagesUrl } from 'educoder' import SendToCourseModal from '../coursesPublic/modal/SendToCourseModal' import CBreadcrumb from '../common/CBreadcrumb' @@ -32,7 +18,8 @@ import { generateComments, generateChildComments, _findById, handleContentBefore , handleDeleteComment, handleCommentPraise, handleHiddenComment } from '../common/CommentsHelper' const $ = window.$ -const REPLY_PAGE_COUNT = 10 +const REPLY_PAGE_COUNT = 10; +let setTime; function urlStringify(params) { let noParams = true; let paramsUrl = ''; @@ -57,7 +44,8 @@ class TopicDetail extends Component { pageCount: 1, comments: [], goldRewardDialogOpen: false, - author:undefined + author:undefined, + commentstype:false } } componentDidMount() { @@ -512,11 +500,26 @@ class TopicDetail extends Component { } } + startcomments=()=>{ + setTime = setInterval( ()=> { + this.fetchReplies() + }, 5000); + this.setState({ + commentstype:true + }) + } + + clearcomments=()=>{ + clearInterval(setTime); + this.setState({ + commentstype:false + }) + } render() { const { match, history } = this.props const { recommend_shixun, current_user,author_info } = this.props; - const { memo, comments, hasMoreComments, goldRewardDialogOpen, pageCount, total_count , author } = this.state; + const { memo, comments, hasMoreComments, commentstype, pageCount, total_count , author } = this.state; const messageId = match.params.topicId if (this.state.memoLoading || !current_user) { return
@@ -560,7 +563,7 @@ class TopicDetail extends Component { ref="sendToCourseModal" {...this.props} moduleName="帖子" - selectedMessageIds={[messageId]} + seletedMessageIds={[messageId]} >
@@ -690,9 +693,15 @@ class TopicDetail extends Component { */}
-
+
+ {this.props.isAdmin()===true? + {this.state.commentstype===false? + :} + :""} + 全部回复 ({memo.total_replies_count}) +
- 翻转课堂 + 教学课堂
diff --git a/public/react/src/modules/courses/coursesHome/CoursesHome.js b/public/react/src/modules/courses/coursesHome/CoursesHome.js index f6b6d7303..21f7b33bc 100644 --- a/public/react/src/modules/courses/coursesHome/CoursesHome.js +++ b/public/react/src/modules/courses/coursesHome/CoursesHome.js @@ -55,7 +55,7 @@ class CoursesHome extends Component{ } componentDidMount(){ - document.title="翻转课堂"; + document.title="教学课堂"; const upsystem=`/users/system_update.json`; axios.get(upsystem).then((response)=>{ let updata=response.data; @@ -159,7 +159,7 @@ class CoursesHome extends Component{ onClick={ () => this.changeStatus("created_at")}>最新 this.changeStatus("visits")}>最热 - {this.props.user&&this.props.user.user_identity==="学生"?"":this.getUser("/courses/new")}>+新建翻转课堂} + {this.props.user&&this.props.user.user_identity==="学生"?"":this.getUser("/courses/new")}>+新建教学课堂} {/*
*/} {/*/!* - {this.props.match.params.coursesId === undefined ?"翻转课堂":dataname} + {this.props.match.params.coursesId === undefined ?"教学课堂":dataname} > {this.props.match.params.coursesId === undefined ?"新建课堂":"编辑课堂"} diff --git a/public/react/src/modules/courses/new/Goldsubject.js b/public/react/src/modules/courses/new/Goldsubject.js index 006f3f44f..23e098f80 100644 --- a/public/react/src/modules/courses/new/Goldsubject.js +++ b/public/react/src/modules/courses/new/Goldsubject.js @@ -721,7 +721,7 @@ class Goldsubject extends Component { {/**/}

{Whethertocreateanewclassroom===true?"翻转课堂":name} + >{Whethertocreateanewclassroom===true?"教学课堂":name} > {Whethertocreateanewclassroom===true?"新建课堂":"编辑课堂"}

diff --git a/public/react/src/modules/tpm/NewHeader.js b/public/react/src/modules/tpm/NewHeader.js index 351cb80ff..17bd92001 100644 --- a/public/react/src/modules/tpm/NewHeader.js +++ b/public/react/src/modules/tpm/NewHeader.js @@ -1097,7 +1097,7 @@ submittojoinclass=(value)=>{ {/*
  • 课堂
  • */}
  • {/*课堂*/} - 翻转课堂 + 教学课堂
  • 实训项目 @@ -1183,7 +1183,7 @@ submittojoinclass=(value)=>{ onBlur={(e)=>this.hideshowSearchOpen(e)} onMouseLeave={()=>this.setevaluatinghides()}> this.onKeywordSearchKeyDowns()} onSearch={(value) => this.onKeywordSearchKeyDown(value)} // onPressEnter={this.onKeywordSearchKeyDown} @@ -1229,7 +1229,8 @@ submittojoinclass=(value)=>{
  • {is_current ? "我":"TA"}的金币 {data && data.grade} -
    + { - is_current ? + is_current ? { - data && data.attendance_signed ? + data && data.attendance_signed ? 已签到 : 签到 } - + : - 私信 @@ -120,7 +120,7 @@ class InfosBanner extends Component{ {coursestypes===true?"":
  • this.setState({moduleName: 'courses'})} - to={`/users/${username}/courses`}>翻转课堂 + to={`/users/${username}/courses`}>教学课堂
  • } {shixuntype===true?"":
  • 实训项目
  • } {pathstype===true?"":
  • - this.setState({moduleName: 'paths'})} to={`/users/${username}/paths`}>实践课程
  • } diff --git a/public/react/src/search/SearchPage.js b/public/react/src/search/SearchPage.js index e25829554..fc50bcbfa 100644 --- a/public/react/src/search/SearchPage.js +++ b/public/react/src/search/SearchPage.js @@ -158,7 +158,7 @@ class SearchPage extends Component{
    实践课程 - 翻转课堂 + 教学课堂 实训项目 交流问答