MDL-64820 portfolio: add url return for portfolio_add_button to_html
This commit is contained in:
@@ -200,3 +200,9 @@ define('PORTFOLIO_ADD_TEXT_LINK', 4);
|
||||
* this replaces the old portfolio_fake_add_url function
|
||||
*/
|
||||
define('PORTFOLIO_ADD_FAKE_URL', 5);
|
||||
|
||||
/**
|
||||
* PORTFOLIO_ADD_MOODULE_URL - hacky way to turn the button class into a moodle_url to redirect to
|
||||
* this replaces the old portfolio_fake_add_url function
|
||||
*/
|
||||
define('PORTFOLIO_ADD_MOODLE_URL', 6);
|
||||
|
||||
@@ -327,6 +327,11 @@ class portfolio_add_button {
|
||||
return;
|
||||
}
|
||||
}
|
||||
// If we just want a moodle_url to redirect to, do it now.
|
||||
if ($format == PORTFOLIO_ADD_MOODLE_URL) {
|
||||
return $url;
|
||||
}
|
||||
|
||||
// if we just want a url to redirect to, do it now
|
||||
if ($format == PORTFOLIO_ADD_FAKE_URL) {
|
||||
return $url->out(false);
|
||||
|
||||
Reference in New Issue
Block a user