class Moodle2CC::CanvasCC::Models::Page
Constants
- BOOK_PATH
- EDITING_ROLE_TEACHER
- MAX_URL_LENGTH
- PAGE_ID_POSTFIX
- WIKI_CONTENT
Attributes
body[RW]
editing_roles[RW]
title[RW]
workflow_state[RW]
Public Class Methods
convert_name_to_url(name)
click to toggle source
# File lib/moodle2cc/canvas_cc/models/page.rb, line 31 def self.convert_name_to_url(name) url = CGI::escape(name.downcase.gsub(/\s/, '-').gsub('.', 'dot')) if url.length > MAX_URL_LENGTH url = url[0,MAX_URL_LENGTH][/.{0,#{MAX_URL_LENGTH}}/mu] end url end
new()
click to toggle source
Calls superclass method
Moodle2CC::CanvasCC::Models::Resource::new
# File lib/moodle2cc/canvas_cc/models/page.rb, line 14 def initialize super @type = WEB_CONTENT_TYPE end
Public Instance Methods
identifier()
click to toggle source
# File lib/moodle2cc/canvas_cc/models/page.rb, line 23 def identifier @identifier end
identifier=(identifier)
click to toggle source
# File lib/moodle2cc/canvas_cc/models/page.rb, line 19 def identifier=(identifier) @identifier = identifier end
page_name=(name)
click to toggle source
# File lib/moodle2cc/canvas_cc/models/page.rb, line 27 def page_name= name @title = name end