         return [deleteAction, editAction]
     }
     
-    func setUpNotifications() {
+    func registerHomeWorkNotifications(forDates dates: [Date]) {
         
         //Set notifications for the end of each class, each week day
-        let dates = getClassEndDatesForWeek()
         center.removeAllPendingNotificationRequests()
         for date in dates {
             let requesetString: String! = stringByAppendingDateAndTime(string: "classFinishedRequest", date: date)
             let actionString: String! = stringByAppendingDateAndTime(string: "actionFinishedRequest", date: date)
-            print("Creating notification with id: " + requesetString)
-            createNotificationWithTextField(title: "Enter assigned homework", body: "class=\"Class\" \n name=\"Name\" \n dueDate=\"04/15/17\" \n timeToComplete=\"01:15\"", launchDate: date, repeats: true, requestId: requesetString, actionId: actionString, textTitle: "Reminder", textButtonTitle: "Save", textPlaceholder: "Enter arguments here", catagotyId: "classFinishedCatagory", center: center)
+            print("Registiring notification with id: " + requesetString)
+            createNotificationWithTextField(title: "Enter assigned homework", body: "class=\"Class\" \n name=\"Name\" \n dueDate=\"04/15/17\" \n timeToComplete=\"01:15\"", launchDate: date, repeats: false, requestId: requesetString, actionId: actionString, textTitle: "Reminder", textButtonTitle: "Save", textPlaceholder: "Enter arguments here", catagotyId: "classFinishedCatagory", center: center)
         }
     }
     

        // set observer for UIApplicationWillEnterForeground
        NotificationCenter.default.addObserver(self, selector: #selector(willEnterForeground), name: .UIApplicationWillEnterForeground, object: nil)
        
        
        
        getData()
        setUp()
        center.getPendingNotificationRequests(completionHandler: {
            requests in
            for request in requests {
                print(request.identifier)
            }
        })
        setUpNotifications()
    }
    
    override func viewWillAppear(_ animated: Bool) {

        return string + "." + String(weekDay) + "." + timeString
    }
    
    func getClassEndDatesForWeek(forWeekOfMonth weekOfMonth: Int) -> [Date] {
        //Returns the endtimes of each class for each work day
        var classEndDatesForWeek = [Date]()
        let endTimes = getEndTimes()
