--- loncom/homework/structuretags.pm 2011/12/27 20:13:22 1.500
+++ loncom/homework/structuretags.pm 2014/05/18 02:21:28 1.512.2.8
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# definition of tags that give a structure to a document
#
-# $Id: structuretags.pm,v 1.500 2011/12/27 20:13:22 foxr Exp $
+# $Id: structuretags.pm,v 1.512.2.8 2014/05/18 02:21:28 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -379,10 +379,10 @@ sub page_start {
} elsif (!defined($found{'body'})
&& $env{'request.state'} eq 'construct') {
if ($target eq 'web' || $target eq 'edit') {
- # Breadcrumbs for Construction Space
+ # Breadcrumbs for Authoring Space
&Apache::lonhtmlcommon::clear_breadcrumbs();
&Apache::lonhtmlcommon::add_breadcrumb({
- 'text' => 'Construction Space',
+ 'text' => 'Authoring Space',
'href' => &Apache::loncommon::authorspace($env{'request.uri'}),
});
# breadcrumbs (and tools) will be created
@@ -414,6 +414,8 @@ sub page_start {
$body_args{'add_entries'} = \%add_entries;
if ( $env{'request.state'} eq 'construct') {
$body_args{'only_body'} = 1;
+ } elsif ($target eq 'web') {
+ $body_args{'print_suppress'} = 1;
}
}
$body_args{'no_auto_mt_title'} = 1;
@@ -453,7 +455,6 @@ sub page_start {
}
$form_tag_start.='>'."\n";
- my $symb=&Apache::lonnet::symbread();
if ($symb =~ /\S/) {
$symb=
&HTML::Entities::encode(&Apache::lonenc::check_encrypt($symb));
@@ -638,7 +639,7 @@ sub problem_edit_header {
'.&Apache::lonxml::message_location().'
'.
- '
';
+ '
';
}
sub problem_edit_footer {
@@ -729,7 +730,7 @@ $show_all
@@ -976,7 +977,7 @@ sub checkout_msg {
$lt{'warning'}
ENDCHECKOUT
}
@@ -990,19 +991,19 @@ sub firstaccess_msg {
my $foldertitle=&Apache::lonnet::gettitle($map);
&Apache::lonxml::debug("map is $map title is $foldertitle");
- $result .= "
".&mt('The resources in "[_1]" are open for a limited time.'
- .' Once you click the "Show Resource" button below you have [_2] to complete all resources "[_1]".'
- ,$foldertitle,$time)."
";
+ $result .= "
".&mt('The resources in "[_1]" are open for a limited time.',$foldertitle)."
"
+ .'
'.&mt('Once you click the "Show Resource" button below you have [_2] to complete all resources "[_1]".'
+ ,$foldertitle,$time)."
".&mt('The resources in "[_1]" are open for a limited time.'
- .' Once you click the "Show Resource" button below you have [_2] to complete all resources "[_1]".'
- ,$course,$time)."
";
+ $result .= "
".&mt('The resources in "[_1]" are open for a limited time.',$course)."
"
+ .'
'.&mt('Once you click the "Show Resource" button below you have [_2] to complete all resources "[_1]".'
+ ,$course,$time)."
";
} else {
my $title=&Apache::lonnet::gettitle($symb);
- $result .= "
".&mt('This resource "[_1]" is open for a limited time.'
- .' Once you click the "Show Resource" button below you have [_2] to complete this resource "[_1]".'
- ,$title,$time)."
";
+ $result .= "
".&mt('This resource "[_1]" is open for a limited time.',$title)."
"
+ .'
'.&mt('Once you click the "Show Resource" button below you have [_2] to complete this resource "[_1]".'
+ ,$title,$time)."
";
}
my $uri = &Apache::lonenc::check_encrypt($env{'request.uri'});
my $buttontext = &mt('Show Resource');
@@ -1010,7 +1011,7 @@ sub firstaccess_msg {
$result .= (<
-
+
ENDCHECKOUT
return $result;
@@ -1160,9 +1161,23 @@ sub start_problem {
&Apache::run::run($expression,$safeeval);
my $status;
my $accessmsg;
+ my $resource_due;
my $name= &get_resource_name($parstack,$safeeval);
- my ($result,$form_tag_start);
+ my ($result,$form_tag_start,$slot_name,$slot);
+
+ if ($target eq 'web' || $target eq 'grade' || $target eq 'answer' ||
+ $target eq 'tex') {
+ if ($env{'form.markaccess'}) {
+ my @interval=&Apache::lonnet::EXT("resource.0.interval");
+ &Apache::lonnet::set_first_access($interval[1],$interval[0]);
+ }
+
+ ($status,$accessmsg,$slot_name,$slot) =
+ &Apache::lonhomework::check_slot_access('0','problem');
+ push (@Apache::inputtags::status,$status);
+ }
+
if ($target eq 'web' || $target eq 'webgrade' || $target eq 'tex'
|| $target eq 'edit') {
($result,$form_tag_start) =
@@ -1175,14 +1190,6 @@ sub start_problem {
if ($target eq 'analyze') { my $rndseed=&setup_rndseed($safeeval,$target); }
if ($target eq 'web' || $target eq 'grade' || $target eq 'answer' ||
$target eq 'tex') {
- if ($env{'form.markaccess'}) {
- my @interval=&Apache::lonnet::EXT("resource.0.interval");
- &Apache::lonnet::set_first_access($interval[1]);
- }
-
- ($status,$accessmsg,my $slot_name,my $slot) =
- &Apache::lonhomework::check_slot_access('0','problem');
- push (@Apache::inputtags::status,$status);
#handle rand seed in construction space
my $rndseed=&setup_rndseed($safeeval,$target);
@@ -1241,14 +1248,14 @@ sub start_problem {
if ( $target eq "web" ) {
my $msg;
if ($status eq 'UNAVAILABLE') {
- $msg.='
'.&mt('Unable to determine if this resource is open due to network problems. Please try again later.').'
';
+ $msg.='
'.&mt('Unable to determine if this resource is open due to network problems. Please try again later.').'