--- loncom/interface/loncommon.pm 2011/10/07 14:55:24 1.948.2.32
+++ loncom/interface/loncommon.pm 2011/12/26 13:47:18 1.1028.2.1
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# a pile of common routines
#
-# $Id: loncommon.pm,v 1.948.2.32 2011/10/07 14:55:24 raeburn Exp $
+# $Id: loncommon.pm,v 1.1028.2.1 2011/12/26 13:47:18 foxr Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -154,6 +154,7 @@ sub ssi_with_retries {
# ----------------------------------------------- Filetypes/Languages/Copyright
my %language;
my %supported_language;
+my %latex_language; # Language name LaTeX uses for selecting hyphenation.
my %cprtag;
my %scprtag;
my %fe; my %fd; my %fm;
@@ -186,11 +187,14 @@ BEGIN {
while (my $line = <$fh>) {
next if ($line=~/^\#/);
chomp($line);
- my ($key,$two,$country,$three,$enc,$val,$sup)=(split(/\t/,$line));
+ my ($key,$two,$country,$three,$enc,$val,$sup,$latex)=(split(/\t/,$line));
$language{$key}=$val.' - '.$enc;
if ($sup) {
$supported_language{$key}=$sup;
}
+ if ($latex) {
+ $latex_language{$two} = $latex;
+ }
}
close($fh);
}
@@ -436,6 +440,25 @@ sub studentbrowser_javascript {
ENDSTDBRW
}
+sub resourcebrowser_javascript {
+ unless ($env{'request.course.id'}) { return ''; }
+ return (<<'ENDRESBRW');
+
+ENDRESBRW
+}
+
sub selectstudent_link {
my ($form,$unameele,$udomele,$courseadvonly,$clickerid)=@_;
my $callargs = "'".&Apache::lonhtmlcommon::entity_encode($form)."','".
@@ -456,7 +479,7 @@ sub selectstudent_link {
&mt('Select User').'';
}
if ($env{'request.role'}=~/^(au|dc|su)/) {
- $callargs .= ",'',1";
+ $callargs .= ",'',1";
return ''.
''.
&mt('Select User').'';
@@ -464,6 +487,19 @@ sub selectstudent_link {
return '';
}
+sub selectresource_link {
+ my ($form,$reslink,$arg)=@_;
+
+ my $callargs = "'".&Apache::lonhtmlcommon::entity_encode($form)."','".
+ &Apache::lonhtmlcommon::entity_encode($reslink)."'";
+ unless ($env{'request.course.id'}) { return $arg; }
+ return ''.
+ ''.
+ $arg.'';
+}
+
+
+
sub authorbrowser_javascript {
return <<"ENDAUTHORBRW";