Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
moodle-tool_lifecycle
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
elc
moodle-tool_lifecycle
Commits
fa266dd0
Unverified
Commit
fa266dd0
authored
8 years ago
by
Tobias Reischmann
Browse files
Options
Downloads
Patches
Plain Diff
Added definition() for subplugins to extend from_step_instance
parent
20592602
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
classes/form_step_instance.php
+6
-0
6 additions, 0 deletions
classes/form_step_instance.php
step/lib.php
+16
-0
16 additions, 0 deletions
step/lib.php
with
22 additions
and
0 deletions
classes/form_step_instance.php
+
6
−
0
View file @
fa266dd0
...
...
@@ -98,6 +98,9 @@ class form_step_instance extends \moodleform {
$stepmanager
->
get_step_instances
());
$mform
->
setType
(
$elementname
,
PARAM_TEXT
);
// Insert the subplugin specific settings.
$this
->
lib
->
extend_add_instance_form_definition
(
$mform
);
$this
->
add_action_buttons
();
}
...
...
@@ -119,6 +122,9 @@ class form_step_instance extends \moodleform {
$mform
->
setDefault
(
'subpluginnamestatic'
,
get_string
(
'pluginname'
,
'cleanupcoursesstep_'
.
$subpluginname
));
$mform
->
setDefault
(
'subpluginname'
,
$subpluginname
);
// Insert the subplugin specific settings.
$this
->
lib
->
extend_add_instance_form_definition_after_data
(
$mform
);
}
}
This diff is collapsed.
Click to expand it.
step/lib.php
+
16
−
0
View file @
fa266dd0
...
...
@@ -75,6 +75,22 @@ abstract class base {
return
$settingsvalues
;
}
/**
* This method can be overriden, to add form elements to the form_step_instance.
* It is called in definition().
* @param \MoodleQuickForm $mform
*/
public
function
extend_add_instance_form_definition
(
$mform
)
{
}
/**
* This method can be overriden, to set default values to the form_step_instance.
* It is called in definition_after_data().
* @param \MoodleQuickForm $mform
*/
public
function
extend_add_instance_form_definition_after_data
(
$mform
)
{
}
}
class
instance_setting
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment