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.
  • Loading branch information...
commit daf4471a40110431d21c22c6d46663aeb7db361b 1 parent 3973662
David Mudrák mudrd8mz authored
Showing with 2 additions and 2 deletions.
  1. +1 −1  mod/assignment/lib.php
  2. +1 −1  mod/assignment/renderer.php
2  mod/assignment/lib.php
View
@@ -1927,7 +1927,7 @@ function print_user_files($userid=0, $return=false) {
}
if ($CFG->enableportfolios && 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);
}
}
2  mod/assignment/renderer.php
View
@@ -98,7 +98,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.