Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.10.x will end 8 November 2021 (12 months).
  • Bug fixes for security issues in 3.10.x will end 9 May 2022 (18 months).
  • PHP version: minimum PHP 7.2.0 Note: minimum PHP version has increased since Moodle 3.8. PHP 7.3.x and 7.4.x are supported too.

Processor.

Copyright: 2016 Frédéric Massart - FMCorz.net
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 638 lines (24 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class


Class: framework_processor  - X-Ref

Processor class.

__construct(framework_mapper $mapper, \core\progress\base $progress = null)   X-Ref
Constructor.

param: framework_mapper $mapper The mapper.
param: \core\progress\base $progress The progress object.

process_mapping()   X-Ref
Process the mapping.

return: void

find_coursescompetencies()   X-Ref
Identifies what courses and their competencies to work with.

return: void

find_modulecompetencies()   X-Ref
Identifies what course modules and their competencies to work with.

return: void

get_cms_found()   X-Ref
Return a list of CMs found.

return: int

get_cms_found_count()   X-Ref
Return the number of CMs found.

return: int

get_courses_found()   X-Ref
Return a list of courses found.

return: int

get_courses_found_count()   X-Ref
Return the number of courses found.

return: int

get_course_competency_migrations()   X-Ref
Get the number of course migrations.

return: int

get_course_competency_removals()   X-Ref
Get the number of removals.

return: int

get_expected_course_competency_migrations()   X-Ref
Get the number of expected course migrations.

return: int

get_expected_module_competency_migrations()   X-Ref
Get the number of expected course module migrations.

return: int

get_module_competency_migrations()   X-Ref
Get the number of course module migrations.

return: int

get_module_competency_removals()   X-Ref
Get the number of removals.

return: int

get_errors()   X-Ref
Return a list of errors.

return: array

get_missing_mappings()   X-Ref
Get the missing mappings.

return: array Where keys are origin IDs.

get_warnings()   X-Ref
Return a list of warnings.

return: array

has_run()   X-Ref
Whether the processor has run.

return: boolean

log_error($courseid, $competencyid, $cmid, $message)   X-Ref
Log an error.

param: int $courseid The course ID.
param: int $competencyid The competency ID.
param: int $cmid The CM ID.
param: string $message The error message.
return: void

log_warning($courseid, $competencyid, $cmid, $message)   X-Ref
Log a warning.

param: int $courseid The course ID.
param: int $competencyid The competency ID.
param: int $cmid The CM ID.
param: string $message The warning message.
return: void

proceed()   X-Ref
Execute the whole task.

return: void

process_courses()   X-Ref
Process each course individually.

return: void

set_allowedcourses(array $courseids)   X-Ref
Set the IDs of the courses that are allowed.

param: array $courseids

set_course_start_date_from($value)   X-Ref
Set the minimum start date for courses to be migrated.

param: int $value Timestamp, or 0.

set_disallowedcourses(array $courseids)   X-Ref
Set the IDs of the courses that are not allowed.

param: array $courseids

set_remove_original_when_destination_already_present($value)   X-Ref
Set whether we should remove original competencies when the destination competency was already there.

param: bool $value

set_remove_when_mapping_is_missing($value)   X-Ref
Set whether we should remove unmapped competencies.

param: bool $value