Moodle PHP Documentation 4.2
Moodle 4.2.8 (Build: 20240610) (2d41ac46f45)
core_competency_generator Class Reference

Competency data generator class. More...

Inheritance diagram for core_competency_generator:
component_generator_base

Public Member Functions

 create_competency ($record=null)
 Create a new competency.
 
 create_course_competency ($record=null)
 Create a new course competency.
 
 create_course_module_competency ($record=null)
 Create a new course module competency.
 
 create_evidence ($record=null)
 Create a new evidence.
 
 create_framework ($record=null)
 Create a new framework.
 
 create_plan ($record=null)
 Create a new plan.
 
 create_plan_competency ($record=null)
 Create a new plan competency.
 
 create_related_competency ($record=null)
 Create a related competency.
 
 create_template ($record=null)
 Create a template.
 
 create_template_cohort ($record=null)
 Create a new template cohort.
 
 create_template_competency ($record=null)
 Create a template competency.
 
 create_user_competency ($record=null)
 Create a new user competency.
 
 create_user_competency_course ($record=null)
 Create a new user competency course.
 
 create_user_competency_plan ($record=null)
 Create a new user competency plan.
 
 create_user_evidence ($record=null)
 Create a new user_evidence.
 
 create_user_evidence_competency ($record=null)
 Create a new user_evidence_comp.
 
 reset ()
 Reset process.
 

Protected Member Functions

 insert_files (stdClass $instance, stdClass $record, string $table, context $context, string $component, string $filearea, int $targetitemid)
 Update the instance record, inserting any files that are referenced.
 
 make_default_scale_configuration ($scaleid)
 Make a default scale configuration.
 
 set_user (?stdClass $user=null)
 Set the current user during data generation.
 

Protected Attributes

int $competencycount = 0
 Number of created competencies.
 
testing_data_generator $datagenerator
 
int $frameworkcount = 0
 Number of created frameworks.
 
int $plancount = 0
 Number of created plans.
 
stdClass $scale
 Scale that we might need.
 
int $templatecount = 0
 Number of created templates.
 
int $userevidencecount = 0
 Number of created user_evidence.
 

Detailed Description

Competency data generator class.

License
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

Member Function Documentation

◆ create_competency()

core_competency_generator::create_competency ( $record = null)

Create a new competency.

Parameters
array | stdClass$record
Return values
competency

◆ create_course_competency()

core_competency_generator::create_course_competency ( $record = null)

Create a new course competency.

Parameters
array | stdClass$record
Return values
user_competency

◆ create_course_module_competency()

core_competency_generator::create_course_module_competency ( $record = null)

Create a new course module competency.

Parameters
array | stdClass$record
Return values
course_module_competency

◆ create_evidence()

core_competency_generator::create_evidence ( $record = null)

Create a new evidence.

Parameters
array | stdClass$record
Return values
evidence

◆ create_framework()

core_competency_generator::create_framework ( $record = null)

Create a new framework.

Parameters
array | stdClass$record
Return values
competency_framework

◆ create_plan()

core_competency_generator::create_plan ( $record = null)

Create a new plan.

Parameters
array | stdClass$record
Return values
plan

◆ create_plan_competency()

core_competency_generator::create_plan_competency ( $record = null)

Create a new plan competency.

Parameters
array | stdClass$record
Return values
plan_competency

◆ create_related_competency()

core_competency_generator::create_related_competency ( $record = null)

Create a related competency.

Parameters
array | stdClass$record
Return values
related_competency

◆ create_template()

core_competency_generator::create_template ( $record = null)

Create a template.

Parameters
array | stdClass$record
Return values
template

◆ create_template_cohort()

core_competency_generator::create_template_cohort ( $record = null)

Create a new template cohort.

Parameters
array | stdClass$record
Return values
template_cohort

◆ create_template_competency()

core_competency_generator::create_template_competency ( $record = null)

Create a template competency.

Parameters
array | stdClass$record
Return values
template_competency

◆ create_user_competency()

core_competency_generator::create_user_competency ( $record = null)

Create a new user competency.

Parameters
array | stdClass$record
Return values
user_competency

◆ create_user_competency_course()

core_competency_generator::create_user_competency_course ( $record = null)

Create a new user competency course.

Parameters
array | stdClass$record
Return values
user_competency_course

◆ create_user_competency_plan()

core_competency_generator::create_user_competency_plan ( $record = null)

Create a new user competency plan.

Parameters
array | stdClass$record
Return values
user_competency_plan

◆ create_user_evidence()

core_competency_generator::create_user_evidence ( $record = null)

Create a new user_evidence.

Parameters
array | stdClass$record
Return values
evidence

◆ create_user_evidence_competency()

core_competency_generator::create_user_evidence_competency ( $record = null)

Create a new user_evidence_comp.

Parameters
array | stdClass$record
Return values
evidence

◆ insert_files()

component_generator_base::insert_files ( stdClass $instance,
stdClass $record,
string $table,
context $context,
string $component,
string $filearea,
int $targetitemid )
protectedinherited

Update the instance record, inserting any files that are referenced.

Parameters
stdClass$instanceThe instance record of the already-created record
stdClass$recordThe data passed in to create the instance
string$tableThe table that the data exists in
context$contextThe context of the instance
string$componentThe component of the owning plugin
string$fileareaThe name of the file area
int$targetitemidThe itemid to use when saving the files
Return values
stdClassThe updated instance record

◆ make_default_scale_configuration()

core_competency_generator::make_default_scale_configuration ( $scaleid)
protected

Make a default scale configuration.

The last and second-last item will be flagged proficient. The second-last item will be flagged as default.

Parameters
int$scaleidThe scale ID.
Return values
arrayConfiguration as array.

◆ reset()

core_competency_generator::reset ( )

Reset process.

Do not call directly.

Return values
void

Reimplemented from component_generator_base.

◆ set_user()

component_generator_base::set_user ( ?stdClass $user = null)
protectedinherited

Set the current user during data generation.

This should be avoided wherever possible, but in some situations underlying code will insert data as the current user.

Parameters
stdClass$user

The documentation for this class was generated from the following file: