dev_hs
杨树林 6 years ago
commit 7519350274

@ -152,7 +152,7 @@ class CoursesController < ApplicationController
end end
rescue => e rescue => e
uid_logger_error(e.message) uid_logger_error(e.message)
tip_exception("课堂创建失败!") tip_exception(e.message)
raise ActiveRecord::Rollback raise ActiveRecord::Rollback
end end
end end

@ -562,9 +562,9 @@ class ShixunsController < ApplicationController
commit_id = commit["id"] commit_id = commit["id"]
end end
# 如果该实训是金课中的实训,则将当前用户加入到当期开课的课
if StageShixun.exists?(shixun_id: @shixun.id, subject_id: Subject.where(excellent: 1)) if StageShixun.exists?(shixun_id: @shixun.id, subject_id: Subject.where(excellent: 1))
subject = Subject.where(id: StageShixun.where(shixun_id: @shixun.id).pluck(:subject_id), excellent: 1).take(1) subject = Subject.find_by(id: StageShixun.where(shixun_id: @shixun.id).pluck(:subject_id), excellent: 1)
course = subject.courses.where("start_date is not null and start_date <= '#{Date.today}' and end_date is not null and end_date >= '#{Date.today}'").take course = subject.courses.where("start_date is not null and start_date <= '#{Date.today}' and end_date is not null and end_date >= '#{Date.today}'").take
if course.present? && !CourseMember.exists?(course_id: course.id, user_id: current_user.id) if course.present? && !CourseMember.exists?(course_id: course.id, user_id: current_user.id)
# 为了不影响后续操作用create而不是create! # 为了不影响后续操作用create而不是create!

@ -42,7 +42,7 @@ namespace :public_course do
begin begin
CourseMember.create!(course_id: course_id, user_id: user_id, role: 4) CourseMember.create!(course_id: course_id, user_id: user_id, role: 4)
rescue Exception => e rescue Exception => e
Rails.logger() Rails.logger(e.message)
end end
end end
end end
@ -68,12 +68,15 @@ namespace :public_course do
case type.to_i case type.to_i
when 1 when 1
# 讨论区 # 讨论区
created_on = random_time start_time, end_time
puts created_on
messages = Message.where(board_id: course.boards) messages = Message.where(board_id: course.boards)
messages.each do |message| messages.each do |message|
created_on = random_time start_time, end_time
puts created_on
message.update_columns(created_on: created_on, updated_on: created_on) message.update_columns(created_on: created_on, updated_on: created_on)
MessageDetail.where(message_id: message.id).update_all(created_at: created_on, updated_at: created_on) MessageDetail.where(message_id: message.id).each do |detail|
rand_created_on = random_time start_time, end_time
detail.update_columns(created_at: rand_created_on, updated_at: rand_created_on)
end
end end
when 2 when 2
# 作业 # 作业
@ -134,5 +137,4 @@ namespace :public_course do
end end
large_time large_time
end end
end end

@ -43,12 +43,18 @@ namespace :sync do
is_test: true is_test: true
} }
user = User.create!(edit_params) user = User.create!(edit_params)
puts "aa" user.password = "edu12345678"
user.save!
UserExtension.create!(user_id: user.id, school_id: 117) UserExtension.create!(user_id: user.id, school_id: 117)
puts i puts i
end end
end end
task :password => :environment do
end
# 随机生成字符 # 随机生成字符
def generate_identifier(container, num) def generate_identifier(container, num)
code = DCODES.sample(num).join code = DCODES.sample(num).join

@ -193,10 +193,10 @@ function generateNewIndexJsp() {
} }
const newVersion = '1.1.1' const newVersion = '1.1.1'
let cdnHost = 'https://shixun.educoder.net' let cdnHost = 'https://shixun.educoder.net'
cdnHost = 'http://cdn.educoder.net' cdnHost = 'https://ali-cdn.educoder.net'
cdnHost = '' // cdnHost = ''
var result = data.replace('/js/js_min_all.js', `${cdnHost}/react/build/js/js_min_all.js?v=${newVersion}`) var result = data.replace('/js/js_min_all.js', `${cdnHost}/react/build/js/js_min_all.js?v=${newVersion}`)
.replace('/js/js_min_all_2.js', `${cdnHost}/react/build/js/js_min_all_2.js?v=${newVersion}`) // .replace('/js/js_min_all_2.js', `${cdnHost}/react/build/js/js_min_all_2.js?v=${newVersion}`)
.replace('/css/css_min_all.css', `${cdnHost}/react/build/css/css_min_all.css?v=${newVersion}`) .replace('/css/css_min_all.css', `${cdnHost}/react/build/css/css_min_all.css?v=${newVersion}`)
.replace('/css/iconfont.css', `${cdnHost}/react/build/css/iconfont.css?v=${newVersion}`) .replace('/css/iconfont.css', `${cdnHost}/react/build/css/iconfont.css?v=${newVersion}`)

@ -1,108 +1,108 @@
import React,{ Component } from "react"; import React,{ Component } from "react";
import { Modal,Checkbox,Upload,Button,Icon,message,Input} from "antd"; import { Modal,Checkbox,Upload,Button,Icon,message,Input} from "antd";
class ModulationModal extends Component{ class ModulationModal extends Component{
constructor(props){ constructor(props){
super(props); super(props);
this.state={ this.state={
group_ids:[], group_ids:[],
fileList:[], fileList:[],
textareaval:undefined, textareaval:undefined,
Inputsval:undefined Inputsval:undefined
} }
} }
Saves=()=>{ Saves=()=>{
let {textareaval,Inputsval}=this.state; let {textareaval,Inputsval}=this.state;
if(textareaval===""||textareaval===undefined){ if(textareaval===""||textareaval===undefined){
this.setState({ this.setState({
textareavaltype:true textareavaltype:true
}) })
return return
} }
this.setState({ this.setState({
textareavaltype: false textareavaltype: false
}) })
if(Inputsval===undefined||Inputsval===""){ if(Inputsval===undefined||Inputsval===""){
this.setState({ this.setState({
Inputsvaltype:true Inputsvaltype:true
}) })
return return
} }
this.props.Saves(textareaval,Inputsval) this.props.Saves(textareaval,Inputsval)
} }
settextarea=(e)=>{ settextarea=(e)=>{
this.setState({ this.setState({
textareaval:e.target.value textareaval:e.target.value
}) })
} }
setInputs=(e)=>{ setInputs=(e)=>{
var value=parseInt(e.target.value) var value=parseInt(e.target.value)
if(isNaN(value)){ if(isNaN(value)){
value=0 value=0
}else{ }else{
if(value<0||value>100){ if(value<0||value>100){
value=0 value=0
} }
} }
this.setState({ this.setState({
Inputsval:value Inputsval:value
}) })
} }
render(){ render(){
let {textareaval,Inputsval,textareavaltype,Inputsvaltype}=this.state; let {textareaval,Inputsval,textareavaltype,Inputsvaltype}=this.state;
return( return(
<div> <div>
<Modal <Modal
keyboard={false} keyboard={false}
className={"HomeworkModal"} className={"HomeworkModal"}
title={this.props.modalname || '调分'} title={this.props.modalname || '调分'}
visible={this.props.visible} visible={this.props.visible}
closable={false} closable={false}
footer={null} footer={null}
destroyOnClose={true} destroyOnClose={true}
> >
<div className="task-popup-content"> <div className="task-popup-content">
<p className="task-popup-text-center font-16"> <p className="task-popup-text-center font-16 mb20">
<span className={"color-dark-21"}>该学生的最终成绩将不会按照评分规则进行计算</span> <span className={"color-dark-21"}>该学生的最终成绩将不会按照评分规则进行计算</span>
</p> </p>
<div className="clearfix"> <div className="clearfix">
<textarea <textarea
className="winput-100-150" className="winput-100-150"
placeholder="请填写您对作品调分的原因" placeholder="请填写您对作品调分的原因"
value={textareaval} value={textareaval}
onInput={this.settextarea} onInput={this.settextarea}
></textarea> ></textarea>
<li style={{height:"20px",lineHeight:"20px"}}><span className={textareavaltype===true?"color-red":"none"}>原因不能为空</span></li> <li style={{height:"20px",lineHeight:"20px"}}><span className={textareavaltype===true?"color-red":"none"}>原因不能为空</span></li>
</div> </div>
<li> <li>
<Input style={{ <Input style={{
width: '20%', width: '20%',
}} }}
placeholder="请填写分数" placeholder="请填写分数"
value={Inputsval} value={Inputsval}
onInput={this.setInputs}/> <span className="ml10"></span> onInput={this.setInputs}/> <span className="ml10"></span>
</li> </li>
<li style={{height:"20px",lineHeight:"20px"}}><span className={Inputsvaltype===true?"color-red":"none"}>分数不能为空</span></li> <li style={{height:"20px",lineHeight:"20px"}}><span className={Inputsvaltype===true?"color-red":"none"}>分数不能为空</span></li>
<div className="clearfix edu-txt-center"> <div className="clearfix edu-txt-center">
<a className="task-btn color-white mr30" onClick={this.props.Cancel}>{this.props.Cancelname || '取消'}</a> <a className="task-btn color-white mr30" onClick={this.props.Cancel}>{this.props.Cancelname || '取消'}</a>
<a className="task-btn task-btn-orange" onClick={this.Saves}>{this.props.Savesname || '保存'}</a> <a className="task-btn task-btn-orange" onClick={this.Saves}>{this.props.Savesname || '保存'}</a>
</div> </div>
</div> </div>
</Modal> </Modal>
</div> </div>
) )
} }
} }
export default ModulationModal; export default ModulationModal;

@ -632,89 +632,89 @@ class Selectsetting extends Component{
{this.state.newfileListtypes===true?<p className={"color-red"}>请先上传资源</p>:""} {this.state.newfileListtypes===true?<p className={"color-red"}>请先上传资源</p>:""}
<p className={"winth540"}> {/*<p className={"winth540"}>*/}
<style>{` {/*<style>{`*/}
.ant-checkbox-wrapper{ {/*.ant-checkbox-wrapper{*/}
margin-left:0px !important; {/*margin-left:0px !important;*/}
margin-top:10px; {/*margin-top:10px;*/}
} {/*}*/}
`}</style> {/*`}</style>*/}
<div className={this.state.fileListtype===true?"mt30":""}> {/*<div className={this.state.fileListtype===true?"mt30":""}>*/}
<Checkbox {/*<Checkbox*/}
checked={is_public} {/*checked={is_public}*/}
onChange={this.onChangepublics}> {/*onChange={this.onChangepublics}>*/}
<span className={"font-14"}>勾选后所有用户可见否则仅课堂成员可见</span> {/*<span className={"font-14"}>勾选后所有用户可见,否则仅课堂成员可见</span>*/}
</Checkbox> {/*</Checkbox>*/}
</div> {/*</div>*/}
{/*{this.props.has_course_groups&&this.props.has_course_groups===true?:""}*/} {/*/!*{this.props.has_course_groups&&this.props.has_course_groups===true?:""}*!/*/}
{/*{this.state.course_groupss&&this.state.course_groupss.length>0?<Checkbox*/} {/*/!*{this.state.course_groupss&&this.state.course_groupss.length>0?<Checkbox*!/*/}
{/*checked={unified_setting}*/} {/*/!*checked={unified_setting}*!/*/}
{/*onChange={this.onChangesettings}>*/} {/*/!*onChange={this.onChangesettings}>*!/*/}
{/*<span>统一设置</span><span className={"font-14 color-grey-9"}>(选中则所有分班使用相同的发布设置,否则各个单独设置)</span>*/} {/*/!*<span>统一设置</span><span className={"font-14 color-grey-9"}>(选中则所有分班使用相同的发布设置,否则各个单独设置)</span>*!/*/}
{/*</Checkbox>:""}*/} {/*/!*</Checkbox>:""}*!/*/}
<style> {/*<style>*/}
{` {/*{`*/}
.Selectleft20{ {/*.Selectleft20{*/}
margin-left: 20px !important; {/*margin-left: 20px !important;*/}
width: 176px; {/*width: 176px;*/}
height: 40px; {/*height: 40px; */}
} {/*}*/}
.resourcebox{ {/*.resourcebox{*/}
max-height:150px; {/*max-height:150px;*/}
overflow: auto; {/*overflow: auto;*/}
} {/*}*/}
`} {/*`}*/}
</style> {/*</style>*/}
{/*this.props.has_course_groups&&this.props.has_course_groups===true?:""*/} {/*/!*this.props.has_course_groups&&this.props.has_course_groups===true?:""*!/*/}
<div className={"resourcebox"}> {/*<div className={"resourcebox"}>*/}
{unified_setting===false? {/*{unified_setting===false?*/}
this.state.course_groups&&this.state.course_groups.map((item,key)=>{ {/*this.state.course_groups&&this.state.course_groups.map((item,key)=>{*/}
return( {/*return(*/}
<div className={"mt10 "} key={key}> {/*<div className={"mt10 "} key={key}>*/}
<Select placeholder="请选择分班名称" {/*<Select placeholder="请选择分班名称"*/}
value={item.course_group_id} {/*value={item.course_group_id}*/}
style={{ width: 200 }} {/*style={{ width: 200 }}*/}
onChange={(e,index)=>this.selectassigngroups(e,index,key)} {/*onChange={(e,index)=>this.selectassigngroups(e,index,key)}*/}
> {/*>*/}
{ this.state.course_groupss&&this.state.course_groupss.map((item,key)=>{ {/*{ this.state.course_groupss&&this.state.course_groupss.map((item,key)=>{*/}
return( {/*return(*/}
<Option value={item.id} key={key}>{item.name}</Option> {/*<Option value={item.id} key={key}>{item.name}</Option>*/}
) {/*)*/}
})} {/*})}*/}
</Select> {/*</Select>*/}
<DatePicker {/*<DatePicker*/}
showToday={false} {/*showToday={false}*/}
dropdownClassName="hideDisable" {/*dropdownClassName="hideDisable"*/}
showTime={{ format: 'HH:mm' }} {/*showTime={{ format: 'HH:mm' }}*/}
format="YYYY-MM-DD HH:mm" {/*format="YYYY-MM-DD HH:mm"*/}
locale={locale} {/*locale={locale}*/}
placeholder="请选择发布时间" {/*placeholder="请选择发布时间"*/}
id={"startimes"} {/*id={"startimes"}*/}
className={"Selectleft20"} {/*className={"Selectleft20"}*/}
width={"200px"} {/*width={"200px"}*/}
value={item.publish_time===undefined||item.publish_time===""?"":item.publish_time===null?"":moment(item.publish_time, dateFormat)} {/*value={item.publish_time===undefined||item.publish_time===""?"":item.publish_time===null?"":moment(item.publish_time, dateFormat)}*/}
onChange={(e,index)=>this.onChangeTimepublishs(e,index,key)} {/*onChange={(e,index)=>this.onChangeTimepublishs(e,index,key)}*/}
// onChange={ this.onChangeTimepublish } {/*// onChange={ this.onChangeTimepublish }*/}
disabledTime={disabledDateTime} {/*disabledTime={disabledDateTime}*/}
disabledDate={disabledDate} {/*disabledDate={disabledDate}*/}
/> {/*/>*/}
{key!=0?<i className="iconfont icon-shanchu color-grey-c font-14 font-n ml20" onClick={()=>this.deletegrouppublish(key)}></i>:""} {/*{key!=0?<i className="iconfont icon-shanchu color-grey-c font-14 font-n ml20" onClick={()=>this.deletegrouppublish(key)}></i>:""}*/}
{key===course_groups.length-1?<i className="iconfont icon-tianjiafangda color-green ml15" onClick={this.addgrouppublish}></i>:""} {/*{key===course_groups.length-1?<i className="iconfont icon-tianjiafangda color-green ml15" onClick={this.addgrouppublish}></i>:""}*/}
</div> {/*</div>*/}
) {/*)*/}
}):""} {/*}):""}*/}
</div> {/*</div>*/}
</p> {/*</p>*/}
<style> <style>
{` {`
#startime .ant-calendar-picker-icon{ #startime .ant-calendar-picker-icon{
@ -723,7 +723,7 @@ class Selectsetting extends Component{
`} `}
</style> </style>
{unified_setting===true? {unified_setting===true?
<p className={"mt10"}> <p className={this.state.fileListtype===true?"mt30":""}>
<span> <span>
<DatePicker <DatePicker
showToday={false} showToday={false}

@ -469,81 +469,81 @@ class Sendresource extends Component{
{newfileListtype===true&&this.state.fileListtype===false?<p className={"color-red"}>请先上传资源</p>:""} {newfileListtype===true&&this.state.fileListtype===false?<p className={"color-red"}>请先上传资源</p>:""}
<p className={"winth540"}> {/*<p className={"winth540"}>*/}
<style>{` {/*<style>{`*/}
.ant-checkbox-wrapper{ {/*.ant-checkbox-wrapper{*/}
margin-left:0px !important; {/*margin-left:0px !important;*/}
margin-top:10px; {/*margin-top:10px;*/}
} {/*}*/}
`}</style> {/*`}</style>*/}
<div className={this.state.fileListtype===true?"mt30":""}></div><Checkbox checked={is_public} onChange={this.onChangepublic}> {/*<div className={this.state.fileListtype===true?"mt30":""}></div><Checkbox checked={is_public} onChange={this.onChangepublic}>*/}
<span className={"font-14"}>勾选后所有用户可见否则仅课堂成员可见</span> {/*<span className={"font-14"}>勾选后所有用户可见,否则仅课堂成员可见</span>*/}
</Checkbox> {/*</Checkbox>*/}
{/*{this.state.course_groups_count&&this.state.course_groups_count>0?<Checkbox checked={is_unified_setting} onChange={this.onChangesetting}>*/} {/*/!*{this.state.course_groups_count&&this.state.course_groups_count>0?<Checkbox checked={is_unified_setting} onChange={this.onChangesetting}>*!/*/}
{/*<span>统一设置</span><span className={"font-14 color-grey-9"}>(选中则所有分班使用相同的发布设置,否则各个单独设置)</span>*/} {/*/!*<span>统一设置</span><span className={"font-14 color-grey-9"}>(选中则所有分班使用相同的发布设置,否则各个单独设置)</span>*!/*/}
{/*</Checkbox>:""}*/} {/*/!*</Checkbox>:""}*!/*/}
<style>{` {/*<style>{`*/}
.Selectleft20{ {/*.Selectleft20{*/}
margin-left: 20px !important; {/*margin-left: 20px !important;*/}
width: 176px; {/*width: 176px;*/}
height: 40px; {/*height: 40px; */}
} {/*}*/}
#startimes .ant-calendar-picker-icon{ {/*#startimes .ant-calendar-picker-icon{*/}
margin-top:-11px; {/*margin-top:-11px;*/}
} {/*}*/}
.resourcebox{ {/*.resourcebox{*/}
max-height:150px; {/*max-height:150px;*/}
overflow: auto; {/*overflow: auto;*/}
} {/*}*/}
`}</style> {/*`}</style>*/}
<div className={"resourcebox"}> {/*<div className={"resourcebox"}>*/}
{is_unified_setting===false? {/*{is_unified_setting===false?*/}
course_group_publish_times.map((item,key)=>{ {/*course_group_publish_times.map((item,key)=>{*/}
return( {/*return(*/}
<div className={"mt10"} key={key}> {/*<div className={"mt10"} key={key}>*/}
<Select placeholder="请选择分班名称" {/*<Select placeholder="请选择分班名称"*/}
value={item.course_group_id} {/*value={item.course_group_id}*/}
style={{ width: 200 }} {/*style={{ width: 200 }}*/}
onChange={(e,index)=>this.selectassigngroups(e,index,key)} {/*onChange={(e,index)=>this.selectassigngroups(e,index,key)}*/}
> {/*>*/}
{course_groups&&course_groups.map((item,key)=>{ {/*{course_groups&&course_groups.map((item,key)=>{*/}
return( {/*return(*/}
<Option value={item.id} key={key}>{item.name}</Option> {/*<Option value={item.id} key={key}>{item.name}</Option>*/}
) {/*)*/}
})} {/*})}*/}
</Select> {/*</Select>*/}
<DatePicker {/*<DatePicker*/}
dropdownClassName="hideDisable" {/*dropdownClassName="hideDisable"*/}
showTime={{ format: 'HH:mm' }} {/*showTime={{ format: 'HH:mm' }}*/}
locale={locale} {/*locale={locale}*/}
showToday={false} {/*showToday={false}*/}
format={dateFormat} {/*format={dateFormat}*/}
placeholder="请选择发布时间" {/*placeholder="请选择发布时间"*/}
id={"startimes"} {/*id={"startimes"}*/}
className={"Selectleft20 "} {/*className={"Selectleft20 "}*/}
width={"200px"} {/*width={"200px"}*/}
value={item.publish_time===undefined||item.publish_time===""?undefined:moment(item.publish_time, dateFormat)} {/*value={item.publish_time===undefined||item.publish_time===""?undefined:moment(item.publish_time, dateFormat)}*/}
onChange={(e,index)=>this.onChangeTimepublish(e,index,key,2)} {/*onChange={(e,index)=>this.onChangeTimepublish(e,index,key,2)}*/}
// onChange={ this.onChangeTimepublish } {/*// onChange={ this.onChangeTimepublish }*/}
disabledTime={disabledDateTime} {/*disabledTime={disabledDateTime}*/}
disabledDate={disabledDate} {/*disabledDate={disabledDate}*/}
/> {/*/>*/}
{key!=0?<i className="iconfont icon-shanchu color-grey-c font-14 font-n ml20" onClick={()=>this.deletegrouppublish(key)}></i>:""} {/*{key!=0?<i className="iconfont icon-shanchu color-grey-c font-14 font-n ml20" onClick={()=>this.deletegrouppublish(key)}></i>:""}*/}
{key===course_group_publish_times.length-1&&key<this.state.course_groups_count-1?<i className="iconfont icon-tianjiafangda color-green ml15" onClick={this.addgrouppublish}></i>:""} {/*{key===course_group_publish_times.length-1&&key<this.state.course_groups_count-1?<i className="iconfont icon-tianjiafangda color-green ml15" onClick={this.addgrouppublish}></i>:""}*/}
</div> {/*</div>*/}
) {/*)*/}
}) {/*})*/}
:""} {/*:""}*/}
</div> {/*</div>*/}
</p> {/*</p>*/}
{is_unified_setting===true?<p className={"mt10"}> {is_unified_setting===true?<p className={this.state.fileListtype===true?"mt30":"mt10"}>
<span> <span>
<DatePicker <DatePicker
dropdownClassName="hideDisable" dropdownClassName="hideDisable"

@ -2,7 +2,7 @@ import React,{Component} from "React";
import { Form, Select, Input, Button,Checkbox,Upload,Icon,message,Modal} from "antd"; import { Form, Select, Input, Button,Checkbox,Upload,Icon,message,Modal} from "antd";
import {Link} from 'react-router-dom'; import {Link} from 'react-router-dom';
import TPMMDEditor from '../../../tpm/challengesnew/TPMMDEditor'; import TPMMDEditor from '../../../tpm/challengesnew/TPMMDEditor';
import { WordsBtn,getUrl ,bytesToSize,appendFileSizeToUploadFileAll} from 'educoder'; import { WordsBtn,getUrl ,bytesToSize,appendFileSizeToUploadFileAll,AttachmentList} from 'educoder';
import axios from 'axios'; import axios from 'axios';
import Modals from '../../../modals/Modals'; import Modals from '../../../modals/Modals';
import '../../css/Courses.css'; import '../../css/Courses.css';
@ -419,35 +419,35 @@ class GraduationTasksedit extends Component{
)} )}
</Form.Item> </Form.Item>
<input type="hidden" id='descriptiontypes' /> <input type="hidden" id='descriptiontypes' />
<AttachmentList {...this.props} {...this.state} attachments={attachments&&attachments}></AttachmentList>
{/*{attachments&&attachments.map((item,key)=>{*/}
{attachments&&attachments.map((item,key)=>{ {/*return(*/}
{/*<div className="color-grey mt5"*/}
return( {/*key={key}*/}
<div className="color-grey mt5" {/*>*/}
key={key} {/*<a className="color-grey ml3">*/}
> {/*<i className="font-14 color-green iconfont icon-fujian mr8" aria-hidden="true"></i>*/}
<a className="color-grey ml3"> {/*</a>*/}
<i className="font-14 color-green iconfont icon-fujian mr8" aria-hidden="true"></i> {/*<a*/}
</a> {/*href={item.url}*/}
<a {/*className="mr12 color9B9B" length="58">*/}
href={item.url} {/*{item.title}*/}
className="mr12 color9B9B" length="58">
{item.title} {/*</a>*/}
{/*<span className="color656565 mt2 color-grey-6 font-12 mr8">*/}
</a> {/*{item.filesize}*/}
<span className="color656565 mt2 color-grey-6 font-12 mr8">
{item.filesize} {/*</span>*/}
{/*{item.delete===true?*/}
</span> {/*<i className="font-14 iconfont icon-guanbi "*/}
{item.delete===true? {/*id={item.id}*/}
<i className="font-14 iconfont icon-guanbi " {/*onClick={()=>this.onAttachmentRemove(item.id)}*/}
id={item.id} {/*aria-hidden="true">*/}
onClick={()=>this.onAttachmentRemove(item.id)} {/*</i>:""}*/}
aria-hidden="true"> {/*</div>*/}
</i>:""} {/*)*/}
</div> {/*})}*/}
)
})}
<Upload {...uploadProps} fileList={this.state.fileList} className="upload_1 ml5"> <Upload {...uploadProps} fileList={this.state.fileList} className="upload_1 ml5">
<Button className="uploadBtn"> <Button className="uploadBtn">
<Icon type="upload" /> 上传附件 <Icon type="upload" /> 上传附件

@ -1,7 +1,7 @@
import React,{Component} from "React"; import React,{Component} from "React";
import { Form, Select, Input, Button,Checkbox,Upload,Icon,message,Modal, Table, Divider, Tag} from "antd"; import { Form, Select, Input, Button,Checkbox,Upload,Icon,message,Modal, Table, Divider, Tag} from "antd";
import {Link} from 'react-router-dom'; import {Link} from 'react-router-dom';
import { WordsBtn,markdownToHTML} from 'educoder'; import { WordsBtn,markdownToHTML,AttachmentList} from 'educoder';
import axios from 'axios'; import axios from 'axios';
import Modals from '../../../modals/Modals'; import Modals from '../../../modals/Modals';
import DownloadMessageysl from "../../../modals/DownloadMessageysl"; import DownloadMessageysl from "../../../modals/DownloadMessageysl";
@ -396,23 +396,23 @@ class GraduationTasksquestions extends Component{
} }
<div> <div>
{questionslist&&questionslist.attachments.map((item,key)=>{ {/*{questionslist&&questionslist.attachments.map((item,key)=>{*/}
return( {/*return(*/}
<div className="color-grey mt5"> {/*<div className="color-grey mt5">*/}
<a className="color-grey"> {/*<a className="color-grey">*/}
<i className="font-14 color-green iconfont icon-fujian mr8" aria-hidden="true"></i> {/*<i className="font-14 color-green iconfont icon-fujian mr8" aria-hidden="true"></i>*/}
</a> {/*</a>*/}
<a href={item.url} {/*<a href={item.url}*/}
className="mr12" length="58"> {/*className="mr12" length="58">*/}
{item.title} {/*{item.title}*/}
</a> {/*</a>*/}
<span className="color-grey mt2 color-grey-6 font-12">{item.filesize}</span> {/*<span className="color-grey mt2 color-grey-6 font-12">{item.filesize}</span>*/}
</div> {/*</div>*/}
) {/*)*/}
})} {/*})}*/}
<AttachmentList {...this.props} {...this.state} attachments={questionslist&&questionslist.attachments}></AttachmentList>
</div> </div>
{questionslist&&questionslist.group_info?<div> {questionslist&&questionslist.group_info?<div>

@ -620,8 +620,8 @@ class DetailCardsEditAndAdd extends Component{
</div> </div>
} }
{this.props.detailInfoList===undefined?"":this.props.detailInfoList.allow_statistics===true?editPanel===false?<div className="click_add color-grey-9"> {this.props.detailInfoList===undefined?"":this.props.detailInfoList.allow_statistics===true?editPanel===false?<div className="click_add color-grey-9" onClick={this.addStage}>
<span className="color-blue_4C" onClick={this.addStage}>+点击新建阶段</span>1 <span className="color-blue_4C" >+点击新建阶段</span>1
</div>:'':''} </div>:'':''}
</div> </div>
) )

@ -82,11 +82,12 @@ class DetailCardsEditAndEdit extends Component{
//打开选择实训弹框初始化tag标签和列表 //打开选择实训弹框初始化tag标签和列表
changeTag(id,search){ changeTag(id,search){
this.setState({ this.setState({
ChooseShixunListshixun_list:[],
page:1,
hometypepvisible:true hometypepvisible:true
}) })
let pathId=this.props.pathid; let pathId=this.props.pathid;
let {page}=this.state; let url='/paths/'+pathId+'/choose_subject_shixun.json?page='+1
let url='/paths/'+pathId+'/choose_subject_shixun.json?page='+page
if(search!="" && search!=undefined){ if(search!="" && search!=undefined){
url+="&search="+search; url+="&search="+search;
} }
@ -523,7 +524,7 @@ class DetailCardsEditAndEdit extends Component{
` `
} }
</style> </style>
<div className="over180 pl20 pr20" {ChooseShixunListshixun_list && ChooseShixunListshixun_list.length===0?"":<div className="over180 pl20 pr20"
onScroll={this.contentViewScrolledit} onScroll={this.contentViewScrolledit}
> >
<Checkbox.Group style={{ width: '100%' }} onChange={this.shixunhomeworkedit}> <Checkbox.Group style={{ width: '100%' }} onChange={this.shixunhomeworkedit}>
@ -552,7 +553,7 @@ class DetailCardsEditAndEdit extends Component{
}) })
} }
</Checkbox.Group> </Checkbox.Group>
</div> </div>}
<div className="mt20 marginauto clearfix edu-txt-center"> <div className="mt20 marginauto clearfix edu-txt-center">
<a className="pop_close task-btn mr30 margin-tp26" onClick={this.cloasShixunBox}>取消</a> <a className="pop_close task-btn mr30 margin-tp26" onClick={this.cloasShixunBox}>取消</a>
<a className="task-btn task-btn-orange margin-tp26" id="submit_send_shixun" onClick={this.clickShixunchoose}>确定</a> <a className="task-btn task-btn-orange margin-tp26" id="submit_send_shixun" onClick={this.clickShixunchoose}>确定</a>

@ -321,7 +321,13 @@ class DetailTop extends Component{
{ detailInfoList.allow_send === true?this.props.courses===undefined? { detailInfoList.allow_send === true?this.props.courses===undefined?
<SendPanel {...this.props} {...this.state}></SendPanel>:"":"" <SendPanel {...this.props} {...this.state}></SendPanel>:"":""
} }
<div className="fr pr">
{this.props.courses===undefined?"":detailInfoList.is_creator===true?<a className={"fl font-18 color-white mt5 kaike mr20"} onClick={()=>this.OpenCoursefun()}>开课</a>:""}
{detailInfoList===undefined?"":detailInfoList.allow_statistics===true?this.props.courses===undefined?"":<Link to={"/paths/"+this.props.match.params.pathId+"/statistics"} className="fl font-18 color-white mt5 kaike">
学习统计
</Link>:""
}
</div>
</div> </div>
<div className="clearfix mt20"> <div className="clearfix mt20">
{ {
@ -335,11 +341,11 @@ class DetailTop extends Component{
{ detailInfoList.member_count!=0 ? <li><span>学习人数</span><span>{detailInfoList.member_count}</span></li> : ""} { detailInfoList.member_count!=0 ? <li><span>学习人数</span><span>{detailInfoList.member_count}</span></li> : ""}
</ul> </ul>
} }
{this.props.courses===undefined?<div className="fr pr"> <div className="fr pr">
{detailInfoList===undefined?"":detailInfoList.allow_delete===true?<a {detailInfoList===undefined?"":detailInfoList.allow_delete===true?<a
className={detailInfoList.publish_status===-1?"fl font-18 color-white mt5 mr20":"fl font-18 color-white mt5"} className={detailInfoList.publish_status===-1?"fl font-18 color-white mt5 mr20":"fl font-18 color-white mt5"}
style={{opacity: '0.6'}} onClick={this.allow_deletepath} style={{opacity: '0.6'}} onClick={this.allow_deletepath}
>删除路径</a>:""} >删除课程</a>:""}
{ {
detailInfoList.publish_status===0&&detailInfoList.allow_add_member===true? detailInfoList.publish_status===0&&detailInfoList.allow_add_member===true?
@ -356,16 +362,9 @@ class DetailTop extends Component{
detailInfoList.publish_status===2 && detailInfoList.allow_statistics===true? detailInfoList.publish_status===2 && detailInfoList.allow_statistics===true?
<a className="user_default_btn user_grey_btn font-18 fl pointer ml40" onClick={this.reovkissuePath}>撤销发布</a>:"" <a className="user_default_btn user_grey_btn font-18 fl pointer ml40" onClick={this.reovkissuePath}>撤销发布</a>:""
} }
</div>:""} </div>
{this.props.courses===undefined?"":detailInfoList.is_creator===true?<div className="fr pr">
<a className={"fl font-18 color-white mt5 kaike mr20"} onClick={()=>this.OpenCoursefun()}>开课</a>
<Link to={"/paths/"+this.props.match.params.pathId+"/statistics"} className="fl font-18 color-white mt5 kaike">
学习统计
</Link>
</div>:""}
</div> </div>
{this.props.courses===undefined||this.props.courses.length===0?"":<div className="userNavs mt20"> {this.props.courses===undefined||this.props.courses.length===0?"":<div className="userNavs mt20">

@ -68,10 +68,11 @@ class OpenCourse extends Component {
<div className={"tabeltext-alignleft"}> <div className={"tabeltext-alignleft"}>
<p className={"mt20 mb20 font-16"}> <p className={"mt20 mb20 font-16"}>
<Radio.Group onChange={this.setpathradioChange} value={this.state.value}> <Radio.Group onChange={this.setpathradioChange} value={this.state.value}>
<Radio style={pathradioStyle} value={1}> <Radio style={pathradioStyle} value={1} className={"mt10"}>
开放课堂<span style={pathradioStyles}>所有用户可以随时访问</span> 开放课堂<span style={pathradioStyles}>所有用户可以随时访问</span>
</Radio> </Radio>
<Radio style={pathradioStyle} value={0}>
<Radio style={pathradioStyle} value={0} className={"mt10"}>
私有课堂<span style={pathradioStyles}>仅报名参与的课堂成员可以访问</span> 私有课堂<span style={pathradioStyles}>仅报名参与的课堂成员可以访问</span>
</Radio> </Radio>
</Radio.Group> </Radio.Group>

@ -542,7 +542,7 @@ class PathDetailIndex extends Component{
{ {
detailInfoList===undefined?"":detailInfoList.allow_add_member===true? <div> detailInfoList===undefined?"":detailInfoList.allow_add_member===true? <div>
{key!=0?<div className="fr ml15 flex1"><a onClick={()=>this.moveup(item)}><Tooltip title="上移"><i className="color-green font-18 iconfont icon-xiangshangyi"></i></Tooltip></a></div>:""} {key!=0?<div className="fr ml15 flex1"><a onClick={()=>this.moveup(item)}><Tooltip title="上移"><i className="color-green font-18 iconfont icon-xiangshangyi"></i></Tooltip></a></div>:""}
{key+1!= members&&members.length?<div className="fr ml15 flex1 "><a onClick={()=>this.movedown(item)}><Tooltip title="下移"><i className="color-green font-18 iconfont icon-xiangxiayi"></i></Tooltip></a></div>:""} {key+1== members.length?"":<div className="fr ml15 flex1 "><a onClick={()=>this.movedown(item)}><Tooltip title="下移"><i className="color-green font-18 iconfont icon-xiangxiayi"></i></Tooltip></a></div>}
</div> </div>
:"" :""
} }

@ -43,6 +43,7 @@ function doCreateUploader (options) {
retryDuration: $('#retryDuration').val() || 2, retryDuration: $('#retryDuration').val() || 2,
region: $('#region').val() || 'ap-southeast-1', region: $('#region').val() || 'ap-southeast-1',
userId: $('#userId').val() || 1829848226361863, // 1303984639806000, userId: $('#userId').val() || 1829848226361863, // 1303984639806000,
enableUploadProgress: false,
// 添加文件成功 // 添加文件成功
addFileSuccess: function (uploadInfo) { addFileSuccess: function (uploadInfo) {

Loading…
Cancel
Save