2015-10-22 00:01:51 +02:00
|
|
|
(function () {
|
|
|
|
|
|
|
|
'use strict';
|
|
|
|
|
|
|
|
angular.module('OpenSlidesApp.assignments.projector', ['OpenSlidesApp.assignments'])
|
|
|
|
|
2016-01-17 21:16:04 +01:00
|
|
|
.config([
|
|
|
|
'slidesProvider',
|
|
|
|
function(slidesProvider) {
|
|
|
|
slidesProvider.registerSlide('assignments/assignment', {
|
|
|
|
template: 'static/templates/assignments/slide_assignment.html',
|
|
|
|
});
|
|
|
|
}
|
|
|
|
])
|
2015-10-22 00:01:51 +02:00
|
|
|
|
2016-01-17 21:16:04 +01:00
|
|
|
.controller('SlideAssignmentCtrl', [
|
|
|
|
'$scope',
|
|
|
|
'Assignment',
|
2016-01-18 16:27:50 +01:00
|
|
|
'User',
|
|
|
|
function($scope, Assignment, User) {
|
2016-01-17 21:16:04 +01:00
|
|
|
// Attention! Each object that is used here has to be dealt on server side.
|
|
|
|
// Add it to the coresponding get_requirements method of the ProjectorElement
|
|
|
|
// class.
|
|
|
|
var id = $scope.element.id;
|
2016-12-12 12:52:17 +01:00
|
|
|
$scope.showResult = $scope.element.poll;
|
2016-01-25 21:22:22 +01:00
|
|
|
|
2016-01-17 21:16:04 +01:00
|
|
|
Assignment.bindOne(id, $scope, 'assignment');
|
2016-01-25 21:22:22 +01:00
|
|
|
Assignment.getPhases().then(function(phases) {
|
|
|
|
$scope.phases = phases;
|
|
|
|
});
|
2016-01-18 16:27:50 +01:00
|
|
|
User.bindAll({}, $scope, 'users');
|
2016-01-17 21:16:04 +01:00
|
|
|
}
|
|
|
|
]);
|
2015-10-22 00:01:51 +02:00
|
|
|
|
|
|
|
}());
|