-
Bug
-
Resolution: Fixed
-
Major
-
2.3
-
MOODLE_23_STABLE
-
MOODLE_23_STABLE
-
wip-
MDL-33832-master -
From Marina in MDL-33513:
I found that for some reason setting of files.source at
https://github.com/moodle/moodle/blob/master/repository/repository_ajax.php#L269
is included inside the different parts of "if" statement but not all.
field source is set:
- If file is picked by reference (from external or moodle repository) and there is no name conflict
- If file is picked as copy from external repository
field source is not set:
- If file is picked by reference and there is a name conflict (user is asked whether to rename or overwrite an existing file);
- If file is picked as a copy from internal moodle repository.
Why don't we just set $record->source before this big "if" statement and it will be always consistent?
And besides I don't see any usage of get_file_source_info() in non-js filepicker
Again, I did not test it, this is just from code review.