version 1.29, 2009/05/14 14:23:56
|
version 1.33, 2011/12/21 21:25:40
|
Line 119 sub get_data {
|
Line 119 sub get_data {
|
$text = 'View more activity by this student'; |
$text = 'View more activity by this student'; |
$inc = $num_records; |
$inc = $num_records; |
$r->print(&Apache::loncommon::track_student_link($text,$sname,$sdom,undef, |
$r->print(&Apache::loncommon::track_student_link($text,$sname,$sdom,undef, |
($env{'form.start'}+$inc) |
($env{'form.start'}+$inc), |
|
$env{'form.only_body'} |
)); |
)); |
$r->print('<br />'); |
$r->print('<br />'); |
} |
} |
$r->print('<hr />'); |
$r->print('<hr />'); |
$text = 'Resubmit last request to check for newer data'; |
$text = 'Resubmit last request to check for newer data'; |
$r->print(&Apache::loncommon::track_student_link($text,$sname,$sdom,undef, |
$r->print(&Apache::loncommon::track_student_link($text,$sname,$sdom,undef, |
$env{'form.start'})); |
$env{'form.start'}, |
|
$env{'form.only_body'})); |
|
|
&Apache::lonhtmlcommon::Update_PrgWin($r,$prog_state,&mt('Finished!')); |
&Apache::lonhtmlcommon::Update_PrgWin($r,$prog_state,&mt('Finished!')); |
return; |
return; |
Line 431 sub display_values {
|
Line 433 sub display_values {
|
my ($action,$values)=@_; |
my ($action,$values)=@_; |
my $result='<table>'; |
my $result='<table>'; |
if ($action eq 'CSTORE') { |
if ($action eq 'CSTORE') { |
|
my $is_anon; |
my %values=map {split('=',$_,-1)} split(/\&/,$values); |
my %values=map {split('=',$_,-1)} split(/\&/,$values); |
foreach my $key (sort(keys(%values))) { |
foreach my $key (sort(keys(%values))) { |
|
my $unesc_key = &unescape($key); |
|
if ($values{$key} eq 'anonsurvey' || $values{$key} eq 'anonsurveycred') { |
|
if ($unesc_key =~ /^resource\..+\.type$/) { |
|
$is_anon = 1; |
|
last; |
|
} |
|
} |
$result.='<tr><td align="right">'. |
$result.='<tr><td align="right">'. |
&unescape($key). |
$unesc_key. |
'</td><td>=</td><td align="left">'. |
'</td><td>=</td><td align="left">'. |
&unescape($values{$key}).'</td></tr>'; |
&unescape($values{$key}).'</td></tr>'; |
} |
} |
$result.='</table>'; |
$result.='</table>'; |
|
if ($is_anon) { |
|
$result = '<span class="LC_warning">'.&mt('Anonymous Survey Submission: details not shown').'</span>'; |
|
} |
} elsif ($action eq 'POST') { |
} elsif ($action eq 'POST') { |
my %values; |
my %values; |
foreach my $pair (split(/\&/,$values)) { |
foreach my $pair (split(/\&/,$values)) { |
Line 523 sub handler {
|
Line 536 sub handler {
|
my $r=shift; |
my $r=shift; |
my $c = $r->connection(); |
my $c = $r->connection(); |
# |
# |
# Check for overloading here and on the course home server |
|
my $loaderror=&Apache::lonnet::overloaderror($r); |
|
if ($loaderror) { return $loaderror; } |
|
$loaderror= |
|
&Apache::lonnet::overloaderror |
|
($r, |
|
$env{'course.'.$env{'request.course.id'}.'.home'}); |
|
if ($loaderror) { return $loaderror; } |
|
# |
|
# Check for access |
# Check for access |
if (! &Apache::lonnet::allowed('vsa',$env{'request.course.id'})) { |
if (! &Apache::lonnet::allowed('vsa',$env{'request.course.id'})) { |
$env{'user.error.msg'}= |
$env{'user.error.msg'}= |
Line 554 sub handler {
|
Line 558 sub handler {
|
# |
# |
# Extract form elements from query string |
# Extract form elements from query string |
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'}, |
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'}, |
['selected_student','start']); |
['selected_student','start','only_body']); |
# |
# |
# We will almost always need this... |
# We will almost always need this... |
my $navmap = Apache::lonnavmaps::navmap->new(); |
my $navmap = Apache::lonnavmaps::navmap->new(); |
Line 572 sub handler {
|
Line 576 sub handler {
|
bug=>'instructor interface'}); |
bug=>'instructor interface'}); |
# |
# |
# Give the LON-CAPA page header |
# Give the LON-CAPA page header |
$r->print(&Apache::loncommon::start_page('Student Activity',&styles()). |
my $args; |
|
if ($env{'form.only_body'}) { |
|
$args = { only_body => 1, }; |
|
} |
|
$r->print(&Apache::loncommon::start_page('Student Activity',&styles(),$args). |
&Apache::lonhtmlcommon::breadcrumbs('Student Activity')); |
&Apache::lonhtmlcommon::breadcrumbs('Student Activity')); |
$r->rflush(); |
$r->rflush(); |
# |
# |
Line 584 sub handler {
|
Line 592 sub handler {
|
'<input type="text" name="status" size="60" value="" readonly="readonly" />'). |
'<input type="text" name="status" size="60" value="" readonly="readonly" />'). |
'</div>'); |
'</div>'); |
$r->rflush(); |
$r->rflush(); |
my %prog_state=&Apache::lonhtmlcommon::Create_PrgWin |
my %prog_state=&Apache::lonhtmlcommon::Create_PrgWin($r); |
($r,&mt('Student Activity Retrieval'), |
|
&mt('Student Activity Retrieval'),undef,'inline',undef, |
|
'trackstudent','status'); |
|
&Apache::lonhtmlcommon::Update_PrgWin |
&Apache::lonhtmlcommon::Update_PrgWin |
($r,\%prog_state,&mt('Contacting course home server')); |
($r,\%prog_state,&mt('Contacting course home server')); |
# |
# |