form_service
class form_service
Methods
static moodle_url
static moodle_url
generate_file_url(string $content, form $form)
Generates a URL for the exported file based on the provided content and form.
static bool
validate_import_structure(stdClass $json)
Validates the structure of an imported JSON object for a form configuration system.
static stdClass
static deprecated_item
get_form_by_idnumber(string $idnumber)
Retrieves a form by its idnumber.
Details
at line 46
static moodle_url
generate_file_exporter(form $form)
Generates a file exporter URL based on the provided form data.
at line 69
static moodle_url
generate_file_url(string $content, form $form)
Generates a URL for the exported file based on the provided content and form.
at line 93
static bool
validate_import_structure(stdClass $json)
Validates the structure of an imported JSON object for a form configuration system.
at line 142
static stdClass
replicate(stdClass $form)
Imports a form object, validates its structure, creates a new form if necessary, and performs custom form actions. Updates the form ID if the import is successful.
at line 178
static deprecated_item
get_form_by_idnumber(string $idnumber)
Retrieves a form by its idnumber.