forked from moodle/moodle
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'MDL-68796-master' of git://github.com/bmbrands/moodle
- Loading branch information
Showing
12 changed files
with
179 additions
and
8 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<?php | ||
// This file is part of Moodle - http://moodle.org/ | ||
// | ||
// Moodle is free software: you can redistribute it and/or modify | ||
// it under the terms of the GNU General Public License as published by | ||
// the Free Software Foundation, either version 3 of the License, or | ||
// (at your option) any later version. | ||
// | ||
// Moodle is distributed in the hope that it will be useful, | ||
// but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
// GNU General Public License for more details. | ||
// | ||
// You should have received a copy of the GNU General Public License | ||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
/** | ||
* Library functions for contentbank | ||
* | ||
* @package core_contentbank | ||
* @copyright 2020 Bas Brands | ||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later | ||
*/ | ||
|
||
/** | ||
* Get the current user preferences that are available | ||
* | ||
* @return Array preferences configuration | ||
*/ | ||
function core_contentbank_user_preferences() { | ||
return [ | ||
'core_contentbank_view_list' => [ | ||
'choices' => array(0, 1), | ||
'type' => PARAM_INT, | ||
'null' => NULL_NOT_ALLOWED, | ||
'default' => 'none' | ||
], | ||
]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
@core @core_contentbank @contentbank_h5p @javascript | ||
Feature: Store the content bank view preference | ||
In order to consistantly view the content bank in icons or details view | ||
As an admin | ||
I need to be able to store my view preference | ||
|
||
Background: | ||
Given the following "contentbank content" exist: | ||
| contextlevel | reference | contenttype | user | contentname | | ||
| System | | contenttype_h5p | admin | filltheblanks.h5p | | ||
| System | | contenttype_h5p | admin | mathsbook.h5p | | ||
|
||
Scenario: Admins can order content in the content bank | ||
Given I log in as "admin" | ||
And I am on site homepage | ||
And I turn editing mode on | ||
And I add the "Navigation" block if not present | ||
And I expand "Site pages" node | ||
And I click on "Content bank" "link" | ||
When I click on "Display content bank with file details" "button" | ||
And I should see "Last modified" | ||
And I follow "filltheblanks.h5p" | ||
And I click on "Content bank" "link" | ||
And I should see "Last modified" | ||
And I click on "Display content bank with icons" "button" | ||
And I follow "filltheblanks.h5p" | ||
And I click on "Content bank" "link" | ||
And I should not see "Last modified" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters