Fix function name, add comments see BT#2957

pull/2959/head
Julio Montoya 6 years ago
parent 94062a2f4e
commit 5ee3a54cfd
  1. 11
      main/webservices/user_import/import.lib.php

@ -1,4 +1,6 @@
<?php <?php
/* For licensing terms, see /license.txt*/
/** /**
* Validates imported data. * Validates imported data.
*/ */
@ -87,6 +89,8 @@ function complete_missing_data($user)
/** /**
* Save the imported data. * Save the imported data.
*
* @param array
*/ */
function save_data($users) function save_data($users)
{ {
@ -107,15 +111,18 @@ function save_data($users)
'', '',
$user['AuthSource'] $user['AuthSource']
); );
foreach ($user['Courses'] as $index => $course) {
if (!empty($user['Courses'])) {
foreach ($user['Courses'] as $course) {
if (CourseManager::course_exists($course)) { if (CourseManager::course_exists($course)) {
CourseManager:: subscribe_user( CourseManager::subscribeUser(
$user_id, $user_id,
$course, $course,
$user['Status'] $user['Status']
); );
} }
} }
}
// TODO: Hard-coded French texts. // TODO: Hard-coded French texts.

Loading…
Cancel
Save