mirror of
https://gitee.com/koogua/course-tencent-cloud.git
synced 2025-06-22 19:44:02 +08:00
Merge branch 'koogua/v1.3.7'
This commit is contained in:
commit
1d09a2e005
13
CHANGELOG.md
13
CHANGELOG.md
@ -1,3 +1,16 @@
|
||||
### [v1.3.7](https://gitee.com/koogua/course-tencent-cloud/releases/v1.3.7)(2021-06-14)
|
||||
|
||||
### 更新
|
||||
|
||||
- 升级layui到v2.6.8
|
||||
- 升级腾讯云播放器到v2.4.0
|
||||
- 点播增加外链支持
|
||||
- 源文件增加版权信息
|
||||
- 优化模块继承基类
|
||||
- 优化评论审核机制
|
||||
- 优化课程和群组状态协同逻辑
|
||||
- 优化用户索引重建逻辑
|
||||
|
||||
### [v1.3.6](https://gitee.com/koogua/course-tencent-cloud/releases/v1.3.6)(2021-06-04)
|
||||
|
||||
### 更新
|
||||
|
@ -1,7 +1,7 @@
|
||||
<div class="user-list group-user-list clearfix">
|
||||
<div class="layui-row layui-col-space20">
|
||||
{% for item in pager.items %}
|
||||
{% set user_url = url({'for':'home.user.show','id':item.id}) %}
|
||||
{% set user_url = url({'for':'home.user.show','id':item.user.id}) %}
|
||||
{% set avatar_class = item.user.vip == 1 ? 'avatar vip' : 'avatar' %}
|
||||
<div class="layui-col-md3">
|
||||
<div class="user-card">
|
||||
|
@ -16,7 +16,7 @@ class AppInfo
|
||||
|
||||
protected $link = 'https://koogua.com';
|
||||
|
||||
protected $version = '1.3.6';
|
||||
protected $version = '1.3.7';
|
||||
|
||||
public function __get($name)
|
||||
{
|
||||
|
@ -251,21 +251,22 @@ class Course extends Validator
|
||||
|
||||
$chapters = $courseRepo->findChapters($course->id);
|
||||
|
||||
$totalCount = $chapters->count();
|
||||
|
||||
$publishedCount = 0;
|
||||
$totalCount = $publishedCount = 0;
|
||||
|
||||
foreach ($chapters as $chapter) {
|
||||
if ($chapter->parent_id > 0 && $chapter->published == 1) {
|
||||
$publishedCount++;
|
||||
}
|
||||
if ($chapter->parent_id > 0) {
|
||||
$totalCount++;
|
||||
}
|
||||
}
|
||||
|
||||
if ($publishedCount == 0) {
|
||||
throw new BadRequestException('course.pub_chapter_not_found');
|
||||
}
|
||||
|
||||
if ($publishedCount / $totalCount < 0.3) {
|
||||
if ($publishedCount / $totalCount < 0.2) {
|
||||
throw new BadRequestException('course.pub_chapter_not_enough');
|
||||
}
|
||||
}
|
||||
|
@ -179,7 +179,7 @@ $error['course.invalid_feature_status'] = '无效的推荐状态';
|
||||
$error['course.invalid_publish_status'] = '无效的发布状态';
|
||||
$error['course.teacher_not_assigned'] = '尚未指定授课教师';
|
||||
$error['course.pub_chapter_not_found'] = '尚未发现已发布的课时';
|
||||
$error['course.pub_chapter_not_enough'] = '已发布的课时太少(小于30%)';
|
||||
$error['course.pub_chapter_not_enough'] = '已发布的课时太少(小于20%)';
|
||||
|
||||
/**
|
||||
* 面授课程相关
|
||||
@ -259,6 +259,7 @@ $error['chapter.child_existed'] = '不允许相关操作(存在子章节)';
|
||||
* 点播相关
|
||||
*/
|
||||
$error['chapter_vod.not_found'] = '点播资源不存在';
|
||||
$error['chapter_vod.invalid_duration'] = '无效的视频时长';
|
||||
$error['chapter_vod.invalid_file_id'] = '无效的文件编号';
|
||||
$error['chapter_vod.invalid_file_url'] = '无效的文件地址';
|
||||
$error['chapter_vod.invalid_file_ext'] = '无效的文件格式(目前只支持mp4,m3u8)';
|
||||
|
Loading…
x
Reference in New Issue
Block a user