Skip to content
Permalink
Browse files

MDL-44148 portfolio: set_user_config usage fix

Amended user/portfolio.php's use of portfolio_plugin_base::set_user_config to be consistent with the API.
  • Loading branch information...
Jetha Chan
Jetha Chan committed Mar 18, 2014
1 parent 872f4e2 commit 3a1237997a327f8d39328ea8efb8701e8b24b1e7
Showing with 5 additions and 9 deletions.
  1. +5 −9 user/portfolio.php
@@ -77,15 +77,11 @@
if (!confirm_sesskey()) {
print_error('confirmsesskeybad', '', $baseurl);
}
//this branch is where you process validated data.
$success = $instance->set_user_config($fromform, $USER->id);
//$success = $success && $instance->save();
if ($success) {
core_plugin_manager::reset_caches();
redirect($baseurl, get_string('instancesaved', 'portfolio'), 3);
} else {
print_error('instancenotsaved', 'portfolio', $baseurl);
}
// This branch is where you process validated data.
$instance->set_user_config($fromform, $USER->id);
core_plugin_manager::reset_caches();
redirect($baseurl, get_string('instancesaved', 'portfolio'), 3);
exit;
} else {
echo $OUTPUT->heading(get_string('configplugin', 'portfolio'));

0 comments on commit 3a12379

Please sign in to comment.
You can’t perform that action at this time.