mirror of
https://github.com/moodle/moodle.git
synced 2025-04-22 17:02:03 +02:00
portfolio: MDL-21030 added helper function to add multiple attachments
This commit is contained in:
parent
67f941099a
commit
ed986e0082
@ -331,6 +331,16 @@ class portfolio_format_leap2a_entry {
|
||||
$this->attachments[$file->get_id()] = $file;
|
||||
}
|
||||
|
||||
/**
|
||||
* helper function to add a bunch of files at the same time
|
||||
* useful for passing $this->multifiles straight through from the portfolio_caller
|
||||
*/
|
||||
public function add_attachments(array $files) {
|
||||
foreach ($files as $file) {
|
||||
$this->add_attachment($file);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* add a category to this entry
|
||||
* http://wiki.cetis.ac.uk/2009-03/LEAP2A_categories
|
||||
|
Loading…
x
Reference in New Issue
Block a user