This commit is contained in:
Ilya Tregubov 2023-06-01 10:12:14 +08:00
commit 59cd47c02f
No known key found for this signature in database
GPG key ID: 0F58186F748E55C1
29 changed files with 395 additions and 455 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -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);
};
/**