Allowing tools be added even if none exist
authorChris Scribner <scriby@gmail.com>
Thu, 1 Sep 2011 17:26:37 +0000 (13:26 -0400)
committerChris Scribner <scriby@gmail.com>
Mon, 7 Nov 2011 01:41:48 +0000 (20:41 -0500)
mod/lti/settings.php

index 169c542..92193ff 100644 (file)
@@ -60,11 +60,11 @@ function blti_get_tool_table($tools, $id){
     $action = get_string('action', 'lti');\r
     $createdon = get_string('createdon', 'lti');\r
     \r
+    if($id == 'lti_configured'){\r
+        $html .= '<a style="margin-top:.25em" href="'.$CFG->wwwroot.'/mod/lti/typessettings.php?action=add&amp;sesskey='.$USER->sesskey.'">'.get_string('addtype', 'lti').'</a>';\r
+    }\r
+    \r
     if (!empty($tools)) {\r
-        if($id == 'lti_configured'){\r
-            $html .= '<a style="margin-top:.25em" href="'.$CFG->wwwroot.'/mod/lti/typessettings.php?action=add&amp;sesskey='.$USER->sesskey.'">'.get_string('addtype', 'lti').'</a>';\r
-        }\r
-        \r
         $html .= <<<HTML\r
         <div id="{$id}_container" style="margin-top:.5em;margin-bottom:.5em">\r
             <table id="{$id}_tools">\r