When questions are deleted, we now check if the parent is in use before deletion.
Prior to this, it would be possible for multianswer questions to reference
questions that have been deleted. This results in fatal errors when the quiz
is viewed.
This patch uses a dummy 'subquestion_replacement' to handle this case and
display some information to the end user about what has happened so that
they may take action to repair the corrupted question.
As a result of the bug described above, the sequence column of
mdl_question_multianswer can contiain references to questions that no
longer exist, and these IDs can make their way in to backups.
When this happens, the backups cannot be restored. To avoid this,
this patch skips trying to restore those questions that reference
question IDs that no longer exist (as there is no way to recover them).
This implementation will introduce a feature "columnsortorder"
which will add the column sort order feature in an external page.
Having this feature will give users the flexibility of sorting plugin
columns in the question bank view.
Avoids removing the section breadcrumb nodes in the course module
context when the course uses the 'One section per page' layout.
Additionaly, it also removes the Courses and Category breadcrumb
nodes in the module contexts to be consistent with the way the
breadcrumbs are displayed in the course context.
Show the activity information in the view page and add/edit submission
page.
- Removed the line change to disable activity header. This should help
- When any additional files are attached to the assignment by the
teacher/admin they should be displayed in the view and add/edit
submission page (in the default settings)
- Added more padding to the "Add submission" button.
- Changed the string 'Activity' to 'Activity instructions'.
Test data providers are executed before `setUpBeforeClass`, so any
library constants used by the providers must already be present.
Reverts part of the change in 691c5b83.
Course formats may want to preserve the existing section information,
but either change the wrapper (.section .course-section-header), or
prepend and append additional content to it.
Prior to this change, the only way to do this was by copying the entire
content of the template.
This change moves the content of the .course-section-header to a
separate template.
This means that a course format can replace the .section
.course-section-header wrapper whilst retaining its content by
overriding the content/section template and including the
content/section/content template. For example:
```
<li id="section-{{num}}"{{!
}} class="section course-section main clearfix{{!
}}{{#onlysummary}} section-summary{{/onlysummary}}{{!
}}{{#ishidden}} hidden{{/ishidden}}{{!
}}{{#iscurrent}} current{{/iscurrent}}{{!
}}{{#isstealth}} orphaned{{/isstealth}}{{!
}}"
data-sectionid="{{num}}"
data-sectionreturnid="{{sectionreturnid}}"
data-for="section"
data-id="{{id}}"
data-number="{{num}}"{{!
}}>
<!--
Add a custom div to the existing wrapper, without replacing the
entire content of the section/content.
-->
<div class="my-custom-content">
<!--
The upstream content is here:
-->
<div class="course-section-header d-flex"
data-for="section_title"
data-id="{{id}}"
data-number="{{num}}"
>
{{$ core_courseformat/local/content/cm/section/content }}
{{> core_courseformat/local/content/cm/section/content }}
{{/ core_courseformat/local/content/cm/section/content }}
</div>
</div>
</li>
```
It also means that a course format can append additional information to
this wrapper, for example:
```
{{< core_courseformat/local/content/section }}
{{$ core_courseformat/local/content/cm/section/content }}
<div class="some-custom-class">
<!--
Some custom content appended _before_ the course section
content but within the wrapper
-->
</div>
{{> core_courseformat/local/content/cm/section/content }}
<div class="some-custom-class">
<!--
Some custom content appended _after_ the course section
content but within the wrapper
-->
</div>
{{/ core_courseformat/local/content/cm/section/content }}
{{/ core_courseformat/local/content/section }}
```
Course formats may want to preserve the existing activity information,
but either change the wrapper (.activity-item), or prepend and append
additional content to it.
Prior to this change, the only way to do this was by copying the entire
content of the template.
This change moves the content of the activity-item to a separate
template.
This means that a course format can replace the activity-item wrapper
whilst retaining its content by overriding the cm template and including
the cm/activity template. For example:
```
<div class="my-custom-activity-item {{!
}}{{#modstealth}}hiddenactivity{{/modstealth}}{{!
}}{{#modhiddenfromstudents}}hiddenactivity{{/modhiddenfromstudents}}{{!
}}{{#modinline}}activityinline{{/modinline}}" data-activityname="{{activityname}}">
{{#moveicon}} {{{moveicon}}} {{/moveicon}}
{{$ core_courseformat/local/content/cm/activity }}
{{> core_courseformat/local/content/cm/activity }}
{{/ core_courseformat/local/content/cm/activity }}
</div>
```
It also means that a course format can append additional information to
this wrapper, for example:
```
{{< core_courseformat/local/content/cm }}
{{$ core_courseformat/local/content/cm/activity }}
{{> core_courseformat/local/content/cm/activity }}
{{#cmmeta}}
<div class="ct-activity-meta-container">
{{{cmmeta}}}
</div>
{{/cmmeta}}
{{/ core_courseformat/local/content/cm/activity }}
{{/ core_courseformat/local/content/cm }}
```