mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
Merge branch 'MDL-62859' of https://github.com/paulholden/moodle
This commit is contained in:
commit
59cd47c02f
29 changed files with 395 additions and 455 deletions
4
contentbank/amd/build/sort.min.js
vendored
4
contentbank/amd/build/sort.min.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -24,8 +24,8 @@
|
|||
import selectors from './selectors';
|
||||
import {get_string as getString} from 'core/str';
|
||||
import Prefetch from 'core/prefetch';
|
||||
import Ajax from 'core/ajax';
|
||||
import Notification from 'core/notification';
|
||||
import {setUserPreference} from 'core_user/repository';
|
||||
|
||||
/**
|
||||
* Set up the contentbank views.
|
||||
|
@ -168,19 +168,8 @@ const setViewListPreference = function(viewList) {
|
|||
viewList = null;
|
||||
}
|
||||
|
||||
const request = {
|
||||
methodname: 'core_user_update_user_preferences',
|
||||
args: {
|
||||
preferences: [
|
||||
{
|
||||
type: 'core_contentbank_view_list',
|
||||
value: viewList
|
||||
}
|
||||
]
|
||||
}
|
||||
};
|
||||
|
||||
return Ajax.call([request])[0].catch(Notification.exception);
|
||||
return setUserPreference('core_contentbank_view_list', viewList)
|
||||
.catch(Notification.exception);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue