".&mt('Select Course')."";
+ my ($form,$unameele,$udomele,$desc,$extra_element,$multflag,$selecttype,
+ $typeelement) = @_;
+ my $type = $selecttype;
+ my $linktext = &mt('Select Course');
+ if ($selecttype eq 'Community') {
+ $linktext = &mt('Select Community');
+ } elsif ($selecttype eq 'Course/Community') {
+ $linktext = &mt('Select Course/Community');
+ $type = '';
+ }
+ return ''
+ ."".$linktext.''
+ .'';
}
sub selectauthor_link {
@@ -612,6 +782,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 +888,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 +989,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 +1127,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;
}
@@ -947,23 +1144,23 @@ sub helpLatexCheatsheet {
my $out;
my $addOther = '';
if ($topic) {
- $addOther = Apache::loncommon::help_open_topic($topic,$text,
- undef, undef, 600).
- '';
+ $addOther = &Apache::loncommon::help_open_topic($topic,$text,
+ 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).
- ' | ';
+ $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).
- ' | ';
+ &Apache::loncommon::help_open_topic("Authoring_Output_Tags",&mt('Output Tags'),
+ undef,undef,600).
+ '';
}
$out .= ' ';
return $out;
@@ -973,7 +1170,7 @@ sub general_help {
my $helptopic='Student_Intro';
if ($env{'request.role'}=~/^(ca|au)/) {
$helptopic='Authoring_Intro';
- } elsif ($env{'request.role'}=~/^cc/) {
+ } elsif ($env{'request.role'}=~/^(cc|co)/) {
$helptopic='Course_Coordination_Intro';
} elsif ($env{'request.role'}=~/^dc/) {
$helptopic='Domain_Coordination_Intro';
@@ -993,7 +1190,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;
@@ -1070,8 +1269,8 @@ sub help_menu_js {
my $template .= <<"ENDTEMPLATE";
ENDTEMPLATE
return $template;
@@ -1365,6 +1564,7 @@ sub resize_textarea_js {
my $geometry = &viewport_geometry_js();
return <<"RESIZE";
RESIZE
@@ -1635,7 +1836,7 @@ sub multiple_select_form {
$size = scalar(keys(%$hash));
}
}
- $output.="\n |