mirror of
https://github.com/moodle/moodle.git
synced 2025-03-21 16:10:15 +01:00
Merge branch 'MDL-70912-master' of git://github.com/sarjona/moodle
This commit is contained in:
commit
e635eed2ed
@ -138,9 +138,19 @@ class data_field_textarea extends data_field_base {
|
||||
$link_options->env = 'editor';
|
||||
$link_options->itemid = $draftitemid;
|
||||
|
||||
// H5P plugin.
|
||||
$args->accepted_types = ['h5p'];
|
||||
$h5poptions = initialise_filepicker($args);
|
||||
$h5poptions->context = $this->context;
|
||||
$h5poptions->client_id = uniqid();
|
||||
$h5poptions->maxbytes = $options['maxbytes'];
|
||||
$h5poptions->env = 'editor';
|
||||
$h5poptions->itemid = $draftitemid;
|
||||
|
||||
$fpoptions['image'] = $image_options;
|
||||
$fpoptions['media'] = $media_options;
|
||||
$fpoptions['link'] = $link_options;
|
||||
$fpoptions['h5p'] = $h5poptions;
|
||||
}
|
||||
|
||||
$editor = editors_get_preferred_editor($format);
|
||||
|
@ -4,8 +4,7 @@ Feature: Users can add entries to database activities
|
||||
As a user
|
||||
I need to add entries to databases
|
||||
|
||||
@javascript
|
||||
Scenario: Students can add entries to a database
|
||||
Background:
|
||||
Given the following "users" exist:
|
||||
| username | firstname | lastname | email |
|
||||
| student1 | Student | 1 | student1@example.com |
|
||||
@ -20,7 +19,10 @@ Feature: Users can add entries to database activities
|
||||
And the following "activities" exist:
|
||||
| activity | name | intro | course | idnumber |
|
||||
| data | Test database name | n | C1 | data1 |
|
||||
And I log in as "teacher1"
|
||||
|
||||
@javascript
|
||||
Scenario: Students can add entries to a database
|
||||
Given I log in as "teacher1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I add a "Text input" field to "Test database name" database and I fill the form with:
|
||||
| Field name | Test field name |
|
||||
@ -76,3 +78,14 @@ Feature: Users can add entries to database activities
|
||||
And I press "Delete selected"
|
||||
And I press "Delete"
|
||||
And I should see "No entries in database"
|
||||
|
||||
@javascript @editor @editor_atto @atto @atto_h5p
|
||||
Scenario: If a new text area entry is added, the filepicker is displayed in the H5P Atto button
|
||||
Given I log in as "teacher1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I add a "Text area" field to "Test database name" database and I fill the form with:
|
||||
| Field name | Textarea field name |
|
||||
When I add an entry to "Test database name" database with:
|
||||
| Textarea field name | This is the content |
|
||||
And I click on "Insert H5P" "button"
|
||||
Then I should see "Browse repositories..."
|
||||
|
Loading…
x
Reference in New Issue
Block a user