File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -35,7 +35,11 @@ export function useCourseData(courses: CourseBase[]) {
3535 result . vodDataArray . forEach ( ( vodData ) => {
3636 result . vodAttendanceArray . forEach ( ( vodAttendanceData ) => {
3737 const vodKey = makeVodKey ( course . courseId , vodData . title , vodData . week ) ;
38- if ( vodAttendanceData . title === vodData . title && vodAttendanceData . week === vodData . week ) {
38+ if (
39+ vodAttendanceData . title === vodData . title &&
40+ vodAttendanceData . week === vodData . week &&
41+ isCurrentDateInRange ( vodData . range )
42+ ) {
3943 if ( ! vodSet . has ( vodKey ) ) {
4044 vodSet . add ( vodKey ) ;
4145 tempVods . push ( {
@@ -62,7 +66,7 @@ export function useCourseData(courses: CourseBase[]) {
6266 assignData . title ,
6367 assignData . dueDate ? assignData . dueDate : ''
6468 ) ;
65- if ( ! assignSet . has ( assignKey ) ) {
69+ if ( ! assignSet . has ( assignKey ) && isCurrentDateByDate ( assignData . dueDate ) ) {
6670 console . info ( assignKey ) ;
6771 assignSet . add ( assignKey ) ;
6872 tempAssigns . push ( {
@@ -80,7 +84,7 @@ export function useCourseData(courses: CourseBase[]) {
8084
8185 result . quizDataArray . forEach ( ( quizData ) => {
8286 const quizKey = makeQuizKey ( course . courseId , quizData . title , quizData . dueDate ? quizData . dueDate : '' ) ;
83- if ( ! quizSet . has ( quizKey ) ) {
87+ if ( ! quizSet . has ( quizKey ) && isCurrentDateByDate ( quizData . dueDate ) ) {
8488 console . info ( quizKey ) ;
8589 quizSet . add ( quizKey ) ;
8690 tempQuizes . push ( {
You can’t perform that action at this time.
0 commit comments