--- loncom/interface/loncommon.pm 2009/08/14 03:50:09 1.692.4.5
+++ loncom/interface/loncommon.pm 2009/01/12 04:11:25 1.732
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# a pile of common routines
#
-# $Id: loncommon.pm,v 1.692.4.5 2009/08/14 03:50:09 raeburn Exp $
+# $Id: loncommon.pm,v 1.732 2009/01/12 04:11:25 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -271,7 +271,7 @@ BEGIN {
}
}
&Apache::lonnet::logthis(
- "INFO: Read file types");
+ "INFO: Read file types");
$readit=1;
} # end of unless($readit)
@@ -406,10 +406,9 @@ sub studentbrowser_javascript {
|| ($env{'request.role'}=~/^(au|dc|su)/)
) { return ''; }
return (<<'ENDSTDBRW');
-
ENDSTDBRW
}
sub selectstudent_link {
- my ($form,$unameele,$udomele,$courseadvonly)=@_;
- my $callargs = "'".$form."','".$unameele."','".$udomele."'";
+ my ($form,$unameele,$udomele)=@_;
if ($env{'request.course.id'}) {
if (!&Apache::lonnet::allowed('srm',$env{'request.course.id'})
&& !&Apache::lonnet::allowed('srm',$env{'request.course.id'}.
'/'.$env{'request.course.sec'})) {
return '';
}
- if ($courseadvonly) {
- $callargs .= ",'',1,1";
- }
- return ''.
- ''.
- &mt('Select User').'';
+ return "".&mt('Select User')."";
}
if ($env{'request.role'}=~/^(au|dc|su)/) {
- $callargs .= ",1";
- return ''.
- ''.
- &mt('Select User').'';
+ return "".&mt('Select User')."";
}
return '';
}
@@ -463,7 +453,6 @@ sub selectstudent_link {
sub authorbrowser_javascript {
return <<"ENDAUTHORBRW";
ENDAUTHORBRW
}
@@ -484,8 +473,7 @@ sub coursebrowser_javascript {
my ($domainfilter,$sec_element,$formname)=@_;
my $crs_or_grp_alert = &mt('Please select the type of LON-CAPA entity - Course or Group - for which you wish to add/modify a user role');
my $output = '
-';
return $output;
}
@@ -615,13 +602,8 @@ function setSect(sectionlist) {
sub selectcourse_link {
my ($form,$unameele,$udomele,$desc,$extra_element,$multflag,$selecttype)=@_;
- return ''
- ."".&mt('Select Course').''
- .'';
+ return "".&mt('Select Course')."";
}
sub selectauthor_link {
@@ -728,21 +710,6 @@ 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(...)
@@ -829,8 +796,7 @@ 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
@@ -961,18 +926,16 @@ sub help_open_topic {
if ($text ne "") {
$template .=
"
".
- "$text";
+ " | $text";
}
# Add the graphic
my $title = &mt('Online Help');
my $helpicon=&lonhttpdurl("/adm/help/help.png");
- $template .= ''.
- '';
- if ($text ne '') {
- $template.=' |
';
- }
+ $template .= <<"ENDTEMPLATE";
+
+ENDTEMPLATE
+ if ($text ne '') { $template.='' };
return $template;
}
@@ -985,22 +948,22 @@ sub helpLatexCheatsheet {
my $addOther = '';
if ($topic) {
$addOther = &Apache::loncommon::help_open_topic($topic,$text,
- undef, undef, 600) .
+ 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;
@@ -1030,9 +993,7 @@ 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;
@@ -1173,7 +1134,7 @@ sub help_open_bug {
{
$template .=
"".
- "$text";
+ " | $text";
}
# Add the graphic
@@ -1218,7 +1179,7 @@ sub help_open_faq {
{
$template .=
"".
- "$text";
+ " | $text";
}
# Add the graphic
@@ -1404,7 +1365,6 @@ sub resize_textarea_js {
my $geometry = &viewport_geometry_js();
return <<"RESIZE";
RESIZE
@@ -1676,7 +1635,7 @@ sub multiple_select_form {
$size = scalar(keys(%$hash));
}
}
- $output.="\n".' |
|
|