diff --git a/main/admin/filler.php b/main/admin/filler.php
new file mode 100755
index 0000000000..522e1a51dd
--- /dev/null
+++ b/main/admin/filler.php
@@ -0,0 +1,64 @@
+
+$language_file=array('admin','tracking');
+
+// resetting the course id
+$cidReset=true;
+
+// including some necessary chamilo files
+require_once '../inc/global.inc.php';
+require_once api_get_path(LIBRARY_PATH).'security.lib.php';
+
+// setting the section (for the tabs)
+$this_section=SECTION_PLATFORM_ADMIN;
+
+// Access restrictions
+api_protect_admin_script(true);
+$nameTools = get_lang('PlatformAdmin');
+
+// setting breadcrumbs
+$interbreadcrumb[] = array ("url" => 'index.php', "name" => $nameTools);
+
+// setting the name of the tool
+$nameTools = get_lang('DataFiller');
+
+$output = array();
+if (!empty($_GET['fill'])) {
+ require api_get_path('SYS_TEST_PATH').'datafiller/fill_users.php';
+ $output = fill_users();
+}
+
+// Displaying the header
+Display::display_header($nameTools);
+
+$result = '';
+if (count($output)>0) {
+ $result = '
'."\n";
+ $result .= '
'.$output[0]['title'].'
'."\n";
+ $result .= '
';
+ foreach ($output as $line) {
+ $result .= '';
+ $result .= ''.$line['line-init'].' | '.$line['line-info'].' | ';
+ $result .= '
'."\n";
+ }
+ $result .= '
';
+ $result .= '
';
+ Display::display_normal_message($result);
+}
+?>
+
+'.get_lang('SystemStatus').'';
-
+ if (is_dir(api_get_path(SYS_TEST_PATH).'datafiller/')) {
+ //do not show on production portals, where the tests directory doesn't exist
+ echo ''.get_lang('DataFiller').'';
+ }
?>
@@ -278,6 +281,7 @@ if(api_is_platform_admin()){
+
Chamilo.org
@@ -294,7 +298,7 @@ if(api_is_platform_admin()){
?>
-'UsersFillingReport:');
+ $i = 1;
foreach ($users as $i => $user) {
//first check that the first item doesn't exist already
- echo $user['firstname'].$eol;
- $output[] = UserManager::create_user($user['firstname'],$user['lastname'],$user['status'],$user['email'],$user['username'],$user['pass'],null,null,null,null,$user['auth_source'],null,$user['active']);
+ $output[$i]['line-init'] = $user['firstname'];
+ $output[$i]['line-info'] = (UserManager::create_user($user['firstname'],$user['lastname'],$user['status'],$user['email'],$user['username'],$user['pass'],null,null,null,null,$user['auth_source'],null,$user['active'])?$res:get_lang('NotInserted'));
+ $i++;
}
return $output;
}
\ No newline at end of file