Skip to content

Commit

Permalink
usando nome do conteúdo como nome sugerido do arquivo no filepicker
Browse files Browse the repository at this point in the history
  • Loading branch information
danielneis committed Apr 10, 2024
1 parent c30094b commit 73cd1dd
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion repository/contentbank/classes/helper.php
Expand Up @@ -146,9 +146,15 @@ public static function create_contentbank_content_node(\core_contentbank\content

$encodedpath = base64_encode(json_encode($params));

$filename = $file->get_filename();
if (strpos($filename, '.') !== false) {
$tmp = explode('.', $filename);
$extension = array_pop($tmp);
$filename = $content->get_name() . '.' . $extension;
}
$node = [
'shorttitle' => $content->get_name(),
'title' => $file->get_filename(),
'title' => $filename,
'datemodified' => $file->get_timemodified(),
'datecreated' => $file->get_timecreated(),
'author' => $file->get_author(),
Expand Down

0 comments on commit 73cd1dd

Please sign in to comment.