In Edit Questionnaire mode, the following sequence results in faulty navigation:
—
Go to Re-order question screen
Click Preview... button
Close or do not close the popup Preview window (does not matter).
Come back to the Questionnaire Edit window.
Click either on the Add Section Break, the Edit (one question), the Remove (one question) buttons
-> instead of the desired action, the program takes you to Edit Questions screen !!!
—
Diagnostic.- The preview action changes some of the form parameters and does not reset them correctly
—
Proposed solution.-
In file /questionnaire/manage_survey.php about line 175, add the following test
/// 'q' comes from the question editor as a submit, and can be from the reorder form.
} else if (isset($formdata->q)) {
+ if ($formdata->dst == 1 || is_numeric($formdata>q) || $formdata->src || $formdata->addbreak ) {
+ $formdata->tab = 'order';
+ $formdata->sid = $formdata->instance + 1;
+ }
if ($formdata->tab == 'order' && empty($formdata->q)) {
Please test and commit to CVS if proved reliable.
Thanks
Joseph
In file /questionnaire/manage_survey.php about line 175, add the following test lines
/// 'q' comes from the question editor as a submit, and can be from the reorder form.
} else if (isset($formdata->q)) {
+ if ($formdata->sid == 0) { + $formdata->sid = $SESSION->questionnaire_survey_id; + $sid = $formdata->sid; + }
+ if ($formdata->tab != 'questions') { + $formdata->tab = 'order'; + }
if ($formdata->tab == 'order' && empty($formdata->q)) {
Joseph