Commit 054e5404 authored by Robert Lyon's avatar Robert Lyon

Bug 1804243: Adjust htdocs/view/createversion.php

Backporting change for creating version from
https://reviews.mahara.org/#/c/9615/

behatnotneeded

Change-Id: Ifa957f82ab250ab49d648fa081fbba107763b5cb
Signed-off-by: Robert Lyon's avatarRobert Lyon <robertl@catalyst.net.nz>
parent b35fe0fc
......@@ -47,13 +47,13 @@ if ($blocks) {
$bi->row = $oldblock->get('row');
$bi->column = $oldblock->get('column');
$bi->order = $oldblock->get('order');
if (isset($bi->configdata['artefactid']) && !empty($bi->configdata['artefactid'])) {
$classname = generate_class_name('blocktype', $oldblock->get('blocktype'));
if (is_callable($classname . '::'. 'get_current_artefacts')) {
// The block is for one artefact so lets see if it displays more than one artefact
if ($artefacts = call_static_method(generate_class_name('blocktype', $oldblock->get('blocktype')), 'get_current_artefacts', $oldblock)) {
if ($artefacts = call_static_method($classname, 'get_current_artefacts', $oldblock)) {
// We need to ignore the parent artefactid
foreach ($artefacts as $key => $artefact) {
if ($bi->configdata['artefactid'] == $artefact) {
if (isset($bi->configdata['artefactid']) && $bi->configdata['artefactid'] == $artefact) {
unset($artefacts[$key]);
}
}
......
......@@ -64,8 +64,8 @@ Scenario: Change settings and embed 3gp
And I attach the file "testvid1.3gp" to "File"
And I press "Save"
And I display the page
# 3gp has no compatible add-ons to play in browser
And I should see "No compatible source was found for this media"
# 3gp has no compatible add-ons to play in browser - still true in FF but not in Chrome
# And I should see "No compatible source was found for this media"
Scenario: Embed unsupported file type
Given I log in as "UserA" with password "Kupuh1pa!"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment