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
5836e4cf
Commit
5836e4cf
authored
8 years ago
by
Frode Petterson
Browse files
Options
Downloads
Patches
Plain Diff
Bump version number + double check hash
parent
db9b7155
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
db/upgrade.php
+7
-4
7 additions, 4 deletions
db/upgrade.php
version.php
+1
-1
1 addition, 1 deletion
version.php
with
8 additions
and
5 deletions
db/upgrade.php
+
7
−
4
View file @
5836e4cf
...
...
@@ -149,7 +149,7 @@ function xmldb_hvp_upgrade($oldversion) {
upgrade_mod_savepoint
(
true
,
2016051000
,
'hvp'
);
}
if
(
$oldversion
<
2016
080903
)
{
if
(
$oldversion
<
2016
110100
)
{
// Change context of activity files from COURSE to MODULE.
...
...
@@ -172,12 +172,15 @@ function xmldb_hvp_upgrade($oldversion) {
// Need to re-hash pathname after changing context
$pathnamehash
=
file_storage
::
get_pathname_hash
(
$hvp
->
id
,
$component
,
$filearea
,
$hvp
->
itemid
,
$hvp
->
filepath
,
$hvp
->
filename
);
// Double check that hash doesn't exist (avoid duplicate entries)
if
(
!
$DB
->
get_field_sql
(
"SELECT contextid FROM
{
files
}
WHERE pathnamehash = '
{
$pathnamehash
}
'"
))
{
// Update context ID and pathname hash for files
$DB
->
execute
(
"UPDATE
{
files
}
SET contextid =
{
$hvp
->
id
}
, pathnamehash = '
{
$pathnamehash
}
' WHERE pathnamehash = '
{
$hvp
->
pathnamehash
}
'"
);
}
}
// Hvp savepoint reached.
upgrade_mod_savepoint
(
true
,
2016
080903
,
'hvp'
);
upgrade_mod_savepoint
(
true
,
2016
110100
,
'hvp'
);
}
return
true
;
...
...
This diff is collapsed.
Click to expand it.
version.php
+
1
−
1
View file @
5836e4cf
...
...
@@ -23,7 +23,7 @@
defined
(
'MOODLE_INTERNAL'
)
||
die
();
$plugin
->
version
=
2016
092
100
;
$plugin
->
version
=
2016
110
100
;
$plugin
->
requires
=
2013051403
;
$plugin
->
cron
=
0
;
$plugin
->
component
=
'mod_hvp'
;
...
...
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