PDA

View Full Version : Delete restart button on learning path


smartdesigners
10-11-2007, 12:04 PM
I want to disable the restart course button at the end of the course, how can I do this, thanks

den
10-11-2007, 02:46 PM
The source of the file joomla_lms.course_lpathstu.php, where this button is added to the menu is encoded.
If you have php skills, you should edit file includes/lms_html_tmpl.php (function 'JLMS_ShowToolbar()') to disable this button.

smartdesigners
10-13-2007, 11:45 AM
Thanks den, I have no php skills (although i would love to) can you advise on what i need to change. Thanks

den
10-13-2007, 05:09 PM
Open the file components/com_joomla_lms/includes/lms_html_tmpl.php

and change the code near line ~15
from:

$toolbar_thml .= "<td>";
$btn_w = "32";$btn_h = "32";
switch ($toolbar_btn['btn_type']) {

to:

$toolbar_thml .= "<td>";
if ($toolbar_btn['btn_type'] == 'restart') {
$toolbar_thml .='&nbsp;</td>';
break;
}
$btn_w = "32";$btn_h = "32";
switch ($toolbar_btn['btn_type']) {

smartdesigners
10-13-2007, 06:10 PM
That hit the spot! Great support thank you very much for your help

mscherenberg
07-26-2010, 04:16 AM
If the user fails the quiz, is it possible to have the restart button in the results? I would like them to restart the learning path completely.

Where would I modify the php code to allow this?

Thank You,
Mike

Helga_13
07-27-2010, 01:16 PM
Hope we understood you correctly, but what are you talking about is not so necessary:

If users fail a quiz and cannot proceed with the learning path then they can simple navigate to the quiz step again and the failed quiz will be automatically restarted.
There is a 'restart' button to restart entire lpath, it appears after completing the entire lpath.

If in your case failed quizzes are not restarted automatically after navigating to them for the second time please check if the number of attempts for quizzes is limited (edit the quiz and check its settings). If the number of attempts for the quiz is limited to 1 then the users cannot start quiz again after failing.
Please let us know if we didn't address your question and we will try to advise some other solution.

k10
09-21-2010, 10:49 PM
I would also like to disable the "Restart" button and link on our LMS but my components/com_joomla_lms/includes/lms_html_tmpl.php file looks very different from the code described above. I am using Joomla Version: 1.5.20 with JoomlaLMS 1.0.7.

The only reference I see to "restart" in lms_html_tmpl.php in my version is this (lines 211 - 217):


case 'restart':

$btn_str = _JLMS_RESTART_ALT_TITLE;

$btn_img = 'buttons/btn_restart.png';

break;


How can I disable "Restart" in this version?

Helga_13
09-22-2010, 09:57 AM
Solution is the same as mentioned in this post:
http://www.joomlalms.com/forum/showthread.php?p=3311
Possibly line numbers in your case are different due to additional line breaks (do you use MacOs?), if so - check lines 30 - 32 instead of 15-16.

k10
09-22-2010, 02:52 PM
I found it - my files had some very weird spacing!

CLun910
10-05-2010, 12:16 AM
Thanks Helga_13 for some reason I was having the same problem as k10. problem solved.

k10
10-15-2010, 08:12 PM
I thought removing the Restart button would solve our problem - but maybe there is another solution.

The reason we wanted to remove Restart is so students that passed a quiz couldn't come back to take the quiz again. Our passing score is 70% or better, and we didn't want students taking the test over and over so they could get a 100%. If a student fails a quiz we let them take it as many times as needed to pass, but once they pass that's the end.

The problem I've found in removing the Restart button is that students who have passed a quiz cannot go back into the lesson to see items in the Learning Path. All of our lessons have a content page of resources and a quiz. We don't mind students viewing the content page again, we just don't want them taking the quiz after they've passed. When you view the lesson you get the "Congratulations" message for passing the course but no ways to see the learning path materials.

How could this be accomplished?

Helga_13
10-18-2010, 05:08 PM
Unfortunately we can't offer another solution than removing the Restart button.
By the way after completing Learning Path students can access the parts of it by clicking on the Contents button.