diff --git a/htdocs/artefact/peerassessment/blocktype/peerassessment/lib.php b/htdocs/artefact/peerassessment/blocktype/peerassessment/lib.php index 0a95e2941ef6c3f586d065d66c57c91a060c3150..616df69b0b34275b74969eb71dde73112469f8be 100644 --- a/htdocs/artefact/peerassessment/blocktype/peerassessment/lib.php +++ b/htdocs/artefact/peerassessment/blocktype/peerassessment/lib.php @@ -43,7 +43,7 @@ class PluginBlocktypePeerassessment extends MaharaCoreBlocktype { } public static function render_instance(BlockInstance $instance, $editing=false, $versioning=false) { - global $USER; + global $USER, $exporter; $configdata = $instance->get('configdata'); $instructions = false; @@ -76,6 +76,7 @@ class PluginBlocktypePeerassessment extends MaharaCoreBlocktype { $smarty = smarty_core(); $smarty->assign('blockid', $instance->get('id')); + $smarty->assign('exporter', ($exporter ? true : false)); $smarty->assign('instructions', $instructions); $smarty->assign('allowfeedback', $feedback->canedit && !$versioning); $smarty->assign('addassessmentfeedbackform', pieform($feedbackform)); diff --git a/htdocs/artefact/peerassessment/lib.php b/htdocs/artefact/peerassessment/lib.php index 213a4c77707a6cecee515de26c2c2de0ef804566..f656566fb73faf0c641fe25dcf6f432e3a44f228 100644 --- a/htdocs/artefact/peerassessment/lib.php +++ b/htdocs/artefact/peerassessment/lib.php @@ -99,6 +99,22 @@ class PluginArtefactPeerassessment extends PluginArtefact { WHERE artefact IN (' . join(',', $artefacts). ')')) { $artefacts = array_merge($artefacts, $attachments); } + if ($embeds = get_column_sql(" + SELECT afe.fileid + FROM {artefact_file_embedded} afe + JOIN {artefact_peer_assessment} apa ON apa.assessment = afe.resourceid + WHERE afe.resourcetype IN (?) + AND apa.view IN (" . join(',', array_map('intval', $viewids)) . ") + UNION + SELECT afe.fileid + FROM {artefact_file_embedded} afe + JOIN {artefact_peer_assessment} apa ON apa.block = afe.resourceid + WHERE afe.resourcetype in(?) + AND apa.view IN (" . join(',', array_map('intval', $viewids)) . ")" + , array('assessment', 'peerinstruction'))) { + $artefacts = array_merge($artefacts, $embeds); + } + return $artefacts; } diff --git a/htdocs/theme/raw/plugintype/artefact/peerassessment/blocktype/peerassessment/templates/peerassessment.tpl b/htdocs/theme/raw/plugintype/artefact/peerassessment/blocktype/peerassessment/templates/peerassessment.tpl index 0e20b935ef2bc1a4a294d45f513afab48d8d1dd5..4ac3943f6716533b0bfcd8c1b77730b89148e347 100644 --- a/htdocs/theme/raw/plugintype/artefact/peerassessment/blocktype/peerassessment/templates/peerassessment.tpl +++ b/htdocs/theme/raw/plugintype/artefact/peerassessment/blocktype/peerassessment/templates/peerassessment.tpl @@ -7,6 +7,13 @@ {str tag=addpeerassessment section=blocktype.peerassessment/peerassessment} + {elseif $exporter} + {if $instructions} +
{str tag='instructions' section='view'}
+
+ {$instructions|safe} +
+ {/if} {/if} {/if} diff --git a/htdocs/theme/raw/plugintype/export/html/templates/view.tpl b/htdocs/theme/raw/plugintype/export/html/templates/view.tpl index 3b7880d30e04dd00ac397a7e568c6d452d816514..6ed45b3bd71dfd7afbdc33acd5d66f7fe1f059c5 100644 --- a/htdocs/theme/raw/plugintype/export/html/templates/view.tpl +++ b/htdocs/theme/raw/plugintype/export/html/templates/view.tpl @@ -13,7 +13,12 @@ {/if}

{$viewdescription|clean_html|safe}

-

{$viewinstructions|clean_html|safe}

+{if $viewinstructions} +
{str tag='instructions' section='view'}
+
+ {$viewinstructions|clean_html|safe} +
+{/if} {$view|safe} diff --git a/htdocs/theme/raw/sass/_custom.scss b/htdocs/theme/raw/sass/_custom.scss index 704b44960e1fe42b7a2b06643bca267d457babd6..78a950bca81b1bd2553a4ab075a960f48692e3ef 100644 --- a/htdocs/theme/raw/sass/_custom.scss +++ b/htdocs/theme/raw/sass/_custom.scss @@ -681,7 +681,12 @@ div.toolbarhtml { background-color: $gray-100 !important; } } - +.viewinstruction-export { + border: 1px solid $card-border-color; + padding: 10px 15px; + margin-bottom: -1px; //remove double border + background-color: $gray-100 !important; +} .releaseviewform { position: relative; top: 15px;