     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: UIViewController {

    var course:Course!
    var classIndex:Int!
    var initialCenterPoint:CGPoint?
    var lastCenterPoint:CGPoint?
    var allowedToCheckIn:Bool?
    
    /*Start Class*/
    @IBOutlet var startClassTapGestureRecognizer: UITapGestureRecognizer!
    /*Class Details*/
    //private var classIndex: Int!
    private var currentClass: Class!
    
    @IBOutlet weak var studentAvatar: UIImageView!
    @IBOutlet weak var openDoorImage: UIImageView!
    @IBOutlet weak var imageView3: UIImageView!
    
    @IBOutlet var attendanceTapGestureRecognizer: UITapGestureRecognizer!
    
    /* Question Details */
    @IBOutlet weak var questionCount: UILabel!
    @IBOutlet weak var unansweredQuestionCount: UILabel!
    @IBOutlet weak var questionsView: UIView!
    @IBOutlet var questionsTapGestureRecognizer: UITapGestureRecognizer!
    
    @IBOutlet weak var attendClassLabel: UILabel!
    @IBOutlet weak var attendClassView: UIView!
    //PageController Property.
    var indexNumber:Int!
    
    /* the Student */
    var student: Student!

        
        resetAttendView()
        setUpUI()
       
        setUpGestures()
    
        allowedToCheckIn = false
    }
    
    

    func setUpUI(){
     }
    
    func setUpGestures() {
      }
    
    //Attendance View Tapped.
    func attendanceViewTapped(){
