Adding a link to a Feedback module in an HTML block

Adding a link to a Feedback module in an HTML block

by Kerry Sheehan -
Number of replies: 3

In our company we have three Moodle sites - development, QA and live. A client wanted to add a block on the left-hand side to highlight the use of the Feedback tool as students kept missing it at the bottom of the page. So working in our dev site, I added an HTML block and linked it to the Feedback tool (at the bottom of the page) using the URL. This works fine if everyone was working in the dev site, however when our administrator uploaded it to the QA site the link was broken. The other issue is that the course has about 10 sub-courses that this block needs to be added to.

So, is there any easy way to link the Feedback tool in the HTML block to the Feedback tool (at the bottom of the page) without having to relink everytime each sub-course is moved to a different Moodle site? Is there anyway for the link to automatically relink to the new URL when it's moved?

Cheers

Average of ratings: -
In reply to Kerry Sheehan

Re: Adding a link to a Feedback module in an HTML block

by Andreas Grabs -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Translators
Hi,

what version of moodle do you use?
What do you mean with "uploaded"? Do you mean a backup->restore of a course?
Is the feedback placed in the course you backuped and restored?
Is the link on the bottom side defined as an absolute url?
Relative urls will not be resolved and recoded correctly.

Andreas
In reply to Andreas Grabs

Re: Adding a link to a Feedback module in an HTML block

by Kerry Sheehan -

Hi there,

So we're currently running 1.9.6+. Sorry I should have been clearer, yes when we move to the QA system (and then the live system/site) we backup > restore a course.

So I've added an HTML block (see image 1) and created a link to the Feedback questionnaire (image 2) which sits at the bottom of the page.  The id on the dev site is: id=3589

1HTML block example    2Feedback tool

My issue is that when it's restored on the QA site and live site the id is different, e.g. id=3124, so the link is no longer valid in the HTML block. The only way I can think to get around this is to manaully relink the HTML block link to the Feedback questionnaire on each site.  Is this the only way or is there an easier way around this?

Cheers smile

Kerry

In reply to Kerry Sheehan

Re: Adding a link to a Feedback module in an HTML block

by Andreas Grabs -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Translators
Hi,

the id always should be changed while restoring.
An important fact is, that the link to the feedback is defined as an absolute url.
e.G. http://your.domain.tld/mod/feedback/view.php?id=xyz
Please check this in the source view of your html-block.
A relative url will not be altered while restoring.
example for relative url: /mod/feedback/view.php?id=xyz

In addition of all I would suggest that you update your installation to the current secure version.

Best regards
Andreas