version 1.453, 2009/06/30 10:18:47
|
version 1.461.2.1, 2010/08/09 23:39:50
|
Line 218 sub page_start {
|
Line 218 sub page_start {
|
'text' => 'Construction Space', |
'text' => 'Construction Space', |
'href' => &Apache::loncommon::authorspace(), |
'href' => &Apache::loncommon::authorspace(), |
}); |
}); |
|
# breadcrumbs (and tools) will be created |
|
# in start_page->bodytag->innerregister |
|
|
# FIXME Where are we? |
# FIXME Where are we? |
# &Apache::lonhtmlcommon::add_breadcrumb({ |
# &Apache::lonhtmlcommon::add_breadcrumb({ |
# 'text' => 'Problem Editing', # 'Problem Testing' |
# 'text' => 'Problem Editing', # 'Problem Testing' |
# 'href' => '', |
# 'href' => '', |
# }); |
# }); |
$pageheader = &Apache::lonhtmlcommon::breadcrumbs() |
$pageheader =&Apache::loncommon::head_subbox( |
.&Apache::loncommon::head_subbox( |
|
&Apache::loncommon::CSTR_pageheader()); |
&Apache::loncommon::CSTR_pageheader()); |
} |
} |
} elsif (!defined($found{'body'})) { |
} elsif (!defined($found{'body'})) { |
Line 252 sub page_start {
|
Line 254 sub page_start {
|
my $page_start = &Apache::loncommon::start_page($name,$extra_head, |
my $page_start = &Apache::loncommon::start_page($name,$extra_head, |
\%body_args); |
\%body_args); |
$page_start .= $pageheader; |
$page_start .= $pageheader; |
if (!defined($found{'body'}) |
|
&& $env{'request.state'} ne 'construct' |
unless ($env{'request.gcicontext'} eq 'buildtest') { |
&& ($target eq 'web' || $target eq 'webgrade')) { |
if (!defined($found{'body'}) |
|
&& $env{'request.state'} ne 'construct' |
my ($symb,undef,undef,undef,$publicuser)= &Apache::lonnet::whichuser(); |
&& ($target eq 'web' || $target eq 'webgrade')) { |
if ($symb eq '' && !$publicuser) { |
|
my $help = &Apache::loncommon::help_open_topic("Ambiguous_Reference"); |
my ($symb,undef,undef,undef,$publicuser)= &Apache::lonnet::whichuser(); |
$help=&mt("Browsing resource, all submissions are temporary.")."<br />"; |
if ($symb eq '' && !$publicuser) { |
$page_start .= $help; |
$page_start .= '<p class="LC_info">' |
} |
.&mt('Browsing resource, all submissions are temporary.') |
|
.'</p>'; |
|
} |
|
} |
} |
} |
|
|
if (!defined($found{'body'}) && $env{'request.state'} ne 'construct') { |
if (!defined($found{'body'}) && $env{'request.state'} ne 'construct') { |
Line 271 sub page_start {
|
Line 276 sub page_start {
|
my $form_tag_start; |
my $form_tag_start; |
if (!defined($found{'form'})) { |
if (!defined($found{'form'})) { |
$form_tag_start='<form name="lonhomework" enctype="multipart/form-data" method="post" action="'; |
$form_tag_start='<form name="lonhomework" enctype="multipart/form-data" method="post" action="'; |
my $uri = &Apache::lonenc::check_encrypt($env{'request.uri'}); |
my $uri = Apache::loncommon::inhibit_menu_check( |
|
&Apache::lonenc::check_encrypt($env{'request.uri'})); |
$form_tag_start.=$uri.'" '; |
$form_tag_start.=$uri.'" '; |
if ($target eq 'edit') { |
if ($target eq 'edit') { |
$form_tag_start.=&Apache::edit::form_change_detection(); |
$form_tag_start.=&Apache::edit::form_change_detection(); |
Line 386 sub problem_edit_header {
|
Line 392 sub problem_edit_header {
|
'.&mt('Problem Editing').&Apache::loncommon::help_open_menu('Problem Editing','Problem_Editor_XML_Index',5,'Authoring').' |
'.&mt('Problem Editing').&Apache::loncommon::help_open_menu('Problem Editing','Problem_Editor_XML_Index',5,'Authoring').' |
</div>'. |
</div>'. |
&problem_edit_buttons().' |
&problem_edit_buttons().' |
<hr /> |
<hr style="clear:both;" /> |
'.&Apache::lonxml::message_location().' |
'.&Apache::lonxml::message_location().' |
</div> |
</div> |
'. |
'. |
'<table border="0" width="100%"><tr><td bgcolor="#DDDDDD">'; |
'<table border="0" width="100%"><tr><td bgcolor="#F8F8F8">'; |
} |
} |
|
|
sub problem_edit_footer { |
sub problem_edit_footer { |
Line 398 sub problem_edit_footer {
|
Line 404 sub problem_edit_footer {
|
<div class="LC_edit_problem_footer"> |
<div class="LC_edit_problem_footer"> |
<hr />'. |
<hr />'. |
&problem_edit_buttons().' |
&problem_edit_buttons().' |
<hr /> |
<hr style="clear:both;" /> |
</div> |
</div> |
'. |
'. |
|
|
Line 648 item store_aggregates()
|
Line 654 item store_aggregates()
|
|
|
sub store_aggregates { |
sub store_aggregates { |
my ($symb,$courseid) = @_; |
my ($symb,$courseid) = @_; |
my %aggregate; |
my (%aggregate,%subtracker); |
|
my $tracksub; |
|
if ($symb =~ m{^uploaded/gcitest/$LONCAPA::match_courseid/default_1261144274.sequence___\d+___gci/gci/}) { |
|
$tracksub = 1; |
|
} |
my @parts; |
my @parts; |
my $cdomain = $env{'course.'.$env{'request.course.id'}.'.domain'}; |
my $cdomain = $env{'course.'.$env{'request.course.id'}.'.domain'}; |
my $cname = $env{'course.'.$env{'request.course.id'}.'.num'}; |
my $cname = $env{'course.'.$env{'request.course.id'}.'.num'}; |
Line 663 sub store_aggregates {
|
Line 673 sub store_aggregates {
|
$Apache::lonhomework::results{'resource.'.$part.'.award'} |
$Apache::lonhomework::results{'resource.'.$part.'.award'} |
eq 'EXACT_ANS') { |
eq 'EXACT_ANS') { |
$aggregate{$symb."\0".$part."\0correct"} = 1; |
$aggregate{$symb."\0".$part."\0correct"} = 1; |
|
if ($tracksub) { |
|
$subtracker{$env{'user.name'}.':'.$env{'user.domain'}."\0correct"} ++; |
|
} |
} |
} |
if ($Apache::lonhomework::results{'resource.'.$part.'.tries'} == 1) { |
if ($Apache::lonhomework::results{'resource.'.$part.'.tries'} == 1) { |
$aggregate{$symb."\0".$part."\0users"} = 1; |
$aggregate{$symb."\0".$part."\0users"} = 1; |
Line 675 sub store_aggregates {
|
Line 688 sub store_aggregates {
|
} |
} |
} |
} |
$aggregate{$symb."\0".$part."\0attempts"} = 1; |
$aggregate{$symb."\0".$part."\0attempts"} = 1; |
|
if ($tracksub) { |
|
if ($Apache::lonhomework::type eq 'survey') { |
|
$subtracker{$env{'user.name'}.':'.$env{'user.domain'}."\0surveysubs"} ++; |
|
} else { |
|
$subtracker{$env{'user.name'}.':'.$env{'user.domain'}."\0attempts"} ++; |
|
} |
|
} |
} |
} |
if (keys (%aggregate) > 0) { |
if (keys (%aggregate) > 0) { |
&Apache::lonnet::cinc('nohist_resourcetracker',\%aggregate, |
&Apache::lonnet::cinc('nohist_resourcetracker',\%aggregate, |
$cdomain,$cname); |
$cdomain,$cname); |
} |
} |
|
if (keys(%subtracker) > 0) { |
|
&Apache::lonnet::cinc('nohist_submissiontracker',\%subtracker, |
|
$cdomain,$cname); |
|
} |
} |
} |
|
|
sub checkout_msg { |
sub checkout_msg { |
Line 911 sub start_problem {
|
Line 935 sub start_problem {
|
if ($env{'request.state'} ne "construct" && |
if ($env{'request.state'} ne "construct" && |
($symb eq '' || $Apache::lonhomework::type eq 'practice')) { |
($symb eq '' || $Apache::lonhomework::type eq 'practice')) { |
$form_tag_start.='<input type="hidden" name="rndseed" value="'. |
$form_tag_start.='<input type="hidden" name="rndseed" value="'. |
$rndseed.'" />'. |
$rndseed.'" />'; |
'<input type="submit" name="resetdata" |
unless ($env{'request.gcicontext'} eq 'buildtest') { |
value="'.&mt('New Problem Variation').'" />'; |
$form_tag_start .= '<input type="submit" name="resetdata"'. |
|
' value="'.&mt('New Problem Variation').'" />'; |
|
} |
if (exists($env{'form.username'})) { |
if (exists($env{'form.username'})) { |
$form_tag_start.= |
$form_tag_start.= |
'<input type="hidden" name="username" |
'<input type="hidden" name="username" |
value="'.$env{'form.username'}.'" />'; |
value="'.$env{'form.username'}.'" />'; |
} |
} |
if ($env{'request.role.adv'}) { |
unless ($env{'request.gcicontext'} eq 'buildtest') { |
$form_tag_start.= |
if ($env{'request.role.adv'}) { |
' <label><input type="checkbox" name="showallfoils"'; |
$form_tag_start.= ' <label class="LC_nobreak">' |
if (defined($env{'form.showallfoils'})) { |
.'<input type="checkbox" name="showallfoils"'; |
$form_tag_start.=' checked="checked"'; |
if (defined($env{'form.showallfoils'})) { |
} |
$form_tag_start.=' checked="checked"'; |
$form_tag_start.= ' />'.&mt(' Show All Foils'). |
} |
'</label>'; |
$form_tag_start.= ' /> ' |
} |
.&mt('Show All Foils') |
|
.'</label>'; |
|
} |
|
} |
if ($Apache::lonhomework::type eq 'practice') { |
if ($Apache::lonhomework::type eq 'practice') { |
$form_tag_start.=&practice_problem_header(); |
$form_tag_start.=&practice_problem_header(); |
} |
} |
$form_tag_start.='<hr />'; |
unless ($env{'request.gcicontext'} eq 'buildtest') { |
|
$form_tag_start.='<hr />'; |
|
} |
} |
} |
|
|
($status,$accessmsg,my $slot_name,my $slot) = |
($status,$accessmsg,my $slot_name,my $slot) = |