Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
moodle
moodle
Commits
ac6beb75
Commit
ac6beb75
authored
Oct 12, 2011
by
Tim Hunt
Browse files
MDL-47494 gapselect: Improve file handling in overall feedback.
parent
769fd123
Changes
2
Hide whitespace changes
Inline
Side-by-side
question/type/gapselect/backup/moodle2/backup_qtype_gapselect_plugin.class.php
View file @
ac6beb75
...
...
@@ -68,17 +68,4 @@ class backup_qtype_gapselect_plugin extends backup_qtype_plugin {
return
$plugin
;
}
/**
* Returns one array with filearea => mappingname elements for the qtype
*
* Used by {@link get_components_and_fileareas} to know about all the qtype
* files to be processed both in backup and restore.
*/
public
static
function
get_qtype_fileareas
()
{
return
array
(
'correctfeedback'
=>
'question_created'
,
'partiallycorrectfeedback'
=>
'question_created'
,
'incorrectfeedback'
=>
'question_created'
);
}
}
question/type/gapselect/questiontypebase.php
View file @
ac6beb75
...
...
@@ -312,22 +312,11 @@ abstract class qtype_gapselect_base extends question_type {
public
function
move_files
(
$questionid
,
$oldcontextid
,
$newcontextid
)
{
parent
::
move_files
(
$questionid
,
$oldcontextid
,
$newcontextid
);
$fs
=
get_file_storage
();
$fs
->
move_area_files_to_new_context
(
$oldcontextid
,
$newcontextid
,
'question'
,
'correctfeedback'
,
$questionid
);
$fs
->
move_area_files_to_new_context
(
$oldcontextid
,
$newcontextid
,
'question'
,
'partiallycorrectfeedback'
,
$questionid
);
$fs
->
move_area_files_to_new_context
(
$oldcontextid
,
$newcontextid
,
'question'
,
'incorrectfeedback'
,
$questionid
);
$this
->
move_files_in_combined_feedback
(
$questionid
,
$oldcontextid
,
$newcontextid
);
}
protected
function
delete_files
(
$questionid
,
$contextid
)
{
parent
::
delete_files
(
$questionid
,
$contextid
);
$fs
=
get_file_storage
();
$fs
->
delete_area_files
(
$contextid
,
'question'
,
'correctfeedback'
,
$questionid
);
$fs
->
delete_area_files
(
$contextid
,
'question'
,
'partiallycorrectfeedback'
,
$questionid
);
$fs
->
delete_area_files
(
$contextid
,
'question'
,
'incorrectfeedback'
,
$questionid
);
$this
->
delete_files_in_combined_feedback
(
$questionid
,
$contextid
);
}
}
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment