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
4282898e
Commit
4282898e
authored
8 years ago
by
Frode Petterson
Browse files
Options
Downloads
Patches
Plain Diff
Implemented latest core changes
HFP-23
parent
5cff08e2
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
classes/file_storage.php
+23
-3
23 additions, 3 deletions
classes/file_storage.php
classes/framework.php
+5
-0
5 additions, 0 deletions
classes/framework.php
library
+1
-1
1 addition, 1 deletion
library
with
29 additions
and
4 deletions
classes/file_storage.php
+
23
−
3
View file @
4282898e
...
...
@@ -179,23 +179,43 @@ class file_storage implements \H5PFileStorage {
}
/**
*
Removes
given export file
*
Get file object for
given export file
.
*
* @param string $filename
* @return stdClass Moodle file object
*/
p
ublic
function
del
et
e
Export
(
$filename
)
{
p
rivate
function
g
etExport
File
(
$filename
)
{
global
$COURSE
;
$context
=
\context_course
::
instance
(
$COURSE
->
id
);
// Check if file exists.
$fs
=
get_file_storage
();
$file
=
$fs
->
get_file
(
$context
->
id
,
'mod_hvp'
,
'exports'
,
0
,
'/'
,
$filename
);
return
$fs
->
get_file
(
$context
->
id
,
'mod_hvp'
,
'exports'
,
0
,
'/'
,
$filename
);
}
/**
* Removes given export file
*
* @param string $filename
*/
public
function
deleteExport
(
$filename
)
{
$file
=
$this
->
getExportFile
(
$filename
);
if
(
$file
)
{
// Remove old export.
$file
->
delete
();
}
}
/**
* Check if the given export file exists
*
* @param string $filename
* @return boolean
*/
public
function
hasExport
(
$filename
)
{
return
!!
$this
->
getExportFile
(
$filename
);
}
/**
* Will concatenate all JavaScrips and Stylesheets into two files in order
* to improve page performance.
...
...
This diff is collapsed.
Click to expand it.
classes/framework.php
+
5
−
0
View file @
4282898e
...
...
@@ -1222,4 +1222,9 @@ class framework implements \H5PFrameworkInterface {
));
}
/**
* Implements afterExportCreated
*/
public
function
afterExportCreated
()
{
}
}
This diff is collapsed.
Click to expand it.
library
@
c9e5680e
Compare
6b6d4cd1
...
c9e5680e
Subproject commit
6b6d4cd109a0d187f6523fa1428a9a0440917c05
Subproject commit
c9e5680e852ddc579e78b467504cb6bec40e0e0c
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