File tree Expand file tree Collapse file tree 1 file changed +2
-36
lines changed
packages/db/src/impl/pouch Expand file tree Collapse file tree 1 file changed +2
-36
lines changed Original file line number Diff line number Diff line change @@ -484,43 +484,9 @@ above:\n${above.rows.map((r) => `\t${r.id}-${r.key}\n`)}`;
484484 const strategy = await this . surfaceNavigationStrategy ( ) ;
485485 return ContentNavigator . create ( u , this , strategy ) . getPendingReviews ( ) ;
486486 } catch ( e ) {
487- console . error (
488- `[courseDB] Error surfacing a NavigationStrategy: ${ e } ` ,
489- 'Falling back to default SRS scheuler.'
490- ) ;
487+ console . error ( `[courseDB] Error surfacing a NavigationStrategy: ${ e } ` ) ;
488+ throw e ;
491489 }
492-
493- type ratedReview = ScheduledCard & CourseElo ;
494-
495- u . getCourseRegDoc ( this . id ) ;
496-
497- const reviews = await u . getPendingReviews ( this . id ) ; // todo: this adds a db round trip - should be server side
498- const elo = await this . getCardEloData ( reviews . map ( ( r ) => r . cardId ) ) ;
499-
500- const ratedReviews = reviews . map ( ( r , i ) => {
501- const ratedR : ratedReview = {
502- ...r ,
503- ...elo [ i ] ,
504- } ;
505- return ratedR ;
506- } ) ;
507-
508- ratedReviews . sort ( ( a , b ) => {
509- return a . global . score - b . global . score ;
510- } ) ;
511-
512- return ratedReviews . map ( ( r ) => {
513- return {
514- ...r ,
515- contentSourceType : 'course' ,
516- contentSourceID : this . id ,
517- cardID : r . cardId ,
518- courseID : r . courseId ,
519- qualifiedID : `${ r . courseId } -${ r . cardId } ` ,
520- reviewID : r . _id ,
521- status : 'review' ,
522- } ;
523- } ) ;
524490 }
525491
526492 public async getCardsCenteredAtELO (
You can’t perform that action at this time.
0 commit comments