Skip to content
Permalink
Browse files

Add importOpenSessions option see BT#14813

  • Loading branch information...
jmontoyaa committed Nov 2, 2018
1 parent 9d6b2eb commit 4c7dc3ce58250c5939d747c06ae8ada973ab4aba
Showing with 22 additions and 1 deletion.
  1. +22 −1 main/cron/import_csv.php
@@ -158,6 +158,10 @@ public function run()
$method = 'importCareersDiagram';
}
if ($method == 'importOpensessions') {
$method = 'importOpenSessions';
}
if ($method == 'importSubsessionsextidStatic') {
$method = 'importSubscribeUserToCourseSessionExtStatic';
}
@@ -200,6 +204,7 @@ public function run()
'teachers',
'courses',
'sessions',
'opensessions',
'subscribe-static',
'courseinsert-static',
'unsubscribe-static',
@@ -220,7 +225,7 @@ public function run()
echo PHP_EOL;
$this->logger->addInfo("Reading file: $file");
$this->logger->addInfo("Loading method $method ");
if ($method == 'importSessions') {
if ($method == 'importSessions' || $method == 'importOpenSessions' ) {
$this->$method(
$file,
true,
@@ -2238,6 +2243,22 @@ private function importSessionsStatic($file, $moveFile = true)
}
}
/**
* @param $file
* @param bool $moveFile
* @param array $teacherBackup
* @param array $groupBackup
*/
private function importOpenSessions(
$file,
$moveFile = true,
&$teacherBackup = [],
&$groupBackup = []
) {
$this->importSessions($file, $moveFile, $teacherBackup, $groupBackup);
}
/**
* @param string $file
* @param bool $moveFile

0 comments on commit 4c7dc3c

Please sign in to comment.
You can’t perform that action at this time.