error with tries lists solved

parent d01deb37
......@@ -29,6 +29,8 @@ dashboardControllers.controller('StudentSessionCtrl', function StudentSessionCtr
paused: false,
showSessions: false,
showLastTry: true,
showTries: false,
tryRunning: false,
section: 'new'
};
......@@ -77,7 +79,7 @@ dashboardControllers.controller('StudentSessionCtrl', function StudentSessionCtr
if ($scope.selected.item == -1)
return;
$scope.showLastTry = false;
$scope.flags.showLastTry = false;
var ids = $scope.selected.item.split("-"); // this is because Angular 1.2 doesn't assign objects in ng-value
$scope.selected.method = $scope.methods[parseInt(ids[0])];
......@@ -328,7 +330,7 @@ dashboardControllers.controller('StudentSessionCtrl', function StudentSessionCtr
$scope.startTimer = function (){
$scope.$broadcast('timer-start');
$scope.flags.paused = false;
$scope.tryRunning = true;
$scope.flags.tryRunning = true;
};
$scope.pauseTimer = function (){
......@@ -344,7 +346,7 @@ dashboardControllers.controller('StudentSessionCtrl', function StudentSessionCtr
$scope.stopTimer = function (){
$scope.$broadcast('timer-stop');
$scope.flags.paused = false;
$scope.tryRunning = false;
$scope.flags.tryRunning = false;
};
$scope.$on('timer-stopped', function (event, data){
......
......@@ -113,7 +113,7 @@
</div>
<!-- running try -->
<div id="actual_try" ng-model="actual_try" ng-show="tryRunning && flags.section == 'new'">
<div id="actual_try" ng-model="actual_try" ng-show="flags.tryRunning && flags.section == 'new'">
<div class="try_time">
<timer id="time_try" class="color_blue" interval="1000" auto-start="false">
{{mminutes}}:{{sseconds}}
......@@ -193,7 +193,7 @@
<!-- / running try -->
<!-- sessions list -->
<div class="list-group pre-scrollable" ng-show="flags.showSessions && flags.section == 'previous' || flags.showLastTry && wsessions.length > 0 || ws_recover || tryRunning">
<div class="list-group pre-scrollable" ng-show="flags.showSessions && flags.section == 'previous' || flags.showLastTry && wsessions.length > 0 || ws_recover || flags.tryRunning">
<div ng-repeat="s in wsessions | orderBy: '-begin'">
<!-- div class="list-group-item" ng-repeat="s in wsessions | orderBy: '-begin' | limitTo: numPerPage:(currentPage-1)*numPerPage" -->
......@@ -212,11 +212,11 @@
<!-- show/hide tries button -->
<div class="form-group pull-right" ng-show="ws.id != s.id && !ws_recover">
<span class="control-label"> {{ s.tries.length }} {{ 'tries' | translate }}</span>
<button ng-click="showTries = !showTries" class="btn btn-default btn-sm">
<div ng-show="!showTries">
<button ng-click="flags.showTries = !flags.showTries" class="btn btn-default btn-sm">
<div ng-show="!flags.showTries">
{{ 'show' | translate }} <span class="glyphicon glyphicon-collapse-down" aria-hidden="true"></span>
</div>
<div ng-show="showTries">
<div ng-show="flags.showTries">
{{ 'hide' | translate }} <span class="glyphicon glyphicon-collapse-up" aria-hidden="true"></span>
</div>
</button>
......@@ -229,7 +229,7 @@
<button ng-show="ws_recover" class="btn btn-warning btn-sm pull-right" type="button" ng-click="close_ws()" translate>close_session</button>
<!-- tries list -->
<div class="sessionTries" ng-show="showTries || ws.id == s.id || ws_recover">
<div class="sessionTries" ng-show="flags.showTries || ws.id == s.id || ws_recover">
<div class="try" ng-repeat="t in s.tries">
<div ng-show="!is_currentOpenTry(t)">
<table width="100%">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment