         
         resetAttendView()
         setUpUI()
-        setUpValues()
+       
         setUpGestures()
-        
-        
-        //This shows we cannnot login as such.
-        imageView3.backgroundColor = UIColor.grayColor()
-        
+    
         allowedToCheckIn = false
     }
     
-    //  MARK: Setup Values
-    func setUpValues(){
-        // show current class
-        currentClass = course.classes![classIndex]
-        currentClass.refreshDetails { (error) -> Void in
-            if error == nil {
-                dispatch_async(dispatch_get_main_queue()){
-                    self.questionCount.hidden = false
-                    self.unansweredQuestionCount.hidden = false
-                    self.questionCount.text = "\(self.currentClass.questions!.count)"
-                    self.unansweredQuestionCount.text = "\(self.currentClass.questions!.filter({!$0.isAnswered}).count)"
-                    self.attendClassLabel.text = self.currentClass.name
-                    // set "class start" view based on class status
-                    if self.currentClass.isFinished {
-                        self.imageView3.hidden = true
-                    }else if self.currentClass.isStarted {
-                        self.imageView3.hidden = false
-                        //imageView3.backgroundColor = UIColor.greenColor()
-                    }else {
-                        //    imageView3.backgroundColor = UIColor.grayColor()
-                        self.imageView3.hidden = true
-                    }
-                    self.setupAttendView()
-                }
-            }
-        }
-
-        
-        student.getImage{ (image, error) -> Void in
-            if error == nil {
-                dispatch_async(dispatch_get_main_queue()){
-                    self.studentAvatar.alpha = 0
-                    self.studentAvatar.image = image
-                    UIView.animateWithDuration(0.3, animations: { () -> Void in
-                        self.studentAvatar.alpha = 1
-                    })
-                }
-            }else{
-                print("error getting image for student \(self.student.studentName)")
-            }
-        }
-    }
-    
-
-    @IBAction func presentAction(sender: UIPanGestureRecognizer) {
-        let translation = sender.translationInView(self.attendClassView)
-        if allowedToCheckIn == true {
-        switch sender.state {
-        case .Began:
-            initialCenterPoint = self.studentAvatar.center
-            lastCenterPoint = self.openDoorImage.center
-        case .Cancelled:
-            fallthrough
-        case .Ended:
-            fallthrough
-        case .Failed:
-            fallthrough
-        case .Possible:
-            fallthrough
-        case .Changed:
-            
-            if(self.studentAvatar.center.x < ((initialCenterPoint?.x)!)  || translation.x < 0){
-            }
-            if (translation.x > 0 && self.studentAvatar.center.x < self.openDoorImage.center.x){
-                self.studentAvatar.center.x = (initialCenterPoint?.x)! + translation.x
-            }
-            
-            if studentAvatar.center.x > lastCenterPoint?.x {
-                imageView3.hidden = true
-                print("Student Attended")
-                
-            }
-        }
-        }
-    }
-    
-    
+    
+
     func setUpUI(){
-          ThemeManager.theme().themeForContentView(questionsView)
-    }
+     }
     
     func setUpGestures() {
-        questionsTapGestureRecognizer.addTarget(self, action: "questionsViewTapped")
-        startClassTapGestureRecognizer.addTarget(self, action: "attendClassTapped")
-        attendanceTapGestureRecognizer.addTarget(self, action: "attendanceViewTapped")
-    }
+      }
     
     //Attendance View Tapped.
     func attendanceViewTapped(){

    func canAttendClass() {
        print("student can attend class \(currentClass.name)!")
        self.allowedToCheckIn = true
        imageView3.backgroundColor = UIColor.greenColor()
        attendClassView.backgroundColor = UIColor.greenColor()
        NSNotificationCenter.defaultCenter().removeObserver(self, name: Class.insideClassGeofenceNotification, object: nil)
        NSNotificationCenter.defaultCenter().removeObserver(self, name: Class.outsideClassGeofenceNotification, object: nil)
        currentClass.attendClass(self.student) { (confirmed) -> Void in

import UIKit
import MBProgressHUD

class StudentCourseDraggableViewController: UICollectionViewController {

    var course:Course!
    var classIndex:Int!
    var initialCenterPoint:CGPoint?
    var lastCenterPoint:CGPoint?
    var allowedToCheckIn:Bool?
    //PageController Property.
        var indexNumber:Int!
    
    /*Start Class*/
    /*Class Details*/
    //private var classIndex: Int!
    private var currentClass: Class!
    
    
    
    
    /* the Student */
    var student: Student!
