From 4dba21f35aa5c0df8d5ef29c27d72e985e533087 Mon Sep 17 00:00:00 2001 From: Rajesh Taneja Date: Tue, 17 Jul 2012 15:21:27 +0800 Subject: [PATCH] MDL-34148 Blog: Fixed variable name used for saving module name Updated Erik's patch to match coding style --- blog/lib.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/blog/lib.php b/blog/lib.php index 436b2ab7a7f..b4085a63dbc 100644 --- a/blog/lib.php +++ b/blog/lib.php @@ -611,14 +611,14 @@ function blog_get_options_for_module($module, $user=null) { $canparticipate = (is_enrolled($modcontext) or is_viewing($modcontext)); if (has_capability('moodle/blog:view', $modcontext)) { - // Save the correct module name for later usage - $module_name = strtolower(get_string('modulename', $module->modname)); + // Save correct module name for later usage. + $modulename = get_string('modulename', $module->modname); // We can view! if ($CFG->bloglevel >= BLOG_SITE_LEVEL) { // View all entries about this module $a = new stdClass; - $a->type = $module_name; + $a->type = $modulename; $options['moduleview'] = array( 'string' => get_string('viewallmodentries', 'blog', $a), 'link' => new moodle_url('/blog/index.php', array('modid'=>$module->id)) @@ -626,13 +626,13 @@ function blog_get_options_for_module($module, $user=null) { } // View MY entries about this module $options['moduleviewmine'] = array( - 'string' => get_string('viewmyentriesaboutmodule', 'blog', $module_name), + 'string' => get_string('viewmyentriesaboutmodule', 'blog', $modulename), 'link' => new moodle_url('/blog/index.php', array('modid'=>$module->id, 'userid'=>$USER->id)) ); if (!empty($user) && ($CFG->bloglevel >= BLOG_SITE_LEVEL)) { // View the given users entries about this module $a = new stdClass; - $a->mod = $module_name; + $a->mod = $modulename; $a->user = fullname($user); $options['moduleviewuser'] = array( 'string' => get_string('blogentriesbyuseraboutmodule', 'blog', $a), @@ -644,7 +644,7 @@ function blog_get_options_for_module($module, $user=null) { if (has_capability('moodle/blog:create', $sitecontext) and $canparticipate) { // The user can blog about this module $options['moduleadd'] = array( - 'string' => get_string('blogaboutthismodule', 'blog', $module_name), + 'string' => get_string('blogaboutthismodule', 'blog', $modulename), 'link' => new moodle_url('/blog/edit.php', array('action'=>'add', 'modid'=>$module->id)) ); }