Questtype ?Drag&Drop?: correct step-handling for task editing
This commit is contained in:
parent
4ce4a14cbc
commit
433e4b3a81
1 changed files with 9 additions and 13 deletions
|
|
@ -276,7 +276,7 @@
|
||||||
if($this->request->getRequestMethod() == 'POST')
|
if($this->request->getRequestMethod() == 'POST')
|
||||||
{
|
{
|
||||||
// Get current step
|
// Get current step
|
||||||
$step = max(0, min(2, intval($this->request->getPostParam('step'))));
|
$step = max(0, min($steps, intval($this->request->getPostParam('step'))));
|
||||||
|
|
||||||
// Drag&Drop-field (background image)
|
// Drag&Drop-field (background image)
|
||||||
if($step == 0)
|
if($step == 0)
|
||||||
|
|
@ -495,21 +495,17 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
// Go to next/previous step
|
// Go to next/previous step
|
||||||
if(!is_null($this->request->getPostParam('prev'))) {
|
if($validation === true && $dragsValidation === true)
|
||||||
$step--;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$step++;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Redirect after last step
|
|
||||||
if($step > $steps)
|
|
||||||
{
|
{
|
||||||
if($validation === true && $dragsValidation === true) {
|
if(!is_null($this->request->getPostParam('prev'))) {
|
||||||
$this->redirect($this->linker->link(array('quest', $seminary['url'], $questgroup['url'], $quest['url']), 1));
|
$step--;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$step--;
|
$step++;
|
||||||
|
}
|
||||||
|
// Redirect after last step
|
||||||
|
if($step > $steps) {
|
||||||
|
$this->redirect($this->linker->link(array('quest', $seminary['url'], $questgroup['url'], $quest['url']), 1));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue