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

courseware
cxt 5 years ago
commit 2246e8fd9b

@ -35,7 +35,7 @@ class CourseVideosController < ApplicationController
@watch_course_videos = @watch_course_videos.where("course_members.course_group_id = ?", params[:group_id])
end
@watch_course_videos = @watch_course_videos.select("count(watch_course_videos.course_video_id) AS freq, watch_course_videos.*")
@watch_course_videos = @watch_course_videos.select("count(watch_course_videos.course_video_id) AS freq, watch_course_videos.id, watch_course_videos.user_id, watch_course_videos.start_at, watch_course_videos.end_at, watch_course_videos.is_finished, watch_course_videos.total_duration")
if params[:order].present?
key = params[:order].split("-")

@ -1520,7 +1520,7 @@ class CoursesController < ApplicationController
end
end
@videos = @videos.select("course_videos.id, videos.user_id, videos.title, IFNULL(hisotries.time,0) AS total_time, IFNULL(hisotries.num,0) AS people_num")
@videos = @videos.select("course_videos.id, videos.user_id, videos.title AS video_title, IFNULL(hisotries.time,0) AS total_time, IFNULL(hisotries.num,0) AS people_num")
@videos = paginate @videos
end

@ -1,5 +1,6 @@
json.data do
json.array! @watch_course_videos do |d|
json.id d.id
json.user_name d.user&.real_name
json.is_finished d.is_finished ? true : false
json.total_duration d.total_duration.round(0)

@ -1,7 +1,7 @@
json.videos do
json.array! @videos do |v|
json.id v.id
json.title v.title
json.title v['video_title']
json.user_name v.user&.real_name
json.people_num v['people_num']
json.total_time v['total_time'].round(0)

@ -1,7 +1,7 @@
import React, {Component} from "react";
import '../../signin/css/signincdi.css';
import {Progress, message} from 'antd';
import {getImageUrl} from 'educoder';
import {getImageUrl,formatSeconds} from 'educoder';
import axios from 'axios';
@ -88,7 +88,7 @@ class Studenticscom extends Component {
<div className="yslshipingshi" style={{width:260,height:100}}>
<div className="ws100s verticallayout tbrt">
<div className="ws100 ts">总观看时长</div>
<div className="ws100s tss">{this.props.watch_staticsdata&&this.props.watch_staticsdata.total_duration?this.props.watch_staticsdata.total_duration:0}</div>
<div className="ws100s tss">{this.props.watch_staticsdata&&this.props.watch_staticsdata.total_duration?formatSeconds(this.props.watch_staticsdata.total_duration):0}</div>
</div>
</div>

@ -205,7 +205,7 @@ class Studentstatistics extends Component {
let mysorder="";
if (sorter.order === "ascend") {
if(sorter.columnKey === "feq"){
mysorder="feq-asc";
mysorder="freq-asc";
}else{
mysorder="total_duration-asc";
@ -221,7 +221,7 @@ class Studentstatistics extends Component {
})
} else if (sorter.order === "descend") {
if(sorter.columnKey === "feq"){
mysorder="feq-desc";
mysorder="freq-desc";
}else{
mysorder="total_duration-desc";

Loading…
Cancel
Save