Jelajahi Sumber

同一个考场一个学生报了多场考试的处理

Steven 5 tahun lalu
induk
melakukan
9c20497242

+ 7 - 1
MusicGradeExam/MusicGradeExam/UI/Classroom/Controller/ClassroomViewController.m

@@ -370,6 +370,12 @@ typedef NS_ENUM(NSInteger, KICKTYPE) {
     [self.hud hideAnimated:YES];
     [ClassroomService sharedService].currentRoom = nil;
     [self dismissViewControllerAnimated:NO completion:^{
+        
+        for (UIView *view in [UIApplication sharedApplication].keyWindow.subviews) {
+            if ([view isKindOfClass:[KSNormalAlertView class]]) {
+                [view removeFromSuperview];
+            }
+        }
         [self.titleView stopDurationTimer];
     }];
 }
@@ -648,7 +654,7 @@ typedef NS_ENUM(NSInteger, KICKTYPE) {
 
 #pragma mark ----- ClassVideoListViewDelegate
 - (void)videoListView:(ClassVideoListView *)view didTap:(RoomMember *)member {
-    
+    self.titleView.isDisplay = YES;
 }
 
 #pragma mark - Getters & setters

+ 7 - 7
MusicGradeExam/MusicGradeExam/UI/Classroom/Service/RTCService/RTCService.m

@@ -167,12 +167,7 @@
     [self cancelRenderVideoInView:view];
     
     if (_capturer == nil) {
-        if (enable) {
-            [self.capturer startCapture];
-        }
-        else {
-            [self.capturer stopCapture];
-        }
+        
         self.audioCapturer.musicPlayMode = RCRTCAudioScenarioMusicNormalPlay;
         self.audioCapturer.audioScenario = RCRTCAudioScenarioMusic;
         
@@ -185,7 +180,12 @@
             }
             return sampleBuffer;
         }];
-        [self.capturer startCapture];
+        if (enable) {
+            [self.capturer startCapture];
+        }
+        else {
+            [self.capturer stopCapture];
+        }
     }
     else {
         if (enable) {

+ 1 - 1
MusicGradeExam/MusicGradeExam/UI/Classroom/View/VideoList/ClassVideoListCell.m

@@ -157,7 +157,7 @@
 
 - (void)remakeNameLable:(RoomMember *)member {
     NSString * nameTxt = [[NSString alloc] init];
-    nameTxt =  member.name.length > 5 ? [NSString stringWithFormat:@"%@...",[member.name substringToIndex:5]] : member.name;
+    nameTxt =  member.name.length > 8 ? [NSString stringWithFormat:@"%@...",[member.name substringToIndex:8]] : member.name;
     self.nameLable.text = nameTxt;
 }
 

+ 1 - 1
MusicGradeExam/MusicGradeExam/UI/Exam/Controller/WaitExamViewController.m

@@ -75,7 +75,7 @@
         for (NSInteger i = 0; i < countArray.count; i++) {
             TicketRefreshModel *model = countArray[i];
             NSString *userId = [NSString stringWithFormat:@"%.0f", model.studentId];
-            if ([userId isEqualToString:[NSString stringWithFormat:@"%.0f",USER_MANAGER.userInfo.userId]]) {
+            if ([userId isEqualToString:[NSString stringWithFormat:@"%.0f",USER_MANAGER.userInfo.userId]] && [self.examRegistrationId isEqualToString:[NSString stringWithFormat:@"%.0f",model.examRegistrationId]]) {
                 self.sourceModel.openFlag = model.openFlag;
                 self.sourceModel.classroomSwitch = model.classroomSwitch;
                 self.sourceModel.recordFlag = model.recordFlag;

+ 1 - 1
MusicGradeExam/MusicGradeExam/UI/Exam/Model/TicketRefreshModel.h

@@ -17,7 +17,7 @@ NS_ASSUME_NONNULL_BEGIN
 @property (nonatomic, assign) double classroomSwitch;
 @property (nonatomic, assign) double studentId;
 @property (nonatomic, assign) double finishedExam;
-
+@property (nonatomic, assign) double examRegistrationId;
 @end
 
 NS_ASSUME_NONNULL_END

+ 4 - 4
MusicGradeExam/MusicGradeExam/UI/Exam/View/WaitExamBodyView.xib

@@ -56,7 +56,7 @@
                 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Pa9-Km-YvF">
                     <rect key="frame" x="0.0" y="206" width="414" height="200"/>
                     <subviews>
-                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="考试日期:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="qtd-ei-Gfc">
+                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="考试名称:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="qtd-ei-Gfc">
                             <rect key="frame" x="16" y="15" width="110" height="21"/>
                             <constraints>
                                 <constraint firstAttribute="height" constant="21" id="GaS-lx-E5H"/>
@@ -65,7 +65,7 @@
                             <color key="textColor" red="0.1019607843" green="0.1019607843" blue="0.1019607843" alpha="1" colorSpace="calibratedRGB"/>
                             <nil key="highlightedColor"/>
                         </label>
-                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="考试名称:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="OCV-Hb-Bhx">
+                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="考试日期:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="OCV-Hb-Bhx">
                             <rect key="frame" x="16" y="51" width="110" height="21"/>
                             <constraints>
                                 <constraint firstAttribute="height" constant="21" id="32S-MN-pjK"/>
@@ -237,13 +237,13 @@
             <freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
             <viewLayoutGuide key="safeArea" id="vUN-kp-3ea"/>
             <connections>
-                <outlet property="classDate" destination="qLV-gz-q1k" id="deW-pB-idj"/>
+                <outlet property="classDate" destination="cOI-UA-7JY" id="f8U-jY-V7W"/>
                 <outlet property="classTime" destination="Czx-Hb-wZ8" id="irw-eT-XKg"/>
                 <outlet property="examMessageView" destination="Pa9-Km-YvF" id="xvc-mw-5ne"/>
                 <outlet property="levelLabel" destination="Lud-fR-Ai6" id="NWf-Fs-DYd"/>
                 <outlet property="signButton" destination="WEa-ER-E4J" id="Ft8-JM-Rw6"/>
                 <outlet property="signDescLabel" destination="O3Y-5U-nUH" id="tBU-Y1-qvd"/>
-                <outlet property="subjectLabel" destination="cOI-UA-7JY" id="95e-BG-AVB"/>
+                <outlet property="subjectLabel" destination="qLV-gz-q1k" id="twd-R0-AEi"/>
                 <outlet property="subjectName" destination="XPl-I0-Z4w" id="7kD-SR-wKa"/>
                 <outlet property="tipsLabel" destination="LPU-2y-DR5" id="b5a-fX-xS4"/>
                 <outlet property="tipsView" destination="rEr-rK-lTU" id="QFY-uH-NJW"/>

+ 2 - 1
MusicGradeExam/MusicGradeExam/UI/Home/View/HomeExamTicketCell.m

@@ -92,7 +92,8 @@
             break;
     }
     name = [NSString isEmptyString:name] ? @"通用" : name;
-    return [NSString stringWithFormat:@"%@(%@)", name, levelStr];
+    levelStr = [NSString isEmptyString:levelStr] ? @"" : [NSString stringWithFormat:@"(%@)",levelStr];
+    return [NSString stringWithFormat:@"%@%@", name, levelStr];
 }
 
 @end

+ 9 - 9
MusicGradeExam/MusicGradeExam/UI/Home/View/HomeExamTicketCell.xib

@@ -17,8 +17,8 @@
                 <rect key="frame" x="0.0" y="0.0" width="375" height="146"/>
                 <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
                 <subviews>
-                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="最近考试" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="qvJ-vA-iTg">
-                        <rect key="frame" x="15" y="17" width="85.5" height="30"/>
+                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="XXXX" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="qvJ-vA-iTg">
+                        <rect key="frame" x="15" y="17" width="56.5" height="30"/>
                         <constraints>
                             <constraint firstAttribute="height" constant="30" id="lNh-Kp-LAR"/>
                         </constraints>
@@ -46,13 +46,13 @@
                         <color key="textColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" alpha="1" colorSpace="calibratedRGB"/>
                         <nil key="highlightedColor"/>
                     </label>
-                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="钢琴(一级)" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="SBL-f7-w01">
-                        <rect key="frame" x="100" y="63" width="98" height="20"/>
+                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="XX(XX)" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="SBL-f7-w01">
+                        <rect key="frame" x="100" y="63" width="76" height="20"/>
                         <fontDescription key="fontDescription" type="system" weight="medium" pointSize="16"/>
                         <color key="textColor" red="0.1019607843" green="0.1019607843" blue="0.1019607843" alpha="1" colorSpace="calibratedRGB"/>
                         <nil key="highlightedColor"/>
                     </label>
-                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="2020-05-20" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Qoe-n1-s6Q">
+                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="xxxx-xx-xx" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Qoe-n1-s6Q">
                         <rect key="frame" x="100" y="100" width="100" height="20"/>
                         <constraints>
                             <constraint firstAttribute="width" constant="100" id="fDI-bE-Rfk"/>
@@ -62,13 +62,13 @@
                         <nil key="highlightedColor"/>
                     </label>
                     <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Ek5-fn-qTb">
-                        <rect key="frame" x="210" y="97" width="127" height="26"/>
+                        <rect key="frame" x="210" y="97" width="118" height="26"/>
                         <subviews>
                             <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="count_bg" translatesAutoresizingMaskIntoConstraints="NO" id="FZq-yB-D7G">
-                                <rect key="frame" x="0.0" y="0.0" width="127" height="26"/>
+                                <rect key="frame" x="0.0" y="0.0" width="118" height="26"/>
                             </imageView>
-                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="倒计时 10天" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="cKe-X3-WHL">
-                                <rect key="frame" x="25" y="3.5" width="87" height="19.5"/>
+                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="倒计时 x天" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="cKe-X3-WHL">
+                                <rect key="frame" x="25" y="3.5" width="78" height="19.5"/>
                                 <fontDescription key="fontDescription" type="system" weight="medium" pointSize="16"/>
                                 <color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                                 <nil key="highlightedColor"/>