Skip to content

Commit

Permalink
method is restored
Browse files Browse the repository at this point in the history
  • Loading branch information
solomax committed Jan 16, 2024
1 parent f74adc4 commit eede23c
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
##Apache OpenMeetings Moodle Plugin Change Log

4.4.2 (2024011701)
* `mod_form->getFile` method is restored

4.4.1 (2024011601)
* Error at `Default activity completion` page is fixed

Expand Down
2 changes: 1 addition & 1 deletion build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
xmlns:ivy="antlib:org.apache.ivy.ant">

<property name="dist.dir" value="dist" />
<property name="project.version" value="4.4.1" />
<property name="project.version" value="4.4.2" />
<property name="project.distname" value="openmeetings-moodle-plugin" />
<property name="plugin.name" value="openmeetings" />

Expand Down
20 changes: 20 additions & 0 deletions mod_form.php
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,26 @@ public function definition() {
// Add standard buttons, common to all modules.
$this->add_action_buttons();
}

/**
* Method to get uploaded files
*/
public function getFile($idx = 0) {
global $USER;
$grp = $this->_form->getElement('file_grp[' . $idx . ']');
if ($grp instanceof MoodleQuickForm_group) {
$picker = $grp->getElements()[2];
if ($picker instanceof MoodleQuickForm_filepicker) {
$fs = get_file_storage();
$context = context_user::instance($USER->id);
$files = $fs->get_area_files($context->id, 'user', 'draft', $picker->getValue(), 'id DESC', false);
if ($files) {
return reset($files);
}
}
}
return false;
}
}

if ($data) {
Expand Down

0 comments on commit eede23c

Please sign in to comment.