◆ getDefaultAmountOfStepsPerRun()
PRGUpdateCRSRefLPSettingMigration::getDefaultAmountOfStepsPerRun |
( |
| ) |
|
◆ getLabel()
PRGUpdateCRSRefLPSettingMigration::getLabel |
( |
| ) |
|
◆ getPreconditions()
PRGUpdateCRSRefLPSettingMigration::getPreconditions |
( |
Environment |
$environment | ) |
|
◆ getRemainingAmountOfSteps()
PRGUpdateCRSRefLPSettingMigration::getRemainingAmountOfSteps |
( |
| ) |
|
Definition at line 90 of file class.PRGUpdateCRSRefLPSettingMigration.php.
References $query, $result, and ilLPObjSettings\LP_MODE_COURSE_REFERENCE.
92 $query =
"SELECT count(distinct od.obj_id) AS cnt " . PHP_EOL .
93 "FROM object_reference oref " . PHP_EOL .
94 "JOIN object_data od ON od.obj_id = oref.obj_id AND od.type = 'crsr'" . PHP_EOL .
95 "JOIN tree ON oref.ref_id = tree.child" . PHP_EOL .
96 "JOIN tree t2 ON t2.path > tree.path" . PHP_EOL .
97 "JOIN object_reference oref2 ON oref2.ref_id = t2.child" . PHP_EOL .
98 "JOIN object_data od2 ON od2.obj_id = oref2.obj_id AND od2.type = 'prg'" . PHP_EOL .
99 "WHERE od.obj_id NOT IN (" . PHP_EOL .
100 "SELECT obj_id FROM ut_lp_settings WHERE obj_type = 'crsr' AND u_mode = " 104 $row = $this->db->fetchAssoc(
$result);
106 return (
int) $row[
'cnt'];
const LP_MODE_COURSE_REFERENCE
◆ prepare()
PRGUpdateCRSRefLPSettingMigration::prepare |
( |
Environment |
$environment | ) |
|
◆ step()
PRGUpdateCRSRefLPSettingMigration::step |
( |
Environment |
$environment | ) |
|
- Exceptions
-
Definition at line 61 of file class.PRGUpdateCRSRefLPSettingMigration.php.
References $query, $result, and ilLPObjSettings\LP_MODE_COURSE_REFERENCE.
63 $query =
"SELECT distinct od.obj_id AS objid " . PHP_EOL .
64 "FROM object_reference oref " . PHP_EOL .
65 "JOIN object_data od ON od.obj_id = oref.obj_id AND od.type = 'crsr'" . PHP_EOL .
66 "JOIN tree ON oref.ref_id = tree.child" . PHP_EOL .
67 "JOIN tree t2 ON t2.path > tree.path" . PHP_EOL .
68 "JOIN object_reference oref2 ON oref2.ref_id = t2.child" . PHP_EOL .
69 "JOIN object_data od2 ON od2.obj_id = oref2.obj_id AND od2.type = 'prg'" . PHP_EOL .
70 "WHERE od.obj_id NOT IN (" . PHP_EOL .
71 "SELECT obj_id FROM ut_lp_settings WHERE obj_type = 'crsr' AND u_mode = " 77 $row = $this->db->fetchAssoc(
$result);
78 $q =
'DELETE FROM ut_lp_settings WHERE obj_id = ' . (int) $row[
'objid'];
79 $this->db->manipulate($q);
81 $q =
'INSERT INTO ut_lp_settings (obj_id, obj_type, u_mode)' . PHP_EOL .
87 $this->db->manipulate($q);
const LP_MODE_COURSE_REFERENCE
◆ $db
◆ $io
mixed PRGUpdateCRSRefLPSettingMigration::$io |
|
private |
◆ DEFAULT_AMOUNT_OF_STEPS
const PRGUpdateCRSRefLPSettingMigration::DEFAULT_AMOUNT_OF_STEPS = 1000 |
|
private |
The documentation for this class was generated from the following file: