|
@@ -29,35 +29,41 @@
|
|
|
self.selectionStyle = UITableViewCellSelectionStyleNone;
|
|
|
}
|
|
|
|
|
|
-- (void)configWithAttachmentArray:(NSMutableArray *)fileArray hasSubmit:(BOOL)hasSubmit isExpired:(BOOL)homeworkExpire callback:(HomeworkPlayAction)callback {
|
|
|
+- (void)configWithAttachmentArray:(NSMutableArray *)fileArray hasSubmit:(BOOL)hasSubmit isExpired:(BOOL)homeworkExpire courseStatus:(NSString *)courseStatus callback:(HomeworkPlayAction)callback {
|
|
|
if (callback) {
|
|
|
self.callback = callback;
|
|
|
}
|
|
|
[self.videoContainer removeAllSubViews];
|
|
|
- if (homeworkExpire) {
|
|
|
- self.emptyView.hidden = NO;
|
|
|
- self.containerHeight.constant = 88.0f;
|
|
|
- NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc] init];
|
|
|
- [paragraphStyle setLineSpacing:4];//调整行间距
|
|
|
- NSMutableAttributedString *attr = [[NSMutableAttributedString alloc] initWithString:@"作业已过期无法查看!" attributes:@{NSParagraphStyleAttributeName:paragraphStyle,NSFontAttributeName:[UIFont systemFontOfSize:13.0f],NSForegroundColorAttributeName:HexRGB(0x999999)}];
|
|
|
- self.emptyDescLabel.attributedText = attr;
|
|
|
- }
|
|
|
- else {
|
|
|
- if (hasSubmit) {
|
|
|
- self.emptyView.hidden = YES;
|
|
|
- self.containerHeight.constant = 76.0f;
|
|
|
- [self configVideoViewWithSource:fileArray];
|
|
|
- }
|
|
|
- else {
|
|
|
+ NSString *tipsDesc = @"";
|
|
|
+ if ([courseStatus isEqualToString:@"COMPLETE"]) {
|
|
|
+ if (homeworkExpire) {
|
|
|
+ tipsDesc = @"作业已过期无法查看!";
|
|
|
self.emptyView.hidden = NO;
|
|
|
self.containerHeight.constant = 88.0f;
|
|
|
- NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc] init];
|
|
|
- [paragraphStyle setLineSpacing:4];//调整行间距
|
|
|
- NSMutableAttributedString *attr = [[NSMutableAttributedString alloc] initWithString:@"学员尚未上传作业视频" attributes:@{NSParagraphStyleAttributeName:paragraphStyle,NSFontAttributeName:[UIFont systemFontOfSize:13.0f],NSForegroundColorAttributeName:HexRGB(0x999999)}];
|
|
|
- self.emptyDescLabel.attributedText = attr;
|
|
|
}
|
|
|
+ else {
|
|
|
+ if (hasSubmit) {
|
|
|
+ self.emptyView.hidden = YES;
|
|
|
+ self.containerHeight.constant = 76.0f;
|
|
|
+ [self configVideoViewWithSource:fileArray];
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ tipsDesc = @"学员尚未上传作业视频";
|
|
|
+ self.emptyView.hidden = NO;
|
|
|
+ self.containerHeight.constant = 88.0f;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ tipsDesc = @"课程结束之后学员可上传作业视频";
|
|
|
+ self.emptyView.hidden = NO;
|
|
|
+ self.containerHeight.constant = 88.0f;
|
|
|
}
|
|
|
|
|
|
+ NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc] init];
|
|
|
+ [paragraphStyle setLineSpacing:4];//调整行间距
|
|
|
+ NSMutableAttributedString *attr = [[NSMutableAttributedString alloc] initWithString:tipsDesc attributes:@{NSParagraphStyleAttributeName:paragraphStyle,NSFontAttributeName:[UIFont systemFontOfSize:13.0f],NSForegroundColorAttributeName:HexRGB(0x999999)}];
|
|
|
+ self.emptyDescLabel.attributedText = attr;
|
|
|
}
|
|
|
|
|
|
- (void)configVideoViewWithSource:(NSMutableArray *)fileArray {
|