I'm a Symfony web developer and I use forma 2.3 for the school in my village during the confinement period in France.
We use it, with a team of 3 teachers, for students between 6 and 7 years old and the platform is really easy to use.
Many features are not useful but the platform lends itself very well to this use. So thanks to the team for developing this wonderful tool!
I wanted to share with you improvements that I have made, including a button to return to the list of courses when a course is open (more user-friendly than a return to the previous page of the browser) and notifications from private messages in the menu bar.
Here are the improvements:
1) The return button
In file templates/standard/layout/coursemenu_lat.html.twig
At line 25, replace the complete <div class="col-sm-9"> by :
Code: Select all
<div class="col-sm-9">
<div class="row">
<div class="col-sm-12">
<h1 class="section-coourse__title">{{ course_name }}</h1>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<div class="section-coourse__progress-container">
<div class="progress section-coourse__progress">
<div class="progress-bar progress-bar-warning{% if stats.perc_completed < 25 %} progress-bar-warning--black{% endif %}" role="progressbar" aria-valuenow="{{ stats.perc_completed }}"
aria-valuemin="0" aria-valuemax="100" style="width: {{ stats.perc_completed }}%;">
<span>{{ stats.perc_completed }}%</span>
</div>
<span class="glyphicon glyphicon-signal pull-right" aria-hidden="true" data-toggle="modal" data-target="#myModal"></span>
</div>
</div>
</div>
<div class="col-sm-6">
<div class="section-coourse__progress-container">
<a href="../appLms/index.php?r=lms/mycourses/show&mycourses_tab=tb_elearning&sop=unregistercourse" title="Return to courses list" class="btn btn-primary" style="width:100%"><span class="glyphicon glyphicon-home"></span> Return to courses list</a>
</div>
</div>
</div>
</div>
2) For notifications, there are several files to modify:
In file appLms/lib/lib.user_profile.php :
Line 627, add :
Code: Select all
function notifMsg()
{
$this->setViewer($viewer);
return $this->_up_viewer->notifMsg();
}
Code: Select all
if ($unread_num > 0 && $perm_message) {
$this->user_info['NOTIF'] = $unread_num;
$html .= '<div class="col-xs-4"><a class="btn btn-default" href="index.php?r=message/show&sop=unregistercourse">' . Lang::t('_MESSAGES', 'standard') . '<b class="num_notify"><i style="font-size:.78em">' . $this->user_info['NOTIF'] . '</i></b></a></div>';
}
Code: Select all
function notifMsg() {
if (isset($this->user_info['NOTIF'])) {
$html = '<b class="num_notify_menu"><span class="glyphicon glyphicon-envelope" aria-hidden="true"></span> <i style="font-size:.78em">' . $this->user_info['NOTIF'] . '</i></b>';
} else {
$html = '';
}
return $html;
}
Code: Select all
$GLOBALS['page']->addStart($profile->notifMsg(), 'content');
Code: Select all
{% if profile %}
{% set profil, notif = profile.homeUserProfile('normal', false, false), profile.notifMsg() %}
{% endif %}
{{ notif|raw }}
Code: Select all
echo $profile->notifMsg();
Code: Select all
#middlearea .yui-nav li b,.num_notify_menu{position: absolute;color: #fff!important;text-align: right;font-size: 0.9em;padding-top: 0px;line-height: 1.2em;text-decoration: none;top: -7px;
right: -13px;height: 15px;padding: 0 3px;background: #ee1111;border: 0px none;z-index: 2;
-webkit-border-radius: 4px 4px 4px 0;-moz-border-radius: 4px 4px 4px 0;border-radius: 4px 4px 4px 0;
-webkit-box-shadow: #666 0px 2px 3px;-moz-box-shadow: #666 0px 2px 3px;box-shadow: #666 0px 1px 3px;
_top: -11px;_right: -10px;_height: 18px;_width: 16px;
_background: url(../images/standard/updates.png) 0 0 no-repeat transparent;}
I am currently looking to display an indication in the menu bar when a new message is posted since the last visit to the public forum.
I will update this topic when it's developed.
I don't think I forgot anything.
Hope you find it useful.
Regards,
Arnaud.