Ver Fonte

Creación del repositorio

Damian Zhaoying há 2 anos atrás
commit
e1913b0109

+ 12 - 0
README.txt

@@ -0,0 +1,12 @@
+SLOODLE Menu Block
+
+This is an optional menu block is available showing students' avatar information and helping people navigate to SLOODLE tools in Moodle.
+
+It requires the main SLOODLE module:
+https://github.com/sloodle/moodle-mod_sloodle
+
+It should be installed under the blocks/ directory of your Moodle site.
+
+See http://www.sloodle.org for more information, and post any questions or comments in the forums there.
+
+Edmund Edgar, 2012-05-19

+ 209 - 0
block_sloodle_menu.php

@@ -0,0 +1,209 @@
+<?php
+
+/**
+* Defines the Sloodle menu block class.
+* 
+* @package sloodle
+* @contributor Peter R. Bloomfield
+*/
+
+/** Include the current Sloodle configuration, if possible. */
+@include_once($CFG->dirroot .'/mod/sloodle/sl_config.php');
+if (defined('SLOODLE_LIBROOT')) {
+    /** Inlcude the current general Sloodle functionality. */
+    require_once(SLOODLE_LIBROOT.'/general.php');
+    /** Include the Sloodle course functionality. */
+    require_once(SLOODLE_LIBROOT.'/course.php');
+}
+
+/** Include the old Sloodle configuration, in case the module is out-dated. */
+if (!defined('SLOODLE_VERSION')) {
+    @include_once($CFG->dirroot .'/mod/sloodle/config.php');
+    if (defined('SLOODLE_DIRROOT')) {
+        /** Include the old general Sloodle functionality. */
+        require_once(SLOODLE_DIRROOT.'/lib/sl_generallib.php');
+    }
+}
+
+/** Define the Sloodle Menu Block version. */
+define('SLOODLE_MENU_VERSION', 2.0);
+
+/**
+* Defines the block class.
+* @package sloodle
+*/
+class block_sloodle_menu extends block_base {
+
+    /**
+    * Perform block initialisation.
+    * @return void
+    */
+    function init() {
+        global $CFG;
+        
+        $this->title = get_string('blockname', 'block_sloodle_menu');
+        $this->content_type = BLOCK_TYPE_TEXT;
+        $this->version = 2010110311;
+    }
+    
+    /**
+    * Indicates whether or not this module has a global configuration page.
+    * @return bool True if there is a global configuration page, or false otherwise.
+    */
+    function has_config() {
+        return false;
+    }
+    
+    /**
+    * Indicates whether or not to hide the header of this block.
+    * @return bool True to hide the header, or false to show it.
+    */
+    function hide_header() {
+        return false;
+    }
+
+    /**
+    * Defines *and* returns the content of this block.
+    * @return object
+    */
+    function get_content() {
+        global $CFG, $COURSE, $USER;
+        
+        // Construct the content
+        $this->content = new stdClass;
+        $this->content->text = '';
+        $this->content->footer = '';
+        
+        // If no course has been specified, then we are using the site course
+        if (!isset($COURSE)) {
+            $COURSE = get_site();
+        }
+        
+        // If the user is not logged in or if they are using guest access, then we can't show anything
+        if (!isloggedin() || isguestuser()) {
+            return $this->content;
+        }
+        
+        // Get the context instance for this course
+        $course_context = get_context_instance(CONTEXT_COURSE, $COURSE->id);
+        
+        // This version of the menu isn't compatible with older version of the Sloodle module
+        if (defined('SLOODLE_VERSION') && SLOODLE_VERSION < 0.4) {
+            $this->content->text = get_string('oldmodule', 'block_sloodle_menu');
+            return $this->content;
+        }
+        
+        // Has the Sloodle activity module been installed?
+        if (!(function_exists("sloodle_is_installed") && sloodle_is_installed())) {
+            $this->content->text = get_string('sloodlenotinstalled', 'block_sloodle_menu');
+            return $this->content;
+        }
+        
+        // Get the Sloodle course data
+        $sloodle_course = new SloodleCourse();
+        if (!$sloodle_course->load((int)$COURSE->id)) {
+            $this->content->text = get_string('failedloadcourse', 'block_sloodle_menu');
+            return $this->content;
+        }
+        
+        // Add the Sloodle and Sloodle Menu version info to the footer of the block
+        $this->content->footer = '<span style="color:#565656;font-style:italic; font-size:10pt;">'.get_string('sloodlemenuversion', 'block_sloodle_menu').': '.(string)SLOODLE_MENU_VERSION.'</span>';
+        $this->content->footer .= '<br/><span style="color:#888888;font-style:italic;font-size:8pt;">'.get_string('sloodleversion', 'block_sloodle_menu').': '.(string)SLOODLE_VERSION.'</span>';
+        
+        // Attempt to find a Sloodle user for the Moodle user
+        $dbquery = "    SELECT * FROM {$CFG->prefix}sloodle_users
+                        WHERE userid = ? AND NOT (avname = '' AND uuid = '')
+                    ";
+        $dbresult = sloodle_get_records_sql_params($dbquery, array($USER->id));
+        $sl_avatar_name = "";
+        if (!is_array($dbresult) || count($dbresult) == 0) $userresult = FALSE;
+        else if (count($dbresult) > 1) $userresult = "Multiple avatars associated with your Moodle account.";
+        else {
+            $userresult = TRUE;
+            reset($dbresult);
+            $cur = current($dbresult);
+            $sl_avatar_name = $cur->avname;
+        }
+        
+        if ($userresult === TRUE) {
+            // Success
+            // Make sure there was a name
+            if (empty($sl_avatar_name)) $sl_avatar_name = '('.get_string('nameunknown', 'block_sloodle_menu').')';
+            $this->content->text .= '<center><span style="font-size:10pt;font-style:italic;color:#777777;">'.get_string('youravatar', 'block_sloodle_menu').':</span><br/>';
+            
+            // Make the avatar name a link if the user management page exists
+            $this->content->text .= "<a href=\"{$CFG->wwwroot}/mod/sloodle/view.php?_type=user&amp;id={$USER->id}&amp;course={$COURSE->id}\">$sl_avatar_name</a>";
+            $this->content->text .= '<br/></center>';
+            
+        } else if (is_string($userresult)) {
+            // An error occurred
+            $this->content->text .= '<center><span style="font-size:10pt;font-style:italic;color:#777777;">'.get_string('youravatar', 'block_sloodle_menu').':</span><br/>ERROR ('.$userresult.')</center>';
+            
+        } else {
+            // No avatar linked yet
+            $this->content->text .= '<center><span style="font-style:italic;">('.get_string('noavatar', 'block_sloodle_menu').')</span></center>';
+        }
+        
+        // Add links to common Sloodle stuff
+        $this->content->text .= '<div style="padding:1px; margin-top:4px; margin-bottom:4px; border-top:solid 1px #cccccc; border-bottom:solid 1px #cccccc;">';
+
+        // Add the Sloodle profile link
+        $this->content->text .= "<img src=\"{$CFG->wwwroot}/blocks/sloodle_menu/img/user.gif\" width=\"16\" height=\"16\"/> ";
+        $this->content->text .= "<a href=\"{$CFG->wwwroot}/mod/sloodle/view.php?_type=user&amp;id={$USER->id}&amp;course={$COURSE->id}\">".get_string('mysloodleprofile', 'block_sloodle_menu')."</a><br/>";
+
+        // Show a link to all Sloodle activities on this course
+        //TODO: possibly show number of visible Sloodle activities?
+        $this->content->text .= "<img src=\"{$CFG->wwwroot}/blocks/sloodle_menu/img/boxes.gif\" width=\"16\" height=\"16\"/> ";
+        $this->content->text .= "<a href=\"{$CFG->wwwroot}/mod/sloodle/index.php?id={$COURSE->id}\">".get_string('sloodleactivities', 'block_sloodle_menu')."</a><br/>";
+        
+        // Do we have LoginZone data for this course?
+        if ($sloodle_course->has_loginzone_data()) {
+            // Show a link to the LoginZone for this course
+            $this->content->text .= "<img src=\"{$CFG->wwwroot}/blocks/sloodle_menu/img/loginzone.gif\" width=\"16\" height=\"16\"/> ";
+            $this->content->text .= "<a href=\"{$CFG->wwwroot}/mod/sloodle/classroom/loginzone.php?id={$COURSE->id}\">".get_string('courseloginzone', 'block_sloodle_menu')."</a><br/>";
+        }
+        
+        //$this->content->text .= '<hr>';
+        
+        // Add a link for avatars list
+        $this->content->text .= "<img src=\"{$CFG->wwwroot}/blocks/sloodle_menu/img/user_mng.gif\" width=\"16\" height=\"16\"/> ";
+        $this->content->text .= "<a href=\"{$CFG->wwwroot}/mod/sloodle/view.php?_type=users&amp;course={$COURSE->id}\">".get_string('avatars', 'block_sloodle_menu')."</a><br/>";            
+        
+        // Add a link to Sloodle course settings, if the user can update the course
+        if (has_capability('moodle/course:update', $course_context)) {
+            $this->content->text .= "<img src=\"{$CFG->wwwroot}/blocks/sloodle_menu/img/page.gif\" width=\"16\" height=\"16\"/> ";
+            $this->content->text .= "<a href=\"{$CFG->wwwroot}/mod/sloodle/view.php?_type=course&amp;id={$COURSE->id}\">".get_string('editcourse', 'block_sloodle_menu')."</a><br>\n";
+        }
+        // Add a link to Sloodle logs, if the user can update the course
+        //if (has_capability('moodle/course:update', $course_context)) {
+            //$this->content->text .= "<img src=\"{$CFG->wwwroot}/blocks/sloodle_menu/img/notes.gif\" width=\"16\" height=\"16\"/> ";
+            //$this->content->text .= "<a href=\"{$CFG->wwwroot}/mod/sloodle/view.php?_type=logs&id={$COURSE->id}\">".get_string('logs:view', 'sloodle')."</a><br>\n";
+        //}
+        // Add a link to Sloodle Backpack
+        
+            $this->content->text .= "<img src=\"{$CFG->wwwroot}/blocks/sloodle_menu/img/coin.png\" width=\"16\" height=\"16\"/> ";
+            $this->content->text .= "<a href=\"{$CFG->wwwroot}/mod/sloodle/view.php?_type=backpack&id={$COURSE->id}\">".get_string('backpack:view', 'sloodle')."</a><br>\n";
+        
+        // Add a module configuration link if the user has authority to administer the module
+        if (has_capability('moodle/site:config', $course_context)) {
+            
+            // The address of the configuration page depends on our version of Moodle
+            if ($CFG->version < 2007101500) {
+                // < 1.9
+                $address = "/admin/module.php?module=sloodle";
+            } else {
+                // >= 1.9
+                $address = "/admin/settings.php?section=modsettingsloodle";
+            }
+        
+            $this->content->text .= "<img src=\"{$CFG->wwwroot}/blocks/sloodle_menu/img/configure.gif\" width=\"16\" height=\"16\"/> ";
+            $this->content->text .= "<a href=\"{$CFG->wwwroot}$address\">".get_string('sloodleconfig', 'block_sloodle_menu')."</a><br/>";
+        }
+        
+        $this->content->text .= '</div>';
+        
+        return $this->content;
+    }
+}
+
+?>

+ 82 - 0
config_global.html

@@ -0,0 +1,82 @@
+<?php
+    //require_once($CFG->dirroot .'/blocks/sloodle_menu/block_sloodle_menu.php');
+?>
+
+<!-- The form tags are provided by Moodle. Just create the invidivual input elements. -->
+
+<table cellpadding="9" cellspacing="0">
+
+<tr>
+ <td>
+  <h2><?php echo get_string('sloodlemenuversion', 'block_sloodle_menu').': '.(string)SLOODLE_MENU_VERSION; ?></h2>
+ </td>
+</tr>
+
+<?php
+    // These variables will determine if the individual items are shown
+    $show_myprofile = true;
+    $show_distributor = true;
+    $show_loginzone = true;
+    $show_usermanagement = true;
+    $show_sloodleconfig = true;
+    $show_notecardsetup = true;
+    // If an item has not been set, then default to true
+    if (isset($CFG->block_sloodle_menu_show_myprofile))         $show_myprofile = (bool)$CFG->block_sloodle_menu_show_myprofile;
+    if (isset($CFG->block_sloodle_menu_show_distributor))       $show_distributor = (bool)$CFG->block_sloodle_menu_show_distributor;
+    if (isset($CFG->block_sloodle_menu_show_loginzone))         $show_loginzone = (bool)$CFG->block_sloodle_menu_show_loginzone;
+    if (isset($CFG->block_sloodle_menu_show_usermanagement))    $show_usermanagement = (bool)$CFG->block_sloodle_menu_show_usermanagement;
+    if (isset($CFG->block_sloodle_menu_show_sloodleconfig))     $show_sloodleconfig = (bool)$CFG->block_sloodle_menu_show_sloodleconfig;
+    if (isset($CFG->block_sloodle_menu_show_notecardsetup))     $show_notecardsetup = (bool)$CFG->block_sloodle_menu_show_notecardsetup;
+?>
+
+<tr valign="top">
+ <td align="left">
+  <h3><?php echo get_string('showhideitems','block_sloodle_menu').helpbutton('show_hide_menu_items', get_string('showhideitems:help','block_sloodle_menu'), 'block_sloodle_menu', true, false, '', true); ?></h3>
+  <p><?php print_string('showhideitems:info','block_sloodle_menu'); ?></p>
+   
+   <table border="1" style="border-collapse:collapse;">
+    <tr><td><?php print_string('show','block_sloodle_menu'); ?></td><td><?php print_string('hide','block_sloodle_menu'); ?></td><td> </td></tr>
+    
+    <tr>
+     <td align="center"><input type="radio" value="1" name="block_sloodle_menu_show_myprofile" <?php if ($show_myprofile) echo 'checked'; ?> /></td>
+     <td align="center"><input type="radio" value="0" name="block_sloodle_menu_show_myprofile" <?php if (!$show_myprofile) echo 'checked'; ?> /></td>
+     <td align="left"><?php print_string('mysloodleprofile','block_sloodle_menu'); ?></td>
+    </tr>
+    
+    <tr>
+     <td align="center"><input type="radio" value="1" name="block_sloodle_menu_show_distributor" <?php if ($show_distributor) echo 'checked'; ?> /></td>
+     <td align="center"><input type="radio" value="0" name="block_sloodle_menu_show_distributor" <?php if (!$show_distributor) echo 'checked'; ?> /></td>
+     <td align="left"><?php print_string('objectdistributor','block_sloodle_menu'); ?></td>
+    </tr>
+    
+    <tr>
+     <td align="center"><input type="radio" value="1" name="block_sloodle_menu_show_loginzone" <?php if ($show_loginzone) echo 'checked'; ?> /></td>
+     <td align="center"><input type="radio" value="0" name="block_sloodle_menu_show_loginzone" <?php if (!$show_loginzone) echo 'checked'; ?> /></td>
+     <td align="left"><?php print_string('loginzone','block_sloodle_menu'); ?></td>
+    </tr>
+    
+    <tr>
+     <td align="center"><input type="radio" value="1" name="block_sloodle_menu_show_usermanagement" <?php if ($show_usermanagement) echo 'checked'; ?> /></td>
+     <td align="center"><input type="radio" value="0" name="block_sloodle_menu_show_usermanagement" <?php if (!$show_usermanagement) echo 'checked'; ?> /></td>
+     <td align="left"><?php print_string('usermanagement','block_sloodle_menu'); ?></td>
+    </tr>
+    
+    <tr>
+     <td align="center"><input type="radio" value="1" name="block_sloodle_menu_show_sloodleconfig" <?php if ($show_sloodleconfig) echo 'checked'; ?> /></td>
+     <td align="center"><input type="radio" value="0" name="block_sloodle_menu_show_sloodleconfig" <?php if (!$show_sloodleconfig) echo 'checked'; ?> /></td>
+     <td align="left"><?php print_string('sloodleconfig','block_sloodle_menu'); ?></td>
+    </tr>
+    
+    <tr>
+     <td align="center"><input type="radio" value="1" name="block_sloodle_menu_show_notecardsetup" <?php if ($show_notecardsetup) echo 'checked'; ?> /></td>
+     <td align="center"><input type="radio" value="0" name="block_sloodle_menu_show_notecardsetup" <?php if (!$show_notecardsetup) echo 'checked'; ?> /></td>
+     <td align="left"><?php print_string('notecardsetuppage','block_sloodle_menu'); ?></td>
+    </tr>
+   </table>   
+   
+ </td>
+</tr>
+
+<tr><td><input type="submit" value="<?php print_string('savesettings','block_sloodle_menu'); ?>" /></td></tr>
+
+</table>

BIN
img/boxes.gif


BIN
img/coin.png


BIN
img/configure.gif


BIN
img/loginzone.gif


BIN
img/notecard.gif


BIN
img/notes.gif


BIN
img/page.gif


BIN
img/user.gif


BIN
img/user_mng.gif


+ 78 - 0
lang/en/block_sloodle_menu.php

@@ -0,0 +1,78 @@
+<?php
+// This is the English language file for the Sloodle menu block.
+// It is included automatically by the Moodle framework.
+// Retrieve strings using the Moodle get_string or print_string functions.
+
+$string['avatars'] = 'Avatars';
+$string['avatarname'] = 'Avatar name';
+
+$string['pluginname'] = 'SLOODLE Menu';
+$string['blockname'] = 'SLOODLE Menu';
+$string['blocknameplural'] = 'SLOODLE Menus';
+
+$string['courseloginzone'] = 'Course Login Zone';
+$string['courseloginzone:nodata'] = 'There does not appear to be a LoginZone rezzed for this course.';
+
+$string['editcourse'] = 'Course Settings';
+
+$string['failedloadcourse'] = 'Failed to load SLOODLE course data';
+
+$string['hide'] = 'Hide';
+
+$string['moduleversion'] = 'Module Version';
+$string['mysloodleprofile'] = 'My SLOODLE profile';
+
+$string['nameunknown'] = 'name unknown';
+$string['noavatar'] = 'no avatar';
+$string['notecardsetuppage'] = 'Notecard Setup page';
+
+$string['oldmodule'] = 'Your SLOODLE module is out-of-date. Please upgrade it to at least 0.4.';
+
+$string['pleaselogin'] = 'Please login to use SLOODLE.';
+
+$string['savesettings'] = 'Save Settings';
+$string['show'] = 'Show';
+$string['showhideitems'] = 'Show/Hide Menu Items';
+$string['showhideitems:info'] = 'Check the boxes to make the items visible. Uncheck the boxes to hide them.';
+$string['showhideitems:help'] = 'Show or hide SLOODLE menu items';
+
+$string['sloodle'] = 'SLOODLE';
+$string['sloodlemenuversion'] = 'SLOODLE Menu Version';
+$string['sloodlenotinstalled'] = 'You need to install the SLOODLE activity module in order to use this block.';
+$string['sloodleconfig'] = 'SLOODLE Configuration';
+$string['sloodleactivity'] = 'Course Activity';
+$string['sloodleactivities'] = 'Course Activities';
+$string['sloodleversion'] = 'SLOODLE Version';
+$string['viewlogs'] = 'View Avatar Logs';
+
+$string['usermanagement'] = 'User Management';
+
+$string['youravatar'] = 'Your avatar';
+
+$string['backpack:view'] = 'Backpacks'; 
+$string['backpack:avname'] = 'Avatar'; 
+$string['backpack:currency'] = 'Currency'; 
+$string['backpack:type'] = 'Type'; 
+$string['backpack:time'] = 'Time'; 
+$string['backpack:username'] = 'User name';
+$string['backpack:nocurrency'] = 'No Currency Transactions Exist';
+$string['backpack:gold'] = 'Gold';
+$string['backpack:silver'] = 'Silver';
+$string['backpack:bronze'] = 'Bronze';
+$string['backpack:credits'] = 'Credits';
+$string['backpack:magic'] = 'Magic';
+$string['backpack:hit'] = 'Hit';
+$string['backpack:health'] = 'Health';
+$string['backpack:damage'] = 'Damage';
+$string['backpack:power'] = 'Power';
+$string['backpack:food'] = 'Food';
+$string['backpack:ore'] = 'Ore';
+$string['backpack:wood'] = 'Wood';
+$string['backpack:metal'] = 'Precious Metal';
+$string['backpack:points'] = 'Points';
+$string['backpack:rations'] = 'Rations';
+$string['backpack:units'] = 'Units';
+$string['backpack:coins'] = 'Coins';
+$string['backpack:amount'] = 'Amount';
+
+?>

+ 7 - 0
lang/en/help/sloodle_menu/show_hide_menu_items.html

@@ -0,0 +1,7 @@
+<h4>Show/Hide Menu Items</h4>
+<p>
+ You can use the Sloodle Menu block configuration page to show or hide specific menu items.
+ Note that certain items will always be hidden under certain circumstances.
+ For example, the links to the "Sloodle configuration page" and "Notecard setup page" will
+ never be displayed to students and teachers.
+</p>

+ 77 - 0
lang/en_utf8/block_sloodle_menu.php

@@ -0,0 +1,77 @@
+<?php
+// This is the English language file for the Sloodle menu block.
+// It is included automatically by the Moodle framework.
+// Retrieve strings using the Moodle get_string or print_string functions.
+
+$string['avatars'] = 'Avatars';
+$string['avatarname'] = 'Avatar name';
+
+$string['blockname'] = 'SLOODLE Menu';
+$string['blocknameplural'] = 'SLOODLE Menus';
+
+$string['courseloginzone'] = 'Course Login Zone';
+$string['courseloginzone:nodata'] = 'There does not appear to be a LoginZone rezzed for this course.';
+
+$string['editcourse'] = 'Course Settings';
+
+$string['failedloadcourse'] = 'Failed to load SLOODLE course data';
+
+$string['hide'] = 'Hide';
+
+$string['moduleversion'] = 'Module Version';
+$string['mysloodleprofile'] = 'My SLOODLE profile';
+
+$string['nameunknown'] = 'name unknown';
+$string['noavatar'] = 'no avatar';
+$string['notecardsetuppage'] = 'Notecard Setup page';
+
+$string['oldmodule'] = 'Your SLOODLE module is out-of-date. Please upgrade it to at least 0.4.';
+
+$string['pleaselogin'] = 'Please login to use SLOODLE.';
+
+$string['savesettings'] = 'Save Settings';
+$string['show'] = 'Show';
+$string['showhideitems'] = 'Show/Hide Menu Items';
+$string['showhideitems:info'] = 'Check the boxes to make the items visible. Uncheck the boxes to hide them.';
+$string['showhideitems:help'] = 'Show or hide SLOODLE menu items';
+
+$string['sloodle'] = 'SLOODLE';
+$string['sloodlemenuversion'] = 'SLOODLE Menu Version';
+$string['sloodlenotinstalled'] = 'You need to install the SLOODLE activity module in order to use this block.';
+$string['sloodleconfig'] = 'SLOODLE Configuration';
+$string['sloodleactivity'] = 'Course Activity';
+$string['sloodleactivities'] = 'Course Activities';
+$string['sloodleversion'] = 'SLOODLE Version';
+$string['viewlogs'] = 'View Avatar Logs';
+
+$string['usermanagement'] = 'User Management';
+
+$string['youravatar'] = 'Your avatar';
+
+$string['backpack:view'] = 'Backpacks'; 
+$string['backpack:avname'] = 'Avatar'; 
+$string['backpack:currency'] = 'Currency'; 
+$string['backpack:type'] = 'Type'; 
+$string['backpack:time'] = 'Time'; 
+$string['backpack:username'] = 'User name';
+$string['backpack:nocurrency'] = 'No Currency Transactions Exist';
+$string['backpack:gold'] = 'Gold';
+$string['backpack:silver'] = 'Silver';
+$string['backpack:bronze'] = 'Bronze';
+$string['backpack:credits'] = 'Credits';
+$string['backpack:magic'] = 'Magic';
+$string['backpack:hit'] = 'Hit';
+$string['backpack:health'] = 'Health';
+$string['backpack:damage'] = 'Damage';
+$string['backpack:power'] = 'Power';
+$string['backpack:food'] = 'Food';
+$string['backpack:ore'] = 'Ore';
+$string['backpack:wood'] = 'Wood';
+$string['backpack:metal'] = 'Precious Metal';
+$string['backpack:points'] = 'Points';
+$string['backpack:rations'] = 'Rations';
+$string['backpack:units'] = 'Units';
+$string['backpack:coins'] = 'Coins';
+$string['backpack:amount'] = 'Amount';
+
+?>

+ 7 - 0
lang/en_utf8/help/sloodle_menu/show_hide_menu_items.html

@@ -0,0 +1,7 @@
+<h4>Show/Hide Menu Items</h4>
+<p>
+ You can use the Sloodle Menu block configuration page to show or hide specific menu items.
+ Note that certain items will always be hidden under certain circumstances.
+ For example, the links to the "Sloodle configuration page" and "Notecard setup page" will
+ never be displayed to students and teachers.
+</p>

+ 47 - 0
lang/es/block_sloodle_menu.php

@@ -0,0 +1,47 @@
+<?php
+/**
+* This is the Spanish language file for the Sloodle menu block.
+* It is included automatically by the Moodle framework.
+* Retrieve strings using the Moodle get_string or print_string functions.
+*
+* @package sloodlelang
+*/
+
+$string['avatarname'] = 'Nombre del Avatar';
+
+$string['blockname'] = 'Men&uacute; Sloodle';
+$string['blocknameplural'] = 'Men&uacute;s Sloodle';
+
+$string['hide'] = 'Ocultar';
+
+$string['loginzone'] = 'Zona de Usuario';
+
+$string['moduleversion'] = 'M&oacute;dulo Versi&oacute;n';
+$string['mysloodleprofile'] = 'Mi perfil Sloodle';
+
+$string['nameunknown'] = 'nombre desconocido';
+$string['noavatar'] = 'no avatar';
+$string['notecardsetuppage'] = 'Notecard Configuraci&oacute;n de p&aacute;gina';
+
+$string['objectdistributor'] = 'Objecto Distribuidor';
+
+$string['pleaselogin'] = 'Por favor resgistrese para usar Sloodle.';
+$string['pleaseupgrade'] = 'Por favor, actualice su bloque Sloodle Men&uacute;.';
+
+$string['savesettings'] = 'Guardar Cambios';
+$string['show'] = 'Mostrar';
+$string['showhideitems'] = 'Mostrar/Ocultar Men&uacute; de Temas';
+$string['showhideitems:info'] = 'Marcar las casillas correspondientes a los elementos visibles. Desmarcar las casillas para ocultarlos.';
+$string['showhideitems:help'] = 'Mostrar u ocultar los elementos de men&uacute; Sloodle';
+
+$string['sloodle'] = 'Sloodle';
+$string['sloodlemenuversion'] = 'Sloodle Men&uacute; Versi&oacute;n';
+$string['sloodlenotinstalled'] = 'Necesita instalar el m&oacute;dulo Sloodle a fin de poder utilizar este bloque.';
+$string['sloodleconfig'] = 'Configuraci&oacute;n Sloodle';
+$string['sloodleversion'] = 'Sloodle Versi&oacute;n';
+
+$string['usermanagement'] = 'Gesti&oacute;n de Usuarios';
+
+$string['youravatar'] = 'Tu avatar';
+
+?>

+ 47 - 0
lang/es_utf8/block_sloodle_menu.php

@@ -0,0 +1,47 @@
+<?php
+/**
+* This is the Spanish language file for the Sloodle menu block.
+* It is included automatically by the Moodle framework.
+* Retrieve strings using the Moodle get_string or print_string functions.
+*
+* @package sloodlelang
+*/
+
+$string['avatarname'] = 'Nombre del Avatar';
+
+$string['blockname'] = 'Men&uacute; Sloodle';
+$string['blocknameplural'] = 'Men&uacute;s Sloodle';
+
+$string['hide'] = 'Ocultar';
+
+$string['loginzone'] = 'Zona de Usuario';
+
+$string['moduleversion'] = 'M&oacute;dulo Versi&oacute;n';
+$string['mysloodleprofile'] = 'Mi perfil Sloodle';
+
+$string['nameunknown'] = 'nombre desconocido';
+$string['noavatar'] = 'no avatar';
+$string['notecardsetuppage'] = 'Notecard Configuraci&oacute;n de p&aacute;gina';
+
+$string['objectdistributor'] = 'Objecto Distribuidor';
+
+$string['pleaselogin'] = 'Por favor resgistrese para usar Sloodle.';
+$string['pleaseupgrade'] = 'Por favor, actualice su bloque Sloodle Men&uacute;.';
+
+$string['savesettings'] = 'Guardar Cambios';
+$string['show'] = 'Mostrar';
+$string['showhideitems'] = 'Mostrar/Ocultar Men&uacute; de Temas';
+$string['showhideitems:info'] = 'Marcar las casillas correspondientes a los elementos visibles. Desmarcar las casillas para ocultarlos.';
+$string['showhideitems:help'] = 'Mostrar u ocultar los elementos de men&uacute; Sloodle';
+
+$string['sloodle'] = 'Sloodle';
+$string['sloodlemenuversion'] = 'Sloodle Men&uacute; Versi&oacute;n';
+$string['sloodlenotinstalled'] = 'Necesita instalar el m&oacute;dulo Sloodle a fin de poder utilizar este bloque.';
+$string['sloodleconfig'] = 'Configuraci&oacute;n Sloodle';
+$string['sloodleversion'] = 'Sloodle Versi&oacute;n';
+
+$string['usermanagement'] = 'Gesti&oacute;n de Usuarios';
+
+$string['youravatar'] = 'Tu avatar';
+
+?>

+ 10 - 0
version.php

@@ -0,0 +1,10 @@
+<?php
+$plugin->version  = 2011072301;
+$plugin->requires = 2007021500;  // Requires Moodle 1.8
+
+// For Moodle 2, we have to pretend we don't work on Moodle 1.9 or Moodle gets upset.
+global $CFG;
+if ($CFG->version > 2010060800) {
+    $plugin->requires = 2010000000;  // Requires Moodle 2.0
+}
+?>