Skip to content

Commit

Permalink
MDL-34148 Blog: Fixed variable name used for saving module name
Browse files Browse the repository at this point in the history
Updated Erik's patch to match coding style
  • Loading branch information
Rajesh Taneja authored and danpoltawski committed Jul 23, 2012
1 parent 4eaf120 commit dc9fa9c
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions blog/lib.php
Expand Up @@ -608,28 +608,28 @@ 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))
);
}
// 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),
Expand All @@ -641,7 +641,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))
);
}
Expand Down

0 comments on commit dc9fa9c

Please sign in to comment.