Пример #1
0
    def run(self):
        config = self.state.document.settings.env.config

        height = common.get_parameter_value(config, self.options, "height", "embedded_video_height")
        width = common.get_parameter_value(config, self.options, "width", "embedded_video_width")

        vformat = common.get_parameter_value(config, self.options, "format", "embedded_video_format")

        element_id = "embedded-video-%s" % self.state.document.settings.env.new_serialno("embedded-video")

        return [embedded_video(args=self.arguments, element_id=element_id, height=height, width=width, format=vformat)]
    def run(self):
        config = self.state.document.settings.env.config

        # Submit button text
        button_name = \
            common.get_parameter_value(config,
                                       self.options,
                                       'button_name',
                                       "instructor_feedback_submit_button_name",
                                       False)

        # Number of rows and columns in the text area
        rows = common.get_parameter_value(config, self.options, 'rows',
                                          "instructor_feedback_rows", False)

        columns = common.get_parameter_value(config, self.options, 'columns',
                                             "instructor_feedback_columns",
                                             False)

        # Get the path to the static directory containing the images
        p_to_static = common.get_relative_path_to_static(self.state.document)

        # Text to include in the form
        text = common.get_parameter_value(config, self.options, 'text',
                                          "instructor_feedback_text", False)

        # Create the form node
        result = html_form.html_form(args=self.arguments,
                                     button_name=button_name,
                                     p_to_static=p_to_static)

        # Add an input field containing the event-name
        result += html_form.html_input(args=['event-name'],
                                       el_type='hidden',
                                       checked='',
                                       maxlength='',
                                       value='instructor-session-feedback')

        # And the default text.
        result += html_form.html_textarea(args=["msg"],
                                          rows=rows,
                                          columns=columns,
                                          text=text)
        return [result]
    def run(self):
        config = self.state.document.settings.env.config

        # Submit button text
        button_name = \
            common.get_parameter_value(config, 
                                       self.options, 
                                       'button_name',
                                       "instructor_feedback_submit_button_name",
                                       False)

        # Number of rows and columns in the text area
        rows = common.get_parameter_value(config, self.options, 'rows',
                                   "instructor_feedback_rows", False)

        columns = common.get_parameter_value(config, self.options, 'columns',
                                   "instructor_feedback_columns", False)
        
        # Get the path to the static directory containing the images
        p_to_static = common.get_relative_path_to_static(self.state.document)

        # Text to include in the form
        text = common.get_parameter_value(config, self.options, 'text', 
                                   "instructor_feedback_text", False)
        
        # Create the form node
        result = html_form.html_form(args = self.arguments, 
                                     button_name = button_name,
                                     p_to_static = p_to_static)
        
        # Add an input field containing the event-name
        result += html_form.html_input(args = ['event-name'], 
                                       el_type = 'hidden', 
                                       checked = '',
                                       maxlength = '',
                                       value = 'instructor-session-feedback')

        # And the default text.
        result += html_form.html_textarea(args = ["msg"], 
                                          rows = rows, 
                                          columns = columns, text = text)
        return [result]
Пример #4
0
    def run(self):
        config = self.state.document.settings.env.config

        height = common.get_parameter_value(config, self.options, 'height',
                                            'embedded_video_height')
        width = common.get_parameter_value(config, self.options, 'width',
                                           'embedded_video_width')

        vformat = common.get_parameter_value(config, self.options, 'format',
                                             'embedded_video_format')

        element_id = 'embedded-video-%s' % \
            self.state.document.settings.env.new_serialno('embedded-video')

        return [
            embedded_video(args=self.arguments,
                           element_id=element_id,
                           height=height,
                           width=width,
                           format=vformat)
        ]
Пример #5
0
    def run(self):
        config = self.state.document.settings.env.config

        # Get the labels
        title = common.get_parameter_value(config, self.options, 'title',
                                           "xy_click_title", False)
        top_label = common.get_parameter_value(config, self.options, 'top',
                                               "xy_click_top_label", False)
        bottom_label = common.get_parameter_value(config, self.options,
                                                  'bottom',
                                                  "xy_click_bottom_label",
                                                  False)
        left_label = common.get_parameter_value(config, self.options, 'left',
                                                "xy_click_left_label", False)
        right_label = common.get_parameter_value(config, self.options, 'right',
                                                 "xy_click_right_label", False)

        # Get the size
        grid_size = common.get_parameter_value(config, self.options, 'size',
                                               "xy_click_grid_size", False)

        # Get the path to the static directory containing the images
        p_to_static = common.get_relative_path_to_static(self.state.document)

        return [
            XyClickNode(args=self.arguments,
                        title=title,
                        top_label=top_label,
                        bottom_label=bottom_label,
                        left_label=left_label,
                        right_label=right_label,
                        size=grid_size,
                        p_to_static=p_to_static)
        ]
Пример #6
0
    def run(self):
        config = self.state.document.settings.env.config

        # Phrase to prefix the value
        phrase = common.get_parameter_value(config, self.options, 'phrase',
                                            "activity_duration_phrase", False)

        # Get the path to the static directory containing the images
        p_to_static = common.get_relative_path_to_static(self.state.document)

        return [activity_duration(args = self.arguments,
                                  phrase = phrase,
                                  p_to_static = p_to_static)]
    def run(self):
        config = self.state.document.settings.env.config

        # Phrase to prefix the value
        phrase = common.get_parameter_value(config, self.options, 'phrase',
                                            "activity_duration_phrase", False)

        # Get the path to the static directory containing the images
        p_to_static = common.get_relative_path_to_static(self.state.document)

        return [
            activity_duration(args=self.arguments,
                              phrase=phrase,
                              p_to_static=p_to_static)
        ]
Пример #8
0
    def run(self):
        config = self.state.document.settings.env.config

        # Submit button text
        button_name = common.get_parameter_value(
            config, self.options, "button_name", "html_form_submit_button_name", False
        )

        # Get the path to the static directory containing the images
        p_to_static = common.get_relative_path_to_static(self.state.document)

        new_node = html_form(args=self.arguments, button_name=button_name, p_to_static=p_to_static)

        # Parse the nested content
        self.state.nested_parse(self.content, self.content_offset, new_node)

        return [new_node]
Пример #9
0
    def run(self):
        config = self.state.document.settings.env.config

        # Submit button text
        button_name = \
            common.get_parameter_value(config,
                                       self.options,
                                       'button_name',
                                       "html_form_submit_button_name",
                                       False)

        # Get the path to the static directory containing the images
        p_to_static = common.get_relative_path_to_static(self.state.document)

        new_node = html_form(args=self.arguments,
                             button_name=button_name,
                             p_to_static=p_to_static)

        # Parse the nested content
        self.state.nested_parse(self.content, self.content_offset, new_node)

        return [new_node]