Various fixes

This commit is contained in:
Reynaldo Reyes
2016-05-20 23:00:34 -04:00
parent b220f21065
commit 48e8b73111
55 changed files with 714 additions and 690 deletions

View File

@@ -6,10 +6,11 @@
.controller('CourseAssistCtrl', CourseAssistCtrl)
CourseAssistCtrl.$inject =
['$scope', '$rootScope', '$state', 'professors', '$modal', 'selectedCourse'];
function CourseAssistCtrl($scope, $rootScope, $state, professors, $modal, selectedCourse) {
['$scope', '$state', 'professors', '$modal', 'selectedCourse', 'authentication'];
function CourseAssistCtrl($scope, $state, professors, $modal, selectedCourse, authentication) {
var vm = this;
var professorid = $rootScope.professorId;
var user = authentication.currentUser();
var professorid = user._id;
vm.course = null;
vm.lectures = 0;
vm.percentage = 0;

View File

@@ -6,10 +6,11 @@
.controller('CourseReportCtrl', CourseReportCtrl)
CourseReportCtrl.$inject =
['$scope', '$rootScope', '$state', 'professors', '$modal', 'profesorSeleccionado', 'selectedCourse'];
function CourseReportCtrl($scope, $rootScope, $state, professors, $modal, profesorSeleccionado, selectedCourse) {
['$scope', '$state', 'professors', '$modal', 'profesorSeleccionado', 'selectedCourse', 'authentication'];
function CourseReportCtrl($scope, $state, professors, $modal, profesorSeleccionado, selectedCourse, authentication) {
var vm = this;
var professorid = $rootScope.professorId;
var user = authentication.currentUser();
var professorid = user._id;
professors.get({ id: professorid },
function (successResult){

View File

@@ -33,14 +33,14 @@
<td style="vertical-align:middle">{{ course.credits }}</td>
<td style="vertical-align:middle">{{ course.description }}</td>
<td style="text-align: center">
<span
<span title="Haga click para ver los reportes de esta materia"
class="glyphicon glyphicon-list-alt"
aria-hidden="true"
ng-click="vm.courseReports($index)"
style="cursor:pointer"></span>
</td>
<td style="text-align: center">
<span
<span title="Haga click para ver el listado de las secciones de esta materia"
class="glyphicon glyphicon-list"
aria-hidden="true"
ng-click="vm.listSections($index)"

View File

@@ -18,16 +18,10 @@
$stateProvider
.state('courseReport', {
parent: 'index',
url: '/reportesPorMateria',
views: {
sidebar: {
templateUrl: 'partials/sidebar/sidebar.html',
controller: 'SidebarCtrl'
},
navbar: {
templateUrl: 'partials/sidebar/navbar.html'
},
content: {
'content@': {
templateUrl: 'partials/report/course_report.html',
controller: 'CourseReportCtrl',
controllerAs: 'vm'
@@ -35,16 +29,10 @@
}
})
.state('sectionReport', {
parent: 'index',
url: '/reportesPorSeccion',
views: {
sidebar: {
templateUrl: 'partials/sidebar/sidebar.html',
controller: 'SidebarCtrl'
},
navbar: {
templateUrl: 'partials/sidebar/navbar.html'
},
content: {
'content@': {
templateUrl: 'partials/report/section_report.html',
controller: 'SectionReportCtrl',
controllerAs: 'vm'
@@ -52,16 +40,10 @@
}
})
.state('studentReport', {
parent: 'index',
url: '/reportesPorEstudiante',
views: {
sidebar: {
templateUrl: 'partials/sidebar/sidebar.html',
controller: 'SidebarCtrl'
},
navbar: {
templateUrl: 'partials/sidebar/navbar.html'
},
content: {
'content@': {
templateUrl: 'partials/report/student_report.html',
controller: 'StudentReportCtrl',
controllerAs: 'vm'
@@ -69,16 +51,10 @@
}
})
.state('studentAssist', {
parent: 'index',
url: '/asistenciaPorEstudiante',
views: {
sidebar: {
templateUrl: 'partials/sidebar/sidebar.html',
controller: 'SidebarCtrl'
},
navbar: {
templateUrl: 'partials/sidebar/navbar.html'
},
content: {
'content@': {
templateUrl: 'partials/report/student_assist.html',
controller: 'StudentAssistCtrl',
controllerAs: 'vm'
@@ -86,16 +62,10 @@
}
})
.state('sectionAssist', {
parent: 'index',
url: '/asistenciaPorSeccion',
views: {
sidebar: {
templateUrl: 'partials/sidebar/sidebar.html',
controller: 'SidebarCtrl'
},
navbar: {
templateUrl: 'partials/sidebar/navbar.html'
},
content: {
'content@': {
templateUrl: 'partials/report/section_assist.html',
controller: 'SectionAssistCtrl',
controllerAs: 'vm'
@@ -103,16 +73,10 @@
}
})
.state('courseAssist', {
parent: 'index',
url: '/asistenciaPorMateria',
views: {
sidebar: {
templateUrl: 'partials/sidebar/sidebar.html',
controller: 'SidebarCtrl'
},
navbar: {
templateUrl: 'partials/sidebar/navbar.html'
},
content: {
'content@': {
templateUrl: 'partials/report/course_assist.html',
controller: 'CourseAssistCtrl',
controllerAs: 'vm'

View File

@@ -6,10 +6,11 @@
.controller('SectionAssistCtrl', SectionAssistCtrl)
SectionAssistCtrl.$inject =
['$scope', '$rootScope','$state', 'professors', '$modal', 'selectedCourse', 'selectedSection', 'selectedStudent'];
function SectionAssistCtrl($scope, $rootScope, $state, professors, $modal, selectedCourse, selectedSection, selectedStudent) {
['$scope', '$state', 'professors', '$modal', 'selectedCourse', 'selectedSection', 'selectedStudent', 'authentication'];
function SectionAssistCtrl($scope, $state, professors, $modal, selectedCourse, selectedSection, selectedStudent, authentication) {
var vm = this;
var professorid = $rootScope.professorId;
var user = authentication.currentUser();
var professorid = user._id;
vm.section = [];
vm.lectures = 0;
vm.percentage = 0;

View File

@@ -6,9 +6,17 @@
<div> Estadisticas </div>
<div> Porcentaje de Asistencia: {{vm.percentage}} % </div>
<div> Total de Dias de Clase: {{vm.lectures}} </div>
<br><br/>
<br>
</div>
<button class = "btn-warning btn"
type = "button"
style = "margin: 10px"
ng-click = "vm.back()">
Regresar
</button>
<br><br/>
<div ng-show="vm.flag">
<h4 style="color: red"> Estudiantes con menos de 75% de Asistencia </h4>
<table class="table table-bordered table-striped">
@@ -57,11 +65,4 @@
</tr>
</tbody>
</table>
<button class = "btn-warning btn"
type = "button"
style = "margin: 10px"
ng-click = "vm.back()">
Regresar
</button>
</div>

View File

@@ -6,10 +6,11 @@
.controller('SectionReportCtrl', SectionReportCtrl)
SectionReportCtrl.$inject =
['$scope', '$rootScope', '$state', 'professors', '$modal', 'profesorSeleccionado', 'selectedCourse', 'selectedSection'];
function SectionReportCtrl($scope, $rootScope, $state, professors, $modal, profesorSeleccionado, selectedCourse, selectedSection) {
['$scope', '$state', 'professors', '$modal', 'profesorSeleccionado', 'selectedCourse', 'selectedSection', 'authentication'];
function SectionReportCtrl($scope, $state, professors, $modal, profesorSeleccionado, selectedCourse, selectedSection, authentication) {
var vm = this;
var professorid = $rootScope.professorId;
var user = authentication.currentUser();
var professorid = user._id;
vm.section = [];
vm.professor = null;

View File

@@ -39,13 +39,15 @@
<td style="vertical-align:middle">{{ section.code }}</td>
<td style="vertical-align:middle">{{ section.semester }}</td>
<td style="text-align: center">
<span class="glyphicon glyphicon-list-alt"
<span title="Haga click para ver los reportes de esta sección"
class="glyphicon glyphicon-list-alt"
aria-hidden="true"
ng-click="vm.sectionReport($index)"
style="cursor:pointer"></span>
</td>
<td style="text-align: center">
<span class="glyphicon glyphicon-list"
<span title="Haga click para ver el listado de estudiantes de esta sección"
class="glyphicon glyphicon-list"
aria-hidden="true"
ng-click="vm.listStudents($index)"
style="cursor:pointer"></span>

View File

@@ -6,10 +6,11 @@
.controller('StudentAssistCtrl', StudentAssistCtrl)
StudentAssistCtrl.$inject =
['$scope', '$rootScope','$state', 'professors', '$modal', 'selectedCourse', 'selectedSection', 'selectedStudent'];
function StudentAssistCtrl($scope, $rootScope, $state, professors, $modal, selectedCourse, selectedSection, selectedStudent) {
['$scope', '$state', 'professors', '$modal', 'selectedCourse', 'selectedSection', 'selectedStudent', 'authentication'];
function StudentAssistCtrl($scope, $state, professors, $modal, selectedCourse, selectedSection, selectedStudent, authentication) {
var vm = this;
var professorid = $rootScope.professorId;
var user = authentication.currentUser();
var professorid = user._id;
vm.section = [];
vm.lectures = 0;
vm.percentage = 0;

View File

@@ -6,10 +6,11 @@
.controller('StudentReportCtrl', StudentReportCtrl)
StudentReportCtrl.$inject =
['$scope', '$rootScope', '$state', 'professors', '$modal', 'selectedCourse', 'selectedSection', 'selectedStudent'];
function StudentReportCtrl($scope, $rootScope, $state, professors, $modal, selectedCourse, selectedSection, selectedStudent) {
['$scope', '$state', 'professors', '$modal', 'selectedCourse', 'selectedSection', 'selectedStudent', 'authentication'];
function StudentReportCtrl($scope, $state, professors, $modal, selectedCourse, selectedSection, selectedStudent, authentication) {
var vm = this;
var professorid = $rootScope.professorId;
var user = authentication.currentUser();
var professorid = user._id;
vm.section = [];
vm.professor = null;

View File

@@ -32,7 +32,8 @@
<td style="vertical-align:middle">{{ student.name }}</td>
<td style="vertical-align:middle">{{ student.lastname }}</td>
<td style="text-align: center">
<span class="glyphicon glyphicon-list-alt"
<span title="Haga click para ver la asistencia de este estudiante"
class="glyphicon glyphicon-list-alt"
aria-hidden="true"
ng-click="vm.studentReports($index)"
style="cursor:pointer"></span>