portfolio api MDL-14591 fixing small bugs and removing debugging

This commit is contained in:
Penny Leach
2010-05-02 18:00:52 +00:00
parent 028e1e4f55
commit 9d429f0bae
3 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -84,7 +84,7 @@ abstract class portfolio_caller_base {
foreach ($expected as $key => $required) {
if (!array_key_exists($key, $callbackargs)) {
if ($required) {
$a = (object)array('key' => $key, 'class' => get_class($this));
$a = (object)array('arg' => $key, 'class' => get_class($this));
throw new portfolio_caller_exception('missingcallbackarg', 'portfolio', null, $a);
}
continue;
+1 -1
View File
@@ -639,7 +639,7 @@ class portfolio_exporter {
} else {
if (!$r = $DB->get_record('portfolio_tempdata', array('id' => $this->id))) {
if (!$this->deleted) {
debugging("tried to save current object, but failed - see MDL-20872");
//debugging("tried to save current object, but failed - see MDL-20872");
}
return;
}
+2 -2
View File
@@ -136,13 +136,13 @@ class portfolio_add_button {
$file = substr($backtrace[0]['file'], strlen($CFG->dirroot));
} else if (!is_readable($CFG->dirroot . $file)) {
throw new portfolio_button_exception('nocallbackfile', 'portfolio', $file);
throw new portfolio_button_exception('nocallbackfile', 'portfolio', '', $file);
}
$this->callbackfile = $file;
require_once($CFG->libdir . '/portfolio/caller.php'); // require the base class first
require_once($CFG->dirroot . $file);
if (!class_exists($class)) {
throw new portfolio_button_exception('nocallbackclass', 'portfolio', $class);
throw new portfolio_button_exception('nocallbackclass', 'portfolio', '', $class);
}
// this will throw exceptions