version 1.26, 2009/01/02 23:07:55
|
version 1.32, 2010/06/06 21:34:23
|
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 />'); |
$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 430 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 522 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 553 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 571 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 579 sub handler {
|
Line 588 sub handler {
|
$r->print('<form name="trackstudent" method="post" action="/adm/trackstudent">'); |
$r->print('<form name="trackstudent" method="post" action="/adm/trackstudent">'); |
$r->print('<br />'); |
$r->print('<br />'); |
$r->print('<div name="statusline">'. |
$r->print('<div name="statusline">'. |
&mt('Status:[_1]', |
&mt('Status: [_1]', |
'<input type="text" name="status" size="60" value="" />'). |
'<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 |
Line 599 sub handler {
|
Line 608 sub handler {
|
if ($sname =~ /^$LONCAPA::username_re$/ |
if ($sname =~ /^$LONCAPA::username_re$/ |
&& $sdom =~ /^$LONCAPA::domain_re$/) { |
&& $sdom =~ /^$LONCAPA::domain_re$/) { |
$r->print('<h2>'. |
$r->print('<h2>'. |
&mt('Recent activity of [_1]:[_2]',$sname,$sdom). |
&mt('Recent activity of [_1]',$sname.':'.$sdom). |
'</h2>'); |
'</h2>'); |
$r->print('<p>'.&mt(<<END).'</p>'); |
$r->print('<p class="LC_info">' |
Compiling student activity data can take a long time. |
.&mt('Compiling student activity data can take a long time.' |
Your request continues to be processed while results are displayed. |
.' Your request continues to be processed while results are displayed.') |
END |
.'</p>' |
|
); |
&get_data($r,\%prog_state,$navmap, |
&get_data($r,\%prog_state,$navmap, |
'student:'.$env{'form.selected_student'}); |
'student:'.$env{'form.selected_student'}); |
} else { |
} else { |