Class: Moodle2CC::Moodle2Converter::GlossaryConverter
- Inherits:
-
Object
- Object
- Moodle2CC::Moodle2Converter::GlossaryConverter
- Includes:
- ConverterHelper
- Defined in:
- lib/moodle2cc/moodle2converter/glossary_converter.rb
Constant Summary
Constants included from ConverterHelper
ConverterHelper::ACTIVITY_LOOKUP, ConverterHelper::ASSESSMENT_SUFFIX, ConverterHelper::ASSIGNMENT_SUFFIX, ConverterHelper::CHAPTER_SUFFIX, ConverterHelper::CHOICE_ASSESSMENT_SUFFIX, ConverterHelper::COURSE_SUFFIX, ConverterHelper::DISCUSSION_SUFFIX, ConverterHelper::EXTERNAL_URL_SUFFIX, ConverterHelper::FEEDBACK_ASSESSMENT_SUFFIX, ConverterHelper::FILE_SUFFIX, ConverterHelper::FOLDER_SUFFIX, ConverterHelper::GLOSSARY_SUFFIX, ConverterHelper::INTRO_SUFFIX, ConverterHelper::LTI_SUFFIX, ConverterHelper::MAX_TITLE_LENGTH, ConverterHelper::MODULE_SUFFIX, ConverterHelper::PAGE_SUFFIX, ConverterHelper::QUESTIONNAIRE_ASSESSMENT_SUFFIX, ConverterHelper::QUESTION_BANK_SUFFIX, ConverterHelper::SUMMARY_PAGE_SUFFIX
Instance Method Summary collapse
- #convert(moodle_glossary) ⇒ Object
-
#initialize(moodle_course) ⇒ GlossaryConverter
constructor
A new instance of GlossaryConverter.
Methods included from ConverterHelper
#activity_content_type, #generate_unique_identifier, #generate_unique_identifier_for, #generate_unique_identifier_for_activity, #generate_unique_resource_path, #get_unique_identifier_for_activity, #truncate_text, #workflow_state
Constructor Details
#initialize(moodle_course) ⇒ GlossaryConverter
Returns a new instance of GlossaryConverter.
5 6 7 |
# File 'lib/moodle2cc/moodle2converter/glossary_converter.rb', line 5 def initialize(moodle_course) @moodle_course = moodle_course end |
Instance Method Details
#convert(moodle_glossary) ⇒ Object
9 10 11 12 13 14 15 16 17 18 |
# File 'lib/moodle2cc/moodle2converter/glossary_converter.rb', line 9 def convert(moodle_glossary) canvas_page = Moodle2CC::CanvasCC::Models::Page.new canvas_page.identifier = generate_unique_identifier_for_activity(moodle_glossary) canvas_page.page_name = moodle_glossary.name canvas_page.workflow_state = 'active' canvas_page.editing_roles = 'teachers,students' canvas_page.body = generate_body(moodle_glossary) canvas_page.workflow_state = workflow_state(moodle_glossary.visible) canvas_page end |