mirror of
https://github.com/moodle/moodle.git
synced 2025-03-14 12:40:01 +01:00
Merge branch 'MDL-49490-master' of git://github.com/danpoltawski/moodle
This commit is contained in:
commit
6f77b910ee
@ -788,7 +788,7 @@ class assign_files implements renderable {
|
|||||||
|
|
||||||
if (!empty($CFG->enableportfolios)) {
|
if (!empty($CFG->enableportfolios)) {
|
||||||
require_once($CFG->libdir . '/portfoliolib.php');
|
require_once($CFG->libdir . '/portfoliolib.php');
|
||||||
if (count($files) >= 1 &&
|
if (count($files) >= 1 && !empty($sid) &&
|
||||||
has_capability('mod/assign:exportownsubmission', $this->context)) {
|
has_capability('mod/assign:exportownsubmission', $this->context)) {
|
||||||
$button = new portfolio_add_button();
|
$button = new portfolio_add_button();
|
||||||
$callbackparams = array('cmid' => $this->cm->id,
|
$callbackparams = array('cmid' => $this->cm->id,
|
||||||
@ -823,6 +823,7 @@ class assign_files implements renderable {
|
|||||||
foreach ($dir['files'] as $file) {
|
foreach ($dir['files'] as $file) {
|
||||||
$file->portfoliobutton = '';
|
$file->portfoliobutton = '';
|
||||||
if (!empty($CFG->enableportfolios)) {
|
if (!empty($CFG->enableportfolios)) {
|
||||||
|
require_once($CFG->libdir . '/portfoliolib.php');
|
||||||
$button = new portfolio_add_button();
|
$button = new portfolio_add_button();
|
||||||
if (has_capability('mod/assign:exportownsubmission', $this->context)) {
|
if (has_capability('mod/assign:exportownsubmission', $this->context)) {
|
||||||
$portfolioparams = array('cmid' => $this->cm->id, 'fileid' => $file->get_id());
|
$portfolioparams = array('cmid' => $this->cm->id, 'fileid' => $file->get_id());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user