]> git.mjollnir.org Git - moodle.git/commitdiff
The "Add" block is now called "Blocks" ... other block admin stuff can
authormoodler <moodler>
Tue, 27 Apr 2004 09:30:44 +0000 (09:30 +0000)
committermoodler <moodler>
Tue, 27 Apr 2004 09:30:44 +0000 (09:30 +0000)
go in this block later.

course/format/social/format.php
course/format/topics/format.php
course/format/weeks/format.php
lang/en/moodle.php
lib/blocklib.php

index 4cf24743207a89d0df2be9f9603ad753ba98ac95..47d8dce41103ecfb2deb8ec9e4abcef7625e522d 100644 (file)
@@ -56,7 +56,7 @@
     if(block_have_active($rightblocks) || $editing) {
       echo '<td style="vertical-align: top; width: '.$preferred_width_right.'px;">';
       if ($editing && !empty($missingblocks)) {
-          block_print_add_block($course->id, $missingblocks);
+          block_print_blocks_admin($course->id, $missingblocks);
       }
       print_course_blocks($course, $rightblocks, BLOCK_RIGHT);
       print_spacer(1, 120, true);
index 29b83a25e4a7c8e852458edb56a638340f8f501b..12b303f77cc6f2a0551b410f11305458c78b9b53 100644 (file)
     if(block_have_active($rightblocks) || $editing) {
         echo '<td style="vertical-align: top; width: '.$preferred_width_right.'px;">';
         if ($editing && !empty($missingblocks)) {
-            block_print_add_block($course->id, $missingblocks);
+            block_print_blocks_admin($course->id, $missingblocks);
         }
         print_course_blocks($course, $rightblocks, BLOCK_RIGHT);
         print_spacer(1, 120, true);
index 921b8ea84abdf9aebff0344803d1ec11fde32fe2..2ddec0a01a6c322507472618ff9e9a2ab5e98d93 100644 (file)
     if(block_have_active($rightblocks) || $editing) {
         echo '<td style="vertical-align: top; width: '.$preferred_width_right.'px;">';
         if ($editing && !empty($missingblocks)) {
-            block_print_add_block($course->id, $missingblocks);
+            block_print_blocks_admin($course->id, $missingblocks);
         }
         print_course_blocks($course, $rightblocks, BLOCK_RIGHT);
         print_spacer(1, 120, true);
index 63c9f24641b475b48e1ddbb6eea9c1de61fe3426..7c2e874edb274e9dee425525783891a412c1d87f 100644 (file)
@@ -100,6 +100,7 @@ $string['backupsavetohelp'] = 'Full path to the directory where you want to save
 $string['backupuserfileshelp'] = 'Choose whether user files (eg profile images) should be included in automated backups';
 $string['backupusershelp'] = 'Select whether you want to include all the users in the server or only the needed users for each course';
 $string['backupversion'] = 'Backup Version';
+$string['blocks'] = 'Blocks';
 $string['blocksetup'] = 'Setting up block tables';
 $string['blocksuccess'] = '$a tables have been set up correctly';
 $string['bycourseorder'] = 'By course order';
index 7453f1ba669af5ab9a26edacb3919d029667f967..29f1c54c891d67bd45a29517c3bcb629cecd15b0 100644 (file)
@@ -312,23 +312,25 @@ function block_find($blockid, $leftblocks, $rightblocks) {
     return false;
 }
 
-//This function prints the add_block popup as necessary
-function block_print_add_block($courseid, $missingblocks) {
+//This function prints the block to admin blocks as necessary
+function block_print_blocks_admin($courseid, $missingblocks) {
     if (isediting($courseid)) {
-        $title = get_string('add');
-        if(!empty($missingblocks)) {
+        $strblocks = get_string('blocks');
+        $stradd    = get_string('add');
+        if (!empty($missingblocks)) {
             $blockdata = get_records_list('blocks', 'id', implode(',', $missingblocks));
-            if($blockdata !== false) {
-                foreach($blockdata as $block) {
+            if ($blockdata !== false) {
+                foreach ($blockdata as $block) {
                     $blockobject = block_instance($block->name, NULL);
-                    if($blockobject === false) {
+                    if ($blockobject === false) {
                         continue;
                     }
                     $menu[$block->id] = $blockobject->get_title();
                 }
-                $content = popup_form('view.php?id='.$courseid.'&amp;blockaction=add&amp;blockid=',$menu,'add_block','','choose','','',true);
+                $content = popup_form('view.php?id='.$courseid.'&amp;blockaction=add&amp;blockid=',
+                                      $menu, 'add_block', '', "$stradd...", '', '', true);
                 $content = '<div align="center">'.$content.'</div>';
-                print_side_block($title, $content, NULL, NULL, NULL);
+                print_side_block($strblocks, $content, NULL, NULL, NULL);
             }
         }
     }