<section ng-controller="DashboardController" ng-init="createdCourseList()">
    <div class="row mt">
        <div class="col-lg-12">
            <div class="form-panel">
                <div class="chat-room-head">
                    <h3> Professor Dashboard</h3>
                </div>
               <!--  <div class="page-header centered">
                    <h1> Professor Dashboard</h1>
                </div> -->
               <!--  <div class="room-desk">
                    <p class="pull-left lead">My Course (active course)</p>
                    <a class="pull-right btn btn-lg btn-theme02" href="../courses/create">+ create course</a>
                </div> -->
                <div class="row">
                    <div class="col-lg-6" >
                        <p class="lead text-center">
                            My Course (active course)
                        </p>
                        <div class="row list-group">
                            <div class="col-lg-12 col-md-12 col-sm-12 mb" ng-repeat="course in courses | filter:{active: true}">
                                <div class="pn" >
                                    <a ng-controller="CoursesController"  ng-init="findNumStudentEnrolled(); getNumQuiz();" ui-sref="courses.view({courseId: course._id})" class="list-group-item">

                                             {{course.semester}} {{course.year}}
                                            <h4> {{course.number}} {{course.name}} </h4>
                                              <button id = "edit" class="btn btn-default btn-sm pull-right"  type="submit" ng-controller="CoursesListController" data-ng-click="$event.preventDefault(); $event.stopPropagation(); modalUpdate('lg', course)" > Edit </button>

                                            Number of students: {{course.enrolledStudents.length}}
                                        </br>
                                            Number of quizzes: {{numQuizzesInCourse[course._id]}}


                                    </a>

                                </div>
<!--                                
      <div>
      Popover (working) -> 
              <div ng-model="name" mydirective=""></div>
      </div>
      <div>
      Popover uib (notworking- uib-popover-html)  ->
              <div ng-model="name" mydirectiveuib=""></div>
      </div> -->
                            </div>
                           <!--   <button uib-popover="I appeared on mouse enter!" popover-trigger="mouseenter"  popover-placement="right" type="button" class="btn btn-default">Mouseenter</button> -->

                        </div>
                    </div>

                    <div class="col-lg-6 text-center" >
                         <a class="btn btn-lg btn-theme02 " id="submit" href="../courses/create">+ create course</a>
                    </div>
                </div>
                <div class="row" style="margin-bottom: 30px;">
                    <div class="col-md-12">
                        <button type="button" class="btn btn-default" ng-click="isCollapsed = !isCollapsed">List all deactive courses</button>
                        <hr>
                        <div collapse="isCollapsed">
                            <!-- uib-collapse only works with bootstrap version 0.14.X -->
                            <div class="list-group">
                                <div class="col-lg-12 col-md-12 col-sm-12 mb" ng-repeat="course in courses | filter:{active: false}">
                                    <div class="pn" >
                                        <a id="course" ng-controller="CoursesController" ng-init="findNumStudentEnrolled(course._id); getNumQuiz(course._id);" ui-sref="courses.view({courseId: course._id})" class="list-group-item">
                                             {{course.semester}} {{course.year}}
                                            <h4> {{course.number}} {{course.name}} </h4>
                                              <button id = "edit" class="btn btn-default btn-sm pull-right"  type="submit" ng-controller="CoursesListController" data-ng-click="$event.preventDefault(); $event.stopPropagation(); modalUpdate('lg', course)" > Edit </button>

                                            Number of students: {{numStudentInCourse[course._id]}}
                                            </br>
                                            Number of quizzes: {{numQuizzesInCourse[course._id]}}
                                        </a>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div><!-- col-lg-12-->
    </div><!-- /row -->
</section>
