Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
moodle_mod-hvp
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_mod-hvp
Commits
e27807bc
Commit
e27807bc
authored
8 years ago
by
Frode Petterson
Browse files
Options
Downloads
Plain Diff
Merge branch 'master' of github.com:h5p/h5p-moodle-plugin
parents
82888d4b
3e0b8d50
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
backup/moodle2/backup_hvp_activity_task.class.php
+22
-0
22 additions, 0 deletions
backup/moodle2/backup_hvp_activity_task.class.php
with
22 additions
and
0 deletions
backup/moodle2/backup_hvp_activity_task.class.php
+
22
−
0
View file @
e27807bc
...
@@ -45,4 +45,26 @@ class backup_hvp_activity_task extends backup_activity_task {
...
@@ -45,4 +45,26 @@ class backup_hvp_activity_task extends backup_activity_task {
protected
function
define_my_steps
()
{
protected
function
define_my_steps
()
{
// $this->add_step(new backup_hvp_activity_structure_step('hvp_structure', 'hvp.xml'));
// $this->add_step(new backup_hvp_activity_structure_step('hvp_structure', 'hvp.xml'));
}
}
/**
* Encodes URLs to the index.php and view.php scripts
*
* @param string $content some HTML text that eventually contains URLs to the activity instance scripts
* @return string the content with the URLs encoded
*/
static
public
function
encode_content_links
(
$content
)
{
global
$CFG
;
$base
=
preg_quote
(
$CFG
->
wwwroot
,
"/"
);
// Link to the list of glossaries
$search
=
"/("
.
$base
.
"\/mod\/hvp\/index.php\?id\=)([0-9]+)/"
;
$content
=
preg_replace
(
$search
,
'$@HVPINDEX*$2@$'
,
$content
);
// Link to hvp view by moduleid
$search
=
"/("
.
$base
.
"\/mod\/hvp\/view.php\?id\=)([0-9]+)/"
;
$content
=
preg_replace
(
$search
,
'$@HVPVIEWBYID*$2@$'
,
$content
);
return
$content
;
}
}
}
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