Skip to content

Commit

Permalink
CHOICE MDL-24102 use correct url in form submission
Browse files Browse the repository at this point in the history
  • Loading branch information
danmarsden committed Nov 19, 2010
1 parent cece179 commit 6e4453f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions mod/choice/renderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -118,11 +118,12 @@ public function display_result($choices, $forcepublish = false) {
* @return string
*/
public function display_publish_name_vertical($choices) {
global $PAGE;
$html ='';
$html .= html_writer::tag('h2',format_string(get_string("responses", "choice")), array('class'=>'main'));

$attributes = array('method'=>'POST');
$attributes['action'] = new moodle_url('/mod/choice/view.php');
$attributes['action'] = new moodle_url($PAGE->url);
$attributes['id'] = 'attemptsform';

if ($choices->viewresponsecapability) {
Expand Down Expand Up @@ -213,7 +214,7 @@ public function display_publish_name_vertical($choices) {

$actiondata .= html_writer::tag('label', ' ' . get_string('withselected', 'quiz') . ' ', array('for'=>'menuaction'));

$actionurl = new moodle_url('/mod/choice/view.php', array('sesskey'=>sesskey(), 'action'=>'delete_confirmation()'));
$actionurl = new moodle_url($PAGE->url, array('sesskey'=>sesskey(), 'action'=>'delete_confirmation()'));
$select = new single_select($actionurl, 'action', array('delete'=>get_string('delete')), null, array(''=>get_string('chooseaction', 'choice')), 'attemptsform');

$actiondata .= $this->output->render($select);
Expand Down

0 comments on commit 6e4453f

Please sign in to comment.