e-ucm/rage-analytics-frontend

View on GitHub

Showing 27 of 143 total issues

Function calculateResults has 28 lines of code (exceeds 25 allowed). Consider refactoring.
Open

            var calculateResults = function (rawResults) {
                var results = [];
                rawResults.forEach(function (result) {
                    $scope.version.alias = $scope.version.alias ? $scope.version.alias : 'this.name';
                    result.name = evalExpression.call(result, $scope.version.alias, 'Unknown');
Severity: Minor
Found in app/public/js/controllers/activity.js - About 1 hr to fix

    Function inviteUser has 28 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

                $ctrl.inviteUser = function (role) {
                    var object = {participants: {}};
                    var user;
                    switch (role) {
                        case 'teacher': {
    Severity: Minor
    Found in app/public/js/controllers/participantsConf.js - About 1 hr to fix

      Function RadialProgress has 27 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      var RadialProgress = function (div, initialProgress) {
          var svg = d3.select(div).append('svg')
              .attr('viewBox', '0 0 100 100');
      
          this.outerCircle = svg.append('circle')
      Severity: Minor
      Found in app/public/js/ui.js - About 1 hr to fix

        Function updateOfflineTraces has 26 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                    function updateOfflineTraces() {
                        if ($scope.activity && $scope.activity.offline) {
                            $http.get(CONSTANTS.PROXY + '/offlinetraces/' + $scope.activity._id, {
                                transformRequest: angular.identity,
                                headers: {
        Severity: Minor
        Found in app/public/js/controllers/activity.js - About 1 hr to fix

          Avoid deeply nested control flow statements.
          Open

                                          if ($ctrl.isInSelectedGroup(id, role, $ctrl.classGroups[j])) {
                                              return true;
                                          }
          Severity: Major
          Found in app/public/js/controllers/participantsConf.js - About 45 mins to fix

            Avoid deeply nested control flow statements.
            Open

                                            if ($scope.isInSelectedGroup(id, role, $scope.classGroups[j])) {
                                                return true;
                                            }
            Severity: Major
            Found in app/public/js/controllers/activity.js - About 45 mins to fix

              Consider simplifying this complex logical expression.
              Open

              if (process.env.NODE_ENV === 'test') {
              
                  var options = {
                      encoding: 'utf-8'
                  };
              Severity: Major
              Found in bin/setup.js - About 40 mins to fix
                Severity
                Category
                Status
                Source
                Language