--- loncom/interface/lontrackstudent.pm 2010/01/06 18:23:27 1.30.2.1
+++ loncom/interface/lontrackstudent.pm 2012/10/12 16:27:19 1.35
@@ -1,6 +1,6 @@
# The LearningOnline Network with CAPA
#
-# $Id: lontrackstudent.pm,v 1.30.2.1 2010/01/06 18:23:27 raeburn Exp $
+# $Id: lontrackstudent.pm,v 1.35 2012/10/12 16:27:19 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -251,11 +251,11 @@ 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 '.
@@ -433,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)) {
@@ -525,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,16 +555,6 @@ sub handler {
&Apache::loncommon::content_type($r,'text/html');
$r->send_http_header;
if ($r->header_only) { return OK; }
-
- if (&Apache::loncommon::needs_gci_custom()) {
- $r->print(&Apache::loncommon::start_page("Student Activity"));
- $r->print(''.
- &mt('No student activity display available for Concept Tests') .
- '
');
- $r->print(&Apache::loncommon::end_page());
- return OK;
- }
-
#
# Extract form elements from query string
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},
@@ -594,16 +586,8 @@ sub handler {
#
# Begin form output
$r->print('