function test_set_formats() {
$button = new portfolio_add_button();
- $button->set_callback_options('assignment_portfolio_caller', array('id' => 6), '/mod/assignment/lib.php');
+ $button->set_callback_options('assignment_portfolio_caller', array('id' => 6), '/mod/assignment/locallib.php');
$formats = array(PORTFOLIO_FORMAT_FILE, PORTFOLIO_FORMAT_IMAGE);
$button->set_formats($formats);
$output .= '<br />';
}
if (count($files) > 1 && $this->portfolio_exportable() && has_capability('mod/assignment:exportownsubmission', $this->context)) {
- $button->set_callback_options('assignment_portfolio_caller', array('id' => $this->cm->id));
+ $button->set_callback_options('assignment_portfolio_caller', array('id' => $this->cm->id), '/mod/assignment/locallib.php');
$output .= '<br />' . $button->to_html();
}
}
$text = file_rewrite_pluginfile_urls($submission->data1, 'pluginfile.php', $this->context->id, 'assignment_online_submission', $this->assignment->id);
echo format_text($text, $submission->data2);
$button = new portfolio_add_button();
- $button->set_callback_options('assignment_portfolio_caller', array('id' => $this->cm->id), '/mod/assignment/lib.php');
+ $button->set_callback_options('assignment_portfolio_caller', array('id' => $this->cm->id), '/mod/assignment/locallib.php');
$button->set_formats(PORTFOLIO_FORMAT_PLAINHTML); //TODO this might have files?
$button->render();
} else if (!has_capability('mod/assignment:submit', $context)) { //fix for #4604
}
if (has_capability('mod/assignment:exportownsubmission', $this->context)) {
- $button->set_callback_options('assignment_portfolio_caller', array('id' => $this->cm->id, 'fileid' => $file->get_id()), '/mod/assignment/lib.php');
+ $button->set_callback_options('assignment_portfolio_caller', array('id' => $this->cm->id, 'fileid' => $file->get_id()), '/mod/assignment/locallib.php');
$button->set_format_by_file($file);
$output .= $button->to_html(PORTFOLIO_ADD_ICON_LINK);
}
$output .= '<br />';
}
if (count($files) > 1 && has_capability('mod/assignment:exportownsubmission', $this->context)) {
- $button->set_callback_options('assignment_portfolio_caller', array('id' => $this->cm->id), '/mod/assignment/lib.php');
+ $button->set_callback_options('assignment_portfolio_caller', array('id' => $this->cm->id), '/mod/assignment/locallib.php');
$button->reset_formats(); // reset what we set before, since it's multi-file
$output .= $button->to_html();
}