This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// NB - example test test generated by genimi llm. | |
// Not been tested! | |
namespace mod_coursework\test\output; | |
defined('MOODLE_INTERNAL') || die(); | |
require_once(__DIR__ . '/../../../lib/testlib.php'); | |
require_once(__DIR__ . '/../../../mod/coursework/classes/output/renderer.php'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Return if user has archetype editingteacher. | |
* | |
*/ | |
public static function is_teacher(): bool { | |
global $DB, $USER; | |
// Get id's from role where archetype is editingteacher. | |
$roles = $DB->get_fieldset('role', 'id', ['archetype' => 'editingteacher']); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static function get_assessments() { | |
global $COURSE, $USER, $OUTPUT; | |
// Can edit. | |
$context = context_course::instance($COURSE->id); | |
$canedit = has_capability('moodle/course:update', $context); | |
// Viewing a student record. | |
$viewasstudent = false; // TODO. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="d-flex"> | |
{{! Years. }} | |
{{#hasyears}} | |
<hr> | |
Academic year: | |
<a href="{{mainurl}}" class="mr-2">Current</a> | |
{{#year}} | |
<a href="{{url}}" class="mr-2">{{{name}}}</a> | |
{{/year}} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{{! | |
@template mod | |
}} | |
<div class="row"> | |
<!-- Mod name. --> | |
<div class="col-12 col-md-5 mb-3 mb-md-0"> | |
<img src="https://moodle.ucl.ac.uk/theme/image.php/ucl/quiz/1724290347/monologo" class="icon mr-1"> | |
<a href="">modname</a> | |
</div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Check if an activity is sits mapped. | |
* | |
*/ | |
function sitsmapped($cmid) { | |
global $DB; | |
$dbman = $DB->get_manager(); | |
$table = 'local_sitsgradepush_mapping'; | |
if ($dbman->table_exists($table)) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{{! | |
@template core_courseformat/local/content/cm/cmicon | |
Displays a course module icon. | |
Example context (json): | |
{ | |
"icon": "../../../pix/help.svg", | |
"iconclass": "", | |
"purpose": "content", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{{#url}} | |
<div class="activity-name-area activity-instance d-flex flex-column mr-2 "> | |
<div class="activitytitle media position-relative align-self-start {{textclasses}} modtype_{{modname}}"> | |
{{! Icon }} | |
{{#activityicon}} | |
{{$ core_courseformat/local/content/cm/cmicon }} | |
{{> core_courseformat/local/content/cm/cmicon }} | |
{{/ core_courseformat/local/content/cm/cmicon }} | |
{{/activityicon}} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Header. --> | |
<div id="#{{{ id }}}" class="pb-3"> | |
<hr> | |
<div class="row"> | |
<div class="col-6"> | |
<small>Module Delivery</small> | |
<h3 class="mb-0">{{{ delivercode }}}</h3> | |
<small>{{{ level }}}</small> | |
</div> | |
<div class="col-6"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="position-absolute w-100" style="bottom: 0; z-index: 6666;"> | |
<div class="bg-white"> | |
<div class="alert alert-danger mb-0"> | |
<i class="fa fa-exclamation-triangle text-danger mr-2" aria-hidden="true"></i> | |
This is a preview of Moodle 4.2 and the new UCL Moodle theme. | |
Every fortnight this site will be refreshed. Any work here will be lost. | |
See the <a href="https://wiki.ucl.ac.uk/x/2wDfDw" target="_blank">Moodle 4.2 wiki page</a> for support and to report any issues.</a> | |
</div> | |
</div> | |
</div> |
NewerOlder