]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-14591 - use new warning form element rather than static when configuring a broken...
authormjollnir_ <mjollnir_>
Tue, 2 Sep 2008 12:56:23 +0000 (12:56 +0000)
committermjollnir_ <mjollnir_>
Tue, 2 Sep 2008 12:56:23 +0000 (12:56 +0000)
lib/portfoliolib.php

index 3fb6dc21cd4c558034724136a446fd0f333bb138..df755aecb8bc1f9efb0a91fd3d9fd4393d19c49a 100644 (file)
@@ -1734,10 +1734,8 @@ final class portfolio_admin_form extends moodleform {
             }
         }
 
-
-        if (isset($result) && is_string($result)) { // something went wrong, stop
-            $mform->addElement('static', 'insane', '', get_string($result, 'portfolio_' . $this->plugin)); //, get_string($result, 'portfolio_' . $this->plugin));
-            //throw new portfolio_exception($result, 'portfolio_' . $this->plugin, $CFG->wwwroot . '/' . $CFG->admin . '/portfolio.php');
+        if (isset($result) && is_string($result)) { // something went wrong, warn...
+            $mform->addElement('warning', 'insane', null, get_string($result, 'portfolio_' . $this->plugin));
         }
 
         $mform->addElement('text', 'name', get_string('name'), 'maxlength="100" size="30"');