[LON-CAPA-cvs] cvs: loncom /interface lonnavmaps.pm
raeburn
raeburn@source.lon-capa.org
Sun, 28 Feb 2010 22:36:39 -0000
raeburn Sun Feb 28 22:36:39 2010 EDT
Modified files:
/loncom/interface lonnavmaps.pm
Log:
- Bug 6119. New method: is_anonsurvey() reports if part has type anonsurvey
or anonsurvey_cred.
Method is_survey() will report if part is type survey or type surveycred.
- anonsurvey -- course personnel can not view both identity of submitter
and submission details.
- anonsurveycred -- same anonymity, but submitter receives 'awarded' for
submission
-surveycred - submitter receives 'awarded' for submission to survey.
- survey - standard survey functionality
Index: loncom/interface/lonnavmaps.pm
diff -u loncom/interface/lonnavmaps.pm:1.443 loncom/interface/lonnavmaps.pm:1.444
--- loncom/interface/lonnavmaps.pm:1.443 Tue Jan 26 11:33:48 2010
+++ loncom/interface/lonnavmaps.pm Sun Feb 28 22:36:38 2010
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Navigate Maps Handler
#
-# $Id: lonnavmaps.pm,v 1.443 2010/01/26 11:33:48 foxr Exp $
+# $Id: lonnavmaps.pm,v 1.444 2010/02/28 22:36:38 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
@@ -700,7 +700,11 @@
return &mt("Excused by instructor");
}
if ($status == $res->ATTEMPTED) {
- return &mt("Answer submitted, not yet graded");
+ if ($res->is_anonsurvey($part) || $res->is_survey($part)) {
+ return &mt("Survey submission recorded");
+ } else {
+ return &mt("Answer submitted, not yet graded");
+ }
}
if ($status == $res->TRIES_LEFT) {
my $tries = $res->tries($part);
@@ -3844,7 +3848,7 @@
my $self = shift();
my $part = shift();
my $type = $self->parmval('type',$part);
- if ($type eq 'survey') {
+ if (($type eq 'survey') || ($type eq 'surveycred')) {
return 1;
}
if ($self->src() =~ /\.(survey)$/) {
@@ -3852,6 +3856,15 @@
}
return 0;
}
+sub is_anonsurvey {
+ my $self = shift();
+ my $part = shift();
+ my $type = $self->parmval('type',$part);
+ if (($type eq 'anonsurvey') || ($type eq 'anonsurveycred')) {
+ return 1;
+ }
+ return 0;
+}
sub is_task {
my $self=shift;
my $src = $self->src();