this.client_id = args.client_id;
this.itemid = args.itemid;
this.commentarea = args.commentarea;
+ this.component = args.component;
this.courseid = args.courseid;
this.contextid = args.contextid;
this.env = args.env;
params['area'] = this.commentarea;
params['courseid'] = this.courseid;
params['contextid'] = this.contextid;
+ params['component'] = this.component;
if (args['params']) {
for (i in args['params']) {
params[i] = args['params'][i];
$content = optional_param('content', '', PARAM_RAW);
$itemid = optional_param('itemid', '', PARAM_INT);
$page = optional_param('page', 0, PARAM_INT);
+$component = optional_param('component', '', PARAM_ALPHAEXT);
echo $OUTPUT->header(); // send headers
$args->area = $area;
$args->itemid = $itemid;
$args->client_id = $client_id;
+ $args->component = $component;
$manager = new comment($args);
} else {
die;
}
public function set_component($component) {
+ $this->component = $component;
list($this->plugintype, $this->pluginname) = normalize_component($component);
return null;
}
$options->courseid = $this->courseid;
$options->contextid = $this->contextid;
$options->env = $this->env;
+ $options->component = $this->component;
if ($this->env == 'block_comments') {
$options->notoggle = true;
$options->autostart = true;