|
@@ -2180,6 +2180,9 @@ function fixIds(EntityManager $em)
|
|
|
}
|
|
|
$sql = "SELECT * FROM c_item_property";
|
|
|
$result = $connection->fetchAll($sql);
|
|
|
+ $counter = 0;
|
|
|
+ error_log("Items to process: ".count($result));
|
|
|
+
|
|
|
foreach ($result as $item) {
|
|
|
$courseId = $item['c_id'];
|
|
|
$sessionId = intval($item['session_id']);
|
|
@@ -2234,8 +2237,11 @@ function fixIds(EntityManager $em)
|
|
|
$newId = $data['iid'];
|
|
|
}
|
|
|
$sql = "UPDATE c_item_property SET ref = $newId WHERE iid = $iid";
|
|
|
+ error_log($sql);
|
|
|
$connection->executeQuery($sql);
|
|
|
}
|
|
|
+ error_log("Process item #$counter");
|
|
|
+ $counter++;
|
|
|
}
|
|
|
|
|
|
if ($debug) {
|