Browse files

Merge branch 'MDL-31040-MOODLE_22_STABLE-3' of git://git.luns.net.uk/…

…moodle into MOODLE_22_STABLE
  • Loading branch information...
2 parents 00e4cad + 87b8419 commit 6bf567100abbabff345a68df5643161fafb67fb9 Sam Hemelryk committed Jan 16, 2012
Showing with 22 additions and 17 deletions.
  1. +11 −7 course/lib.php
  2. +2 −0 lang/en/moodle.php
  3. +3 −4 lib/ajax/ajaxlib.php
  4. +6 −6 lib/ajax/section_classes.js
View
18 course/lib.php
@@ -3099,11 +3099,12 @@ function make_editing_buttons(stdClass $mod, $absolute_ignored = true, $movesele
$str->duplicate = get_string("duplicate");
$str->hide = get_string("hide");
$str->show = get_string("show");
- $str->clicktochange = get_string("clicktochange");
- $str->forcedmode = get_string("forcedmode");
- $str->groupsnone = get_string("groupsnone");
- $str->groupsseparate = get_string("groupsseparate");
- $str->groupsvisible = get_string("groupsvisible");
+ $str->groupsnone = get_string('clicktochangeinbrackets', 'moodle', get_string("groupsnone"));
+ $str->groupsseparate = get_string('clicktochangeinbrackets', 'moodle', get_string("groupsseparate"));
+ $str->groupsvisible = get_string('clicktochangeinbrackets', 'moodle', get_string("groupsvisible"));
+ $str->forcedgroupsnone = get_string('forcedmodeinbrackets', 'moodle', get_string("groupsnone"));
+ $str->forcedgroupsseparate = get_string('forcedmodeinbrackets', 'moodle', get_string("groupsseparate"));
+ $str->forcedgroupsvisible = get_string('forcedmodeinbrackets', 'moodle', get_string("groupsvisible"));
}
$baseurl = new moodle_url('/course/mod.php', array('sesskey' => sesskey()));
@@ -3220,16 +3221,19 @@ function make_editing_buttons(stdClass $mod, $absolute_ignored = true, $movesele
if ($mod->groupmode == SEPARATEGROUPS) {
$groupmode = 0;
$grouptitle = $str->groupsseparate;
+ $forcedgrouptitle = $str->forcedgroupsseparate;
$groupclass = 'editing_groupsseparate';
$groupimage = 't/groups';
} else if ($mod->groupmode == VISIBLEGROUPS) {
$groupmode = 1;
$grouptitle = $str->groupsvisible;
+ $forcedgrouptitle = $str->forcedgroupsvisible;
$groupclass = 'editing_groupsvisible';
$groupimage = 't/groupv';
} else {
$groupmode = 2;
$grouptitle = $str->groupsnone;
+ $forcedgrouptitle = $str->forcedgroupsnone;
$groupclass = 'editing_groupsnone';
$groupimage = 't/groupn';
}
@@ -3238,10 +3242,10 @@ function make_editing_buttons(stdClass $mod, $absolute_ignored = true, $movesele
new moodle_url($baseurl, array('id' => $mod->id, 'groupmode' => $groupmode)),
new pix_icon($groupimage, $grouptitle, 'moodle', array('class' => 'iconsmall')),
null,
- array('class' => $groupclass, 'title' => $grouptitle.' ('.$str->clicktochange.')')
+ array('class' => $groupclass, 'title' => $grouptitle)
);
} else {
- $actions[] = new pix_icon($groupimage, $grouptitle, 'moodle', array('title' => $grouptitle.' ('.$str->forcedmode.')', 'class' => 'iconsmall'));
+ $actions[] = new pix_icon($groupimage, $forcedgrouptitle, 'moodle', array('title' => $forcedgrouptitle, 'class' => 'iconsmall'));
}
}
View
2 lang/en/moodle.php
@@ -237,6 +237,7 @@
$string['clickhere'] = 'Click here ...';
$string['clicktohideshow'] = 'Click to expand or collapse';
$string['clicktochange'] = 'Click to change';
+$string['clicktochangeinbrackets'] = '{$a} (Click to change)';
$string['closewindow'] = 'Close this window';
$string['collapseall'] = 'Collapse all';
$string['commentincontext'] = 'Find this comment in context';
@@ -670,6 +671,7 @@
$string['followingrequired'] = 'The following items are required';
$string['force'] = 'Force';
$string['forcedmode'] = 'forced mode';
+$string['forcedmodeinbrackets'] = '{$a} (forced mode)';
$string['forcelanguage'] = 'Force language';
$string['forceno'] = 'Do not force';
$string['forcepasswordchange'] = 'Force password change';
View
7 lib/ajax/ajaxlib.php
@@ -149,10 +149,9 @@ function print_javascript($courseid, $return=false) {
$output .= " main.portal.strings['moveleft']='".addslashes_js(get_string('moveleft'))."';\n";
$output .= " main.portal.strings['moveright']='".addslashes_js(get_string('moveright'))."';\n";
$output .= " main.portal.strings['update']='".addslashes_js(get_string('update'))."';\n";
- $output .= " main.portal.strings['groupsnone']='".addslashes_js(get_string('groupsnone'))."';\n";
- $output .= " main.portal.strings['groupsseparate']='".addslashes_js(get_string('groupsseparate'))."';\n";
- $output .= " main.portal.strings['groupsvisible']='".addslashes_js(get_string('groupsvisible'))."';\n";
- $output .= " main.portal.strings['clicktochange']='".addslashes_js(get_string('clicktochange'))."';\n";
+ $output .= " main.portal.strings['groupsnone']='".addslashes_js(get_string('clicktochangeinbrackets', 'moodle', get_string('groupsnone')))."';\n";
+ $output .= " main.portal.strings['groupsseparate']='".addslashes_js(get_string('clicktochangeinbrackets', 'moodle', get_string('groupsseparate')))."';\n";
+ $output .= " main.portal.strings['groupsvisible']='".addslashes_js(get_string('clicktochangeinbrackets', 'moodle', get_string('groupsvisible')))."';\n";
$output .= " main.portal.strings['deletecheck']='".addslashes_js(get_string('deletecheckfull','','_var_'))."';\n";
$output .= " main.portal.strings['resource']='".addslashes_js(get_string('resource'))."';\n";
$output .= " main.portal.strings['activity']='".addslashes_js(get_string('activity'))."';\n";
View
12 lib/ajax/section_classes.js
@@ -620,9 +620,9 @@ resource_class.prototype.init_buttons = function() {
}
// Language strings.
- var strgroupsnone = main.portal.strings['groupsnone']+' ('+main.portal.strings['clicktochange']+')';
- var strgroupsseparate = main.portal.strings['groupsseparate']+' ('+main.portal.strings['clicktochange']+')';
- var strgroupsvisible = main.portal.strings['groupsvisible']+' ('+main.portal.strings['clicktochange']+')';
+ var strgroupsnone = main.portal.strings['groupsnone'];
+ var strgroupsseparate = main.portal.strings['groupsseparate'];
+ var strgroupsvisible = main.portal.strings['groupsvisible'];
this.commandContainer = commandContainer;
var buttons = commandContainer.getElementsByTagName('a');
@@ -864,13 +864,13 @@ resource_class.prototype.toggle_groupmode = function() {
switch (this.groupmode) {
case 0:
- newtitle = main.portal.strings['groupsnone']+' ('+main.portal.strings['clicktochange']+')';
+ newtitle = main.portal.strings['groupsnone'];
break;
case 1:
- newtitle = main.portal.strings['groupsseparate']+' ('+main.portal.strings['clicktochange']+')';
+ newtitle = main.portal.strings['groupsseparate'];
break;
case 2:
- newtitle = main.portal.strings['groupsvisible']+' ('+main.portal.strings['clicktochange']+')';
+ newtitle = main.portal.strings['groupsvisible'];
break;
}

0 comments on commit 6bf5671

Please sign in to comment.