Made Survey Preview a little less brutal

This commit is contained in:
Patrick Donelan 2009-06-09 03:26:24 +00:00
parent fcad3a112d
commit cdc44a1bfb
2 changed files with 4 additions and 4 deletions

View file

@ -791,7 +791,7 @@ point. This is useful for user-testing large Survey instances where you don't wa
to waste your time clicking through all of the initial questions to get to the one
you want to look at.
Note that calling this method will delete any existing survey responses for the
Note that calling this method will delete any in-progress survey responses for the
current user (although only survey builders can call this method so that shouldn't be
a problem).
@ -811,8 +811,8 @@ sub www_jumpTo {
$self->session->log->debug("www_jumpTo: $id");
# Remove existing responses for current user
$self->session->db->write( 'delete from Survey_response where assetId = ? and userId = ?',
# Remove any in-progress responses for current user
$self->session->db->write( 'delete from Survey_response where assetId = ? and userId = ? and isComplete = 0',
[ $self->getId, $self->session->user->userId() ] );
# Break the $id down into sIndex and qIndex

View file

@ -108,7 +108,7 @@ Survey.ObjectTemplate = (function(){
alert('Sorry, preview is only supported for Sections and Questions, not Answers');
}
else {
var msg = 'This will delete any Survey responses you have made under this ' +
var msg = 'This will delete any in-progress Survey responses you have made under this ' +
'user account and redirect you to the Take Survey page starting at the selected item. ' +
"\n\nAre you sure you want to continue?";
if (confirm(msg)) {