<?php

require_once('classes/local/frontpagecourses.php');

use local\frontpagecourses;

function local_frontpagecourses_extend_navigation_frontpage(){
    global $PAGE;

    $frontpagecourse = new frontpagecourses;

    $PAGE->requires->js_call_amd('local_frontpagecourses/main', 'init', [
        'coursescontent' => $frontpagecourse->get_courses_content()
    ]);

}