Commit bdb2c734 authored by Clare Lenihan's avatar Clare Lenihan Committed by Clare Lenihan
Browse files

Changing the redirects from adding/editing/deleting interactions as well as...

Changing the redirects from adding/editing/deleting interactions as well as backing out of adding/editing/deleting interactions.
parent b4c7bf7d
......@@ -56,7 +56,7 @@ $form = pieform(array(
'submit' => array(
'type' => 'submitcancel',
'value' => array(get_string('yes'), get_string('no')),
'goto' => get_config('wwwroot') . 'group/interactions.php?id=' . $group->id,
'goto' => get_config('wwwroot') . 'interaction/' .$instance->get('plugin') . '/view.php?id=' . $instance->get('id'),
)
)
));
......
......@@ -64,7 +64,8 @@ $elements = array_merge(
'submit' => array(
'type' => 'submitcancel',
'value' => array(get_string('save'), get_string('cancel')),
'goto' => get_config('wwwroot') . 'group/interactions.php?id=' . $groupid,
'goto' => isset($instance) ? get_config('wwwroot') . 'interaction/' . $plugin . '/view.php?id=' . $instance->get('id')
: get_config('wwwroot') . 'interaction/' . $plugin . '/index.php?group=' . $groupid,
)
)
);
......
......@@ -236,7 +236,7 @@ function delete_interaction_submit(Pieform $form, $values) {
$instance->delete();
global $SESSION;
$SESSION->add_ok_msg(get_string('interactiondeleted', 'group', get_string('name', 'interaction.' . $instance->get('plugin'))));
redirect('/group/interactions.php?id=' . $instance->get('group'));
redirect('/interaction/' . $instance->get('plugin') . '/index.php?group=' . $instance->get('group'));
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment