Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mahara
mahara
Commits
466e66ca
Commit
466e66ca
authored
Dec 22, 2016
by
Robert Lyon
Committed by
Gerrit Code Review
Dec 22, 2016
Browse files
Merge "Bug 1632913: Exporting comments in Leap2A"
parents
daa6c439
c7ce2f90
Changes
2
Hide whitespace changes
Inline
Side-by-side
htdocs/artefact/comment/import/leap/lib.php
View file @
466e66ca
...
...
@@ -279,16 +279,14 @@ class LeapImportComment extends LeapImportArtefactPlugin {
* appropriate in setup_relationships. To do that we would have
* to change that call to happen after views are created.
*/
public
static
function
setup_view_relationships_from_request
(
PluginImportLeap
$importer
)
{
public
static
function
setup_view_relationships_from_request
s
(
PluginImportLeap
$importer
)
{
if
(
$entry_requests
=
get_records_select_array
(
'import_entry_requests'
,
'importid = ? AND entrytype = ?'
,
array
(
$importer
->
get
(
'importertransport'
)
->
get
(
'importid'
),
'comment'
)))
{
foreach
(
$entry_requests
as
$entry_request
)
{
$commentids
=
unserialize
(
$entry_request
->
artefactmapping
)
;
$commentids
=
$importer
->
artefactids
[
$entry_request
->
entryid
]
;
$comment
=
new
ArtefactTypeComment
(
$commentids
[
0
]);
if
(
$comment
->
get
(
'onartefact'
))
{
continue
;
}
$entry
=
$importer
->
get_entry_by_id
(
$entry_request
->
entryid
);
$referentid
=
self
::
get_referent_entryid
(
$entry
,
$importer
);
if
(
$viewid
=
$importer
->
get_viewid_imported_by_entryid
(
$referentid
))
{
...
...
htdocs/import/leap/lib.php
View file @
466e66ca
...
...
@@ -287,7 +287,7 @@ class PluginImportLeap extends PluginImport {
*/
public
function
call_import_method_plugins
(
$method
)
{
$installedplugins
=
array_map
(
create_function
(
'$a'
,
'return $a->name;'
),
plugins_installed
(
'artefact'
));
$orderedimportplugins
=
array
(
'internal'
,
'file'
,
'blog'
,
'resume'
,
'plans'
,
'annotation'
);
$orderedimportplugins
=
array
(
'internal'
,
'file'
,
'blog'
,
'resume'
,
'plans'
,
'annotation'
,
'comment'
);
foreach
(
$orderedimportplugins
as
$plugin
)
{
if
(
!
in_array
(
$plugin
,
$installedplugins
))
{
continue
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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