Skip to content
Snippets Groups Projects
Commit db51efe2 authored by Alexandre Peres Arias's avatar Alexandre Peres Arias
Browse files

fix alternancy load statistics

parent adc9e0c9
No related branches found
No related tags found
No related merge requests found
class Management::StatisticsController < ManagementController
include RepositoriesProxy
#before_action :set_statistics
before_action :authenticate_user!, except: [:index, :show, :like]
@@flag = 0
@@flag = 0
def index
if @@flag == 0
if @@flag == 0 || @@user != current_user
@@user = current_user
set_statistics
@@flag = 1
end
......@@ -32,8 +34,8 @@ class Management::StatisticsController < ManagementController
def learning_objects
if @@flag == 0
set_statistics
if @@flag == 0 || @@user != current_user
@@user = current_user
@@flag = 1
end
@n_learning_objects = @@n_learning_objects
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment