Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Course page not obvious to find for new students #83

Open
lhjohn opened this issue Feb 17, 2021 · 1 comment
Open

Course page not obvious to find for new students #83

lhjohn opened this issue Feb 17, 2021 · 1 comment
Labels
enhancement New feature or request

Comments

@lhjohn
Copy link
Contributor

lhjohn commented Feb 17, 2021

Students that just registered will not be able to see the "My Courses" item in the left navigation drawer, because they are not enrolled yet in any courses.

The course page can then only be accessed through a button on the bottom of the left navigation drawer, which does not have a name, but merely an icon.

The button needs to indicate more obviously that it links to the course page OR the "My Courses" item should always show, even if not enrolled into any courses.

@lhjohn
Copy link
Contributor Author

lhjohn commented Feb 17, 2021

Implemented a temporary solution to add "Courses" label next to icon. Currently, does not scale well to closed navigation drawer.

sudo nano ~/apps/moodle/htdocs/theme/remui/classes/utility.php

    public static function get_left_nav_footer_menus() {
        global $CFG, $COURSE, $USER, $PAGE;
        $menudata = array (
            [
                'url' => $CFG->wwwroot.'/course/index.php',
                'iconclass' => '',
                'title' => get_string('createarchivepage', 'theme_remui'),
                'description' => ' Courses'
            ]
        );
        // Return all menus for site administrator.
        if (is_siteadmin($USER)) {
            $menus = array (
                [
                    'url' => "{$CFG->wwwroot}/{$CFG->admin}/user.php",
                    'iconclass' => 'fa-users',
                    'title' => get_string('userlist'),
                    'description' => ''
                ],
                [
                    'url' => self::get_course_creation_link(),
                    'iconclass' => 'fa-file',
                    'title' => get_string('createanewcourse', 'theme_remui'),
                    'description' => ''
                ],
                [
                    'url' => $CFG->wwwroot . "/theme/remui/customizer.php?url=" . urlencode($PAGE->url->out()),
                    'iconclass' => 'fa-paint-brush customizer-editing-icon',
                    'title' => get_string('customizer', 'theme_remui'),
                    'description' => ''
                ],
                [
                    'url' => "{$CFG->wwwroot}/{$CFG->admin}/settings.php?section=themesettingremui",
                    'iconclass' => 'fa-cogs',
                    'title' => get_string('remuisettings', 'theme_remui'),
                    'description' => ''
                ]
            );
            $menudata = array_merge($menudata, $menus);
            $temp = array_splice($menudata, 1, 1);
            array_splice($menudata, 0, 0, $temp);
            return $menudata;
        }

sudo nano ~/apps/moodle/htdocs/theme/remui/templates/nav-drawer.mustache

    <div class="site-menubar-footer d-flex align-items-center" aria-label="{{#str}}drawerfootermenu, theme_remui{{/str}}" role="group">
        {{#navfootermenu}}
            <a href="{{{ url }}}" class="w-100 align-items-center d-flex justify-content-center" data-placement="top" data-toggle="tooltip" aria-label="{{title}}$
                <span class="fa {{ iconclass }} text-dark" aria-hidden="true"></span>
                <span class="text-dark" aria-hidden="true"><b>{{description}}</b></span>
            </a>
        {{/navfootermenu}}
    </div>

@lhjohn lhjohn added the enhancement New feature or request label Oct 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant