1
0
mirror of https://gitee.com/koogua/course-tencent-cloud.git synced 2025-06-23 03:50:56 +08:00

Merge branch 'koogua/v1.3.7'

This commit is contained in:
koogua 2021-06-15 16:24:34 +08:00
commit 1d09a2e005
5 changed files with 22 additions and 7 deletions

View File

@ -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) ### [v1.3.6](https://gitee.com/koogua/course-tencent-cloud/releases/v1.3.6)(2021-06-04)
### 更新 ### 更新

View File

@ -1,7 +1,7 @@
<div class="user-list group-user-list clearfix"> <div class="user-list group-user-list clearfix">
<div class="layui-row layui-col-space20"> <div class="layui-row layui-col-space20">
{% for item in pager.items %} {% 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' %} {% set avatar_class = item.user.vip == 1 ? 'avatar vip' : 'avatar' %}
<div class="layui-col-md3"> <div class="layui-col-md3">
<div class="user-card"> <div class="user-card">

View File

@ -16,7 +16,7 @@ class AppInfo
protected $link = 'https://koogua.com'; protected $link = 'https://koogua.com';
protected $version = '1.3.6'; protected $version = '1.3.7';
public function __get($name) public function __get($name)
{ {

View File

@ -251,21 +251,22 @@ class Course extends Validator
$chapters = $courseRepo->findChapters($course->id); $chapters = $courseRepo->findChapters($course->id);
$totalCount = $chapters->count(); $totalCount = $publishedCount = 0;
$publishedCount = 0;
foreach ($chapters as $chapter) { foreach ($chapters as $chapter) {
if ($chapter->parent_id > 0 && $chapter->published == 1) { if ($chapter->parent_id > 0 && $chapter->published == 1) {
$publishedCount++; $publishedCount++;
} }
if ($chapter->parent_id > 0) {
$totalCount++;
}
} }
if ($publishedCount == 0) { if ($publishedCount == 0) {
throw new BadRequestException('course.pub_chapter_not_found'); 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'); throw new BadRequestException('course.pub_chapter_not_enough');
} }
} }

View File

@ -179,7 +179,7 @@ $error['course.invalid_feature_status'] = '无效的推荐状态';
$error['course.invalid_publish_status'] = '无效的发布状态'; $error['course.invalid_publish_status'] = '无效的发布状态';
$error['course.teacher_not_assigned'] = '尚未指定授课教师'; $error['course.teacher_not_assigned'] = '尚未指定授课教师';
$error['course.pub_chapter_not_found'] = '尚未发现已发布的课时'; $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.not_found'] = '点播资源不存在';
$error['chapter_vod.invalid_duration'] = '无效的视频时长';
$error['chapter_vod.invalid_file_id'] = '无效的文件编号'; $error['chapter_vod.invalid_file_id'] = '无效的文件编号';
$error['chapter_vod.invalid_file_url'] = '无效的文件地址'; $error['chapter_vod.invalid_file_url'] = '无效的文件地址';
$error['chapter_vod.invalid_file_ext'] = '无效的文件格式目前只支持mp4m3u8'; $error['chapter_vod.invalid_file_ext'] = '无效的文件格式目前只支持mp4m3u8';