Commit 18fa13f7 by Fernando Martínez Santiago Committed by root

minor changes on session notifications from dashboard

parent aea8543a
...@@ -99,7 +99,6 @@ dashboardControllers.controller('StudentSessionCtrl', function StudentSessionCtr ...@@ -99,7 +99,6 @@ dashboardControllers.controller('StudentSessionCtrl', function StudentSessionCtr
.success(function(data, status, headers, config) { .success(function(data, status, headers, config) {
// Add to list // Add to list
$scope.wsessions = data; $scope.wsessions = data;
console.log(JSON.stringify(data));
// Refresh navigation vars // Refresh navigation vars
$scope.currentPage = 1; $scope.currentPage = 1;
$scope.numPerPage = 5; $scope.numPerPage = 5;
...@@ -381,7 +380,7 @@ console.log(JSON.stringify(data)); ...@@ -381,7 +380,7 @@ console.log(JSON.stringify(data));
io.socket.on('update_peers', function (data) { io.socket.on('update_peers', function (data) {
if($scope.ws && $scope.actual_try.actions && $scope.paused == false && data.count<$scope.studentData.prev_num_peers) { if($scope.ws && $scope.actual_try.actions && $scope.paused == false && data.count<2) {
$scope.pause_ws(); $scope.pause_ws();
$scope.pauseTimer(); $scope.pauseTimer();
$translate('room_changed').then(function (translation) { $translate('room_changed').then(function (translation) {
......
...@@ -42,6 +42,7 @@ afterDisconnect: function (session, socket, cb) { ...@@ -42,6 +42,7 @@ afterDisconnect: function (session, socket, cb) {
console.log("Unubscribed room in socket afterDisconnect: " + rooms[i]); console.log("Unubscribed room in socket afterDisconnect: " + rooms[i]);
sails.hooks.rooms.unsubscribeFromRoom(rooms[i], socket); sails.hooks.rooms.unsubscribeFromRoom(rooms[i], socket);
} }
else console.log("Sockect disconnected without any room");
}, },
......
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