".&mt('Select Course')."";
+ my $linktext = &mt('Select Course');
+ if ($selecttype eq 'Community') {
+ $linktext = &mt('Select Community');
+ }
+ return ''
+ ."".$linktext.''
+ .'';
}
sub selectauthor_link {
@@ -612,6 +717,14 @@ sub selectauthor_link {
&mt('Select Author').'';
}
+sub selectuser_link {
+ my ($form,$unameelem,$domelem,$lastelem,$firstelem,$emailelem,$hdomelem,
+ $coursedom,$linktext,$caller) = @_;
+ return ''.$linktext.'';
+}
+
sub check_uncheck_jscript {
my $jscript = <<"ENDSCRT";
function checkAll(field) {
@@ -710,6 +823,21 @@ sub select_datelocale {
return $output;
}
+sub select_language {
+ my ($name,$selected,$includeempty) = @_;
+ my %langchoices;
+ if ($includeempty) {
+ %langchoices = ('' => 'No language preference');
+ }
+ foreach my $id (&languageids()) {
+ my $code = &supportedlanguagecode($id);
+ if ($code) {
+ $langchoices{$code} = &plainlanguagedescription($id);
+ }
+ }
+ return &select_form($selected,$name,%langchoices);
+}
+
=pod
=item * &linked_select_forms(...)
@@ -796,7 +924,8 @@ sub linked_select_forms {
my $first = "document.$formname.$firstselectname";
# output the javascript to do the changing
my $result = '';
- $result.="
END
# output the initial values for the selection lists
@@ -932,10 +1062,12 @@ sub help_open_topic {
# Add the graphic
my $title = &mt('Online Help');
my $helpicon=&lonhttpdurl("/adm/help/help.png");
- $template .= <<"ENDTEMPLATE";
-
-ENDTEMPLATE
- if ($text ne '') { $template.='' };
+ $template .= ''.
+ '';
+ if ($text ne '') {
+ $template.='';
+ }
return $template;
}
@@ -943,24 +1075,30 @@ ENDTEMPLATE
# This is a quicky function for Latex cheatsheet editing, since it
# appears in at least four places
sub helpLatexCheatsheet {
- my $other = shift;
+ my ($topic,$text,$not_author) = @_;
+ my $out;
my $addOther = '';
- if ($other) {
- $addOther = Apache::loncommon::help_open_topic($other, shift,
+ if ($topic) {
+ $addOther = &Apache::loncommon::help_open_topic($topic,$text,
undef, undef, 600) .
'';
}
- return ''.
- $addOther .
- &Apache::loncommon::help_open_topic("Greek_Symbols",&mt('Greek Symbols'),
- undef,undef,600)
- .' | '.
- &Apache::loncommon::help_open_topic("Other_Symbols",&mt('Other Symbols'),
- undef,undef,600)
- .' | '.
- &Apache::loncommon::help_open_topic("Authoring_Output_Tags",&mt('Output Tags'),
- undef,undef,600)
- .' | ';
+ $out = ''.
+ $addOther .
+ &Apache::loncommon::help_open_topic("Greek_Symbols",&mt('Greek Symbols'),
+ undef,undef,600).
+ ' | '.
+ &Apache::loncommon::help_open_topic("Other_Symbols",&mt('Other Symbols'),
+ undef,undef,600).
+ ' | ';
+ unless ($not_author) {
+ $out .= ''.
+ &Apache::loncommon::help_open_topic("Authoring_Output_Tags",&mt('Output Tags'),
+ undef,undef,600).
+ ' | ';
+ }
+ $out .= ' ';
+ return $out;
}
sub general_help {
@@ -987,7 +1125,9 @@ sub update_help_link {
my $banner_link = "/adm/helpmenu?page=banner&topic=$topic&component_help=$component_help&faq=$faq&bug=$bug&origurl=$origurl&stamp=$timestamp&stayonpage=$stayOnPage";
my $output .= <<"ENDOUTPUT";
ENDOUTPUT
return $output;
@@ -1064,8 +1204,8 @@ sub help_menu_js {
my $template .= <<"ENDTEMPLATE";
ENDTEMPLATE
return $template;
@@ -1359,6 +1499,7 @@ sub resize_textarea_js {
my $geometry = &viewport_geometry_js();
return <<"RESIZE";
RESIZE
@@ -1629,7 +1771,7 @@ sub multiple_select_form {
$size = scalar(keys(%$hash));
}
}
- $output.="\n |