Made Survey Preview a little less brutal
This commit is contained in:
parent
fcad3a112d
commit
cdc44a1bfb
2 changed files with 4 additions and 4 deletions
|
|
@ -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
|
to waste your time clicking through all of the initial questions to get to the one
|
||||||
you want to look at.
|
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
|
current user (although only survey builders can call this method so that shouldn't be
|
||||||
a problem).
|
a problem).
|
||||||
|
|
||||||
|
|
@ -811,8 +811,8 @@ sub www_jumpTo {
|
||||||
|
|
||||||
$self->session->log->debug("www_jumpTo: $id");
|
$self->session->log->debug("www_jumpTo: $id");
|
||||||
|
|
||||||
# Remove existing responses for current user
|
# Remove any in-progress responses for current user
|
||||||
$self->session->db->write( 'delete from Survey_response where assetId = ? and userId = ?',
|
$self->session->db->write( 'delete from Survey_response where assetId = ? and userId = ? and isComplete = 0',
|
||||||
[ $self->getId, $self->session->user->userId() ] );
|
[ $self->getId, $self->session->user->userId() ] );
|
||||||
|
|
||||||
# Break the $id down into sIndex and qIndex
|
# Break the $id down into sIndex and qIndex
|
||||||
|
|
|
||||||
|
|
@ -108,7 +108,7 @@ Survey.ObjectTemplate = (function(){
|
||||||
alert('Sorry, preview is only supported for Sections and Questions, not Answers');
|
alert('Sorry, preview is only supported for Sections and Questions, not Answers');
|
||||||
}
|
}
|
||||||
else {
|
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. ' +
|
'user account and redirect you to the Take Survey page starting at the selected item. ' +
|
||||||
"\n\nAre you sure you want to continue?";
|
"\n\nAre you sure you want to continue?";
|
||||||
if (confirm(msg)) {
|
if (confirm(msg)) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue