Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

MDL-27857 Assignment does not use form tag to render portfolio export…

… control widget

When this code was used as a part of the grading screen, the default
PORTFOLIO_ADD_FULL_FORM widget led to nested form elements. This patch replaces
the form widget with a plain text link that can be embedded safely.

Backported from MOODLE_21_STABLE with a conflict resolved in mod/assignment/renderer.php
commit 490057db33178ae3e5a8094d28f3416698b13762 1 parent 690ef50
@mudrd8mz mudrd8mz authored
Showing with 2 additions and 2 deletions.
  1. +1 −1  mod/assignment/lib.php
  2. +1 −1  mod/assignment/renderer.php
View
2  mod/assignment/lib.php
@@ -1919,7 +1919,7 @@ function print_user_files($userid=0, $return=false) {
}
if (count($files) > 1 && $this->portfolio_exportable() && has_capability('mod/assignment:exportownsubmission', $this->context)) {
$button->set_callback_options('assignment_portfolio_caller', array('id' => $this->cm->id), '/mod/assignment/locallib.php');
- $output .= '<br />' . $button->to_html();
+ $output .= '<br />' . $button->to_html(PORTFOLIO_ADD_TEXT_LINK);
}
}
View
2  mod/assignment/renderer.php
@@ -97,7 +97,7 @@ public function __construct($context, $itemid, $filearea='submission') {
$button = new portfolio_add_button();
$button->set_callback_options('assignment_portfolio_caller', array('id' => $this->cm->id), '/mod/assignment/locallib.php');
$button->reset_formats();
- $this->portfolioform = $button->to_html();
+ $this->portfolioform = $button->to_html(PORTFOLIO_ADD_TEXT_LINK);
}
$this->preprocess($this->dir, $filearea);
}
Please sign in to comment.
Something went wrong with that request. Please try again.