19 declare(strict_types=1);
27 private const QUERY =
"SELECT page_id, parent_id, parent_type, count(page_id) AS cnt" . PHP_EOL
28 .
"FROM page_object" . PHP_EOL
29 .
"WHERE page_id = (parent_id * -1)" . PHP_EOL
30 .
"AND parent_type = 'cont'";
36 return "Update IDs of intro pages";
41 return self::DEFAULT_AMOUNT_OF_STEPS;
61 $result = $this->db->query(self::QUERY .
' LIMIT 1');
62 $row = $this->db->fetchAssoc($result);
63 $query =
'UPDATE page_object' . PHP_EOL
64 .
"SET page_id = parent_id, parent_type = 'lsoi'" . PHP_EOL
65 .
"WHERE page_id = " . $row[
'page_id'] . PHP_EOL
66 .
"AND parent_id = " . $row[
'parent_id'] . PHP_EOL
67 .
"AND parent_type = " . $this->db->quote($row[
'parent_type'],
'text');
68 $this->db->manipulate($query);
73 $result = $this->db->query(self::QUERY);
74 $row = $this->db->fetchAssoc($result);
76 return (
int) $row[
'cnt'];
prepare(Environment $environment)
getDefaultAmountOfStepsPerRun()
getResource(string $id)
Consumers of this method should check if the result is what they expect, e.g.
getPreconditions(Environment $environment)
step(Environment $environment)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getRemainingAmountOfSteps()
const DEFAULT_AMOUNT_OF_STEPS
An environment holds resources to be used in the setup process.