Merge branch 'dev_aliyun' into dev_jupyter

ecloud_sso
daiao 5 years ago
commit a28e0a70b8

@ -395,9 +395,7 @@ class CoursesController < ApplicationController
def destroy def destroy
if @course.is_delete == 0 if @course.is_delete == 0
@course.delete! @course.delete!
Tiding.where(belong_container: @course).update_all(is_delete: 1) DeleteCourseNotifyJob.perform_later(@course.id, current_user.id)
Tiding.create!(user_id: current_user.id, trigger_user_id: current_user.id, container_id: @course.id,
container_type: 'DeleteCourse', tiding_type: 'System', belong_container: @course, extra: @course.name)
normal_status(0, "成功") normal_status(0, "成功")
else else
normal_status(-1, "课堂已删除,无需重复操作") normal_status(-1, "课堂已删除,无需重复操作")

@ -984,7 +984,7 @@ class HomeworkCommonsController < ApplicationController
homework.homework_detail_manual.update_attributes!(comment_status: 1) homework.homework_detail_manual.update_attributes!(comment_status: 1)
if homework.course_act.blank? if homework.course_act.blank?
homework.course_act << CourseActivity.new(user_id: homework.user_id, course_id: homework.course_id) CourseActivity.create!(user_id: homework.user_id, course_id: homework.course_id, course_act: homework)
end end
# 发消息 # 发消息
HomeworkCommonPushNotifyJob.perform_later(homework.id, tiding_group_ids) HomeworkCommonPushNotifyJob.perform_later(homework.id, tiding_group_ids)
@ -1117,7 +1117,7 @@ class HomeworkCommonsController < ApplicationController
def choose_category def choose_category
@main_catrgory = @course.course_modules.where(module_type: "shixun_homework") @main_catrgory = @course.course_modules.where(module_type: "shixun_homework")
@homework_category = @main_catrgory.take.course_second_categories @homework_category = @main_catrgory.take.course_second_categories.includes(:homework_commons)
end end
# 实训作业移动到目录 # 实训作业移动到目录

@ -20,6 +20,7 @@ class Weapps::CoursesController < Weapps::BaseController
activities = @course.course_activities.where("course_act_type in ('Course', 'CourseMessage') or activities = @course.course_activities.where("course_act_type in ('Course', 'CourseMessage') or
(course_act_type = 'HomeworkCommon' and course_act_id in #{homework_ids})").order("id desc") (course_act_type = 'HomeworkCommon' and course_act_id in #{homework_ids})").order("id desc")
@activities_count = activities.size
@activities = paginate activities.includes(:course_act, user: :user_extension) @activities = paginate activities.includes(:course_act, user: :user_extension)
end end

@ -42,6 +42,14 @@ module CoursesHelper
end end
end end
def practice_homework_count course
homeworks = course.homework_commons.practices
publish_count = homeworks.select{|homework| homework.publish_time.present? && homework.publish_time <= Time.now}.size
unpublish_count = homeworks.select{|homework| homework.publish_time.nil? || homework.publish_time > Time.now}.size
all_count = homeworks.size
{publish_count: publish_count, unpublish_count: unpublish_count, all_count: all_count}
end
# 课堂模块的url # 课堂模块的url
def module_url mod, course def module_url mod, course
return nil if mod.blank? or course.blank? return nil if mod.blank? or course.blank?

@ -0,0 +1,13 @@
# 删除课堂时将相应的课堂消息置为删除状态,并给老师发送删除消息
class DeleteCourseNotifyJob < ApplicationJob
queue_as :default
def perform(course_id, user_id)
course = Course.find_by(id: course_id)
return if course.blank?
Tiding.where(belong_container: course).update_all(is_delete: 1)
Tiding.create!(user_id: user_id, trigger_user_id: user_id, container_id: course.id,
container_type: 'DeleteCourse', tiding_type: 'System', belong_container: course, extra: course.name)
end
end

@ -302,7 +302,7 @@ class Course < ApplicationRecord
#课程动态公共表记录 #课程动态公共表记录
def act_as_course_activity def act_as_course_activity
self.course_act << CourseActivity.new(user_id: tea_id, course_id: id) CourseActivity.create(user_id: tea_id, course_id: id, course_act: self)
end end
# 当前老师分班下的所有学生 # 当前老师分班下的所有学生

@ -30,7 +30,7 @@ class CourseMessage < ApplicationRecord
#课程动态公共表记录 #课程动态公共表记录
def act_as_course_activity def act_as_course_activity
self.course_act << CourseActivity.new(user_id: course_message_id, course_id: course_id) CourseActivity.create(user_id: course_message_id, course_id: course_id, course_act: self)
end end
def send_deal_tiding deal_status def send_deal_tiding deal_status

@ -12,4 +12,13 @@ class CourseSecondCategory < ApplicationRecord
category_type == "graduation" && name == "毕设任务" ? "graduation_tasks" : category_type category_type == "graduation" && name == "毕设任务" ? "graduation_tasks" : category_type
) )
end end
def homework_publish_count
homework_commons.select{|homework| homework.publish_time.present? && homework.publish_time <= Time.now}.size
end
def homework_unpublish_count
homework_commons.select{|homework| homework.publish_time.nil? || homework.publish_time > Time.now}.size
end
end end

@ -14,7 +14,7 @@ class Oauth::CreateORFindCasUserService < ApplicationService
return [open_user.user, false] if open_user.persisted? 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 ActiveRecord::Base.transaction do
@user.save! @user.save!

@ -1,8 +1,15 @@
json.main_category main_catrgory do |category| json.main_category main_catrgory do |category|
json.main_category_id 0 json.main_category_id 0
json.main_category_name category.module_name json.main_category_name category.module_name
homework_count = practice_homework_count category.course
json.publish_count homework_count[:publish_count]
json.unpublish_count homework_count[:unpublish_count]
json.all_count homework_count[:all_count]
end end
json.homework_category homework_category do |category| json.homework_category homework_category do |category|
json.category_id category.id json.category_id category.id
json.category_name category.name json.category_name category.name
json.publish_count category.homework_publish_count
json.unpublish_count category.homework_unpublish_count
json.all_count category.homework_commons.size
end end

@ -6,7 +6,8 @@ json.activities @activities do |activity|
json.login user.login json.login user.login
json.img url_to_avatar(user) json.img url_to_avatar(user)
end end
json.created_at activity.created_at.strftime('%m-%d %H:%M:') json.created_at activity.created_at.strftime('%m-%d %H:%M')
json.container_name activity.container_name json.container_name activity.container_name
json.container_type activity.course_act_type == "HomeworkCommon" ? activity.course_act&.homework_type : "" json.container_type activity.course_act_type == "HomeworkCommon" ? activity.course_act&.homework_type : ""
end end
json.activities_count @activities_count

@ -45,7 +45,7 @@ namespace :homework_publishtime do
end end
end end
homework.course_act << CourseActivity.new(user_id: homework.user_id, course_id: homework.course_id) if !homework.course_act.present? CourseActivity.create(user_id: homework.user_id, course_id: homework.course_id, course_act: homework) if !homework.course_act.present?
end end
# 分组设置发布时间的作业 # 分组设置发布时间的作业

@ -60,17 +60,17 @@ function requestForSignatrue (callback) {
/** /**
实践课程 平台提供涵盖基础入门案例实践和创新应用的完整实训项目体系通过由浅入深的实训路径帮助学生快速提升实战能力 实践课程 平台提供涵盖基础入门案例实践和创新应用的完整实训项目体系通过由浅入深的实训路径帮助学生快速提升实战能力
实训项目 覆盖不同专业的IT实验和实训每周更新无需配置本机实验环境随时随地开启企业级真实实训 实训项目 覆盖不同专业的IT实验和实训每周更新无需配置本机实验环境随时随地开启企业级真实实训
翻转课堂 自动评测实训任务支持技能统计提供教学活动分析报告减轻教师和助教的辅导压力免去作业发布和批改的困扰实时了解学生学习情况全面提升教师施教效率和水平 教学课堂 自动评测实训任务支持技能统计提供教学活动分析报告减轻教师和助教的辅导压力免去作业发布和批改的困扰实时了解学生学习情况全面提升教师施教效率和水平
单个课程和实训 获取课程/实训的简介 该课程或者实训展示的缩略图 单个课程和实训 获取课程/实训的简介 该课程或者实训展示的缩略图
*/ */
export function configShareForIndex (path) { export function configShareForIndex (path) {
requestForSignatrue(() => { requestForSignatrue(() => {
var shareData = { var shareData = {
title: 'EduCoder - 首页', title: 'EduCoder - 首页',
desc: 'Educoder是一个面向计算机类的互联网IT教育和实战平台提供企业级工程实训以实现工程化专业教学的自动化和智能化。高校和企业人员可以在此开展计算机实践性教学活动将传统的知识传授和时兴的工程实战一体化。', desc: 'Educoder是一个面向计算机类的互联网IT教育和实战平台提供企业级工程实训以实现工程化专业教学的自动化和智能化。高校和企业人员可以在此开展计算机实践性教学活动将传统的知识传授和时兴的工程实战一体化。',
link: host + (path || ''), link: host + (path || ''),
imgUrl: window.__testImageUrl imgUrl: window.__testImageUrl
|| host + '/react/build/images/share_logo_icon.jpg' || host + '/react/build/images/share_logo_icon.jpg'
}; };
share(shareData) share(shareData)
@ -83,7 +83,7 @@ export function configShareForPaths () {
title: 'EduCoder - 实践课程', title: 'EduCoder - 实践课程',
desc: '平台提供涵盖基础入门、案例实践和创新应用的完整实训项目体系,通过由浅入深的实训路径,帮助学生快速提升实战能力。', desc: '平台提供涵盖基础入门、案例实践和创新应用的完整实训项目体系,通过由浅入深的实训路径,帮助学生快速提升实战能力。',
link: `${host}/paths`, link: `${host}/paths`,
imgUrl: window.__testImageUrl imgUrl: window.__testImageUrl
|| host + '/react/build/images/share_logo_icon.jpg' || host + '/react/build/images/share_logo_icon.jpg'
}; };
share(shareData) share(shareData)
@ -97,7 +97,7 @@ export function configShareForShixuns () {
title: 'EduCoder - 实训项目', title: 'EduCoder - 实训项目',
desc: '覆盖不同专业的IT实验和实训每周更新无需配置本机实验环境随时随地开启企业级真实实训。', desc: '覆盖不同专业的IT实验和实训每周更新无需配置本机实验环境随时随地开启企业级真实实训。',
link: `${host}/shixuns`, link: `${host}/shixuns`,
imgUrl: window.__testImageUrl imgUrl: window.__testImageUrl
|| host + '/react/build/images/share_logo_icon.jpg' || host + '/react/build/images/share_logo_icon.jpg'
}; };
share(shareData) share(shareData)
@ -108,10 +108,10 @@ export function configShareForCourses () {
console.log('configShareForCourses', host) console.log('configShareForCourses', host)
var shareData = { var shareData = {
title: 'EduCoder - 翻转课堂', title: 'EduCoder - 教学课堂',
desc: '自动评测实训任务,支持技能统计,提供教学活动分析报告,减轻教师和助教的辅导压力,免去作业发布和批改的困扰,实时了解学生学习情况,全面提升教师施教效率和水平。', desc: '自动评测实训任务,支持技能统计,提供教学活动分析报告,减轻教师和助教的辅导压力,免去作业发布和批改的困扰,实时了解学生学习情况,全面提升教师施教效率和水平。',
link: `${host}/courses`, link: `${host}/courses`,
imgUrl: window.__testImageUrl imgUrl: window.__testImageUrl
|| host + '/react/build/images/share_logo_icon.jpg' || host + '/react/build/images/share_logo_icon.jpg'
}; };
share(shareData) share(shareData)
@ -127,7 +127,7 @@ export function configShareForCustom (title, desc, imgUrl, path) {
title: title, title: title,
desc: desc, desc: desc,
link: path ? `${host}/${path}` : _url, link: path ? `${host}/${path}` : _url,
imgUrl: imgUrl || window.__testImageUrl imgUrl: imgUrl || window.__testImageUrl
|| host + '/react/build/images/share_logo_icon.jpg' || host + '/react/build/images/share_logo_icon.jpg'
}; };
share(shareData) share(shareData)

@ -250,7 +250,7 @@ class Competitionteams extends Component{
<Content className={"teamsLayoutContent"}> <Content className={"teamsLayoutContent"}>
<Table className="teamsLayoutTable" columns={shixuncolumns} dataSource={this.state.shixundata} bordered pagination={false}/> <Table className="teamsLayoutTable" columns={shixuncolumns} dataSource={this.state.shixundata} bordered pagination={false}/>
</Content> </Content>
<Content className={"teamsLayoutitle mt40"}>翻转课堂</Content> <Content className={"teamsLayoutitle mt40"}>教学课堂</Content>
<Content className={"teamsLayoutContents"}> <Content className={"teamsLayoutContents"}>
<Table className="teamsLayoutTable" columns={coursecolumns} dataSource={this.state.coursedata} bordered pagination={false}/> <Table className="teamsLayoutTable" columns={coursecolumns} dataSource={this.state.coursedata} bordered pagination={false}/>
</Content> </Content>

@ -250,7 +250,7 @@ class Competitionteams extends Component{
<Content className={"teamsLayoutContent"}> <Content className={"teamsLayoutContent"}>
<Table className="teamsLayoutTable" columns={shixuncolumns} dataSource={this.state.shixundata} bordered pagination={false}/> <Table className="teamsLayoutTable" columns={shixuncolumns} dataSource={this.state.shixundata} bordered pagination={false}/>
</Content> </Content>
<Content className={"teamsLayoutitle mt40"}>翻转课堂</Content> <Content className={"teamsLayoutitle mt40"}>教学课堂</Content>
<Content className={"teamsLayoutContents"}> <Content className={"teamsLayoutContents"}>
<Table className="teamsLayoutTable" columns={coursecolumns} dataSource={this.state.coursedata} bordered pagination={false}/> <Table className="teamsLayoutTable" columns={coursecolumns} dataSource={this.state.coursedata} bordered pagination={false}/>
</Content> </Content>

@ -55,7 +55,7 @@ class CoursesHome extends Component{
} }
componentDidMount(){ componentDidMount(){
document.title="翻转课堂"; document.title="教学课堂";
const upsystem=`/users/system_update.json`; const upsystem=`/users/system_update.json`;
axios.get(upsystem).then((response)=>{ axios.get(upsystem).then((response)=>{
let updata=response.data; let updata=response.data;
@ -159,7 +159,7 @@ class CoursesHome extends Component{
onClick={ () => this.changeStatus("created_at")}>最新</a> onClick={ () => this.changeStatus("created_at")}>最新</a>
<a className={ order == "visits" ? "fl mr20 font-16 bestChoose active" : "fl mr20 font-16 bestChoose"} <a className={ order == "visits" ? "fl mr20 font-16 bestChoose active" : "fl mr20 font-16 bestChoose"}
onClick={ () => this.changeStatus("visits")}>最热</a> onClick={ () => this.changeStatus("visits")}>最热</a>
{this.props.user&&this.props.user.user_identity==="学生"?"":<span className={ "fr font-16 bestChoose color-blue" } onClick={(url)=>this.getUser("/courses/new")}>+新建翻转课堂</span>} {this.props.user&&this.props.user.user_identity==="学生"?"":<span className={ "fr font-16 bestChoose color-blue" } onClick={(url)=>this.getUser("/courses/new")}>+新建教学课堂</span>}
{/*<div className="fr mr5 search-new">*/} {/*<div className="fr mr5 search-new">*/}
{/*/!* <Search*/} {/*/!* <Search*/}

@ -690,7 +690,7 @@ class CoursesNew extends Component {
<a className="btn colorgrey fl hovercolorblue " <a className="btn colorgrey fl hovercolorblue "
href={this.props.match.params.coursesId === undefined ?"/courses":this.props.current_user&&this.props.current_user.first_category_url} href={this.props.match.params.coursesId === undefined ?"/courses":this.props.current_user&&this.props.current_user.first_category_url}
> >
{this.props.match.params.coursesId === undefined ?"翻转课堂":dataname} {this.props.match.params.coursesId === undefined ?"教学课堂":dataname}
</a> </a>
<span className="color-grey-9 fl ml3 mr3">&gt;</span> <span className="color-grey-9 fl ml3 mr3">&gt;</span>
<span className="fl cdefault">{this.props.match.params.coursesId === undefined ?"新建课堂":"编辑课堂"}</span> <span className="fl cdefault">{this.props.match.params.coursesId === undefined ?"新建课堂":"编辑课堂"}</span>

@ -721,7 +721,7 @@ class Goldsubject extends Component {
{/*</Breadcrumb>*/} {/*</Breadcrumb>*/}
<p className="clearfix mb20 mt10"> <p className="clearfix mb20 mt10">
<a className="btn colorgrey fl hovercolorblue " href={Whethertocreateanewclassroom===true?"/courses":this.props.current_user&&this.props.current_user.first_category_url} <a className="btn colorgrey fl hovercolorblue " href={Whethertocreateanewclassroom===true?"/courses":this.props.current_user&&this.props.current_user.first_category_url}
>{Whethertocreateanewclassroom===true?"翻转课堂":name}</a> >{Whethertocreateanewclassroom===true?"教学课堂":name}</a>
<span className="color-grey-9 fl ml3 mr3">&gt;</span> <span className="color-grey-9 fl ml3 mr3">&gt;</span>
<span className="fl cdefault">{Whethertocreateanewclassroom===true?"新建课堂":"编辑课堂"}</span> <span className="fl cdefault">{Whethertocreateanewclassroom===true?"新建课堂":"编辑课堂"}</span>
</p> </p>

@ -1129,7 +1129,7 @@ submittojoinclass=(value)=>{
{/*<li><a href={this.props.Headertop===undefined?"":'/courses'}>课堂</a></li>*/} {/*<li><a href={this.props.Headertop===undefined?"":'/courses'}>课堂</a></li>*/}
<li className={`${coursestype === true ? 'pr active' : 'pr'}`}> <li className={`${coursestype === true ? 'pr active' : 'pr'}`}>
{/*<a href={this.props.Headertop===undefined?"":this.props.Headertop.course_url}>课堂</a>*/} {/*<a href={this.props.Headertop===undefined?"":this.props.Headertop.course_url}>课堂</a>*/}
<Link to={this.props.Headertop===undefined?"":'/courses'}>翻转课堂</Link> <Link to={this.props.Headertop===undefined?"":'/courses'}>教学课堂</Link>
</li> </li>
<li className={`${activeShixuns === true ? 'pr active' : 'pr'}`}> <li className={`${activeShixuns === true ? 'pr active' : 'pr'}`}>
<Link to="/shixuns">实训项目</Link> <Link to="/shixuns">实训项目</Link>
@ -1215,7 +1215,7 @@ submittojoinclass=(value)=>{
onBlur={(e)=>this.hideshowSearchOpen(e)} onMouseLeave={()=>this.setevaluatinghides()}> onBlur={(e)=>this.hideshowSearchOpen(e)} onMouseLeave={()=>this.setevaluatinghides()}>
<Search <Search
id={"HeaderSearchs"} id={"HeaderSearchs"}
placeholder="实践课程/翻转课堂/实训项目/交流问答" placeholder="实践课程/教学课堂/实训项目/交流问答"
onInput={()=>this.onKeywordSearchKeyDowns()} onInput={()=>this.onKeywordSearchKeyDowns()}
onSearch={(value) => this.onKeywordSearchKeyDown(value)} onSearch={(value) => this.onKeywordSearchKeyDown(value)}
// onPressEnter={this.onKeywordSearchKeyDown} // onPressEnter={this.onKeywordSearchKeyDown}
@ -1262,7 +1262,7 @@ submittojoinclass=(value)=>{
<ul className="edu-menu-list" style={{top:'60px'}}> <ul className="edu-menu-list" style={{top:'60px'}}>
{/*<span className="bor-bottom-greyE currentName task-hide">{user.username}</span>*/} {/*<span className="bor-bottom-greyE currentName task-hide">{user.username}</span>*/}
<li><Link to={`/users/${this.props.current_user.login}/courses`}>我的个人主页</Link></li> <li><Link to={`/users/${this.props.current_user.login}/courses`}>我的个人主页</Link></li>
{coursestypes===true?"":<li><Link to={`/users/${this.props.current_user===undefined?"":this.props.current_user.login}/courses`}>{this.props.user&&this.props.user.main_site===false?"我的课堂":"我的翻转课堂"}</Link></li>} {coursestypes===true?"":<li><Link to={`/users/${this.props.current_user===undefined?"":this.props.current_user.login}/courses`}>{this.props.user&&this.props.user.main_site===false?"我的课堂":"我的教学课堂"}</Link></li>}
{/* p 老师 l 学生 */} {/* p 老师 l 学生 */}
{shixuntype===true?"":<li><Link to={`/users/${this.props.current_user===undefined?"":this.props.current_user.login}/shixuns`}>我的实训项目</Link></li>} {shixuntype===true?"":<li><Link to={`/users/${this.props.current_user===undefined?"":this.props.current_user.login}/shixuns`}>我的实训项目</Link></li>}
{pathstype===true?"":<li><Link to={`/users/${this.props.current_user===undefined?"":this.props.current_user.login}/paths`}>{this.props.user&&this.props.user.main_site===false?"我的课程":"我的实践课程"}</Link></li>} {pathstype===true?"":<li><Link to={`/users/${this.props.current_user===undefined?"":this.props.current_user.login}/paths`}>{this.props.user&&this.props.user.main_site===false?"我的课程":"我的实践课程"}</Link></li>}
@ -1314,7 +1314,7 @@ submittojoinclass=(value)=>{
<div className="overPart"></div> <div className="overPart"></div>
<ul className={coursestypes===true&&this.props.user&&this.props.user.main_site===false?"fl headwith100b edu-txt-center pr ul-leftline":"fl with50 edu-txt-center pr ul-leftline"}> <ul className={coursestypes===true&&this.props.user&&this.props.user.main_site===false?"fl headwith100b edu-txt-center pr ul-leftline":"fl with50 edu-txt-center pr ul-leftline"}>
{this.props.current_user&&this.props.current_user.user_identity==="学生"?"":coursestypes===false? {this.props.current_user&&this.props.current_user.user_identity==="学生"?"":coursestypes===false?
<li><a onClick={(url)=>this.getUser("/courses/new")}>{this.props.user&&this.props.user.main_site===false?"新建课堂":"新建翻转课堂"}</a></li>:"" <li><a onClick={(url)=>this.getUser("/courses/new")}>{this.props.user&&this.props.user.main_site===false?"新建课堂":"新建教学课堂"}</a></li>:""
} }
{shixuntype===true?"": {shixuntype===true?"":
<li><a onClick={(url)=>this.getUser("/shixuns/new","newshixuns")}>新建实训项目</a></li> <li><a onClick={(url)=>this.getUser("/shixuns/new","newshixuns")}>新建实训项目</a></li>
@ -1328,7 +1328,7 @@ submittojoinclass=(value)=>{
{coursestypes===true&&this.props.user&&this.props.user.main_site===false?"":<ul className="fl with50 edu-txt-center"> {coursestypes===true&&this.props.user&&this.props.user.main_site===false?"":<ul className="fl with50 edu-txt-center">
{coursestypes===true?"":<li> {coursestypes===true?"":<li>
<a onClick={this.tojoinclass}>{this.props.user&&this.props.user.main_site===false?"加入课堂":"加入翻转课堂"}</a> <a onClick={this.tojoinclass}>{this.props.user&&this.props.user.main_site===false?"加入课堂":"加入教学课堂"}</a>
</li>} </li>}
{Addcoursestypes===true?<Addcourses {Addcoursestypes===true?<Addcourses

@ -163,7 +163,7 @@ export function TPMIndexHOC(WrappedComponent) {
}else if(this.props.match.path==="/paths"){ }else if(this.props.match.path==="/paths"){
document.title="实践课程"; document.title="实践课程";
}else if(this.props.match.path==="/courses"){ }else if(this.props.match.path==="/courses"){
document.title="翻转课堂"; document.title="教学课堂";
} }
// if(this.props.match.path==="/"){ // if(this.props.match.path==="/"){

@ -953,9 +953,9 @@ class Shixuninformation extends Component {
<div> <div>
{this.state.mainvalues === undefined && this.state.subvalues === undefined || this.state.mainvalues === "" && this.state.subvalues === "" ? "" : {this.state.mainvalues === undefined && this.state.subvalues === undefined || this.state.mainvalues === "" && this.state.subvalues === "" ? "" :
<div className={"font-12"} style={{'max-width': '600px'}}> <div className={"font-12"} style={{'max-width': '600px'}}>
{`${this.state.mainvalues === undefined || this.state.mainvalues === "" ? "" : this.state.mainvalues}`} {`${this.state.mainvalues === undefined || this.state.mainvalues === "" ? "" : this.state.mainvalues}`}
{`${this.state.subvalues === undefined || this.state.subvalues === "" ? "" : this.state.mainvalues === undefined || this.state.mainvalues === "" ? this.state.subvalues : this.state.subvalues}`} {`${this.state.subvalues === undefined || this.state.subvalues === "" ? "" : this.state.mainvalues === undefined || this.state.mainvalues === "" ? this.state.subvalues : this.state.subvalues}`}
{`${this.state.mainvalues === undefined || this.state.mainvalues === "" ? "" : this.state.mainvalues}${this.state.subvalues === undefined || this.state.subvalues === "" ? "" : {`${this.state.mainvalues === undefined || this.state.mainvalues === "" ? "" : ""}${this.state.subvalues === undefined || this.state.subvalues === "" ? "" :
this.state.mainvalues === undefined || this.state.mainvalues === "" ? this.state.subvalues : this.state.subvalues}`} this.state.mainvalues === undefined || this.state.mainvalues === "" ? this.state.subvalues : this.state.subvalues}`}
</div>} </div>}
</div> </div>

@ -620,9 +620,9 @@ class Newshixuns extends Component {
<div> <div>
{this.state.mainvalues === undefined && this.state.subvalues === undefined || this.state.mainvalues === "" && this.state.subvalues === "" ? "" : {this.state.mainvalues === undefined && this.state.subvalues === undefined || this.state.mainvalues === "" && this.state.subvalues === "" ? "" :
<div className={"font-12"} style={{'max-width': '600px'}}> <div className={"font-12"} style={{'max-width': '600px'}}>
{`${this.state.mainvalues === undefined || this.state.mainvalues === "" ? "" : this.state.mainvalues}`} {`${this.state.mainvalues === undefined || this.state.mainvalues === "" ? "" : this.state.mainvalues}`}
{`${this.state.subvalues === undefined || this.state.subvalues === "" ? "" : this.state.mainvalues === undefined || this.state.mainvalues === "" ? this.state.subvalues : this.state.subvalues}`} {`${this.state.subvalues === undefined || this.state.subvalues === "" ? "" : this.state.mainvalues === undefined || this.state.mainvalues === "" ? this.state.subvalues : this.state.subvalues}`}
{`${this.state.mainvalues === undefined || this.state.mainvalues === "" ? "" : this.state.mainvalues}${this.state.subvalues === undefined || this.state.subvalues === "" ? "" : {`${this.state.mainvalues === undefined || this.state.mainvalues === "" ? "" : ""}${this.state.subvalues === undefined || this.state.subvalues === "" ? "" :
this.state.mainvalues === undefined || this.state.mainvalues === "" ? this.state.subvalues : this.state.subvalues}`} this.state.mainvalues === undefined || this.state.mainvalues === "" ? this.state.subvalues : this.state.subvalues}`}
</div>} </div>}

@ -15,7 +15,7 @@ class InfosBanner extends Component{
super(props); super(props);
} }
render(){ render(){
let { let {
data , data ,
id, id,
login, login,
@ -87,27 +87,27 @@ class InfosBanner extends Component{
<div class="fl headtab mt20"> <div class="fl headtab mt20">
<span>{is_current ? "我":"TA"}的经验值</span> <span>{is_current ? "我":"TA"}的经验值</span>
<a style={{"cursor":"default"}}>{data && data.experience}</a> <a style={{"cursor":"default"}}>{data && data.experience}</a>
</div> </div>
<div class="fl headtab mt20 pr leftTransform pl20"> <div class="fl headtab mt20 pr leftTransform pl20">
<span>{is_current ? "我":"TA"}的金币</span> <span>{is_current ? "我":"TA"}的金币</span>
<a style={{"cursor":"default"}}>{data && data.grade}</a> <a style={{"cursor":"default"}}>{data && data.grade}</a>
</div> </div>
{ {
is_current ? is_current ?
<span className="fl mt35 ml60"> <span className="fl mt35 ml60">
{ {
data && data.attendance_signed ? data && data.attendance_signed ?
<span className="user_default_btn user_grey_btn font-18">已签到</span> <span className="user_default_btn user_grey_btn font-18">已签到</span>
: :
<a herf="javascript:void(0);" onClick={this.props.signFor} className="user_default_btn user_yellow_btn fl font-18">签到</a> <a herf="javascript:void(0);" onClick={this.props.signFor} className="user_default_btn user_yellow_btn fl font-18">签到</a>
} }
</span> </span>
: :
<span className="fl mt35 ml60"> <span className="fl mt35 ml60">
<LinkAfterLogin <LinkAfterLogin
{...this.props} {...this.props}
{...this.state} {...this.state}
className="user_default_btn user_yellow_btn fl font-18" className="user_default_btn user_yellow_btn fl font-18"
to={`/messages/${login}/message_detail?target_ids=${id}`} to={`/messages/${login}/message_detail?target_ids=${id}`}
> >
私信 私信
@ -120,7 +120,7 @@ class InfosBanner extends Component{
{coursestypes===true?"":<li className={`${moduleName == 'courses' ||moduleName == undefined ? 'active' : '' }`}> {coursestypes===true?"":<li className={`${moduleName == 'courses' ||moduleName == undefined ? 'active' : '' }`}>
<Link <Link
onClick={() => this.setState({moduleName: 'courses'})} onClick={() => this.setState({moduleName: 'courses'})}
to={`/users/${username}/courses`}>翻转课堂</Link> to={`/users/${username}/courses`}>教学课堂</Link>
</li>} </li>}
{shixuntype===true?"":<li className={`${moduleName == 'shixuns' ? 'active' : '' }`}> {shixuntype===true?"":<li className={`${moduleName == 'shixuns' ? 'active' : '' }`}>
<Link <Link
@ -128,7 +128,7 @@ class InfosBanner extends Component{
to={`/users/${username}/shixuns`}>实训项目</Link> to={`/users/${username}/shixuns`}>实训项目</Link>
</li>} </li>}
{pathstype===true?"":<li className={`${moduleName == 'paths' ? 'active' : '' }`}> {pathstype===true?"":<li className={`${moduleName == 'paths' ? 'active' : '' }`}>
<Link <Link
onClick={() => this.setState({moduleName: 'paths'})} onClick={() => this.setState({moduleName: 'paths'})}
to={`/users/${username}/paths`}>实践课程</Link> to={`/users/${username}/paths`}>实践课程</Link>
</li>} </li>}

@ -158,7 +158,7 @@ class SearchPage extends Component{
<div className="tabtitles2"> <div className="tabtitles2">
<Menu mode="horizontal" className="tabtitless" selectedKeys={tab} onClick={this.changeTab}> <Menu mode="horizontal" className="tabtitless" selectedKeys={tab} onClick={this.changeTab}>
<Menu.Item className={"tabtitle1"} key="1">实践课程</Menu.Item> <Menu.Item className={"tabtitle1"} key="1">实践课程</Menu.Item>
<Menu.Item className={"tabtitle2"} key="2">翻转课堂</Menu.Item> <Menu.Item className={"tabtitle2"} key="2">教学课堂</Menu.Item>
<Menu.Item className={"tabtitle2"} key="0">实训项目</Menu.Item> <Menu.Item className={"tabtitle2"} key="0">实训项目</Menu.Item>
<Menu.Item className={"tabtitle2"} key="3">交流问答</Menu.Item> <Menu.Item className={"tabtitle2"} key="3">交流问答</Menu.Item>
</Menu> </Menu>

@ -0,0 +1,5 @@
require 'rails_helper'
RSpec.describe DeleteCourseNotifyJob, type: :job do
pending "add some examples to (or delete) #{__FILE__}"
end
Loading…
Cancel
Save