Showing 430 of 4,502 total issues
Method summarize_reviews_by_reviewee
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def summarize_reviews_by_reviewee(questions, assignment, reviewee_id, summary_ws_url, _session = nil)
Method send_mail_for_conference_user
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def self.send_mail_for_conference_user(user, subject, partial_name, password, conference_variable)
Method export_individual_data_fields
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def self.export_individual_data_fields(review_type, score_name, teams_csv, participants_score, options)
Method get_total_score_for_question
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def get_total_score_for_question(review_type, question_id, participant_id, assignment_id, reviewee_id)
Method add_participant
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def add_participant(user_name, can_submit, can_review, can_take_quiz, can_mentor)
Method get_total_score_for_questions
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def self.get_total_score_for_questions(review_type, questions, participant_id, assignment_id, reviewee_id)
Method check_submission_state
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def check_submission_state(response_map, assignment_created, assignment_due_dates, round, color)
Method get_answers_for_teammatereview
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def get_answers_for_teammatereview(team_id, question_id, participant_id, assignment_id, reviewee_id)
Method view_completed_question
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def view_completed_question(count, answer, questionnaire_max, tag_prompt_deployments = nil, current_user = nil)
Method topic_due
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def topic_due(type, time, topic_id, round, review_allowed_id = 3)
Method get_lock
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def self.get_lock(lockable, user, timeout)
return nil if lockable.nil? || user.nil?
lock = find_by(lockable: lockable)
return create_lock(lockable, user, timeout) if lock.nil?
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method import
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def self.import(row_hash, _row_header = nil, session, id)
raise ArgumentError, 'No user id has been specified.' if row_hash.empty?
user = User.find_by(name: row_hash[:username])
if user.nil?
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function GenCell
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
function GenCell(pValue,pHighLight,pColor)//Generate table cell with value
{
var PValue;
var PCellStr;
var vColor;
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method markup_content
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def markup_content
markup = markup_style
if markup && markup.name
if markup.name == 'Textile'
RedCloth.new(content).to_html(:textile)
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function getSelectedName
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
function getSelectedName(){
var tbl = document.getElementById("file_table");
var numChecks = 0;
for(i=0; i<document.forms[2].elements.length; i++){
if(document.forms[2].elements[i].type=="radio" &&
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method import
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def self.import(row_hash, session, _id = nil)
raise 'Not enough items: expect 2 or more columns: Topic Identifier, User Name 1, User Name 2, ...' if row_hash.length < 2
imported_topic = SignUpTopic.where(topic_identifier: row_hash[:topic_identifier], assignment_id: session[:assignment_id]).first
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function expandtab
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
expandtab:function(tabref){
var relattrvalue=tabref.getAttribute("rel")
//Get "rev" attr as a string of IDs in the format ",john,george,trey,etc," to easy searching through
var associatedrevids=(tabref.getAttribute("rev"))? ","+tabref.getAttribute("rev").replace(/\s+/, "")+"," : ""
if (relattrvalue=="#default")
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method create_or_update_tag_prompt_deployments
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def create_or_update_tag_prompt_deployments(questionnaire_id, value)
(0..value['tag_prompt'].count - 1).each do |i|
tag_dep = nil
tag_params = {
assignment_id: @assignment.id,
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method rubric_weight_error
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def rubric_weight_error(attributes)
error = false
attributes[:assignment_questionnaire].each do |assignment_questionnaire|
# Check rubrics to make sure weight is 0 if there are no Scored Questions
scored_questionnaire = false
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method copy_questionnaire_details
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def self.copy_questionnaire_details(params, instructor_id)
orig_questionnaire = Questionnaire.find(params[:id])
questions = Question.where(questionnaire_id: params[:id])
questionnaire = orig_questionnaire.dup
questionnaire.instructor_id = instructor_id
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"