Skip to content

Commit

Permalink
Merge branch 'MDL-70041-master' of git://github.com/mihailges/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
snake committed Oct 29, 2020
2 parents 131dacc + 81d0642 commit 6fcd084
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion lib/form/filemanager.js
Original file line number Diff line number Diff line change
Expand Up @@ -714,7 +714,8 @@ M.form_filemanager.init = function(Y, options) {
if (filenode) {
// File has a license already, use it.
selectedlicense = filenode.license;
} else if (this.filepicker_options.rememberuserlicensepref) {
} else if (this.filepicker_options.rememberuserlicensepref && this.get_preference('recentlicense')) {
// When 'Remember user licence preference' is enabled use the last license selected by the user, if any.
selectedlicense = this.get_preference('recentlicense');
}
var licenses = this.filepicker_options.licenses;
Expand Down
3 changes: 2 additions & 1 deletion repository/filepicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -1784,7 +1784,8 @@ M.core_filepicker.init = function(Y, options) {
if (filenode) {
// File has a license already, use it.
selectedlicense = filenode.license;
} else if (this.options.rememberuserlicensepref) {
} else if (this.options.rememberuserlicensepref && this.get_preference('recentlicense')) {
// When 'Remember user licence preference' is enabled use the last license selected by the user, if any.
selectedlicense = this.get_preference('recentlicense');
}
var licenses = this.options.licenses;
Expand Down

0 comments on commit 6fcd084

Please sign in to comment.