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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
elc
moodle-tool_lifecycle
Commits
7175f5f7
Commit
7175f5f7
authored
5 years ago
by
Tobias Reischmann
Browse files
Options
Downloads
Patches
Plain Diff
Introduced new config for the backup path of lifecycle backups
parent
9c919b82
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
classes/local/manager/backup_manager.php
+2
-2
2 additions, 2 deletions
classes/local/manager/backup_manager.php
lang/en/tool_lifecycle.php
+3
-0
3 additions, 0 deletions
lang/en/tool_lifecycle.php
settings.php
+5
-0
5 additions, 0 deletions
settings.php
version.php
+1
-1
1 addition, 1 deletion
version.php
with
11 additions
and
3 deletions
classes/local/manager/backup_manager.php
+
2
−
2
View file @
7175f5f7
...
...
@@ -58,7 +58,7 @@ class backup_manager {
$archivefile
=
date
(
"Y-m-d"
)
.
"-ID-
{
$recordid
}
-COURSE-
{
$courseid
}
.mbz"
;
// Path of backup folder.
$path
=
$CFG
->
dataroot
.
'/
lifecycle
_
backup
s'
;
$path
=
get_config
(
'tool_
lifecycle
'
,
'
backup
_path'
)
;
// If the path doesn't exist, make it so!
if
(
!
is_dir
(
$path
))
{
umask
(
0000
);
...
...
@@ -119,7 +119,7 @@ class backup_manager {
$targetfilename
=
\restore_controller
::
get_tempdir_name
(
$backuprecord
->
courseid
,
get_admin
()
->
id
);
$target
=
$backuptmpdir
.
'/'
.
$targetfilename
;
// Create the location of the actual backup file.
$source
=
$CFG
->
dataroot
.
'/
lifecycle
_
backup
s/'
.
$backuprecord
->
backupfile
;
$source
=
get_config
(
'tool_
lifecycle
'
,
'
backup
_path'
)
.
DIRECTORY_SEPARATOR
.
$backuprecord
->
backupfile
;
// Check if the backup file exists.
if
(
!
file_exists
(
$source
))
{
throw
new
\moodle_exception
(
'errorbackupfiledoesnotexist'
,
'tool_lifecycle'
,
$source
);
...
...
This diff is collapsed.
Click to expand it.
lang/en/tool_lifecycle.php
+
3
−
0
View file @
7175f5f7
...
...
@@ -34,6 +34,9 @@ $string['config_delay_duration'] = 'Default duration of a course delay';
$string
[
'config_delay_duration_desc'
]
=
'This setting defines the default delay duration of a workflow
in case one of its processes is rolled back or finishes.
The delay duration determines how long a course will be excepted from being processed again in either of the cases.'
;
$string
[
'config_backup_path'
]
=
'Path of the lifecycle backup folder'
;
$string
[
'config_backup_path_desc'
]
=
'This settings defines the storage location of the backups created by the backup step.
The path has to be specified as an absolute path on your server.'
;
$string
[
'active_processes_list_header'
]
=
'Active processes'
;
$string
[
'adminsettings_heading'
]
=
'Workflow settings'
;
$string
[
'active_manual_workflows_heading'
]
=
'Active manual workflows'
;
...
...
This diff is collapsed.
Click to expand it.
settings.php
+
5
−
0
View file @
7175f5f7
...
...
@@ -38,6 +38,11 @@ if ($hassiteconfig) {
get_string
(
'config_delay_duration_desc'
,
'tool_lifecycle'
),
183
*
24
*
60
*
60
));
// Dafault value is 180 days.
$settings
->
add
(
new
admin_setting_configtext
(
'tool_lifecycle/backup_path'
,
get_string
(
'config_backup_path'
,
'tool_lifecycle'
),
get_string
(
'config_backup_path_desc'
,
'tool_lifecycle'
),
$CFG
->
dataroot
.
DIRECTORY_SEPARATOR
.
'lifecycle_backups'
));
$ADMIN
->
add
(
'lifecycle_category'
,
new
tool_lifecycle\admin_page_active_processes
());
$ADMIN
->
add
(
'lifecycle_category'
,
new
tool_lifecycle\admin_page_course_backups
());
$ADMIN
->
add
(
'lifecycle_category'
,
new
tool_lifecycle\admin_page_sublugins
());
...
...
This diff is collapsed.
Click to expand it.
version.php
+
1
−
1
View file @
7175f5f7
...
...
@@ -25,7 +25,7 @@
defined
(
'MOODLE_INTERNAL'
)
||
die
;
$plugin
->
maturity
=
MATURITY_BETA
;
$plugin
->
version
=
201912020
0
;
$plugin
->
version
=
201912020
1
;
$plugin
->
component
=
'tool_lifecycle'
;
$plugin
->
requires
=
2017111300
;
// Require Moodle 3.4 (or above).
$plugin
->
release
=
'v3.8-r1'
;
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