Skip to content

Commit

Permalink
布置作业优化;
Browse files Browse the repository at this point in the history
样式优化;
课程视频、案例、资料等可对学生隐藏
  • Loading branch information
chengyu2333 committed Dec 30, 2022
1 parent 3c2abf6 commit 6a0c613
Show file tree
Hide file tree
Showing 30 changed files with 606 additions and 278 deletions.
15 changes: 14 additions & 1 deletion api/db/update2.7.sql
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,17 @@ update sys_role set role_level=99 where role_code='admin' or role_code='dev';
alter table sys_depart
modify parent_id varchar(32) default '' not null comment '父机构ID';
update sys_permission set component='system/DepartList' where component = 'system/DepartDetailList';
delete from sys_permission_data_rule where rule_name = '本部门和子部门';
delete from sys_permission_data_rule where rule_name = '本部门和子部门';

alter table teaching_course_unit
add show_course_video tinyint default 1 null comment '对学生显示课程视频' after course_video_source;

alter table teaching_course_unit
add show_course_case tinyint default 1 null comment '对学生显示课程案例' after course_case;

alter table teaching_course_unit
add show_course_ppt tinyint default 0 null comment '对学生显示课程资料' after course_ppt;

alter table teaching_course_unit
add show_course_plan tinyint default 0 null comment '对学生显示教案' after course_plan;

Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,14 @@ public Result<?> queryPageList(CourseUnitModel teachingCourseUnit,
queryWrapper.orderByAsc("order_num");
Page<CourseUnitModel> page = new Page<CourseUnitModel>(pageNo, pageSize);
IPage<CourseUnitModel> pageList = teachingCourseUnitService.getCourseUnitList(page, queryWrapper);
if (getCurrentUser().getUserIdentity().equals(1)){
for (CourseUnitModel model: pageList.getRecords()){
model.setCourseVideo(model.getShowCourseVideo()?model.getCourseVideo(): null);
model.setCourseCase(model.getShowCourseCase()?model.getCourseCase(): null);
model.setCoursePlan(model.getShowCoursePlan()?model.getCoursePlan(): null);
model.setCoursePpt(model.getShowCoursePpt()?model.getCoursePpt(): null);
}
}
return Result.ok(pageList);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,18 +83,27 @@ public class TeachingCourseUnit implements Serializable {
@ApiModelProperty(value = "课程视频")
@FileUrl
private java.lang.String courseVideo;
@ApiModelProperty(value = "是否对学生隐藏课程视频")
@Dict(dicCode = "yn")
private java.lang.Boolean showCourseVideo;
//视频源
private java.lang.Integer courseVideoSource;
/**课程案例*/
@Excel(name = "课程案例", width = 15)
@ApiModelProperty(value = "课程案例")
@FileUrl
private java.lang.String courseCase;
@ApiModelProperty(value = "是否对学生隐藏课程案例")
@Dict(dicCode = "yn")
private java.lang.Boolean showCourseCase;
/**课程资料,多个文件逗号分割*/
@Excel(name = "课程资料", width = 15)
@ApiModelProperty(value = "课程资料")
@FileUrl
private java.lang.String coursePpt;
@ApiModelProperty(value = "是否对学生隐藏课程资料")
@Dict(dicCode = "yn")
private java.lang.Boolean showCoursePpt;
/**作业类型*/
@Excel(name = "作业类型", width = 15, dicCode = "work_type")
@Dict(dicCode = "work_type")
Expand All @@ -115,6 +124,9 @@ public class TeachingCourseUnit implements Serializable {
@ApiModelProperty(value = "教案")
@FileUrl
private java.lang.String coursePlan;
@ApiModelProperty(value = "是否对学生隐藏课程教案")
@Dict(dicCode = "yn")
private java.lang.Boolean showCoursePlan;
/**地图X坐标*/
@Excel(name = "地图X坐标", width = 15)
@ApiModelProperty(value = "地图X坐标")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,12 @@
<select id="userAdditionalWork" resultType="org.jeecg.modules.teaching.model.AdditionalWorkModel">
select a.*, a.id additionalWorkId,
w.id mineWorkId, w.work_name mineWorkName, w.work_status mineWorkStatus,
(select file_path from sys_file where sys_file.id=w.work_file) mineWorkUrl,
(select file_path from sys_file where sys_file.id = w.work_cover) mineWorkCover
w.work_file mineWorkUrl,
w.work_cover mineWorkCover,
c.score, c.comment
from teaching_additional_work a
left join teaching_work w on w.additional_id = a.id and w.user_id = #{userId}
left join teaching_work_correct c on c.work_id = w.id
where
a.status=1 and
<foreach collection="departIds" index="index" item="id" open="(" separator=" or " close=")">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package org.jeecg.modules.teaching.model;

import lombok.Data;
import org.jeecg.common.aspect.annotation.Dict;
import org.jeecg.modules.system.aspect.FileUrl;

import java.util.Date;
Expand All @@ -10,7 +11,6 @@ public class AdditionalWorkModel {
private String additionalWorkId;
private String workName;
private String workDesc;
// @Getter(AccessLevel.NONE)
@FileUrl
private String workCover;
@FileUrl
Expand All @@ -19,26 +19,19 @@ public class AdditionalWorkModel {
private String workDocumentUrl;
private String workDept;
private Date createTime;
@Dict(dictTable = "sys_user", dicCode = "username", dicText = "realname")
private String createBy;
@Dict(dicCode = "work_type")
private Integer codeType;

private String mineWorkId;
private String mineWorkName;
private Integer mineWorkStatus;
@FileUrl
private String mineWorkUrl;
// @Getter(AccessLevel.NONE)
@FileUrl
private String mineWorkCover;

private String departId;
private String departName;

// public String getWorkCover() {
// return workCover==null?null: QiniuConfig.domain + "//" + workCover;
// }
// public String getWorkUrl(){ return workUrl==null?null:QiniuConfig.domain+ "//" + workUrl;}
// public String getMineWorkUrl(){ return mineWorkUrl==null?null:QiniuConfig.domain+ "//" + mineWorkUrl;}
// public String getMineWorkCover() {
// return mineWorkCover==null?null:QiniuConfig.domain+ "//" + mineWorkCover;
// }
private String comment;
private Integer score;
}
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,9 @@ spring:
connectionProperties: druid.stat.mergeSql\=true;druid.stat.slowSqlMillis\=5000
datasource:
master:
url: jdbc:mysql://127.0.0.1:3306/teachingopen?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false
username: teachingopen
password: teachingopen
url: jdbc:mysql://213.name:3306/teachingopendev?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false
username: teachingopendev
password: teachingopendev
driver-class-name: com.mysql.jdbc.Driver
# 多数据源配置
#multi-datasource1:
Expand All @@ -140,15 +140,15 @@ spring:
#redis 配置
redis:
database: 1
host: 127.0.0.1
host: 213.name
lettuce:
pool:
max-active: 8 #最大连接数据库连接数,设 0 为没有限制
max-idle: 8 #最大等待连接中的数量,设 0 为没有限制
max-wait: -1ms #最大建立连接等待时间。如果超过此时间将接到异常。设为-1表示无限制。
min-idle: 0 #最小等待连接中的数量,设 0 为没有限制
shutdown-timeout: 100ms
password: ''
password: 'Chengyu1817'
port: 6379
#mybatis plus 设置
mybatis-plus:
Expand Down Expand Up @@ -196,8 +196,8 @@ jeecg :
staticDomain: ??
#七牛云存储配置
qiniu:
accessKey: ??
secretKey: ??
accessKey: 7r03dL3CsbQtW1DeV2xEic4DjRBIuMgCBHrkGjKo
secretKey: OQ3jE8SjeTpl34PfSq3C10tYVuE9KFfYujZwzUtJ
bucketName: teaching-open
staticDomain: //open.qn.teaching.vip

Expand Down
1 change: 1 addition & 0 deletions changelist.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
v2.7 权限升级
首页移动端适配
增加Google blockly编辑器
增加角色等级配置
部门管理优化和权限完善
Expand Down
5 changes: 3 additions & 2 deletions web/public/blockly/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,10 @@
<select id="code_menu"></select>
</td>
<td class="tabmax">
<button onclick="window.location.href='/account/center'">返回</button>
<select class="farSide" id="languageMenu"></select>
<input type="text" id="project-name" placeholder="My blocks"></input>
<button id="submitButton" class="notext" title="...">
<button id="submitButton" class="notext" title="提交作品">
<img src='./media/1x1.gif' class="upload icon21">
</button>
<button id="trashButton" class="notext" title="...">
Expand Down Expand Up @@ -491,7 +492,7 @@
}),
success: function (res) {
if (res.code == 200) {
alert("Submit success")
alert("提交成功")
// createCode('qrcode', shareUrl)
} else {
}
Expand Down
122 changes: 121 additions & 1 deletion web/public/python/static/css/app.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion web/public/python/static/css/app.css.map

Large diffs are not rendered by default.

120 changes: 120 additions & 0 deletions web/public/python/static/css/appPlayer.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion web/public/python/static/css/appPlayer.css.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion web/public/python/static/js/app.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion web/public/python/static/js/app.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion web/public/python/static/js/appPlayer.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion web/public/python/static/js/appPlayer.js.map

Large diffs are not rendered by default.

Loading

0 comments on commit 6a0c613

Please sign in to comment.