Module: TinCanApi::InteractionType

Extended by:
Enum
Included in:
ActivityDefinition
Defined in:
lib/tin_can_api/interaction_type.rb

Overview

Possible interaction types

Constant Summary collapse

CHOICE =
{
    to_s: 'choice',
    get_value: proc{'choice'}
}
SEQUENCING =
{
    to_s: 'sequencing',
    get_value: proc{'sequencing'}
}
LIKERT =
{
    to_s: 'likert',
    get_value: proc{'likert'}
}
MATCHING =
{
    to_s: 'matching',
    get_value: proc{'matching'}
}
PERFORMANCE =
{
    to_s: 'performance',
    get_value: proc{'performance'}
}
TRUE_FALSE =
{
    to_s: 'true-false',
    get_value: proc{'true-false'}
}
FILL_IN =
{
    to_s: 'fill-in',
    get_value: proc{'fill-in'}
}
NUMERIC =
{
    to_s: 'numeric',
    get_value: proc{'numeric'}
}
OTHER =
{
    to_s: 'other',
    get_value: proc{'other'}
}

Constants included from Enum

Enum::CONVERT_PROC

Instance Method Summary collapse

Methods included from Enum

extended

Instance Method Details

#type_by_string(type) ⇒ Object



51
52
53
# File 'lib/tin_can_api/interaction_type.rb', line 51

def type_by_string(type)
  values.select{|v| v.to_s == type}.first
end