--- loncom/homework/structuretags.pm 2006/01/18 20:16:43 1.331
+++ loncom/homework/structuretags.pm 2006/03/29 22:41:32 1.339
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# definition of tags that give a structure to a document
#
-# $Id: structuretags.pm,v 1.331 2006/01/18 20:16:43 albertel Exp $
+# $Id: structuretags.pm,v 1.339 2006/03/29 22:41:32 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -36,6 +36,7 @@ use Apache::File();
use Apache::lonmenu;
use Apache::lonlocal;
use Apache::lonxml;
+use Apache::lonenc();
use Time::HiRes qw( gettimeofday tv_interval );
BEGIN {
&Apache::lonxml::register('Apache::structuretags',('block','languageblock','instructorcomment','while','randomlist','problem','library','web','tex','part','preduedate','postanswerdate','solved','notsolved','problemtype','startouttext','endouttext','simpleeditbutton','definetag'));
@@ -44,7 +45,7 @@ BEGIN {
sub start_web {
my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_;
my $bodytext=&Apache::lonxml::get_all_text("/web",$parser,$style);
- if ($target eq 'web') {
+ if ($target eq 'web' || $target eq 'webgrade') {
return $bodytext;
}
return '';
@@ -113,6 +114,12 @@ sub page_start {
&Apache::lonhtmlcommon::htmlareaheaders().
&Apache::lonhtmlcommon::spellheader().
&Apache::lonxml::fontsettings();
+ my $css_href = &Apache::lonnet::EXT('resource.0.cssfile');
+ if ($css_href =~ /\S/) {
+ &Apache::lonxml::extlink($css_href);
+ $head_tag_start =
+ '';
+ }
if ($target eq 'edit') {
$head_tag_start.=&Apache::edit::js_change_detection();
}
@@ -150,9 +157,8 @@ sub page_start {
}
my $form_tag_start;
if (!defined($found{'form'})) {
- $form_tag_start='
'.
''.
+ value="'.&mt('New Problem Variation').'" />';
+ if (exists($env{'form.username'})) {
+ $form_tag_start.=
'';
- if ($env{'user.adv'}) {
+ }
+ if ($env{'request.role.adv'}) {
$form_tag_start.=
'