concord-consortium/rigse

View on GitHub

Showing 2,136 of 2,138 total issues

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

        var resolve = function resolve(id, mixed, stack) {
            // check arguments
            assert(isString(id), 'id must be string: ' + id);
            var onlyDepIds = mixed === true;
            var resolvedInstances = (onlyDepIds ? undefined : mixed) || instances;
Severity: Minor
Found in rails/app/assets/javascripts/modulejs.js - About 1 hr to fix

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

      startDrag: function(event) {
        this.dragging = true;
        if(!this.delta)
          this.delta = this.currentDelta();
    
    
    Severity: Minor
    Found in rails/app/assets/javascripts/dragdrop.js - About 1 hr to fix

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

        initialize: function(element) {
          this.element = $(element);
          if (!this.element) throw(Effect._elementDoesNotExistError);
          var options = Object.extend({
            style: { }
      Severity: Minor
      Found in rails/app/assets/javascripts/effects.js - About 1 hr to fix

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

          initialize: function(element, url, options, tinymce_options) {
            this.url = url;
            this.element = element = $(element);
            this.prepareOptions();
            this.tinymceOptions = Object.clone(tinymce_options);

          Method copy has 26 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            def copy
              auth = auth_teacher(params)
              return error(auth[:error]) if auth[:error]
              user = auth[:user]
          
          
          Severity: Minor
          Found in rails/app/controllers/api/v1/teacher_classes_controller.rb - About 1 hr to fix

            Method create has 26 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              def create
                registration = API::V1::StudentRegistration.new(student_registration_strong_params(params))
            
                # This was added to allow for registering after logging in the first time with SSO
                # But it also occurs if a user is able to access the registration form while being
            Severity: Minor
            Found in rails/app/controllers/api/v1/students_controller.rb - About 1 hr to fix

              Method up has 26 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                def self.up
                  create_table :smartgraph_range_questions do |t|
                    
                    t.integer   "user_id"
                    t.string    "uuid",        :limit => 36

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

                const apiPost = (url: any, options: any) => {
                  const { onSuccess, errorMessage } = options;
                  let { type, data, onError } = options;
                
                  type = type || "POST";
                Severity: Minor
                Found in rails/react-components/src/library/helpers/api/post.ts - About 1 hr to fix

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

                    this.add = function (statement: any) {
                      const descArr = statement.description;
                  
                      const arrMap: any = {};
                      arrMap[DCI] = this.dci;
                  Severity: Minor
                  Found in rails/react-components/src/library/helpers/standards-helpers.tsx - About 1 hr to fix

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

                      render () {
                        const resource = this.props.resource;
                        const levels = filters.gradeFilters.reduce(function (levelAcc: any, gradeFilter: any) {
                          const matching = gradeFilter.grades.reduce(function (matchingAcc: any, grade: any) {
                            if (resource.grade_levels && resource.grade_levels.indexOf(grade) !== -1) {
                    Severity: Minor
                    Found in rails/react-components/src/library/components/grade-levels.tsx - About 1 hr to fix

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

                        getPortalData () {
                          const { dataUrl } = this.props;
                          jQuery.ajax({
                            url: "/api/v1/classes/mine",
                            success: data => {

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

                          render () {
                            const { clazz } = this.props;
                            return (
                              <div className={css.classAssignments}>
                                <header>

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

                            render () {
                              return (
                                <Formsy
                                  onValidSubmit={this.submit}
                                  onValid={this.onBasicFormValid}

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

                              apiCall (action: any, options: any) {
                                const basePath = "/api/v1/materials_collections";
                                const { collection } = this.props;
                                const { data } = options;
                            
                            

                              Consider simplifying this complex logical expression.
                              Open

                                    if ( tokens.length > 2 && (token = tokens[0]).type === "ID" &&
                                      support.getById && context.nodeType === 9 && documentIsHTML &&
                                      Expr.relative[ tokens[1].type ] ) {
                              
                                      context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0];
                              Severity: Major
                              Found in rails/app/assets/javascripts/prototype.js - About 1 hr to fix

                                Consider simplifying this complex logical expression.
                                Open

                                    if (element && isPercentage) {
                                      context = context || element.parentNode;
                                      var decimal = toDecimal(value), whole = null;
                                
                                      var isHorizontal = property.include('left') || property.include('right') ||
                                Severity: Major
                                Found in rails/app/assets/javascripts/prototype.js - About 1 hr to fix

                                  Consider simplifying this complex logical expression.
                                  Open

                                          if( ( isIE6 && ( tag in PIE.childlessElements || tag === 'FIELDSET' ) ) ||
                                                  tag === 'BUTTON' || ( tag === 'INPUT' && el.type in PIE.inputButtonTypes ) ) {
                                              rs.borderWidth = '';
                                              sides = this.styleInfos.borderInfo.sides;
                                              for( i = sides.length; i--; ) {
                                  Severity: Major
                                  Found in rails/app/assets/javascripts/pie/PIE_uncompressed.js - About 1 hr to fix

                                    Consider simplifying this complex logical expression.
                                    Open

                                          if (element === document.body) {
                                            var bodyScrollNode = document.documentElement || document.body.parentNode || document.body;
                                            valueT += !Object.isUndefined(window.pageYOffset) ? window.pageYOffset : bodyScrollNode.scrollTop || 0;
                                            valueL += !Object.isUndefined(window.pageXOffset) ? window.pageXOffset : bodyScrollNode.scrollLeft || 0;
                                            break;
                                    Severity: Major
                                    Found in rails/app/assets/javascripts/prototype.js - About 1 hr to fix

                                      Consider simplifying this complex logical expression.
                                      Open

                                              if( css ) {
                                                  tokenizer = new PIE.Tokenizer( css );
                                      
                                                  collectLengths = function () {
                                                      var arr = [], num;
                                      Severity: Major
                                      Found in rails/app/assets/javascripts/pie/PIE_uncompressed.js - About 1 hr to fix

                                        Consider simplifying this complex logical expression.
                                        Open

                                                        if ( run_all || (!event.namespace && !handleObj.namespace) || event.namespace_re && event.namespace_re.test( handleObj.namespace ) ) {
                                        
                                                            event.data = handleObj.data;
                                                            event.handleObj = handleObj;
                                        
                                        
                                        Severity: Major
                                        Found in rails/app/assets/javascripts/jquery/jquery.js - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language