diff --git a/app/controllers/ecs/course_managers_controller.rb b/app/controllers/ecs/course_managers_controller.rb index 714dac580..132a212d7 100644 --- a/app/controllers/ecs/course_managers_controller.rb +++ b/app/controllers/ecs/course_managers_controller.rb @@ -3,7 +3,8 @@ class Ecs::CourseManagersController < Ecs::CourseBaseController before_action :check_major_manager_permission!, only: [:create, :destroy] def create - @user = Ecs::CreateCourseManagerService.call(current_course, params[:user_id]) + Ecs::CreateCourseManagerService.call(current_course, params[:user_ids]) + render_ok rescue Ecs::CreateCourseManagerService::Error => ex render_error(ex.message) end diff --git a/app/controllers/polls_controller.rb b/app/controllers/polls_controller.rb index 6be131d7a..dcbded6fe 100644 --- a/app/controllers/polls_controller.rb +++ b/app/controllers/polls_controller.rb @@ -692,7 +692,7 @@ class PollsController < ApplicationController else unified_setting = @poll.unified_setting end - show_result = params[:show_result].to_i + show_result = params[:show_result] un_anonymous = params[:un_anonymous] ? true : false # 统一设置或者分班为0,则更新问卷,并删除问卷分组 if unified_setting || (course_group_ids.size == 0) diff --git a/app/controllers/templates_controller.rb b/app/controllers/templates_controller.rb new file mode 100644 index 000000000..efb114bdc --- /dev/null +++ b/app/controllers/templates_controller.rb @@ -0,0 +1,5 @@ +class TemplatesController < ApplicationController + def show + @template = EcTemplate.find_by_name!(params[:name]) + end +end \ No newline at end of file diff --git a/app/libs/wechat/app.rb b/app/libs/wechat/app.rb new file mode 100644 index 000000000..54f60fa2a --- /dev/null +++ b/app/libs/wechat/app.rb @@ -0,0 +1,11 @@ +class Wechat::App + class << self + attr_accessor :appid, :secret + + delegate :access_token, :jscode2session, to: :client + + def client + @_client ||= Wechat::Client.new(appid, secret) + end + end +end \ No newline at end of file diff --git a/app/libs/wechat/client.rb b/app/libs/wechat/client.rb index 0d34b9dda..5ac0a28f2 100644 --- a/app/libs/wechat/client.rb +++ b/app/libs/wechat/client.rb @@ -34,6 +34,10 @@ class Wechat::Client jsapi_ticket end + def jscode2session(code) + request(:get, '/sns/jscode2session', appid: appid, secret: secret, js_code: code, grant_type: 'authorization_code') + end + def access_token_cache_key "#{base_cache_key}/access_token" end @@ -49,7 +53,7 @@ class Wechat::Client private def request(method, url, **params) - Rails.logger.error("[wechat] request: #{method} #{url} #{params.inspect}") + Rails.logger.error("[wechat] request: #{method} #{url} #{params.except(:secret).inspect}") client = Faraday.new(url: BASE_SITE) response = client.public_send(method, url, params) diff --git a/app/libs/wechat/official_account.rb b/app/libs/wechat/official_account.rb index 320fbdba3..88208d6f3 100644 --- a/app/libs/wechat/official_account.rb +++ b/app/libs/wechat/official_account.rb @@ -2,20 +2,14 @@ class Wechat::OfficialAccount class << self attr_accessor :appid, :secret + delegate :access_token, :jsapi_ticket, to: :client + def js_sdk_signature(url, noncestr, timestamp) data = { jsapi_ticket: jsapi_ticket, noncestr: noncestr, timestamp: timestamp, url: url } str = data.map { |k, v| "#{k}=#{v}" }.join('&') Digest::SHA1.hexdigest(str) end - def access_token - client.access_token - end - - def jsapi_ticket - client.jsapi_ticket - end - def client @_client ||= Wechat::Client.new(appid, secret) end diff --git a/app/models/mirror_repository.rb b/app/models/mirror_repository.rb index e29b008ad..96a92e5e7 100644 --- a/app/models/mirror_repository.rb +++ b/app/models/mirror_repository.rb @@ -5,7 +5,7 @@ class MirrorRepository < ApplicationRecord - scope :published_mirror, -> { where(status: 1) } + scope :published_mirror, -> { where(status: [1,2,3,5]) } scope :published_main_mirror, -> { published_mirror.where(main_type: 1) } scope :published_small_mirror, -> { published_mirror.where(main_type: 0) } diff --git a/app/services/ecs/create_course_manager_service.rb b/app/services/ecs/create_course_manager_service.rb index 58e803bcf..4d3633bfd 100644 --- a/app/services/ecs/create_course_manager_service.rb +++ b/app/services/ecs/create_course_manager_service.rb @@ -3,27 +3,29 @@ class Ecs::CreateCourseManagerService < ApplicationService COURSE_MANAGER_COUNT_LIMIT = 2 # 课程管理员数量限制 - attr_reader :ec_course, :user_id + attr_reader :ec_course, :user_ids - def initialize(ec_course, user_id) + def initialize(ec_course, user_ids) @ec_course = ec_course - @user_id = user_id + @user_ids = user_ids end def call - user = User.find_by(id: params[:user_id]) - raise Error, '该用户不存在' if user.blank? + users_count = User.where(id: user_ids).count + raise Error, '用户不存在' if users_count != user_ids.size - if ec_course.ec_course_users.exists?(user_id: user.id) - raise Error, '该用户已经是该课程的管理员了' + if ec_course.ec_course_users.exists?(user_id: user_ids) + raise Error, '用户已经是该课程的管理员' end - if ec_course.ec_course_users.count >= COURSE_MANAGER_COUNT_LIMIT - raise Error, '该课程管理员数量已达上限' + if ec_course.ec_course_users.count + user_ids.size > COURSE_MANAGER_COUNT_LIMIT + raise Error, "课程管理员数量过多(最多#{COURSE_MANAGER_COUNT_LIMIT})" end - ec_course.ec_course_users.create!(user: user) - - user + ActiveRecord::Base.transaction do + user_ids.each do |user_id| + ec_course.ec_course_users.create!(user_id: user_id) + end + end end end \ No newline at end of file diff --git a/app/views/ecs/course_managers/create.json.jbuilder b/app/views/ecs/course_managers/create.json.jbuilder deleted file mode 100644 index ff7ff01e5..000000000 --- a/app/views/ecs/course_managers/create.json.jbuilder +++ /dev/null @@ -1 +0,0 @@ -json.partial! 'ecs/shared/user', user: @user diff --git a/app/views/graduation_tasks/_public_navigation.json.jbuilder b/app/views/graduation_tasks/_public_navigation.json.jbuilder index 00280c31b..992d03fd8 100644 --- a/app/views/graduation_tasks/_public_navigation.json.jbuilder +++ b/app/views/graduation_tasks/_public_navigation.json.jbuilder @@ -2,4 +2,5 @@ json.partial! "graduation_topics/show_navigation", locals: {course: course, grad json.task_status task_curr_status(graduation, course)[:status] json.task_name graduation.name json.task_id graduation.id -json.status graduation.status \ No newline at end of file +json.status graduation.status +json.end_time graduation.end_time \ No newline at end of file diff --git a/app/views/templates/show.json.jbuilder b/app/views/templates/show.json.jbuilder new file mode 100644 index 000000000..cff89037b --- /dev/null +++ b/app/views/templates/show.json.jbuilder @@ -0,0 +1,3 @@ +json.template do + json.partial! 'attachments/attachment_simple', attachment: @template.attachments.last +end \ No newline at end of file diff --git a/config/routes.rb b/config/routes.rb index a3c2078f3..56356c8e8 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -821,6 +821,7 @@ Rails.application.routes.draw do post :feedback end end + resource :template, only: [:show] end namespace :admins do diff --git a/public/react/src/modules/courses/Index.js b/public/react/src/modules/courses/Index.js index c414df55a..70cc43f4c 100644 --- a/public/react/src/modules/courses/Index.js +++ b/public/react/src/modules/courses/Index.js @@ -661,6 +661,11 @@ class CoursesIndex extends Component{ (props) => () } > + () + } + > {/* 普通作业 */} () } > + () + } + > + :"" diff --git a/public/react/src/modules/courses/Resource/index.js b/public/react/src/modules/courses/Resource/index.js index 02b1d5be1..1fea29f84 100644 --- a/public/react/src/modules/courses/Resource/index.js +++ b/public/react/src/modules/courses/Resource/index.js @@ -593,7 +593,7 @@ class Fileslists extends Component{ modalname:"立即发布", visible:true, typs:"start", - Topval:"学生将能立即查看和下载发布资源", + Topval:"学生将能立即收到资源", // Botvalleft:"暂不发布", // Botval:`本操作只对"未发布"的分班有效`, // starttime:"发布时间:"+moment(moment(new Date())).format("YYYY-MM-DD HH:mm"), diff --git a/public/react/src/modules/courses/boards/BoardsListItem.js b/public/react/src/modules/courses/boards/BoardsListItem.js index 021a41b7a..2b9c05126 100644 --- a/public/react/src/modules/courses/boards/BoardsListItem.js +++ b/public/react/src/modules/courses/boards/BoardsListItem.js @@ -70,7 +70,7 @@ class BoardsListItem extends Component{ { !!discussMessage.sticky && 置顶 } { - discussMessage.is_public == false ? ( + discussMessage.is_public == false ? ( ) : "" } diff --git a/public/react/src/modules/courses/busyWork/CommonWorkDetailIndex.js b/public/react/src/modules/courses/busyWork/CommonWorkDetailIndex.js index 8985aa07e..7ba231b99 100644 --- a/public/react/src/modules/courses/busyWork/CommonWorkDetailIndex.js +++ b/public/react/src/modules/courses/busyWork/CommonWorkDetailIndex.js @@ -308,15 +308,11 @@ class CommonWorkDetailIndex extends Component{ onClick={() => this.setState({moduleName: '参考答案'})} className={`${childModuleName == '参考答案' ? 'active' : '' } `} to={`/courses/${courseId}/${moduleEngName}/${workId}/answer`}>参考答案} - - {this.props.isAdmin() ? this.setState({moduleName: '设置'})} className={`${childModuleName == '设置' ? 'active' : '' } `} - style={{paddingLeft:'38px'}} - to={`/courses/${courseId}/${moduleEngName}/${workId}/setting`}>设置: - "" - } + style={{paddingLeft:this.props.isAdmin()?'38px':'20px'}} + to={`/courses/${courseId}/${moduleEngName}/${workId}/setting`}>{this.props.isAdmin()?"设置":"得分规则"} {/* { this.props.tabRightComponents } */} diff --git a/public/react/src/modules/courses/busyWork/CommonWorkItem.js b/public/react/src/modules/courses/busyWork/CommonWorkItem.js index c92d91c48..75676557a 100644 --- a/public/react/src/modules/courses/busyWork/CommonWorkItem.js +++ b/public/react/src/modules/courses/busyWork/CommonWorkItem.js @@ -175,7 +175,7 @@ class CommonWorkItem extends Component{ {/* 只有非课堂成员且作业是私有的情况下才会为true */} { item.private_icon===true ? - ( + ( ) : "" } diff --git a/public/react/src/modules/courses/busyWork/CommonWorkSetting.js b/public/react/src/modules/courses/busyWork/CommonWorkSetting.js index 3217b7318..5d9a7dc16 100644 --- a/public/react/src/modules/courses/busyWork/CommonWorkSetting.js +++ b/public/react/src/modules/courses/busyWork/CommonWorkSetting.js @@ -1055,7 +1055,7 @@ class CommonWorkSetting extends Component{ {/* */} - + 截止时间: {/* */} - + 开启时间: - - + + */} - + 匿评数量: - + 缺评扣分: - + 结束时间: {/* */} - + 违规匿评扣分: - +
- + 普通模式(选中,则取各助教最终评分的平均分) diff --git a/public/react/src/modules/courses/busyWork/common/WorkDetailPageHeader.js b/public/react/src/modules/courses/busyWork/common/WorkDetailPageHeader.js index 68a16d89e..82f1f8d2e 100644 --- a/public/react/src/modules/courses/busyWork/common/WorkDetailPageHeader.js +++ b/public/react/src/modules/courses/busyWork/common/WorkDetailPageHeader.js @@ -144,13 +144,11 @@ class WorkDetailPageHeader extends Component{ {view_answer == true && 参考答案} - {this.props.isAdmin()? + 设置: - "" - } + style={{paddingLeft:this.props.isAdmin()?'38px':'20px'}} + to={`/courses/${courseId}/${moduleEngName}/${workId}/setting`}>{this.props.isAdmin()?"设置":"得分规则"} { this.props.tabRightComponents } diff --git a/public/react/src/modules/courses/coursesDetail/CoursesLeftNav.js b/public/react/src/modules/courses/coursesDetail/CoursesLeftNav.js index a97a827b6..e47f83c1f 100644 --- a/public/react/src/modules/courses/coursesDetail/CoursesLeftNav.js +++ b/public/react/src/modules/courses/coursesDetail/CoursesLeftNav.js @@ -1055,7 +1055,7 @@ class Coursesleftnav extends Component{ iem.category_id===0?"": iem.category_type==="graduation_topics"||iem.category_type==="graduation_tasks"? ( - iem.category_name.length<13? + iem.category_name&&iem.category_name.length<13? {iem.category_count===0?"":iem.category_count} : @@ -1064,7 +1064,7 @@ class Coursesleftnav extends Component{ ) : ( - iem.category_name.length<13? + iem.category_name&&iem.category_name.length<13? this.twosandianshowyss(e)}> @@ -1147,15 +1147,26 @@ class Coursesleftnav extends Component{ {/*title={iem.category_name.length<10?"":iem.category_name}*/}
  • - - this.selectnavids(e,key,iem.category_id,item.type+"child",iem.second_category_url,key)} > - {/*{iem.category_name}*/} - {/*{iem.category_name.length<10?"":*/} - {/* iem.category_name}*/} - {iem.category_name} - {iem.category_count===0?"":iem.category_count} - - + { + iem.category_name&&iem.category_name.length<13? + this.selectnavids(e,key,iem.category_id,item.type+"child",iem.second_category_url,key)} > + {/*{iem.category_name}*/} + {/*{iem.category_name.length<10?"":*/} + {/* iem.category_name}*/} + {iem.category_name} + {iem.category_count===0?"":iem.category_count} + + : + + this.selectnavids(e,key,iem.category_id,item.type+"child",iem.second_category_url,key)} > + {/*{iem.category_name}*/} + {/*{iem.category_name.length<10?"":*/} + {/* iem.category_name}*/} + {iem.category_name} + {iem.category_count===0?"":iem.category_count} + + + }
  • diff --git a/public/react/src/modules/courses/coursesPublic/AppraiseModal.js b/public/react/src/modules/courses/coursesPublic/AppraiseModal.js index 120e57b2b..a943e9655 100644 --- a/public/react/src/modules/courses/coursesPublic/AppraiseModal.js +++ b/public/react/src/modules/courses/coursesPublic/AppraiseModal.js @@ -153,7 +153,7 @@ class AppraiseModal extends Component{

    - 可见:(学生可查看老师的评阅内容) + 可见(学生可查看老师的评阅内容)

    {/**/} {/*可见 (学生查看老师的评阅内容)*/} @@ -167,7 +167,7 @@ class AppraiseModal extends Component{ />

    - 不可见:(仅对课堂老师可见) + 不可见(仅对课堂老师可见)

    - 上次学至{last_shixun} + 上次学习内容{last_shixun}
    diff --git a/public/react/src/modules/courses/exercise/ExerciseListItem.js b/public/react/src/modules/courses/exercise/ExerciseListItem.js index 28ead276c..ef500ba0b 100644 --- a/public/react/src/modules/courses/exercise/ExerciseListItem.js +++ b/public/react/src/modules/courses/exercise/ExerciseListItem.js @@ -134,7 +134,7 @@ class ExerciseListItem extends Component{ { item.lock_status === 0 ? - + :"" diff --git a/public/react/src/modules/courses/exercise/Exercisesetting.js b/public/react/src/modules/courses/exercise/Exercisesetting.js index ca1e6eddf..7b3732c9f 100644 --- a/public/react/src/modules/courses/exercise/Exercisesetting.js +++ b/public/react/src/modules/courses/exercise/Exercisesetting.js @@ -104,6 +104,10 @@ class Exercisesetting extends Component{ if(this.props.Commonheadofthetestpaper!=undefined){ this.editSetting() } + + if(this.props.isAdmin() === false){ + this.cancelEdit() + } } componentDidUpdate = (prevProps) => { if(prevProps.Commonheadofthetestpaper!= this.props.Commonheadofthetestpaper){ diff --git a/public/react/src/modules/courses/graduation/tasks/GraduateTaskItem.js b/public/react/src/modules/courses/graduation/tasks/GraduateTaskItem.js index 427ef30d4..39a2f0876 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduateTaskItem.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduateTaskItem.js @@ -256,7 +256,7 @@ class GraduateTaskItem extends Component{ { this.props.discussMessage.private_icon===true? - + : diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationAcross.js b/public/react/src/modules/courses/graduation/tasks/GraduationAcross.js index b672d1b81..18dac8041 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationAcross.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationAcross.js @@ -189,7 +189,8 @@ class GraduationAcross extends Component{ cross_teachers: item.cross_teachers, student_id:item.student_id, user_name:item.user_name, - work_id:item.work_id + work_id:item.work_id, + cross_groups:item.cross_groups } return list; }), @@ -395,7 +396,7 @@ class GraduationAcross extends Component{ ` } :""} -
    this.props.modalCloss()}> +
    - 计算成绩时间:{teacherdata&&teacherdata.calculation_time==null?"--": moment(teacherdata&&teacherdata.calculation_time).format('YYYY-MM-DD HH:mm')} + {/*计算成绩时间:{teacherdata&&teacherdata.calculation_time==null?"--": moment(teacherdata&&teacherdata.calculation_time).format('YYYY-MM-DD HH:mm')}*/} {/* { course_is_end===true?"":teacherdata&&teacherdata.task_operation&&teacherdata.task_operation[0]==="开启挑战"?"":*/} {/* {computeTimetype===true?*/} diff --git a/public/react/src/modules/courses/shixunHomework/ShixunHomeworkPage.js b/public/react/src/modules/courses/shixunHomework/ShixunHomeworkPage.js index f130ce0b8..9b0353b9e 100644 --- a/public/react/src/modules/courses/shixunHomework/ShixunHomeworkPage.js +++ b/public/react/src/modules/courses/shixunHomework/ShixunHomeworkPage.js @@ -236,7 +236,7 @@ class ShixunHomeworkPage extends Component { onClick={(e) => this.ChangeTab(2)}> 代码查重 : ""} {parseInt(tab) === 3? - :""} - {this.props.isAdmin() ? + this.ChangeTab(3)} - >设置:""} + >{this.props.isAdmin()?"设置":"得分规则"} {/*{this.props.isAdmin() ? + : diff --git a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js index 47f33327c..142d1e074 100644 --- a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js +++ b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js @@ -147,7 +147,9 @@ class Trainingjobsetting extends Component { - + if(this.props.isAdmin() === false){ + this.cancelEdit() + } } // componentWillReceiveProps(nextProps) { // // console.log("+++++++++916"); @@ -1721,7 +1723,7 @@ class Trainingjobsetting extends Component { flagPageEditsthrees:deadline, flagPageEditsfor:endtime, completionefficiencyscore:true, - work_efficiencys:true, + work_efficiencys:this.state.work_efficiencys, unifiedsetting:this.state.unifiedsetting, latedeductiontwo:20, }); @@ -1837,7 +1839,7 @@ class Trainingjobsetting extends Component { flagPageEditsthrees:deadline, flagPageEditsfor:endtime, completionefficiencyscore:true, - work_efficiencys:true, + work_efficiencys:datas.data.work_efficiency, unifiedsetting:datas.data.unified_setting, latedeductiontwo:20, }); @@ -2076,7 +2078,10 @@ class Trainingjobsetting extends Component { // console.log(this.props.isAdmin()) // console.log(this.state.code_review===false) // console.log("引入的分值"); - // console.log(this.state.work_efficiencys); + console.log(this.state.work_efficiencys); + + + return (
    {this.state.showmodel===true?
    发布时间: - +
    截止时间: - +
    {/*这里可以进行数据处理*/} -
    +
    { @@ -641,23 +641,24 @@ class MessagSub extends Component { })} - {/*页数*/} - {data === undefined ? "" - : - (count > 10 ? -
    -
    - -
    -
    : "" - ) - }
    + {/*页数*/} + {data === undefined ? "" + : + (count > 10 ? +
    +
    + +
    +
    : "" + ) + + }
    ) } diff --git a/public/react/src/modules/message/js/MessagePrivate.js b/public/react/src/modules/message/js/MessagePrivate.js index ec7c20121..dc8e32e67 100644 --- a/public/react/src/modules/message/js/MessagePrivate.js +++ b/public/react/src/modules/message/js/MessagePrivate.js @@ -8,6 +8,7 @@ import moment from 'moment'; import {getImageUrl,markdownToHTML} from 'educoder'; import "../css/messagemy.css" import WriteaprivateletterModal from '../messagemodal/WriteaprivateletterModal'; +import NoneData from '../../../modules/courses/coursesPublic/NoneData' //私信页面 class MessagePrivate extends Component{ constructor(props) { @@ -160,11 +161,8 @@ class MessagePrivate extends Component{ { - data===undefined?"":data.length===0? -
    - -

    暂无数据哦~

    -
    + data===undefined? :data.length===0? + :data.map((item,key)=>{ return(
    this.smyJump(3,item.target.id)}> diff --git a/public/react/src/modules/page/main/CodeRepositoryViewContainer.js b/public/react/src/modules/page/main/CodeRepositoryViewContainer.js index 279402e66..c30ec0386 100644 --- a/public/react/src/modules/page/main/CodeRepositoryViewContainer.js +++ b/public/react/src/modules/page/main/CodeRepositoryViewContainer.js @@ -21,8 +21,11 @@ function getNewTreeData(treeData, curKey, child, level) { data.forEach((item) => { // 这里不能用indexOf 同一级可能出现test目录和test.py文件 if (item.key == curKey) { - child = addPrePath(child, curKey); - item.children = child; + if (child && child.length) { // 可能没有子节点 + child = addPrePath(child, curKey); + item.children = child; + } + item.isLeaf = false; } else { if (item.children) { loop(item.children); @@ -153,6 +156,10 @@ class CodeRepositoryViewContainer extends Component { }); } map2OldData = (treeData) => { + if (!treeData || treeData.length == 0) { + return [] + } + if (!treeData || treeData.length === 0) return treeData; treeData = treeData.map(item => { return { diff --git a/public/react/src/modules/tpm/TPMIndexHOC.js b/public/react/src/modules/tpm/TPMIndexHOC.js index c39042308..dd4572bcc 100644 --- a/public/react/src/modules/tpm/TPMIndexHOC.js +++ b/public/react/src/modules/tpm/TPMIndexHOC.js @@ -222,7 +222,7 @@ export function TPMIndexHOC(WrappedComponent) { # 课程权限判断 ADMIN = 0 # 超级管理员 BUSINESS = 1 # 运营人员 - CREATOR = 2 # 课程创建者 + CREATOR = 2 # 课程创建者 课堂管理员 PROFESSOR = 3 # 课程老师 ASSISTANT_PROFESSOR = 4 # 课程助教 STUDENT = 5 # 学生 @@ -233,6 +233,9 @@ export function TPMIndexHOC(WrappedComponent) { isSuperAdmin = () => { // return false return this.state.coursedata&&this.state.coursedata.course_identity === 0 + } + isCourseAdmin = () => { + return this.state.coursedata&&this.state.coursedata.course_identity === 2 } //超管、运维0-1 isClassManagement = () => { @@ -537,6 +540,8 @@ export function TPMIndexHOC(WrappedComponent) { isSuperAdmin:this.isSuperAdmin, isAdminOrCreator:this.isAdminOrCreator, isClassManagement:this.isClassManagement, + isCourseAdmin:this.isCourseAdmin, + isAdmin: this.isAdmin, isAdminOrTeacher: this.isAdminOrTeacher, isStudent: this.isStudent, diff --git a/public/react/src/modules/user/account/AccountSecure.js b/public/react/src/modules/user/account/AccountSecure.js index e5b03e36b..797b350d2 100644 --- a/public/react/src/modules/user/account/AccountSecure.js +++ b/public/react/src/modules/user/account/AccountSecure.js @@ -284,7 +284,7 @@ class AccountSecure extends Component {
    { basicInfo && basicInfo.phone ? - { regPhoneAndEmail(basicInfo.phone) } + { basicInfo.phone } : 未绑定 } @@ -348,7 +348,7 @@ class AccountSecure extends Component {
    { basicInfo && basicInfo.mail ? - { regPhoneAndEmail(basicInfo.mail) } + { basicInfo.mail } : 未绑定 } diff --git a/public/react/src/modules/user/usersInfo/InfosTopics.js b/public/react/src/modules/user/usersInfo/InfosTopics.js index 76979c9f5..3b76bfa28 100644 --- a/public/react/src/modules/user/usersInfo/InfosTopics.js +++ b/public/react/src/modules/user/usersInfo/InfosTopics.js @@ -297,8 +297,8 @@ class InfosTopics extends Component{ let categorylist=[ {val:"普通作业",type:"normal"}, {val:"分组作业",type:"group"}, - {val:"毕设选题",type:"gtopic"}, - {val:"毕设任务",type:"gtask"}, + // {val:"毕设选题",type:"gtopic"}, + // {val:"毕设任务",type:"gtask"}, {val:"试卷",type:"exercise"}, {val:"问卷",type:"poll"}, ] diff --git a/public/react/src/modules/user/usersInfo/video/InfosVideo.js b/public/react/src/modules/user/usersInfo/video/InfosVideo.js index cb66434d0..dfda982f2 100644 --- a/public/react/src/modules/user/usersInfo/video/InfosVideo.js +++ b/public/react/src/modules/user/usersInfo/video/InfosVideo.js @@ -288,12 +288,22 @@ function InfoVideo (props) { 个视频 - {categoryObj.category == 'all' && } + {/*{categoryObj.category == 'all' && }*/} + + {categoryObj.category == 'all' &&
    +
  • + {sortKey=="published_at-desc"?"最新上传":"最早上传"} +
      +
    • onSortChange("published_at-desc",0)}>最新上传
    • +
    • onSortChange("published_at-asc",1)}>最早上传
    • +
    +
  • +
    }