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
fe15f410
Commit
fe15f410
authored
7 years ago
by
TamaraGunkel
Browse files
Options
Downloads
Patches
Plain Diff
rEENAbled step interaction handling
parent
243a5a16
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/view_controller.php
+14
-4
14 additions, 4 deletions
classes/view_controller.php
view.php
+2
-1
2 additions, 1 deletion
view.php
with
16 additions
and
5 deletions
classes/view_controller.php
+
14
−
4
View file @
fe15f410
...
@@ -36,12 +36,22 @@ defined('MOODLE_INTERNAL') || die();
...
@@ -36,12 +36,22 @@ defined('MOODLE_INTERNAL') || die();
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
*/
class
view_controller
{
class
view_controller
{
public
function
handle_view
()
{
/**
* Handles actions triggered in the view.php and displays the view.
*
* @param $action string triggered action code.
* @param $processid int id of the process the action was triggered for.
* @param $stepid int id of the step the action was triggerd for.
*/
public
function
handle_view
(
$action
,
$processid
,
$stepid
)
{
global
$USER
,
$DB
,
$OUTPUT
;
global
$USER
,
$DB
,
$OUTPUT
;
// if ($action && $processid) {
// Handle action for step.
// interaction_manager::handle_interaction($stepinstance->id, $processid, $action);
if
(
$action
&&
$processid
&&
$stepid
)
{
// }
interaction_manager
::
handle_interaction
(
$stepid
,
$processid
,
$action
);
}
$courses
=
get_user_capability_course
(
'tool/cleanupcourses:managecourses'
,
$USER
,
false
);
$courses
=
get_user_capability_course
(
'tool/cleanupcourses:managecourses'
,
$USER
,
false
);
if
(
!
$courses
)
{
if
(
!
$courses
)
{
echo
'no courses'
;
echo
'no courses'
;
...
...
This diff is collapsed.
Click to expand it.
view.php
+
2
−
1
View file @
fe15f410
...
@@ -35,6 +35,7 @@ $PAGE->set_url(new \moodle_url('/admin/tool/cleanupcourses/view.php'));
...
@@ -35,6 +35,7 @@ $PAGE->set_url(new \moodle_url('/admin/tool/cleanupcourses/view.php'));
$action
=
optional_param
(
'action'
,
null
,
PARAM_ALPHA
);
$action
=
optional_param
(
'action'
,
null
,
PARAM_ALPHA
);
$processid
=
optional_param
(
'processid'
,
null
,
PARAM_INT
);
$processid
=
optional_param
(
'processid'
,
null
,
PARAM_INT
);
$stepid
=
optional_param
(
'stepid'
,
null
,
PARAM_INT
);
$PAGE
->
set_title
(
get_string
(
'viewheading'
,
'tool_cleanupcourses'
));
$PAGE
->
set_title
(
get_string
(
'viewheading'
,
'tool_cleanupcourses'
));
$PAGE
->
set_heading
(
get_string
(
'viewheading'
,
'tool_cleanupcourses'
));
$PAGE
->
set_heading
(
get_string
(
'viewheading'
,
'tool_cleanupcourses'
));
...
@@ -44,7 +45,7 @@ $renderer = $PAGE->get_renderer('tool_cleanupcourses');
...
@@ -44,7 +45,7 @@ $renderer = $PAGE->get_renderer('tool_cleanupcourses');
echo
$renderer
->
header
();
echo
$renderer
->
header
();
$controller
=
new
\tool_cleanupcourses\view_controller
();
$controller
=
new
\tool_cleanupcourses\view_controller
();
$controller
->
handle_view
();
$controller
->
handle_view
(
$action
,
$processid
,
$stepid
);
echo
$renderer
->
footer
();
echo
$renderer
->
footer
();
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