Creating Custom Dashboard using CMS page

A custom dashboard page can be created by adding dynamic content in a custom cms page. This example covers adding enrolled courses panel in a cms page. A script is added to show enrolled courses panel to a logged in user and register panel to guest user.

CMS page view for anonymous user


CMS page view for logged-in user

For logged in user register panel is replaced with enrolled courses panel.

Page Source

<div class="col-sm-4">
          <div class="panel panel-default pricing-big">
                  <div class="panel-heading">

/* Separate Panel heading for guest user and nonguest user   */ 
                      <h3 class="panel-title hide-nonguest">Register</h3>
                      <h3 class="panel-title hide-guest">My Courses</h3>
                  <div class="panel-body no-padding text-align-center">

/* Separate div for guest ( hide this for nonguest)  */ 
                    <div class="price-features hide-nonguest">
                      <a href="../site/" role="button"><span class="fa fa-user fa-4x"></span></a>
                      <p>No credit card needed for signup.</p>

/* Separate div for nonguest ( hide this for guest)  */ 
                    <div class="price-features hide-guest text-left" id="pnl_personal" style="overflow:scroll; height:230px;"></div>
                  <div class="panel-footer text-align-center">

/* Separate button href for guest and nonguest users  */ 
                      <span class="hide-nonguest">
                          <a href="../site/" class="btn btn-primary btn-block" role="button">Go</a>                        
                      <span class="hide-guest">
                        <a href="../site/" class="btn btn-primary btn-block" role="button">View All</a>
 /* script to hide elements having class hide-guest is user id Guest/Admin/Instructor otherwise hide hide-nonguest */   
    if(eb_IsGuest || eb_IsAdminSiteAdmin || eb_IsTeacher){

 /* script to call java script API to get enrolled courses  */   
    if(!eb_IsGuest && !eb_IsAdminSiteAdmin && !eb_IsTeacher){

List of JavaScript APIs

Here is link to detailed documentation