Dave C
Dave C

Reputation: 15

Moodle theme customization

I am trying to customizing the course page in such way that once the student logged in he should see a button in the center of the screen course layout, i have set the basic requirements in the theme's config.php file. which is shown below.

'incourse' => array(
        'file' => 'course.php',
        'regions' => array(),

    ),

How can i add the button in the center of course layout


   Button 1

which should take the student to his profile when he clicks it. what should be the code in the main-wrap contents.

<div id="region-main-wrap">
         <div id="region-main">
               <div class="region-content">
                    <?php echo $coursecontentheader; ?>
                    <?php echo $OUTPUT->main_content() ?>
                    <?php echo $coursecontentfooter; ?>
                          </div>
                  </div>
          </div>

Upvotes: 1

Views: 1449

Answers (1)

Mark
Mark

Reputation: 491

Firstly, the "incourse" layout is used by pages inside the course structure such as an activity landing page. If you want the actual course to change you will need to modify the "course" layout.

Secondly, the course content itself is rendered by $OUTPUT->main_content(). If you want to put your button above or below the course content you can add it above or below that line.

If you want the button to actually appear within the course somewhere you could try one of the following:

  1. Add the button to your course directly within the HTML editor on the site
  2. Add a div outside your course and position it over the course using absolute positioning in your CSS
  3. Modify your course format directly (not advisable unless you really know what you are doing)

Upvotes: 2

Related Questions