◆ getDefaultAmountOfStepsPerRun()
PRGUpdateCompletionByMigration::getDefaultAmountOfStepsPerRun |
( |
| ) |
|
◆ getLabel()
PRGUpdateCompletionByMigration::getLabel |
( |
| ) |
|
◆ getPreconditions()
PRGUpdateCompletionByMigration::getPreconditions |
( |
Environment |
$environment | ) |
|
◆ getRemainingAmountOfSteps()
PRGUpdateCompletionByMigration::getRemainingAmountOfSteps |
( |
| ) |
|
Definition at line 80 of file class.PRGUpdateCompletionByMigration.php.
References $query.
82 $query =
'SELECT count(completion_by) AS cnt FROM prg_usr_progress' . PHP_EOL
83 .
'JOIN object_data ON prg_usr_progress.completion_by = object_data.obj_id' . PHP_EOL
84 .
'WHERE object_data.type = "crsr"';
86 $result = $this->db->query(
$query);
87 $row = $this->db->fetchAssoc($result);
88 return (
int) $row[
'cnt'];
◆ prepare()
PRGUpdateCompletionByMigration::prepare |
( |
Environment |
$environment | ) |
|
◆ step()
PRGUpdateCompletionByMigration::step |
( |
Environment |
$environment | ) |
|
- Exceptions
-
Definition at line 62 of file class.PRGUpdateCompletionByMigration.php.
References $query.
64 $query =
'SELECT assignment_id, prg_id, usr_id, completion_by, target_obj_id FROM prg_usr_progress' . PHP_EOL
65 .
'JOIN object_data ON prg_usr_progress.completion_by = object_data.obj_id' . PHP_EOL
66 .
'JOIN container_reference ON object_data.obj_id = container_reference.obj_id' . PHP_EOL
67 .
'WHERE object_data.type = "crsr" LIMIT 1';
68 $result = $this->db->query(
$query);
69 $row = $this->db->fetchAssoc($result);
71 $crs_id = $row[
'target_obj_id'];
73 $query =
"UPDATE prg_usr_progress SET completion_by = " . $crs_id . PHP_EOL
74 .
"WHERE assignment_id =" . $row[
'assignment_id'] . PHP_EOL
75 .
"AND prg_id =" . $row[
'prg_id'] . PHP_EOL
76 .
"AND usr_id =" . $row[
'usr_id'];
77 $this->db->manipulate(
$query);
◆ $db
◆ $io
mixed PRGUpdateCompletionByMigration::$io |
|
private |
◆ DEFAULT_AMOUNT_OF_STEPS
const PRGUpdateCompletionByMigration::DEFAULT_AMOUNT_OF_STEPS = 10000 |
|
private |
The documentation for this class was generated from the following file: