             throw ResourceRepositoryError.noDatabase
         }
         
-        let asOf = Date()
-        
-        return try databaseQueue.inDatabase { database in
+        return try databaseQueue.inDatabase { database in
+            guard let userInfo = try UserInformation(from: database), userInfo.currentVacationStartedAt == nil else {
+                return StudyQueue(lessonsAvailable: 0, reviewsAvailable: 0, nextReviewDate: nil, reviewsAvailableNextHour: 0, reviewsAvailableNextDay: 0)
+            }
+            
+            let asOf = Date()
+            
             let table = Tables.assignments
             
-            let lessonsAvailable = try database.longForQuery("SELECT COUNT(*) FROM \(table) WHERE \(table.srsStage) = 0")!
-            let reviewsAvailable = try database.longForQuery("SELECT COUNT(*) FROM \(table) WHERE \(table.srsStage) != 0 AND \(table.availableAt) <= ?", values: [asOf])!
+            let lessonsAvailable = try database.longForQuery("SELECT COUNT(*) FROM \(table) WHERE \(table.srsStage) = \(SRSStage.initiate.numericLevelRange.upperBound)")!
+            let reviewsAvailable = try database.longForQuery("SELECT COUNT(*) FROM \(table) WHERE \(table.srsStage) BETWEEN \(SRSStage.apprentice.numericLevelRange.lowerBound) and \(SRSStage.enlightened.numericLevelRange.upperBound) AND \(table.availableAt) <= ?", values: [asOf])!
             let nextReviewDate = try database.dateForQuery("SELECT MIN(\(table.availableAt)) FROM \(table) WHERE \(table.availableAt) > ?", values: [asOf])
             
             let reviewsAvailableNextHour = try database.longForQuery("SELECT COUNT(*) FROM \(table) WHERE \(table.availableAt) BETWEEN ? AND ?",

        }
        
        return try databaseQueue.inDatabase { database in
            let table = Tables.assignments
            
            let radicalColumn = "radicals"

        }
        
        return try databaseQueue.inDatabase { database in
            return try ResourceType.user.getLastUpdateDate(in: database) != nil
                && ResourceType.assignments.getLastUpdateDate(in: database) != nil
        }
    }
    
