--- loncom/interface/loncommon.pm 2003/05/13 00:52:46 1.99 +++ loncom/interface/loncommon.pm 2003/06/18 15:50:07 1.104 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # a pile of common routines # -# $Id: loncommon.pm,v 1.99 2003/05/13 00:52:46 www Exp $ +# $Id: loncommon.pm,v 1.104 2003/06/18 15:50:07 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -329,7 +329,7 @@ sub studentbrowser_javascript { } url += 'form=' + formname + '&unameelement='+uname+ '&udomelement='+udom; - var title = 'Student Browser'; + var title = 'Student_Browser'; var options = 'scrollbars=1,resizable=1,menubar=0'; options += ',width=700,height=600'; stdeditbrowser = open(url,title,options,'1'); @@ -363,7 +363,7 @@ sub coursebrowser_javascript { } url += 'form=' + formname + '&cnumelement='+uname+ '&cdomelement='+udom; - var title = 'Course Browser'; + var title = 'Course_Browser'; var options = 'scrollbars=1,resizable=1,menubar=0'; options += ',width=700,height=600'; stdeditbrowser = open(url,title,options,'1'); @@ -1358,6 +1358,12 @@ sub display_languages { $languages{$_}=1; } } + if ($ENV{'course.'.$ENV{'request.course.id'}.'.languages'}) { + foreach (split(/\s*(\,|\;|\:)\s*/, + $ENV{'course.'.$ENV{'request.course.id'}.'.languages'})) { + $languages{$_}=1; + } + } &get_unprocessed_cgi($ENV{'QUERY_STRING'},['displaylanguage']); if ($ENV{'form.displaylanguage'}) { foreach (split(/\s*(\,|\;|\:)\s*/,$ENV{'form.displaylanguage'})) { @@ -1512,7 +1518,7 @@ sub get_student_view { } sub get_student_answers { - my ($symb,$username,$domain,$courseid) = @_; + my ($symb,$username,$domain,$courseid,%form) = @_; my ($map,$id,$feedurl) = split(/___/,$symb); my (%old,%moreenv); my @elements=('symb','courseid','domain','username'); @@ -1522,7 +1528,7 @@ sub get_student_answers { } $moreenv{'form.grade_target'}='answer'; &Apache::lonnet::appenv(%moreenv); - my $userview=&Apache::lonnet::ssi('/res/'.$feedurl); + my $userview=&Apache::lonnet::ssi('/res/'.$feedurl,%form); &Apache::lonnet::delenv('form.grade_'); foreach my $element (@elements) { $ENV{'form.grade_'.$element}=$old{$element}; @@ -1731,9 +1737,10 @@ sub bodytag { unless ($realm) { $realm=' '; } # Set messages my $messages=&domainlogo($domain); -# Output +# Port for miniserver my $lonhttpdPort=$Apache::lonnet::perlvar{'lonhttpdPort'}; if (!defined($lonhttpdPort)) { $lonhttpdPort='8080'; } +# construct main body tag my $bodytag = <