public function col_select(\tool_monitor\rule $rule) {
        global $OUTPUT;

        $options = $rule->get_subscribe_options($this->courseid);
        $text = get_string('subscribeto', 'tool_monitor', $rule->get_name($this->context));

        if ($options instanceof \single_select) {
            $options->set_label($text, array('class' => 'accesshide'));
            return $OUTPUT->render($options);
        } else if ($options instanceof \moodle_url) {
            // A \moodle_url to subscribe.
            $icon = $OUTPUT->pix_icon('t/add', $text);
            $link = new \action_link($options, $icon);
            return $OUTPUT->render($link);
        } else {
            return $options;
        }
    }
public function col_select(\tool_monitor\rule $rule) {
        global $OUTPUT;

        $options = $rule->get_subscribe_options($this->courseid);
        $text = get_string('subscribeto', 'tool_monitor', $rule->get_name($this->context));

        if ($options instanceof \single_select) {
            $options->set_label($text, array('class' => 'accesshide'));
            return $OUTPUT->render($options);
        } else if ($options instanceof \moodle_url) {
            // A \moodle_url to subscribe.
            $icon = $OUTPUT->pix_icon('t/add', $text);
            $link = new \action_link($options, $icon);
            return $OUTPUT->render($link);
        } else {
            return $options;
        }
    }
public function col_select ( \ tool_monitor \ rule $ rule ) { global $ OUTPUT ; $ options = $ rule -> get_subscribe_options ( $ this -> courseid ) ; $ text = get_string ( 'subscribeto' , 'tool_monitor' , $ rule -> get_name ( $ this -> context ) ) ; if ( $ options instanceof \ single_select ) { $ options -> set_label ( $ text , array ( 'class' => 'accesshide' ) ) ; return $ OUTPUT -> render ( $ options ) ; } else if ( $ options instanceof \ moodle_url ) { // A \moodle_url to subscribe. $ icon = $ OUTPUT -> pix_icon ( 't/add' , $ text ) ; $ link = new \ action_link ( $ options , $ icon ) ; return $ OUTPUT -> render ( $ link ) ; } else { return $ options ; } }
Generate content for select column.

@param \tool_monitor\rule $rule rule object
@return string html used to display the select field.
Generate content for select column .