Merge branch 'dev_aliyun' of http://bdgit.educoder.net/Hjqreturn/educoder into dev_aliyun

courseware
anke1460 5 years ago
commit 2903ff3979

@ -244,7 +244,7 @@ class SubjectsController < ApplicationController
@subject.update_attributes(public: 1)
ApplyAction.create(container_type: "ApplySubject", container_id: @subject.id, user_id: current_user.id, status: 0)
begin
Educoder::Sms.send(mobile: '18711011226', send_type:'publish_subject' , name: '管理员')
Educoder::Sms.send(mobile: '17347001317', send_type:'publish_subject' , name: '管理员')
rescue => e
uid_logger_error("发送验证码出错: #{e}")
end

@ -21,7 +21,7 @@ module Educoder
def self.notify_admin(opt)
opt[:name] = '管理员'
opt[:mobile] = ENV['NOTIFY_ADMIN_PHONE'] || EduSetting.get('notify_admin_phone') || '18711085785'
opt[:mobile] = ENV['NOTIFY_ADMIN_PHONE'] || EduSetting.get('notify_admin_phone') || '18670760309'
send(opt)
end
@ -49,7 +49,7 @@ module Educoder
elsif send_type == "apply_pro_certification" || send_type == "apply_auth"
params['text'] = "【Edu实训】亲爱的#{name},有新的#{send_type == 'apply_pro_certification'?'':''}认证申请,请尽快处理"
elsif send_type == "publish_subject" ||send_type == "publish_shixun"|| send_type == "user_apply_auth" || send_type == "discuss"
params['mobile'] = EduSetting.get('subject_shixun_notify_phone') || '18711011226' if send_type == "publish_subject" || send_type == "publish_shixun"
params['mobile'] = EduSetting.get('subject_shixun_notify_phone') || '17347001317' if send_type == "publish_subject" || send_type == "publish_shixun"
params['text'] = "【Edu实训】亲爱的#{name},有新的#{send_type == 'publish_subject'?'':(send_type == 'publish_shixun' ? '' : (send_type == 'discuss' ? '':''))}申请发布,请尽快处理"
elsif send_type == 'join_course_multi_role'
params['text'] = "【Edu实训】亲爱的#{user_name},您的课堂#{name}有助教或者教师申请加入,请尽快审核"

@ -12,7 +12,7 @@ import Videostatistics from '../videostatistics/Videostatistics';
import './video.css';
import '../css/Courses.css';
import '../publicNav/nav.css';
import Videostatisticscomtwo from '../videostatistics/component/Videostatisticscomtwo';
const PAGE_SIZE = 15;
const LIVE_PAGE_SIZE = 10;
const $ = window.$;
@ -378,7 +378,12 @@ class VideoIndex extends Component {
</div>
</div>
:
<Videostatistics {...this.props} {...this.state} statisticsy={(b) => this.statisticsy(b)}></Videostatistics>
(
isAdmin?
<Videostatistics {...this.props} {...this.state} statisticsy={(b) => this.statisticsy(b)}></Videostatistics>
:
<Videostatisticscomtwo {...this.props} {...this.state} ></Videostatisticscomtwo>
)
}
{
statistics === false ?

@ -62,15 +62,17 @@ class Videostatistics extends Component{
<div className="ws100s" style={{
position: "relative",
}}>
<div className="ws100s xaxisreverseorder" style={{
<div className="ws100s " style={{
position: "absolute",
top: "-29px",
}}>
<p className="sortinxdirection xiaoshou" onClick={()=>this.props.statisticsy(false)}>
<i className="iconfont icon-zuojiantou posiivsiconmyss mr5"></i>
<p className="fh mr20"> 返回</p>
<p className="sortinxdirection" >
<i className="iconfont icon-zuojiantou posiivsiconmyss mr5 colorbluesigin xiaoshou" onClick={()=>this.props.statisticsy(false)}></i>
<p className="fh mr20 colorbluesigin xiaoshou" onClick={()=>this.props.statisticsy(false)}>返回</p>
</p>
</div>
<Videostatisticscom {...this.state} {...this.props} watch_staticsdata={watch_staticsdata} ></Videostatisticscom>

@ -126,6 +126,7 @@ class Videostatisticscomtwo extends Component {
course_groups: [],
fbbool: false,
groupsid: null,
none_group_member_count:0,
}
}
@ -164,9 +165,9 @@ class Videostatisticscomtwo extends Component {
let url = `/courses/${CourseId}/course_groups.json`;
axios.get(url).then((response) => {
if (response) {
console.log("分班");
console.log("response");
console.log(response);
// console.log("分班");
// console.log("response");
// console.log(response);
this.setState({
course_groups: response.data.course_groups,
current_group_id: response.data.current_group_id,
@ -202,7 +203,7 @@ class Videostatisticscomtwo extends Component {
number: (parseInt(this.state.page) - 1) * parseInt(this.state.limit) + (i + 1),
user_name: response.data.data[i].user_name,
is_finished: response.data.data[i].is_finished,
total_duration: response.data.data[i].total_duration?formatSeconds(response.data.data[i].total_duration):0,
total_duration: response.data.data[i].total_duration,
feq: response.data.data[i].feq,
start_at: response.data.data[i].start_at,
end_at: response.data.data[i].end_at,
@ -398,7 +399,7 @@ class Videostatisticscomtwo extends Component {
render() {
let {loading, data, page, limit, members_count, columnsstu, fbbool, course_groups} = this.state;
const isAdmin = this.props.isAdmin();
const isAdmin = this.props&& this.props.isAdmin();
const menu = (
<Menu>
@ -423,6 +424,16 @@ class Videostatisticscomtwo extends Component {
:
""
}
{
this.state.none_group_member_count&&this.state.none_group_member_count>0?
<Menu.Item>
<a onClick={() => this.setcourse_groups(0)}>
<p className="maxnamewidth200yss">未分班</p>
</a>
</Menu.Item>
:
""
}
</Menu>
);
return (
@ -435,9 +446,14 @@ class Videostatisticscomtwo extends Component {
color: "#5091FF",
lineHeight: "42px",
}}>
<div className="xiaoshou" onClick={() => this.props.tisticsbools(false, null)}>
<span className="mr5 xiaoshou">视频统计总览</span><i className="iconfont icon-fanhui font-13 xiaoshou"></i>
</div>
{
isAdmin === true ?
<div className="xiaoshou" onClick={() => this.props.tisticsbools(false, null)}>
<span className="mr5 xiaoshou">视频统计总览</span><i className="iconfont icon-fanhui font-13 xiaoshou"></i>
</div>
:""
}
{
isAdmin === true ?
<div className="xiaoshou" onClick={() => this.fenbanone()}>

@ -152,7 +152,7 @@ class Videostatisticslist extends Component {
number: (parseInt(this.state.page) - 1) * parseInt(this.state.limit) + (i + 1),
title: response.data.videos[i].title,
people_num: response.data.videos[i].people_num,
total_time: response.data.videos[i].total_time?formatSeconds(response.data.videos[i].total_time):0,
total_time: response.data.videos[i].total_time,
user_name: response.data.videos[i].user_name,
id: response.data.videos[i].id,
})

Loading…
Cancel
Save