Merge branches 'dev_Ysl' and 'dev_aliyun' of https://bdgit.educoder.net/Hjqreturn/educoder into dev_Ysl

dev_local_2
杨树林 6 years ago
commit b3d50d749a

@ -707,12 +707,12 @@ class CoursesController < ApplicationController
if order == 1 if order == 1
# REDO:Extension # REDO:Extension
@students = @students.includes(user: :user_extension).order("user_extensions.student_id, course_members.id") @students = @students.includes(user: :user_extension).order("user_extensions.student_id, users.login")
elsif order == 2 elsif order == 2
@students = @students.includes(:course_group).order("course_groups.position, course_members.id") @students = @students.includes(:course_group).order("course_groups.position, users.login")
else else
# REDO:Extension # REDO:Extension
@students = @students.includes(user: :user_extension).order("user_extensions.student_id, course_members.id") @students = @students.includes(user: :user_extension).order("user_extensions.student_id, users.login")
end end
if course_group_id.present? if course_group_id.present?

@ -322,6 +322,8 @@ class GraduationTasksController < ApplicationController
def publish_task def publish_task
tip_exception("缺少截止时间参数") if params[:end_time].blank? tip_exception("缺少截止时间参数") if params[:end_time].blank?
tip_exception("截止时间必须晚于当前时间") if params[:end_time] <= strf_time(Time.now) tip_exception("截止时间必须晚于当前时间") if params[:end_time] <= strf_time(Time.now)
tip_exception("截止时间不能晚于课堂结束时间(#{@course.end_date.end_of_day.strftime("%Y-%m-%d %H:%M")}") if
@course.end_date.present? && params[:end_time] > @course.end_date.end_of_day
ActiveRecord::Base.transaction do ActiveRecord::Base.transaction do
begin begin
@ -397,8 +399,8 @@ class GraduationTasksController < ApplicationController
tip_exception("发布时间不能早于当前时间") if params[:publish_time] <= Time.now.strftime("%Y-%m-%d %H:%M:%S") tip_exception("发布时间不能早于当前时间") if params[:publish_time] <= Time.now.strftime("%Y-%m-%d %H:%M:%S")
tip_exception("截止时间不能早于当前时间") if params[:end_time] <= Time.now.strftime("%Y-%m-%d %H:%M:%S") tip_exception("截止时间不能早于当前时间") if params[:end_time] <= Time.now.strftime("%Y-%m-%d %H:%M:%S")
tip_exception("截止时间不能早于发布时间") if params[:publish_time] > params[:end_time] tip_exception("截止时间不能早于发布时间") if params[:publish_time] > params[:end_time]
tip_exception("截止时间不能早于课堂结束时间") if @course.end_date.present? && tip_exception("截止时间不能晚于课堂结束时间(#{@course.end_date.end_of_day.strftime("%Y-%m-%d %H:%M")}") if
params[:end_time] > @course.end_date.end_of_day @course.end_date.present? && params[:end_time] > @course.end_date.end_of_day
@task.publish_time = params[:publish_time] @task.publish_time = params[:publish_time]
@task.end_time = params[:end_time] @task.end_time = params[:end_time]
@ -410,7 +412,8 @@ class GraduationTasksController < ApplicationController
elsif @task.status < 2 elsif @task.status < 2
tip_exception("截止时间不能为空") if params[:end_time].blank? tip_exception("截止时间不能为空") if params[:end_time].blank?
tip_exception("截止时间不能早于当前时间") if params[:end_time] <= Time.now.strftime("%Y-%m-%d %H:%M:%S") tip_exception("截止时间不能早于当前时间") if params[:end_time] <= Time.now.strftime("%Y-%m-%d %H:%M:%S")
tip_exception("截止时间不能晚于课堂结束时间(#{@course.end_date.end_of_day.strftime("%Y-%m-%d %H:%M")}") if @course.end_date.present? && params[:end_time] > @course.end_date.end_of_day tip_exception("截止时间不能晚于课堂结束时间(#{@course.end_date.end_of_day.strftime("%Y-%m-%d %H:%M")}") if
@course.end_date.present? && params[:end_time] > @course.end_date.end_of_day
@task.end_time = params[:end_time] @task.end_time = params[:end_time]
end end
@ -421,8 +424,8 @@ class GraduationTasksController < ApplicationController
if params[:allow_late].to_i == 1 if params[:allow_late].to_i == 1
tip_exception("补交结束时间不能为空") if params[:late_time].blank? tip_exception("补交结束时间不能为空") if params[:late_time].blank?
tip_exception("补交结束时间不能早于截止时间") if params[:late_time] <= @task.end_time tip_exception("补交结束时间不能早于截止时间") if params[:late_time] <= @task.end_time
tip_exception("补交结束时间不能晚于课堂结束时间(#{@course.end_date.end_of_day.strftime("%Y-%m-%d %H:%M")}") if @course.end_date.present? && params[:late_time] > tip_exception("补交结束时间不能晚于课堂结束时间(#{@course.end_date.end_of_day.strftime("%Y-%m-%d %H:%M")}") if
@course.end_date.end_of_day @course.end_date.present? && params[:late_time] > @course.end_date.end_of_day
tip_exception("迟交扣分应为正整数") if params[:late_penalty] && params[:late_penalty].to_i < 0 tip_exception("迟交扣分应为正整数") if params[:late_penalty] && params[:late_penalty].to_i < 0
@task.allow_late = true @task.allow_late = true

@ -109,7 +109,7 @@ class ShixunsController < ApplicationController
can_fork = current_user.is_certification_teacher || current_user.admin? can_fork = current_user.is_certification_teacher || current_user.admin?
unless can_fork unless can_fork
@can_fork = {can_fork: "已经职业认证的教师才能fork实训", @can_fork = {can_fork: "已经职业认证的教师才能fork实训",
certi_url: edu_setting('old_edu_host') + "/account/professional_certification"} certi_url: "/account/certification"}
end end
@current_myshixun = @shixun.current_myshixun(current_user) @current_myshixun = @shixun.current_myshixun(current_user)
if @shixun.fork_from if @shixun.fork_from

@ -558,7 +558,7 @@ module ExercisesHelper
standard_answer = standard_answer.first.to_s.split("").map(&:to_i) standard_answer = standard_answer.first.to_s.split("").map(&:to_i)
end end
if user_answer_content == standard_answer #答案一致,多选或单选才给分,答案不对不给分 if user_answer_content == standard_answer.sort #答案一致,多选或单选才给分,答案不对不给分
if standard_answer.size > 0 if standard_answer.size > 0
q_score_1 = q.question_score q_score_1 = q.question_score
else else

@ -39,6 +39,11 @@ class Subject < ApplicationRecord
courses.pluck(:end_date).max courses.pluck(:end_date).max
end end
# 是否有已开课的课堂
def has_course_start?
courses.where("start_date <= '#{Date.today}' and end_date >= '#{Date.today}'").count > 0
end
# 挑战过路径的成员数(金课统计去重后的报名人数) # 挑战过路径的成员数(金课统计去重后的报名人数)
def member_count def member_count
excellent && CourseMember.where(role: 4, course_id: courses.pluck(:id)).pluck(:user_id).uniq.length > shixuns.pluck(:myshixuns_count).sum ? excellent && CourseMember.where(role: 4, course_id: courses.pluck(:id)).pluck(:user_id).uniq.length > shixuns.pluck(:myshixuns_count).sum ?

@ -14,6 +14,7 @@ json.allow_add_member @is_manager
json.is_creator @is_creator json.is_creator @is_creator
if @subject.excellent if @subject.excellent
json.has_start @subject.has_course_start?
json.courses @courses do |course| json.courses @courses do |course|
json.course_id course.id json.course_id course.id
json.first_category_url module_url(course.none_hidden_course_modules.first, course) json.first_category_url module_url(course.none_hidden_course_modules.first, course)

@ -0,0 +1,9 @@
class MigrateSubjectShixunCount < ActiveRecord::Migration[5.2]
def change
Subject.reset_column_information
Subject.all.each do |subject|
Subject.reset_counters subject.id, :stage_shixuns
Subject.reset_counters subject.id, :shixuns
end
end
end

@ -2,7 +2,7 @@
namespace :course do namespace :course do
desc "course end" desc "course end"
task :end => :environment do task :end => :environment do
courses = Course.where("end_date <= '#{Date.today}' and is_end = 0") courses = Course.where("end_date < '#{Date.today}' and is_end = 0")
courses.each do |course| courses.each do |course|
course.update_attribute(:is_end, 1) course.update_attribute(:is_end, 1)
end end

@ -118,12 +118,13 @@ em.vertical-line{display: inline-block;width: 2px;background: #999;height: 10px}
bottom: 90px;} bottom: 90px;}
.tag-green .tag-name{display: block;width: auto; .tag-green .tag-name{display: block;width: auto;
/*background-image: url("/images/educoder/tag1.png");*/ /*background-image: url("/images/educoder/tag1.png");*/
background: #000000; background: rgba(000,000,000,0.56);
border: 1px solid #fff; border: 1px solid #fff;
border-radius: 3px; border-radius: 3px;
font-size: 12px; font-size: 12px;
opacity: 0.56; /*opacity: 0.56;*/
background-size: 100% 100%;padding: 0px 8px;color: #fff;float: left;} background-size: 100% 100%;
padding: 0px 8px;color: #fff;float: left;}
.tag-orange{position: absolute;right: 0px;top:12px;} .tag-orange{position: absolute;right: 0px;top:12px;}
.tag-orange .tag-name{display: block;width: auto;background-color:#FF6800; .tag-orange .tag-name{display: block;width: auto;background-color:#FF6800;
background-size: 100% 100%;padding: 0px 8px;color: #fff;float: left; background-size: 100% 100%;padding: 0px 8px;color: #fff;float: left;
@ -3448,3 +3449,8 @@ a.singlepublishtwo{
.square-main p{ .square-main p{
margin-bottom: 0 !important; margin-bottom: 0 !important;
} }
/*.ant-notification{*/
/*width: auto !important;*/
/*max-width: 600px !important;*/
/*}*/

@ -49,6 +49,20 @@ class ExerciceNew extends Component{
} }
} }
// 已发布试卷编辑保存的确认弹框
changeScore = (question_id,answerArray) =>{
this.props.confirm({
content:'修改了标准答案',
subContent:"是否重新计算学生答题的成绩?",
onOk:()=>{
this.sureChangeScore(question_id,answerArray)
},
onCancel:()=>{
this.addSuccess();
}
})
}
// 已发布试卷修改答案确认修改分数 // 已发布试卷修改答案确认修改分数
sureChangeScore = (question_id,answerArray) =>{ sureChangeScore = (question_id,answerArray) =>{
let url=`/exercise_questions/${question_id}/update_scores.json` let url=`/exercise_questions/${question_id}/update_scores.json`
@ -398,6 +412,7 @@ class ExerciceNew extends Component{
addSuccess: this.addSuccess, addSuccess: this.addSuccess,
addQuestion: this.addQuestion, addQuestion: this.addQuestion,
onEditorCancel: this.onEditorCancel, onEditorCancel: this.onEditorCancel,
changeScore:this.changeScore,
editQestion: this.editQestion, editQestion: this.editQestion,
onSortDown: this.onSortDown, onSortDown: this.onSortDown,
onSortUp: this.onSortUp, onSortUp: this.onSortUp,
@ -523,7 +538,7 @@ class ExerciceNew extends Component{
{ exercise_questions.map((item, index) => { { exercise_questions.map((item, index) => {
if (item.question_type == 0 || item.question_type == 1) { if (item.question_type == 0 || item.question_type == 1) {
if (item.isNew) { if (item.isNew) {
return <SingleEditor {...this.props} {...item} index={index} {...commonHandler} sureChangeScore={this.sureChangeScore}></SingleEditor> return <SingleEditor {...this.props} {...item} index={index} {...commonHandler}></SingleEditor>
} else { } else {
return <SingleDisplay {...this.props} {...item} index={index} {...commonHandler} return <SingleDisplay {...this.props} {...item} index={index} {...commonHandler}
displayCount={exercise_questions.length} displayCount={exercise_questions.length}
@ -531,13 +546,13 @@ class ExerciceNew extends Component{
} }
} else if (item.question_type == 2) { } else if (item.question_type == 2) {
if (item.isNew) { if (item.isNew) {
return <JudgeEditor {...this.props} {...item} index={index} {...commonHandler} sureChangeScore={this.sureChangeScore}></JudgeEditor> return <JudgeEditor {...this.props} {...item} index={index} {...commonHandler}></JudgeEditor>
} else { } else {
return <JudgeDisplay {...this.props} {...item} index={index} {...commonHandler} ></JudgeDisplay> return <JudgeDisplay {...this.props} {...item} index={index} {...commonHandler} ></JudgeDisplay>
} }
} else if (item.question_type == 3) { } else if (item.question_type == 3) {
if (item.isNew) { if (item.isNew) {
return <NullEditor {...this.props} {...item} index={index} {...commonHandler} sureChangeScore={this.sureChangeScore}></NullEditor> return <NullEditor {...this.props} {...item} index={index} {...commonHandler}></NullEditor>
} else { } else {
return <NullDisplay {...this.props} {...item} index={index} {...commonHandler} ></NullDisplay> return <NullDisplay {...this.props} {...item} index={index} {...commonHandler} ></NullDisplay>
} }

@ -97,16 +97,8 @@ class SingleEditor extends Component{
if (response.data.status == 0) { if (response.data.status == 0) {
this.props.addSuccess() this.props.addSuccess()
}else if(response.data.status == 3){ }else if(response.data.status == 3){
this.props.confirm({ // 已发布试卷编辑保存
content:'修改了标准答案', this.props.changeScore(question_id,answerArray);
subContent:"是否重新计算学生答题的成绩?",
onOk:()=>{
this.props.sureChangeScore(question_id,answerArray)
},
onCancel:()=>{
this.props.addSuccess();
}
})
} }
}) })
.catch(function (error) { .catch(function (error) {

@ -137,16 +137,8 @@ class NullEditor extends Component{
if (response.data.status == 0) { if (response.data.status == 0) {
this.props.addSuccess() this.props.addSuccess()
}else if(response.data.status == 3){ }else if(response.data.status == 3){
this.props.confirm({ // 已发布试卷编辑保存
content:'修改了标准答案', this.props.changeScore(question_id,answerArray);
subContent:"是否重新计算学生答题的成绩?",
onOk:()=>{
this.props.sureChangeScore(question_id,answerArray)
},
onCancel:()=>{
this.props.addSuccess();
}
})
} }
}) })
.catch(function (error) { .catch(function (error) {

@ -135,16 +135,8 @@ class SingleEditor extends Component{
if (response.data.status == 0) { if (response.data.status == 0) {
this.props.addSuccess() this.props.addSuccess()
}else if(response.data.status == 3){ }else if(response.data.status == 3){
this.props.confirm({ // 已发布试卷编辑保存
content:'修改了标准答案', this.props.changeScore(question_id,answerArray);
subContent:"是否重新计算学生答题的成绩?",
onOk:()=>{
this.props.sureChangeScore(question_id,answerArray)
},
onCancel:()=>{
this.props.addSuccess();
}
})
} }
}) })
.catch(function (error) { .catch(function (error) {

@ -0,0 +1,330 @@
import React,{ Component } from "react";
import { Input,Checkbox,Table, Pagination, Modal,Menu, Tooltip,Spin,Button,Form } from "antd";
import { WordsBtn,on, off, trigger,markdownToHTML,getImageUrl} from 'educoder';
import './myysleduinforms.css'
import axios from 'axios';
import TPMMDEditor from "../../tpm/challengesnew/TPMMDEditor";
import moment from "../new/CoursesNew";
import Fileslistitem from "../Resource/Fileslistitem";
// 公告栏
class Bullsubdirectory extends Component{
constructor(props){
super(props);
this.messageRef = React.createRef();
this.state={
description:null,
isSpinysl:false,
whethertoeditysl:false,
addonAfter:0,
eduintits:"",
informs:[],
}
}
componentDidMount() {
console.log("获取到数据");
console.log(this.props);
let{id,myname,mydescription} =this.props
this.props.form.setFieldsValue({
id:id,
eduintits:myname,
description:mydescription,
});
this.setState({
id:id,
eduintits:myname,
description:mydescription,
})
if(myname!=undefined){
this.setState({
addonAfter:myname.length
})
}
}
bianji = (bians)=>{
this.setState({
whethertoeditysl:bians,
})
if(bians===true){
this.props.getyslbooltrue();
}else {
this.props.getyslboolfalse();
}
};
changeTopicName = (e) => {
console.log("调用了changeTopicName");
let num = e.target.value.length;
if(num>60){
return;
}
this.setState({
addonAfter: num < 0 ? 0 : num
});
if(num<=60){
this.setState({
eduintits: e.target.value
})
this.props.form.setFieldsValue({
eduintits: e.target.value,
});
}
}
handleSubmit=(e) => {
e.preventDefault();
this.props.form.validateFields((err, values) => {
if (!err) {
console.log(values.description);
if(values.eduintits === undefined|| values.eduintits === "" || values.eduintits ===null){
this.props.showNotification(`请输入标题`);
return
}
if(values.description === undefined|| values.description === "" || values.description ===null){
this.props.showNotification(`请输入内容`);
return
}
var id=this.props.match.params.coursesId
var titname="";
try {
if(values.eduintits.length>0){
if( values.eduintits.length>60){
var str=values.eduintits;
titname=str.substring(0,60);
}else {
titname=values.eduintits;
}
}else {
titname=values.eduintits;
}
}catch (e) {
titname=values.eduintits;
}
var url = `/courses/${id}/update_informs.json`;
axios.post(url,{
inform_id:this.state.id,
name:titname,
description:values.description,
}).then((result) => {
if(result){
if(result.data){
if(result.data.status === 0){
this.props.form.setFieldsValue({
id:this.state.id,
eduintits:titname,
description:values.description,
});
this.setState({
whethertoeditysl:false,
id:this.state.id,
eduintits:titname,
description:values.description,
});
this.props.getinputdata();
this.props.getyslboolfalse();
this.props.showNotification(result.data.message);
}else {
this.props.showNotification(result.data.message);
}
}
}
}).catch((error) => {
console.log(error)
})
}else{
console.log(err);
}
});
}
render(){
let{description,whethertoeditysl,addonAfter,eduintits,informs,isSpinysl} =this.state;
let{myname,mydescription}=this.props;
const {getFieldDecorator} = this.props.form;
return(
<React.Fragment >
<div >
<Spin size="large" spinning={isSpinysl} >
<div className="edu-back-white ">
{
whethertoeditysl === false?
<div>
<div className="" >
<div className="fudonyingxiangysl"><div className="ysltitbt fl"><span >{myname}</span></div>
{
this.props.isAdmin() === true ?
(this.props.yslbool===false?
<i className="iconfont icon-bianji1 newbianji1 fr pr25 yslbianji" onClick={()=>this.bianji(true)}></i>
:
""
)
:""
}
</div>
<div id="MakedownHTML"className={"markdown-body fonttext yslmtopcg yslminHeigth markdownysltext"} dangerouslySetInnerHTML={{__html: markdownToHTML(mydescription).replace(/▁/g, "▁▁▁")}}/>
</div>
<div className="bor-bottom-greyE mr25 ml25"></div>
</div>
:
<div className="edu-back-white ">
<Form layout='vertical' onSubmit={this.handleSubmit} >
<style>
{
`.ant-form-item{
margin-bottom:0px !important;
}
.chooseDestwo .ant-form-item{
margin-bottom:0px !important;
}
.chooseDestwo .ant-form-item-control-wrapper .ant-form-item-control .ant-form-explain{
padding-left: 25px !important;
}
.ant-form-vertical .ant-form-item {
margin-bottom:0px !important;
}
`
}
</style>
<Form.Item
style={{"borderBottom":'none'}}
className="chooseDestwo "
>
{getFieldDecorator('eduintits',{ initialValue: this.state.eduintits }, {
rules: [{
required: true, message: '请在此输入标题,最多60个字符',
}],
})(
<div className="ysleduinwh">
<div className="yslduinlefts">
<span className="yslduincolorred">*</span>
</div>
<div className="yslduinleft">
<Input placeholder="请在此输入标题最多60个字符" maxLength="60"
style={{ textAlign: "left",width:"100%",}}
onInput={this.changeTopicName}
autoComplete="off"
suffix={String(addonAfter)+"/60"}
value={eduintits}
className="searchViewAfter"></Input>
</div>
</div>
)}
</Form.Item>
<div className="edu-back-white ">
<div className={"yslmt16px"}>
<style>
{
`
.ant-form-item-children {
position: unset;
}
.chooseDes .ant-form-item{
margin-bottom:0px !important;
}
.rememberTip{
position:absolute;
right:0px;
bottom:-10px;
}
.chooseDes .ant-form-explain{
position:absolute;
bottom:-10px;
left:0px;
}
.ant-form-vertical .ant-form-explain {
margin-top: 0px !important;
margin-bottom: 0px !important;
padding-left: 0px !important;
}
.chooseDes .ant-form-item-with-help {
margin-bottom: 24px !important;
}
.courseMessageMD .ant-form-item-with-help {
margin-bottom: 24px !important;
}
.chooseDes .editormd-toolbar {
width: 100%;
min-height: 37px;
background: #fff;
display: none;
position: absolute !important;
left: 0;
z-index: 10;
border-bottom: 1px solid #ddd;
}
.yslmt16px .ant-form-item-with-help
{
margin-bottom: 24px !important;
}
`
}
</style>
<Form.Item
style={{"borderBottom":'none'}}
className="chooseDes "
>
{getFieldDecorator('description', { initialValue: this.state.description },{
rules: [{
required: true, message: '请在此输入内容,最多5000个字符',
}, {
len: 5000, message: '最大限制为5000个字符',
}],
})(
<TPMMDEditor ref={this.messageRef}
placeholder={'请在此输入内容,最多5000个字符'}
initValue={description}
mdID={'courseMessageMD'}
className="courseMessageMD "
height={518}
></TPMMDEditor>
)}
</Form.Item>
</div>
</div>
<Form.Item>
<div className="clearfix mt28 fr pb50 mr25">
<a className="defalutCancelbtn fl mr20 " onClick={()=>this.bianji(false)}>取消</a>
<Button htmlType="submit" className="ant-btn defalutSubmitbtn fl ant-btn-primary">
<span> </span></Button>
</div>
</Form.Item>
</Form>
<div className="bor-bottom-greyE mr25 ml25"></div>
</div>
}
</div>
</Spin>
</div>
</React.Fragment>
)
}
}
const Bullsubdirectorys = Form.create({ name: 'bullsubdirectorys' })(Bullsubdirectory);
export default Bullsubdirectorys;

@ -4,7 +4,12 @@ import { WordsBtn,on, off, trigger,markdownToHTML,getImageUrl} from 'educoder';
import './myysleduinforms.css' import './myysleduinforms.css'
import axios from 'axios'; import axios from 'axios';
import TPMMDEditor from "../../tpm/challengesnew/TPMMDEditor"; import TPMMDEditor from "../../tpm/challengesnew/TPMMDEditor";
import Bullsubdirectory from "./Bullsubdirectory";
import moment from "../new/CoursesNew";
import Fileslistitem from "../Resource/Fileslistitem";
// 公告栏 // 公告栏
// var isOnComposition = false;
// const isChrome = !!window.chrome && !!window.chrome.webstore
class Eduinforms extends Component{ class Eduinforms extends Component{
constructor(props){ constructor(props){
super(props); super(props);
@ -14,33 +19,57 @@ class Eduinforms extends Component{
description:null, description:null,
isSpin:true, isSpin:true,
whethertoedit:false, whethertoedit:false,
addonAfter:0,
eduintits:"",
informs:[],
yslbool:false,
} }
} }
componentDidMount() { componentDidMount() {
console.log("获取到数据"); console.log("获取到数据");
console.log(this.props); console.log(this.props);
let url = `/courses/${this.props.match.params.coursesId}/informs.json`;
this.getinputdata();
}
getyslbooltrue(){
console.log("调用了getyslbooltrue");
this.setState({
yslbool:true,
});
}
getyslboolfalse(){
console.log("调用了getyslboolfalse");
this.setState({
yslbool:false,
});
}
getinputdata=()=>{
this.setState({
isSpin:true,
})
let url = `/courses/${this.props.match.params.coursesId}/informs.json`;
// //
axios.get(url).then((response) => { axios.get(url).then((response) => {
if(response){ if(response){
if(response.data){ if(response.data){
this.setState({ this.setState({
description:response.data.description, informs:response.data.informs,
isSpin:false, isSpin:false,
}) })
}else { }else {
this.setState({ this.setState({
description:null, informs:[],
isSpin:false, isSpin:false,
}) })
} }
}else { }else {
this.setState({ this.setState({
description:null, informs:[],
isSpin:false, isSpin:false,
}) })
@ -48,14 +77,12 @@ class Eduinforms extends Component{
}).catch((error) => { }).catch((error) => {
console.log(error) console.log(error)
this.setState({ this.setState({
description:null, informs:[],
isSpin:false, isSpin:false,
}) })
}); });
} }
componentDidUpdate = (prevProps) => { componentDidUpdate = (prevProps) => {
@ -64,33 +91,113 @@ class Eduinforms extends Component{
bianji = (bians)=>{ bianji = (bians)=>{
this.setState({ this.setState({
whethertoedit:bians, whethertoedit:bians,
}) description:"",
eduintits:"",
addonAfter:0,
});
this.props.form.setFieldsValue({
description:"",
eduintits:"",
});
if(bians===true){
this.getyslbooltrue();
}else {
this.getyslboolfalse();
}
}; };
changeTopicName = (e) => {
console.log("调用了changeTopicName");
let num = e.target.value.length;
if(num>60){
return;
}
this.setState({
addonAfter: num < 0 ? 0 : num
});
if(num<=60){
this.setState({
eduintits: e.target.value
})
this.props.form.setFieldsValue({
eduintits: e.target.value,
});
}
};
// handleComposition=(e)=>{
// if (e.type === 'compositionend') {
// // composition is end
// isOnComposition = false
//
// if (!isOnComposition && isChrome) {
// // fire onChange
// console.log(!isOnComposition);
// this.changeTopicName(e);
// }
// } else {
// // in composition
// isOnComposition = true
// }
// };
// handleComposition = (e) => {
// console.log(e.type + ": " + e.target.value);
// if (e.type === 'compositionend') {
// // composition is end
// const value = e.target.value;
// this.setState({ isOnComposition: false },()=>{
// // this.handleFixedChange(value);
// });
// } else {
// // in composition
// this.setState({ isOnComposition: true });
// }
// }
handleSubmit=(e) => { handleSubmit=(e) => {
e.preventDefault(); e.preventDefault();
this.props.form.validateFields((err, values) => { this.props.form.validateFields((err, values) => {
if (!err) { if (!err) {
console.log(values.description); console.log(values.description);
if(values.eduintits === undefined|| values.eduintits === "" || values.eduintits ===null){
this.props.showNotification(`请输入标题`);
return
}
if(values.description === undefined|| values.description === "" || values.description ===null){ if(values.description === undefined|| values.description === "" || values.description ===null){
this.props.showNotification(`请输入提交内容`); this.props.showNotification(`请输入内容`);
return return
} }
var id=this.props.match.params.coursesId var id=this.props.match.params.coursesId
var titname="";
var url = `/courses/${id}/update_informs.json`; try {
if(values.eduintits.length>0){
if( values.eduintits.length>60){
var str=values.eduintits;
titname=str.substring(0,60);
}else {
titname=values.eduintits;
}
}else {
titname=values.eduintits;
}
}catch (e) {
titname=values.eduintits;
}
var url = `/courses/${id}/new_informs.json`;
axios.post(url,{ axios.post(url,{
name:titname,
description:values.description, description:values.description,
}).then((result) => { }).then((result) => {
if(result){ if(result){
if(result.data){ if(result.data){
if(result.data.status === 0){ if(result.data.status === 0){
this.setState({ this.setState({
description:values.description,
whethertoedit:false, whethertoedit:false,
})
});
this.getinputdata();
this.getyslboolfalse();
this.props.showNotification(result.data.message); this.props.showNotification(result.data.message);
}else { }else {
this.props.showNotification(result.data.message); this.props.showNotification(result.data.message);
@ -111,22 +218,25 @@ class Eduinforms extends Component{
render(){ render(){
let{description,whethertoedit} =this.state; let{description,whethertoedit,addonAfter,eduintits,informs,yslbool} =this.state;
const {getFieldDecorator} = this.props.form; const {getFieldDecorator} = this.props.form;
return( return(
<React.Fragment > <React.Fragment >
<div id={"zhudiv"}> <div id={"zhudiv"}>
<div className="edu-back-white"> <div className="edu-back-white">
<p className="clearfix padding30 bor-bottom-greyE"> <p className="clearfix padding30 bor-bottom-greyE yslmaxheigth80" >
<p style={{height: '20px'}}> <p style={{height: '20px'}}>
<span className="font-18 fl color-dark-21">公告栏</span> <span className="font-18 fl color-dark-21">公告栏</span>
{ {
this.props.isAdmin()===true? this.props.isAdmin()===true?
<li className="btn colorblue font-16 fr" style={{cursor: "default"}} (this.state.yslbool===false?
onClick={() => this.bianji(true)}> <li className="btn colorblue font-16 fr bluebkbk pointer"
编辑 onClick={() => this.bianji(true)}>
</li> 发布公告
</li>
:"")
:"" :""
} }
@ -138,36 +248,71 @@ class Eduinforms extends Component{
<div id={"cdiv1"}> <div id={"cdiv1"}>
{ {
whethertoedit === false? whethertoedit === false?""
<div> :
{ <div className="edu-back-white ">
description === null || description=== undefined ||description === "" ?
<div className="alltask ">
<div className="edu-tab-con-box clearfix edu-txt-center"><img className="edu-nodata-img mb20"
src={getImageUrl("images/educoder/nodata.png")} />
<p className="edu-nodata-p mb20">暂时还没有相关数据哦</p></div>
</div>
:
<div className="edu-back-white ">
<div id="MakedownHTML" className={"markdown-body fonttext yslmtopcg yslminHeigth"} style={{minHeight:"400px"}} dangerouslySetInnerHTML={{__html: markdownToHTML(description).replace(/▁/g, "▁▁▁")}}>
</div>
</div>
}
</div>
:
<div>
<Form layout='vertical' onSubmit={this.handleSubmit} > <Form layout='vertical' onSubmit={this.handleSubmit} >
<div className="edu-back-white ">
<div className={"yslmt16px"}>
<style> <style>
{ {
`.ant-form-item{
margin-bottom:0px !important;
}
.chooseDestwo .ant-form-item{
margin-bottom:0px !important;
}
.chooseDestwo .ant-form-item-control-wrapper .ant-form-item-control .ant-form-explain{
padding-left: 25px !important;
}
.ant-form-vertical .ant-form-item {
margin-bottom:0px !important;
}
` `
}
</style>
<Form.Item
style={{"borderBottom":'none'}}
className="chooseDestwo "
>
{getFieldDecorator('eduintits', {
rules: [{
required: true, message: '请在此输入标题,最多60个字符',
}],
})(
<div className="ysleduinwh">
<div className="yslduinlefts">
<span className="yslduincolorred">*</span>
</div>
<div className="yslduinleft">
<Input placeholder="请在此输入标题最多60个字符" maxLength={60}
style={{ textAlign: "left",width:"100%",}}
onInput={this.changeTopicName}
autoComplete="off"
suffix={String(addonAfter)+"/60"}
value={eduintits}
className="searchViewAfter"></Input>
</div>
</div>
)}
</Form.Item>
<div className="edu-back-white ">
<div className={"yslmt16px"}>
<style>
{
`
.ant-form-item-children { .ant-form-item-children {
position: unset; position: unset;
} }
.chooseDes .ant-form-item{
margin-bottom:0px !important;
}
.rememberTip{ .rememberTip{
position:absolute; position:absolute;
right:0px; right:0px;
@ -206,41 +351,67 @@ class Eduinforms extends Component{
margin-bottom: 24px !important; margin-bottom: 24px !important;
} }
` `
} }
</style> </style>
<Form.Item <Form.Item
style={{"borderBottom":'none'}} style={{"borderBottom":'none'}}
className="chooseDes " className="chooseDes "
> >
{getFieldDecorator('description', { {getFieldDecorator('description', {
rules: [{ rules: [{
required: true, message: '请在此输入内容,最多5000个字符', required: true, message: '请在此输入内容,最多5000个字符',
}, { }, {
max: 5000, message: '最大限制为5000个字符', max: 5000, message: '最大限制为5000个字符',
}], }],
})( })(
<TPMMDEditor ref={this.messageRef} <TPMMDEditor ref={this.messageRef}
placeholder={'请在此输入内容,最多5000个字符'} placeholder={'请在此输入内容,最多5000个字符'}
initValue={description} initValue={description}
mdID={'courseMessageMD'} mdID={'courseMessageMD'}
className="courseMessageMD " className="courseMessageMD "
height={518} height={518}
></TPMMDEditor> ></TPMMDEditor>
)} )}
</Form.Item> </Form.Item>
</div> </div>
</div> </div>
<Form.Item> <Form.Item>
<div className="clearfix mt28 fr" style={{display:"block;"}}> <div className="clearfix mt28 fr pb50 mr25" >
<a className="defalutCancelbtn fl mr20" onClick={()=>this.bianji(false)}>取消</a> <a className="defalutCancelbtn fl mr20 " onClick={()=>this.bianji(false)}>取消</a>
<Button htmlType="submit" className="ant-btn defalutSubmitbtn fl ant-btn-primary"> <Button htmlType="submit" className="ant-btn defalutSubmitbtn fl ant-btn-primary">
<span> </span></Button> <span> </span></Button>
</div> </div>
</Form.Item> </Form.Item>
</Form> </Form>
<div className="bor-bottom-greyE mr25 ml25"></div>
</div> </div>
} }
<div>
{
informs === null || informs=== undefined ||informs.length === 0 ?
<div className="alltask ">
<div className="edu-tab-con-box clearfix edu-txt-center"><img className="edu-nodata-img mb20"
src={getImageUrl("images/educoder/nodata.png")} />
<p className="edu-nodata-p mb20">暂时还没有相关数据哦</p></div>
</div>
:
<div className="edu-back-white ">
{ informs&&informs.map((item, index) => {
return (
<Bullsubdirectory {...this.state} {...this.props} key={index} yslbool={yslbool} id={item.id} myname={item.name} mydescription={item.description}
getyslbooltrue={()=>this.getyslbooltrue()}
getyslboolfalse={()=>this.getyslboolfalse()}
getinputdata={()=>this.getinputdata()} ></Bullsubdirectory>
)
})
}
</div>
}
</div>
</div> </div>
@ -257,3 +428,7 @@ class Eduinforms extends Component{
} }
const Eduinformss = Form.create({ name: 'eduinforms' })(Eduinforms); const Eduinformss = Form.create({ name: 'eduinforms' })(Eduinforms);
export default Eduinformss; export default Eduinformss;
{/*<div key={index} className="bor-bottom-greyE" >*/}
{/* {item.name===""?"":item.name===undefined?"":item.name===null?"":<div className="ysltitbt"><span >{item.name}</span></div>}*/}
{/* <div id="MakedownHTML" key={index} className={"markdown-body fonttext yslmtopcg yslminHeigth markdownysltext"} dangerouslySetInnerHTML={{__html: markdownToHTML(item.description).replace(/▁/g, "▁▁▁")}}/>*/}
{/*</div>*/}

@ -1,5 +1,5 @@
.yslmt16px{ .yslmt16px{
padding-top: 25px !important; padding-top: 12px !important;
padding-left: 25px !important; padding-left: 25px !important;
padding-right: 25px !important; padding-right: 25px !important;
padding-bottom: 1px !important; padding-bottom: 1px !important;
@ -11,3 +11,71 @@
} }
.bluebkbk{
border: 1px solid #4CADFF;
width: 79px;
height: 30px;
text-align: center;
line-height: 30px;
border-radius: 2px;
}
.ysleduinwh{
padding-right: 25px;
margin-top: 26px;
display: flex;
justify-content:flex-start;
}
.yslduincolorred{
color: red;
line-height: 40px;
height: 40px;
text-align: center;
}
.yslduinleft{
width: 100% ;
}
.yslduinlefts{
width: 25px;
line-height: 40px;
height: 40px;
text-align: center;
}
.mtyslduin25{
margin-top: 25px;
}
.newbianji1{
font-size: 16px !important;
margin-right: 10px;
color: #4CACFF;
margin-bottom: 3px;
display: inline-block;
}
.ysltitbt{
float: left;
padding-top: 31px;
padding-left: 25px;
font-size: 16px;
color: #333333;
text-align: left;
}
.markdownysltext{
font-size: 14px;
color: #999999;
}
.fudonyingxiangysl{
width: 100%;
height: 66px;
}
.yslbianji{
padding-top: 31px;
}
.yslmaxheigth80{
max-height: 80px;
}
.ysldashed{
border:1px dashed #EEE;
}

@ -13,15 +13,12 @@ class CreateGroupByImportModal extends Component{
constructor(props){ constructor(props){
super(props); super(props);
this.state={ this.state={
errorTip:undefined
} }
} }
fetchMemberList = (arg_page) => {
}
componentDidMount() {
}
onSendOk = () => { onSendOk = () => {
const courseId = this.props.match.params.coursesId const courseId = this.props.match.params.coursesId
let url = `/courses/${courseId}/create_group_by_importing_file.json` let url = `/courses/${courseId}/create_group_by_importing_file.json`
@ -112,12 +109,13 @@ class CreateGroupByImportModal extends Component{
render(){ render(){
const { candidates, checkBoxValues, loading, hasMore, name, school_name, school_names const { candidates, checkBoxValues, loading, hasMore, name, school_name, school_names
, graduationGroup, graduation_groups, courseGroup, course_groups } = this.state , graduationGroup, graduation_groups, courseGroup, course_groups , fileList , errorTip } = this.state
const { moduleName } = this.props const { moduleName } = this.props
const props = { const props = {
name: 'file', name: 'file',
multiple: true, multiple: true,
fileList:fileList,
action: getUploadActionUrl(), action: getUploadActionUrl(),
onRemove: this.onAttachmentRemove, onRemove: this.onAttachmentRemove,
onChange: this.handleChange onChange: this.handleChange
@ -131,17 +129,6 @@ class CreateGroupByImportModal extends Component{
onOk={this.onOk} onOk={this.onOk}
className="createGroupByImport" className="createGroupByImport"
> >
<style>
{`
`}
</style>
<div className="df">
</div>
<Dragger {...props}> <Dragger {...props}>
<p className="ant-upload-drag-icon"> <p className="ant-upload-drag-icon">
<Icon type="inbox" /> <Icon type="inbox" />
@ -151,6 +138,9 @@ class CreateGroupByImportModal extends Component{
单个文件最大150MB 单个文件最大150MB
</p> </p>
</Dragger> </Dragger>
<p className="color-red lineh-25 edu-txt-left" style={{height:"25px"}}>
<span className={ errorTip ? "" : "none" }>{errorTip}</span>
</p>
</ModalWrapper> </ModalWrapper>
) )
} }

@ -294,7 +294,7 @@ class ShixunsHome extends Component {
{/*精选实训 改为 开发社区*/} {/*精选实训 改为 开发社区*/}
<div className="clearfix pt20 educontent pr pb20"> <div className="clearfix pt20 educontent pr pb20">
<div className="edu-txt-center"> <div className="edu-txt-center">
<p className="color-dark edu-txt-center font-24" style={{lineHeight: '30px'}}>开发社区</p> <p className="color-dark edu-txt-center font-24" style={{lineHeight: '30px'}}>实训项目</p>
<p className="color-grey-cd font-12">DEVELOPMENT COMMUNITY</p> <p className="color-grey-cd font-12">DEVELOPMENT COMMUNITY</p>
</div> </div>
<Link to={"/shixuns"} className="moreitem">更多<i className="fa fa-angle-right ml5"></i></Link> <Link to={"/shixuns"} className="moreitem">更多<i className="fa fa-angle-right ml5"></i></Link>

@ -30,38 +30,41 @@ class DetailTop extends Component{
} }
} }
componentDidMount(){ componentDidMount(){
let courseslist=[] this.getdatalist();
}
getdatalist=()=>{
let courseslist=[];
let keys=1;
if(this.props.courses!=undefined&&this.props.courses.length!=0){ if(this.props.courses!=undefined&&this.props.courses.length!=0){
this.props.courses.map((item,key)=>{ if(this.props.detailInfoList.has_start===true){
if(this.props.pathtopskey===key+1){ this.props.courses.map((item,key)=>{
return( if(item.course_status.status===1){
courseslist.push(item) keys=key+1
) return(
} courseslist.push(item)
}) )
}
})
}else{
this.props.courses.map((item,key)=>{
if(this.props.pathtopskey===key+1){
keys=key+1
return(
courseslist.push(item)
)
}
})
}
} }
this.setState({ this.setState({
courseslist:courseslist courseslist:courseslist,
MenuItemskey:keys,
}) })
} }
componentDidUpdate=(prevProps)=> { componentDidUpdate=(prevProps)=> {
if(prevProps.courses!=this.props.courses){ if(prevProps.courses!=this.props.courses){
let courseslist=[] this.getdatalist();
if(this.props.courses!=undefined&&this.props.courses.length!=0){
this.props.courses.map((item,key)=>{
if(this.props.pathtopskey===key+1){
return(
courseslist.push(item)
)
}
})
}
this.setState({
courseslist:courseslist
})
} }
} }
@ -451,7 +454,7 @@ class DetailTop extends Component{
onVisibleChange={this.onVisibleChanges} onVisibleChange={this.onVisibleChanges}
> >
<a className={"alist"}> <a className={"alist"}>
<span className={"color-orange"}>{this.state.MenuItemskey}</span>次开课 <Icon className="aIcons" type={!this.state.onVisibleChangestype?"down":"up"} /> <span className={"color-orange"}> {this.state.MenuItemskey} </span>次开课 <Icon className="aIcons" type={!this.state.onVisibleChangestype?"down":"up"} />
</a> </a>
</Dropdown> </Dropdown>
</li> </li>
@ -509,7 +512,7 @@ class DetailTop extends Component{
报名人数 报名人数
</div> </div>
<div className={"pathtimes"}> <div className={"pathtimes"}>
{item.student_count} {item.student_count}
</div> </div>
</div> </div>
</span> </span>

@ -108,7 +108,7 @@ class PathNew extends Component{
return; return;
} }
if (des.length > 8000) { if (des.length > 8000) {
this.props.showSnackbar("实践课程的简介最大限制5000个字符"); this.props.showSnackbar("实践课程的简介最大限制8000个字符");
window.location.href="#part_Des"; window.location.href="#part_Des";
return; return;
} }
@ -119,7 +119,7 @@ class PathNew extends Component{
return; return;
} }
if(point.length > 2000){ if(point.length > 2000){
this.props.showSnackbar("实践课程的学习须知最大限制500个字符"); this.props.showSnackbar("实践课程的学习须知最大限制2000个字符");
window.location.href="#part_point"; window.location.href="#part_point";
return; return;
} }
@ -186,10 +186,10 @@ class PathNew extends Component{
}) })
const Des_editMD = create_editorMD("shixun_introduction","100%","490px" const Des_editMD = create_editorMD("shixun_introduction","100%","490px"
,"请在此输入实践课程的简介,最大限制5000个字符","/api/attachments.json", response.data.description,""); ,"请在此输入实践课程的简介,最大限制8000个字符","/api/attachments.json", response.data.description,"");
this.Des_editMD=Des_editMD; this.Des_editMD=Des_editMD;
const Point_editMD = create_editorMD("shixun_propaedeutics","100%","260px" const Point_editMD = create_editorMD("shixun_propaedeutics","100%","260px"
,"请在此输入实践课程的学习须知,最大限制500个字符","/api/attachments.json",response.data.learning_notes,""); ,"请在此输入实践课程的学习须知,最大限制2000个字符","/api/attachments.json",response.data.learning_notes,"");
this.Point_editMD=Point_editMD; this.Point_editMD=Point_editMD;
} }
}).catch((error)=>{ }).catch((error)=>{
@ -198,9 +198,9 @@ class PathNew extends Component{
} else { } else {
this.isEditPage = false this.isEditPage = false
const Des_editMD = create_editorMD("shixun_introduction","100%","490px","请在此输入实践课程的简介,最大限制5000个字符","/api/attachments.json","",""); const Des_editMD = create_editorMD("shixun_introduction","100%","490px","请在此输入实践课程的简介,最大限制8000个字符","/api/attachments.json","","");
this.Des_editMD=Des_editMD; this.Des_editMD=Des_editMD;
const Point_editMD = create_editorMD("shixun_propaedeutics","100%","260px","请在此输入实践课程的学习须知,最大限制500个字符","/api/attachments.json","",""); const Point_editMD = create_editorMD("shixun_propaedeutics","100%","260px","请在此输入实践课程的学习须知,最大限制2000个字符","/api/attachments.json","","");
this.Point_editMD=Point_editMD; this.Point_editMD=Point_editMD;
} }

@ -734,7 +734,7 @@ submittojoinclass=(value)=>{
</li> </li>
<li className={`${activeShixuns === true ? 'pr active' : 'pr'}`}> <li className={`${activeShixuns === true ? 'pr active' : 'pr'}`}>
<Link to="/shixuns">开发社区</Link> <Link to="/shixuns">实训项目</Link>
<img src={getImageUrl("images/educoder/hot-h.png")} className="nav-img"> <img src={getImageUrl("images/educoder/hot-h.png")} className="nav-img">
</img> </img>
</li> </li>
@ -814,7 +814,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}
@ -860,15 +860,15 @@ submittojoinclass=(value)=>{
</a> </a>
<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===undefined?"":this.props.current_user.login}/courses`}>我的课堂</Link></li> <li><Link to={`/users/${this.props.current_user===undefined?"":this.props.current_user.login}/courses`}>我的翻转课堂</Link></li>
{/* p 老师 l 学生 */} {/* p 老师 l 学生 */}
<li><Link to={`/users/${this.props.current_user===undefined?"":this.props.current_user.login}/shixuns`}>我的实训</Link></li> <li><Link to={`/users/${this.props.current_user===undefined?"":this.props.current_user.login}/shixuns`}>我的实训项目</Link></li>
<li><Link to={`/users/${this.props.current_user===undefined?"":this.props.current_user.login}/paths`}>我的实践课程</Link></li> <li><Link to={`/users/${this.props.current_user===undefined?"":this.props.current_user.login}/paths`}>我的实践课程</Link></li>
<li><Link to={`/users/${this.props.current_user===undefined?"":this.props.current_user.login}/projects`}>我的开发项目</Link></li>
<li><Link to={`/users/${this.props.current_user===undefined?"":this.props.current_user.login}/package`}>我的众包</Link></li>
<li style={{display: this.props.Headertop === undefined ? 'none' : this.props.Headertop.customer_management_url===null || this.props.Headertop.customer_management_url===""? 'none' : 'block'}}> <li style={{display: this.props.Headertop === undefined ? 'none' : this.props.Headertop.customer_management_url===null || this.props.Headertop.customer_management_url===""? 'none' : 'block'}}>
<a href={this.props.Headertop === undefined ? '' : this.props.Headertop.customer_management_url}>客户管理</a> <a href={this.props.Headertop === undefined ? '' : this.props.Headertop.customer_management_url}>客户管理</a>
</li> </li>
<li><Link to={`/users/${this.props.current_user===undefined?"":this.props.current_user.login}/projects`}>我的项目</Link></li>
<li><Link to={`/users/${this.props.current_user===undefined?"":this.props.current_user.login}/package`}>我的众包</Link></li>
<li><a href={`/account/profile`}>账号管理</a></li> <li><a href={`/account/profile`}>账号管理</a></li>
{/*<li><a onClick={()=>this.educoderlogin()} >登入测试接口</a></li>*/} {/*<li><a onClick={()=>this.educoderlogin()} >登入测试接口</a></li>*/}
{/*<li><a onClick={()=>this.trialapplications()} >试用申请</a> </li>*/} {/*<li><a onClick={()=>this.trialapplications()} >试用申请</a> </li>*/}
@ -902,17 +902,17 @@ submittojoinclass=(value)=>{
<div className="edu-menu-list" style={{top: '60px',width:"240px"}}> <div className="edu-menu-list" style={{top: '60px',width:"240px"}}>
<div className="overPart"></div> <div className="overPart"></div>
<ul className="fl with50 edu-txt-center pr ul-leftline"> <ul className="fl with50 edu-txt-center pr ul-leftline">
{this.props.current_user&&this.props.current_user.user_identity==="学生"?"":<li><a onClick={(url)=>this.getUser("/courses/new")}>新建课堂</a></li>} {this.props.current_user&&this.props.current_user.user_identity==="学生"?"":<li><a onClick={(url)=>this.getUser("/courses/new")}>新建翻转课堂</a></li>}
<li><a onClick={(url)=>this.getUser("/shixuns/new")}>新建实训</a></li> <li><a onClick={(url)=>this.getUser("/shixuns/new")}>新建实训项目</a></li>
{this.props.Headertop===undefined?"": {this.props.Headertop===undefined?"":
<li><a onClick={(url)=>this.getUser("/paths/new")} >新建实践课程</a></li> <li><a onClick={(url)=>this.getUser("/paths/new")} >新建实践课程</a></li>
} }
<li><a onClick={(url)=>this.getUser("/projects/new")} target="_blank">新建项目</a></li> <li><a onClick={(url)=>this.getUser("/projects/new")} target="_blank">新建开发项目</a></li>
</ul> </ul>
<ul className="fl with50 edu-txt-center"> <ul className="fl with50 edu-txt-center">
<li> <li>
<a onClick={this.tojoinclass}>加入课堂</a> <a onClick={this.tojoinclass}>加入翻转课堂</a>
</li> </li>
{Addcoursestypes===true?<Addcourses {Addcoursestypes===true?<Addcourses
@ -925,7 +925,7 @@ submittojoinclass=(value)=>{
{/* /courses/join_course_multi_role */} {/* /courses/join_course_multi_role */}
<li> <li>
<a onClick={this.tojoinitem}>加入项目</a> <a onClick={this.tojoinitem}>加入开发项目</a>
</li> </li>
{tojoinitemtype===true?<Modal {tojoinitemtype===true?<Modal
keyboard={false} keyboard={false}
@ -941,7 +941,7 @@ submittojoinclass=(value)=>{
<label className="panel-form-label fl">项目邀请码</label> <label className="panel-form-label fl">项目邀请码</label>
<Input type="text" className="input-60-40 fl mt5" name="invite_code" <Input type="text" className="input-60-40 fl mt5" name="invite_code"
style={{width: '275px'}} style={{width: '275px'}}
placeholder="请输入6位项目邀请码" value={tojoinclasstitle} onInput={this.inputjoinclassvalue}/> placeholder="请输入6位开发项目邀请码" value={tojoinclasstitle} onInput={this.inputjoinclassvalue}/>
</li> </li>
<p id="none_invite_code_notice" <p id="none_invite_code_notice"

@ -35,14 +35,14 @@ if (!window['indexHOCLoaded']) {
// $('head').append($('<link rel="stylesheet" type="text/css" />') // $('head').append($('<link rel="stylesheet" type="text/css" />')
// .attr('href', `${_url_origin}/stylesheets/educoder/antd.min.css?1525440977`)); // .attr('href', `${_url_origin}/stylesheets/educoder/antd.min.css?1525440977`));
$('head').append($('<link rel="stylesheet" type="text/css" />') $('head').append($('<link rel="stylesheet" type="text/css" />')
.attr('href', `${_url_origin}/stylesheets/css/edu-common.css?6`)); .attr('href', `${_url_origin}/stylesheets/css/edu-common.css?8`));
$('head').append($('<link rel="stylesheet" type="text/css" />') $('head').append($('<link rel="stylesheet" type="text/css" />')
.attr('href', `${_url_origin}/stylesheets/educoder/edu-main.css?6`)); .attr('href', `${_url_origin}/stylesheets/educoder/edu-main.css?8`));
// index.html有加载 // index.html有加载
$('head').append($('<link rel="stylesheet" type="text/css" />') $('head').append($('<link rel="stylesheet" type="text/css" />')
.attr('href', `${_url_origin}/stylesheets/educoder/edu-all.css?6`)); .attr('href', `${_url_origin}/stylesheets/educoder/edu-all.css?8`));
// $('head').append($('<link rel="stylesheet" type="text/css" />') // $('head').append($('<link rel="stylesheet" type="text/css" />')
@ -141,7 +141,7 @@ export function TPMIndexHOC(WrappedComponent) {
}else if(this.props.match.path==="/nopage"){ }else if(this.props.match.path==="/nopage"){
document.title="没有找到该页面"; document.title="没有找到该页面";
}else if(this.props.match.path==="/shixuns"){ }else if(this.props.match.path==="/shixuns"){
document.title="开发社区"; document.title="实训项目";
}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"){

@ -83,7 +83,7 @@ class InfosBanner extends Component{
<li className={`${moduleName == 'shixuns' ? 'active' : '' }`}> <li className={`${moduleName == 'shixuns' ? 'active' : '' }`}>
<Link <Link
onClick={() => this.setState({moduleName: 'shixuns'})} onClick={() => this.setState({moduleName: 'shixuns'})}
to={`/users/${username}/shixuns`}>开发社区</Link> to={`/users/${username}/shixuns`}>实训项目</Link>
</li> </li>
<li className={`${moduleName == 'paths' ? 'active' : '' }`}> <li className={`${moduleName == 'paths' ? 'active' : '' }`}>
<Link <Link
@ -93,7 +93,7 @@ class InfosBanner extends Component{
<li className={`${moduleName == 'projects' ? 'active' : '' }`}> <li className={`${moduleName == 'projects' ? 'active' : '' }`}>
<Link <Link
onClick={() => this.setState({moduleName: 'projects'})} onClick={() => this.setState({moduleName: 'projects'})}
to={`/users/${username}/projects`}>项目</Link> to={`/users/${username}/projects`}>开发项目</Link>
</li> </li>
<li className={`${moduleName == 'package' ? 'active' : '' }`}> <li className={`${moduleName == 'package' ? 'active' : '' }`}>
<Link <Link

@ -122,7 +122,7 @@ class InfosProject extends Component{
<div className="square-list clearfix"> <div className="square-list clearfix">
{ {
page == 1 && is_current && this.props.current_user && !category && this.props.current_user.user_identity != "学生" ? page == 1 && is_current && this.props.current_user && !category && this.props.current_user.user_identity != "学生" ?
<Create href={`${this.props.Headertop && this.props.Headertop.old_url}/projects/new`} name={"新建项目"} index="4"></Create>:"" <Create href={`${this.props.Headertop && this.props.Headertop.old_url}/projects/new`} name={"新建开发项目"} index="4"></Create>:""
} }
{ {
(!data || data.projects.length==0) && (!is_current || (this.props.current_user && this.props.current_user.user_identity === "学生" )) && <NoneData></NoneData> (!data || data.projects.length==0) && (!is_current || (this.props.current_user && this.props.current_user.user_identity === "学生" )) && <NoneData></NoneData>

@ -168,7 +168,7 @@ class banner_out extends Component{
<li className={`${moduleName == 'projects' ? 'active' : '' }`}> <li className={`${moduleName == 'projects' ? 'active' : '' }`}>
<Link <Link
onClick={() => this.setState({moduleName: 'projects'})} onClick={() => this.setState({moduleName: 'projects'})}
to={`/users/${username}/projects`}>项目</Link> to={`/users/${username}/projects`}>开发项目</Link>
</li> </li>
<li className={`${moduleName == 'package' ? 'active' : '' }`}> <li className={`${moduleName == 'package' ? 'active' : '' }`}>

@ -412,7 +412,7 @@ function VideoUploadList (props) {
<div className={`description ${noUploads ? 'noUploads' : ''}`}> <div className={`description ${noUploads ? 'noUploads' : ''}`}>
<div className="">视频大小不支持断点续传单个视频文件最大200M单次最多支持3个视频文件上传 </div> <div className="">视频大小不支持断点续传单个视频文件最大200M单次最多支持3个视频文件上传 </div>
<div className="">视频规格aviflvf4vm4vmovmp4rmvbswfwebm </div> <div className="">视频规格aviflvf4vm4vmovmp4rmvbswfwebm </div>
<div className="">温馨提示请勿上传违法视频平台将为每一个视频分配一个地址您可以通过引用该地址将视频使用在开发社区等模块</div> <div className="">温馨提示请勿上传违法视频平台将为每一个视频分配一个地址您可以通过引用该地址将视频使用在实训项目等模块</div>
</div> </div>
{!noUploads && <React.Fragment> {!noUploads && <React.Fragment>

@ -152,7 +152,7 @@ class SearchPage extends Component{
<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>
</div> </div>

@ -120,12 +120,13 @@ em.vertical-line{display: inline-block;width: 2px;background: #999;height: 10px}
bottom: 90px;} bottom: 90px;}
.tag-green .tag-name{display: block;width: auto; .tag-green .tag-name{display: block;width: auto;
/*background-image: url("/images/educoder/tag1.png");*/ /*background-image: url("/images/educoder/tag1.png");*/
background: #000000; background: rgba(000,000,000,0.56);
border: 1px solid #fff; border: 1px solid #fff;
border-radius: 3px; border-radius: 3px;
font-size: 12px; font-size: 12px;
opacity: 0.56; /*opacity: 0.56;*/
background-size: 100% 100%;padding: 0px 8px;color: #fff;float: left;} background-size: 100% 100%;
padding: 0px 8px;color: #fff;float: left;}
.tag-orange{position: absolute;right: 0px;top:12px;} .tag-orange{position: absolute;right: 0px;top:12px;}
.tag-orange .tag-name{display: block;width: auto;background-color:#FF6800; .tag-orange .tag-name{display: block;width: auto;background-color:#FF6800;
background-size: 100% 100%;padding: 0px 8px;color: #fff;float: left; background-size: 100% 100%;padding: 0px 8px;color: #fff;float: left;
@ -3756,3 +3757,7 @@ a.singlepublishtwo{
.has-error .ant-input:focus{ .has-error .ant-input:focus{
border-color: #ff4d4f !important; border-color: #ff4d4f !important;
} }
/*.ant-notification{*/
/*width: auto !important;*/
/*max-width: 600px !important;*/
/*}*/
Loading…
Cancel
Save