Moodle PHP Documentation 4.4
Moodle 4.4.1 (Build: 20240610) (db07c09afc5)
|
Processor class. More...
Public Member Functions | |
__construct (framework_mapper $mapper, core\progress\base $progress=null) | |
Constructor. | |
get_cms_found () | |
Return a list of CMs found. | |
get_cms_found_count () | |
Return the number of CMs found. | |
get_course_competency_migrations () | |
Get the number of course migrations. | |
get_course_competency_removals () | |
Get the number of removals. | |
get_courses_found () | |
Return a list of courses found. | |
get_courses_found_count () | |
Return the number of courses found. | |
get_errors () | |
Return a list of errors. | |
get_expected_course_competency_migrations () | |
Get the number of expected course migrations. | |
get_expected_module_competency_migrations () | |
Get the number of expected course module migrations. | |
get_missing_mappings () | |
Get the missing mappings. | |
get_module_competency_migrations () | |
Get the number of course module migrations. | |
get_module_competency_removals () | |
Get the number of removals. | |
get_warnings () | |
Return a list of warnings. | |
has_run () | |
Whether the processor has run. | |
proceed () | |
Execute the whole task. | |
set_allowedcourses (array $courseids) | |
Set the IDs of the courses that are allowed. | |
set_course_start_date_from ($value) | |
Set the minimum start date for courses to be migrated. | |
set_disallowedcourses (array $courseids) | |
Set the IDs of the courses that are not allowed. | |
set_remove_original_when_destination_already_present ($value) | |
Set whether we should remove original competencies when the destination competency was already there. | |
set_remove_when_mapping_is_missing ($value) | |
Set whether we should remove unmapped competencies. | |
Protected Member Functions | |
find_coursescompetencies () | |
Identifies what courses and their competencies to work with. | |
find_modulecompetencies () | |
Identifies what course modules and their competencies to work with. | |
log_error ($courseid, $competencyid, $cmid, $message) | |
Log an error. | |
log_warning ($courseid, $competencyid, $cmid, $message) | |
Log a warning. | |
process_courses () | |
Process each course individually. | |
process_mapping () | |
Process the mapping. | |
Protected Attributes | |
array | $allowedcourses = array() |
List of course IDs that can be migrated. | |
array | $cmsfound = array() |
Course modules found. | |
integer | $coursecompetencyexpectedmigrations = 0 |
Number of migrations expected in courses. | |
integer | $coursecompetencymigrations = 0 |
Count of migrations in the course level. | |
integer | $coursecompetencyremovals = 0 |
Count of removals in the course level. | |
array | $coursescompetencies = array() |
Indexed as courseid => competencyids. | |
array | $coursescompetenciesoutcomes = array() |
Indexed as courseid => competencyid => ruleoutcome. | |
array | $coursesfound = array() |
Courses found. | |
int | $coursestartdatefrom = 0 |
Minimum start date of courses that can be migrated. | |
array | $disallowedcourses = array() |
List of course IDs that cannot be migrated. | |
array | $errors = array() |
List of errors. | |
array | $fromids = array() |
The IDs of the objects of origin. | |
framework_mapper | $mapper |
The mapper. | |
array | $mappings = array() |
The mapping originId => destinationId. | |
array | $missingmappings = array() |
IDs of objects missing a mapping in origin, originId => true. | |
array | $modulecompetencies = array() |
Indexed as courseid => cmid => competencyids. | |
array | $modulecompetenciesoutcomes = array() |
Indexed as courseid => cmid => competencyid => ruleoutcome. | |
integer | $modulecompetencyexpectedmigrations = 0 |
Number of migrations expected in CMs. | |
integer | $modulecompetencymigrations = 0 |
Count of migrations in CMs. | |
integer | $modulecompetencyremovals = 0 |
Count of removals in CMs. | |
boolean | $proceeded = false |
Has this processor run? | |
core progress base | $progress |
The progress. | |
bool | $removeoriginalwhenalreadypresent = false |
Whether to remove the original competency when its destination was already there. | |
bool | $removewhenmappingismissing = false |
Whether to remove the competency from course, or cm, when a mapping is not found. | |
array | $warnings = array() |
List of warnings. | |
Processor class.
tool_lpmigrate\framework_processor::__construct | ( | framework_mapper | $mapper, |
core\progress\base | $progress = null ) |
Constructor.
framework_mapper | $mapper | The mapper. |
core\progress\base | $progress | The progress object. |
|
protected |
Identifies what courses and their competencies to work with.
void |
|
protected |
Identifies what course modules and their competencies to work with.
void |
tool_lpmigrate\framework_processor::get_cms_found | ( | ) |
Return a list of CMs found.
int |
tool_lpmigrate\framework_processor::get_cms_found_count | ( | ) |
Return the number of CMs found.
int |
tool_lpmigrate\framework_processor::get_course_competency_migrations | ( | ) |
Get the number of course migrations.
int |
tool_lpmigrate\framework_processor::get_course_competency_removals | ( | ) |
Get the number of removals.
int |
tool_lpmigrate\framework_processor::get_courses_found | ( | ) |
Return a list of courses found.
int |
tool_lpmigrate\framework_processor::get_courses_found_count | ( | ) |
Return the number of courses found.
int |
tool_lpmigrate\framework_processor::get_errors | ( | ) |
Return a list of errors.
array |
tool_lpmigrate\framework_processor::get_expected_course_competency_migrations | ( | ) |
Get the number of expected course migrations.
int |
tool_lpmigrate\framework_processor::get_expected_module_competency_migrations | ( | ) |
Get the number of expected course module migrations.
int |
tool_lpmigrate\framework_processor::get_missing_mappings | ( | ) |
Get the missing mappings.
array | Where keys are origin IDs. |
tool_lpmigrate\framework_processor::get_module_competency_migrations | ( | ) |
Get the number of course module migrations.
int |
tool_lpmigrate\framework_processor::get_module_competency_removals | ( | ) |
Get the number of removals.
int |
tool_lpmigrate\framework_processor::get_warnings | ( | ) |
Return a list of warnings.
array |
tool_lpmigrate\framework_processor::has_run | ( | ) |
Whether the processor has run.
boolean |
|
protected |
Log an error.
int | $courseid | The course ID. |
int | $competencyid | The competency ID. |
int | $cmid | The CM ID. |
string | $message | The error message. |
void |
|
protected |
Log a warning.
int | $courseid | The course ID. |
int | $competencyid | The competency ID. |
int | $cmid | The CM ID. |
string | $message | The warning message. |
void |
tool_lpmigrate\framework_processor::proceed | ( | ) |
Execute the whole task.
void |
|
protected |
Process each course individually.
void |
|
protected |
Process the mapping.
void |
tool_lpmigrate\framework_processor::set_allowedcourses | ( | array | $courseids | ) |
Set the IDs of the courses that are allowed.
array | $courseids |
tool_lpmigrate\framework_processor::set_course_start_date_from | ( | $value | ) |
Set the minimum start date for courses to be migrated.
int | $value | Timestamp, or 0. |
tool_lpmigrate\framework_processor::set_disallowedcourses | ( | array | $courseids | ) |
Set the IDs of the courses that are not allowed.
array | $courseids |
tool_lpmigrate\framework_processor::set_remove_original_when_destination_already_present | ( | $value | ) |
Set whether we should remove original competencies when the destination competency was already there.
bool | $value |
tool_lpmigrate\framework_processor::set_remove_when_mapping_is_missing | ( | $value | ) |
Set whether we should remove unmapped competencies.
bool | $value |