ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
UserHtmlExport.php
Go to the documentation of this file.
1 <?php
2 
20 
21 use ilFileUtils;
22 
27 {
28  public function __construct()
29  {
30  }
31 
35  public function exportUserImages(string $dir, array $user_ids): void
36  {
37  $base_dir = $dir . "/data/" . CLIENT_ID . "/usr_images";
38  ilFileUtils::makeDirParents($base_dir);
39  foreach ($user_ids as $id) {
40  $source = "./data/" . CLIENT_ID . "/usr_images/usr_$id.jpg";
41  if (is_file($source)) {
42  copy($source, $base_dir . "/usr_$id.jpg");
43  }
44  }
45  }
46 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static makeDirParents(string $a_dir)
Create a new directory and all parent directories.
exportUserImages(string $dir, array $user_ids)
const CLIENT_ID
Definition: constants.php:41
Wiki HTML exporter class.
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
$source
Definition: metadata.php:93