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

courseware
dinglink 5 years ago
commit 66fb4bd911

@ -251,7 +251,13 @@ module CoursesHelper
# 获取课堂的资源数
def get_attachment_count(course, category_id)
identity = current_user.course_identity(course)
attachments = category_id.to_i == 0 ? course.attachments : course.attachments.where(course_second_category_id: category_id)
if category_id.to_i == 0
attachments = course.attachments
else
# children_ids = CourseSecondCategory.where(parent_id: category_id).pluck(:id)
# category_ids = [category_id] + children_ids
attachments = course.attachments.joins(:course_second_category).where(course_second_categories: {id: category_id}).or(course.attachments.joins(:course_second_category).where(course_second_categories: {parent_id: category_id}))
end
identity > Course::ASSISTANT_PROFESSOR ? attachments.published.size : attachments.size
end

@ -17,10 +17,15 @@ json.data do
end
# json.partial! "files/course_groups", attachment_group_settings: attachment.attachment_group_settings
json.category_id attachment.course_second_category_id
if (@course_second_category_id.to_i == 0 && attachment.course_second_category.present?) || (@parent_category_id == 0 && attachment.course_second_category&.parent_id.to_i != 0)
if @course_second_category_id.to_i == 0 && attachment.course_second_category.present?
json.category_name attachment.course_second_category&.name
json.parent_category_name attachment.course_second_category&.parent&.name
end
if @parent_category_id == 0 && attachment.course_second_category&.parent_id.to_i != 0
json.category_name attachment.course_second_category&.name
json.parent_category_name nil
end
end
end
end

@ -42,11 +42,11 @@ if (isDev) {
window.location.search.indexOf('debug=a') != -1 ? 'admin' : parsed.debug || 'admin'
}
// 超管
//debugType="admin";
debugType="admin";
// 老师
// debugType="teacher";
// 学生
debugType="student";
// debugType="student";

@ -431,6 +431,13 @@
white-space:nowrap;
cursor: default;
}
.maxnamewidth200ss{
max-width: 200px;
overflow:hidden;
text-overflow:ellipsis;
white-space:nowrap;
cursor: default;
}
.maxnamewidth150s{
width: 150px;
max-width: 150px;
@ -439,6 +446,13 @@
white-space:nowrap;
cursor: default;
}
.maxnamewidth150ss{
max-width: 150px;
overflow:hidden;
text-overflow:ellipsis;
white-space:nowrap;
cursor: default;
}
.maxnamewidth140s{
width: 140px;
max-width: 140px;
@ -480,6 +494,13 @@
white-space:nowrap;
cursor: default;
}
.maxnamewidth100s{
max-width: 100px;
overflow:hidden;
text-overflow:ellipsis;
white-space:nowrap;
cursor: default;
}
.maxnamewidth90s{
width: 90px;
max-width: 90px;
@ -511,3 +532,20 @@
.textalignrights{
text-align: right;
}
.width200s{
width: 200px !important;
}
.width150s{
width: 150px !important;
}
.width100s{
width: 100px !important;
}
.widh150pxwp{
wordWrap: break-word;
wordBreak: break-word
}
.widh150wpos{
word-break: break-all;
}

@ -30,10 +30,11 @@ class Studentstatistics extends Component {
title: '视频名称',
dataIndex: 'title',
key: 'title',
align: "center",
className: 'font-14 ',
align: "left",
className: 'font-14 maxnamewidth150s',
width: '150px',
render: (text, record) => (
<div style={{width: '200px'}} className="maxnamewidth200s textalignlefts">
<div style={{width: '150px'}} className="maxnamewidth150s textalignlefts">
<script>
{
`
@ -48,7 +49,7 @@ class Studentstatistics extends Component {
`
}
</script>
<a className="maxnamewidth200s textalignlefts" style={{
<a className="maxnamewidth150s textalignlefts" style={{
color:"#333333"
}} title={record.title}>{record.title}</a>
@ -78,7 +79,7 @@ class Studentstatistics extends Component {
sorter: true,
sortDirections: sortDirections,
render: (text, record) => (
<div style={{width: '100px'}} className="maxnamewidth100s textalignrights">
<div style={{width: '100px'}} className="maxnamewidth100s ">
<script>
{
`
@ -93,11 +94,11 @@ class Studentstatistics extends Component {
`
}
</script>
<a className="maxnamewidth100s textalignrights" style={{
color:"#333333"
}} title={record.total_duration}>{record.total_duration}</a>
<a className="maxnamewidth100s " style={{
color:"#333333"
}} title={record.total_duration}>{record.total_duration}</a>
</div>
</div>
),
},
{
@ -109,7 +110,7 @@ class Studentstatistics extends Component {
width: '100px',
render: (text, record) => (
<span style={{width: '100px'}} className="maxnamewidth100s">
<script>
<script>
{
`
a{ 

@ -159,6 +159,7 @@ class Videostatisticscomtwo extends Component {
{
record.start_at?
<a style={{
color:"#333333"
}} title={moment(record.start_at).format('YYYY-MM-DD HH:mm:ss')}>{moment(record.start_at).format('YYYY-MM-DD HH:mm:ss')}</a>
:
<span style={{color:"#333333"}}>--</span>
@ -191,7 +192,7 @@ class Videostatisticscomtwo extends Component {
{
record.end_at?
<a style={{
color:"#333333"
}} title={moment(record.end_at).format('YYYY-MM-DD HH:mm:ss')}>{moment(record.end_at).format('YYYY-MM-DD HH:mm:ss')}</a>
:
<span style={{color:"#333333"}}>--</span>

@ -21,19 +21,20 @@ class Videostatisticslist extends Component {
key: 'number',
align: "center",
className: 'font-14',
width: '90px',
width: '100px',
render: (text, record) => (
<span style={{width: '90px'}}>{record.number}</span>
<span style={{width: '100px'}}>{record.number}</span>
),
},
{
title: '视频名称',
dataIndex: 'title',
key: 'title',
align: "center",
className: 'font-14',
align: "left",
className: 'font-14 width200s widh150wpos',
width:200,
render: (text, record) => (
<div style={{width: '200px'}} className="maxnamewidth200s textalignlefts">
<div className="maxnamewidth200ss textalignlefts" style={{ wordWrap: 'break-word', wordBreak: 'break-word' }}>
<script>
{
`
@ -48,7 +49,7 @@ class Videostatisticslist extends Component {
`
}
</script>
<a className="maxnamewidth200s textalignlefts" style={{
<a className="maxnamewidth200ss textalignlefts" style={{
color:"#333333"
}} title={record.title}>{record.title}</a>
@ -56,16 +57,16 @@ class Videostatisticslist extends Component {
),
},
{
title: '观看人数(人)',
title: '观看人数',
dataIndex: 'people_num',
key: 'people_num',
align: "center",
className: 'font-14',
width: '98px',
className: 'font-14 width150s',
sorter: true,
sortDirections: sortDirections,
width:150,
render: (text, record) => (
<span style={{width: '98px'}}>{record.people_num}</span>
<span>{record.people_num}</span>
),
},
{
@ -73,12 +74,12 @@ class Videostatisticslist extends Component {
dataIndex: 'total_time',
key: 'total_time',
align: "center",
className: 'font-14 maxnamewidth100s ',
width: '100px',
className: 'font-14 width100s ',
sorter: true,
sortDirections: sortDirections,
width:100,
render: (text, record) => (
<div style={{width: '100px'}} className="maxnamewidth100s textalignrights">
<div className="maxnamewidth100s ">
<script>
{
`
@ -93,7 +94,7 @@ class Videostatisticslist extends Component {
`
}
</script>
<a className="maxnamewidth100s textalignrights" style={{
<a className="maxnamewidth100s " style={{
color:"#333333"
}} title={record.total_time}>{record.total_time}</a>
@ -105,10 +106,10 @@ class Videostatisticslist extends Component {
dataIndex: 'user_name',
key: 'user_name',
align: "center",
className: 'font-14 maxnamewidth100s',
width: '100px',
className: 'font-14 width150s',
width:150,
render: (text, record) => (
<span style={{width: '100px'}} className="maxnamewidth100s">
<span className="maxnamewidth150ss">
<script>
{
`
@ -123,7 +124,7 @@ class Videostatisticslist extends Component {
`
}
</script>
<a className="maxnamewidth100s" style={{
<a className="maxnamewidth150ss" style={{
color:"#333333"
}} title={record.user_name}>{record.user_name}</a>
@ -136,9 +137,8 @@ class Videostatisticslist extends Component {
key: 'id',
align: "center",
className: 'font-14',
width: '50px',
render: (text, record) => (
<span style={{width: '50px',color:'#5091FF'}} className="xiaoshou" onClick={()=>this.props.tisticsbools(true,record.id,record.title)}>详情</span>
<span style={{color:'#5091FF'}} className="xiaoshou" onClick={()=>this.props.tisticsbools(true,record.id,record.title)}>详情</span>
),
}
],

@ -102,12 +102,12 @@ function VideoInReviewItem (props) {
{
props&&props.mykt!=undefined?isReview !== true &&
props&&props.mykt!=undefined? isReview !== true && !link ?
<Tooltip title="统计" placement="bottom">
<i className="icon-tongji1 iconfont font-15" onClick={() => Setmyktid(props.newcourse_video_id,props.newtitle)}
style={{ marginTop: '1px', display: 'inline-block'}}
></i>
</Tooltip>:""
</Tooltip>:"":""
}

Loading…
Cancel
Save