--- loncom/interface/lontrackstudent.pm 2009/01/02 23:07:55 1.26
+++ loncom/interface/lontrackstudent.pm 2014/01/15 10:29:07 1.36
@@ -1,6 +1,6 @@
# The LearningOnline Network with CAPA
#
-# $Id: lontrackstudent.pm,v 1.26 2009/01/02 23:07:55 raeburn Exp $
+# $Id: lontrackstudent.pm,v 1.36 2014/01/15 10:29:07 bisitz Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -119,13 +119,16 @@ sub get_data {
$text = 'View more activity by this student';
$inc = $num_records;
$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('
');
}
+ $r->print('
');
$text = 'Resubmit last request to check for newer data';
$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!'));
return;
@@ -183,11 +186,11 @@ sub get_max_time_in_db {
($r,$prog_state,&mt('Parsing results'));
#
if (! open(TIMEDATA,$results_file)) {
- $r->print(''.&mt('Unable to read results file.').'
'.
+ $r->print(''.&mt('Unable to read results file.').'
'.
''.
- &mt('This is a serious error and has been logged. '.
- 'You should contact your system administrator '.
- 'to resolve this issue.').
+ &mt('This is a serious error and has been logged.').
+ '
'.
+ &mt('Please alert your LON-CAPA administrator.').
'
');
return;
}
@@ -248,15 +251,15 @@ sub output_results {
##
if (! -s $results_file) {
# results file is empty, just let them know there is no data
- $r->print(''.&mt('So far, no data has been returned for your request').'
');
+ $r->print(''.&mt('So far, no data has been returned for your request').'
');
return -1;
}
if (! open(ACTIVITYDATA,$results_file)) {
- $r->print(''.&mt('Unable to read results file.').'
'.
+ $r->print(''.&mt('Unable to read results file.').'
'.
''.
- &mt('This is a serious error and has been logged. '.
- 'You should contact your system administrator '.
- 'to resolve this issue.').
+ &mt('This is a serious error and has been logged.').
+ '
'.
+ &mt('Please alert your LON-CAPA administrator.').
'
');
return -2;
}
@@ -430,14 +433,25 @@ sub display_values {
my ($action,$values)=@_;
my $result='';
if ($action eq 'CSTORE') {
+ my $is_anon;
my %values=map {split('=',$_,-1)} split(/\&/,$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.=''.
- &unescape($key).
+ $unesc_key.
' | = | '.
&unescape($values{$key}).' |
';
}
$result.='
';
+ if ($is_anon) {
+ $result = ''.&mt('Anonymous Survey Submission: details not shown').'';
+ }
} elsif ($action eq 'POST') {
my %values;
foreach my $pair (split(/\&/,$values)) {
@@ -522,15 +536,6 @@ sub handler {
my $r=shift;
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
if (! &Apache::lonnet::allowed('vsa',$env{'request.course.id'})) {
$env{'user.error.msg'}=
@@ -553,7 +558,7 @@ sub handler {
#
# Extract form elements from query string
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},
- ['selected_student','start']);
+ ['selected_student','start','only_body']);
#
# We will almost always need this...
my $navmap = Apache::lonnavmaps::navmap->new();
@@ -571,22 +576,18 @@ sub handler {
bug=>'instructor interface'});
#
# 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'));
$r->rflush();
#
# Begin form output
$r->print('