Merge branch 'MDL-31040-master-2' of git://git.luns.net.uk/moodle

This commit is contained in:
Sam Hemelryk 2012-01-16 10:54:08 +08:00
commit 66fe8d59c8
4 changed files with 22 additions and 19 deletions

View File

@ -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 File

@ -236,7 +236,7 @@ $string['clear'] = 'Clear';
$string['clickhelpiconformoreinfo'] = '... continues ... Click on the help icon to read the full article';
$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';
@ -672,7 +672,7 @@ $string['folderopened'] = 'Opened folder';
$string['followingoptional'] = 'The following items are optional';
$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 File

@ -149,10 +149,9 @@ class jsportal {
$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 File

@ -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;
}