Feedback doesn't allow HTML colour etc changes in name

Feedback doesn't allow HTML colour etc changes in name

by Julie white -
Number of replies: 19

Thanks Mary

Not really, Let's clarify it by an example, On" add an activity", let's  select "assignment", asking  for "assignment name" and "Descriptions"

Suppose, I named it as" Essay for Students". I can use HTML to change "Essay for Student", in terms of font and color ....,

But for the feedback this does not happen? Any  solution?

Average of ratings: -
In reply to Julie white

Re: Why we could not remove icons in Moodle 2.5

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers
You can't change the name or you can't add html coding?  I use Feedback all the time and never had had an issue changing the name...
In reply to Emma Richardson

Re: Why we could not remove icons in Moodle 2.5

by Julie white -

Why we can change it using HTML for the name of  all activities except the feedback?? HTML perfectly does work for all activities ( the name) , except the name of feedback? I have done for all activiti4es, I do not know how to do it for Feedback. What is the Solution?


In reply to Julie white

Re: Why we could not remove icons in Moodle 2.5

by Mary Cooch -
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators

Julie - I have just connected you to this previous discussion about changing the colour/font of Feedback https://moodle.org/mod/forum/discuss.php?d=316930#p1270228

I see what you mean now but don't know the answer. Except that you can change the NAME of Feedback via the Language strings but if you mean the colours etc, then, no, as you noticed a few weeks back.

In reply to Mary Cooch

Re: Why we could not remove icons in Moodle 2.5

by Julie white -

Very disappointing. What's wrong! Can we ask the professional Moodle users to advise us?? It has a  solution for sure. Any comment of Firebug? or using server?


In reply to Julie white

Re: Why we could not remove icons in Moodle 2.5

by Mary Cooch -
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators
If you think it is really worth it then you could file a tracker report asking the Feedback maintainer to make it so that Feedback will accept HTML changes as with other activities. I personally don't know about programming so I don't know any more than that.
In reply to Mary Cooch

Re: Why we could not remove icons in Moodle 2.5

by Julie white -

Which file in Moodle should be modified? Can anyone help?

In reply to Julie white

Feedback won't allow HTML changes in activity name

by Mary Cooch -
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators

I have split this discussion from the icons/theme on Julie and am moving it to the Feedback forum where your original discussion was. Unfortunately we now have two duplicate discussions on the same topic, so let's keep to this one for any further discussion on this issue. In future it's a good idea to keep to one topic per thread and not to duplicate problems from previous posts.smile

In reply to Mary Cooch

Re: Feedback won't allow HTML changes in activity name

by Julie white -

Thanks Mary for this,

If we are unable to change the name,  ok.  Can we change  it using  Moodle's files from the server. If yes, please can you advise which file? Finger cross for solving this serious issue in Moodle! I wonder if Mary Evans can solve the matter??


In reply to Julie white

Re: Feedback won't allow HTML changes in activity name

by Julie white -

 Does anyone know how we could change the name using html or php codes?


In reply to Julie white

Re: Feedback won't allow HTML changes in activity name

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

From memory I think the Feedback mod has past its 'sell-by' date!

i have never used it and so cannot comment, but when I have a chance to I will take it for a spin and try and figure out what is wrong with it.

As for Colours well these can be added via a theme using CSS

Posted from my iPad 

Mary 

In reply to Julie white

Re: Feedback won't allow HTML changes in activity name

by Richard Oelmann -
Picture of Core developers Picture of Plugin developers Picture of Testers

Mod assign has (as an example because its the same in the other mod folders I checked)

        $mform->addElement('text', 'name', get_string('assignmentname', 'assign'), array('size'=>'64'));
        if (!empty($CFG->formatstringstriptags)) {
            $mform->setType('name', PARAM_TEXT);
        } else {
            $mform->setType('name', PARAM_CLEANHTML);
        }

Mod feedback simply has

        $mform->addElement('text', 'name', get_string('name', 'feedback'), array('size'=>'64'));
        $mform->setType('name', PARAM_TEXT);

These are in the mod_form.php file of the modules

Bear in mind that if you alter this in core code, it will be overwritten whenever you update.


Richard

Average of ratings: Useful (1)
In reply to Richard Oelmann

Re: Feedback won't allow HTML changes in activity name

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

I am surprised that no one has fixed that before today.

I think that calls for a Moodle Tracker issue being set up!

Thanks

Mary

In reply to Mary Evans

Re: Feedback won't allow HTML changes in activity name

by Julie white -

Richard, sorry, but your  codes do not work at all. Please make sure when you advise people.

In reply to Julie white

Re: Feedback won't allow HTML changes in activity name

by Richard Oelmann -
Picture of Core developers Picture of Plugin developers Picture of Testers
What makes you think I hadn't
It works for me



You might want to be a bit more careful with wording your replies as I hope I have mistaken the attitude that seemed to come across in your last one when people are trying to help you Julie!
In reply to Richard Oelmann

Re: Feedback won't allow HTML changes in activity name

by Richard Oelmann -
Picture of Core developers Picture of Plugin developers Picture of Testers



It works Julie
I do test things before I advise people - or state that its from memory or don't have access so test it yourself
In this case I had tried it and it does work, so I don't know what you have done wrong, but the code I gave as an example IS correct and WAS tested before posting

Thank you for your kind support of those trying to help you sad
In reply to Richard Oelmann

Re: Feedback won't allow HTML changes in activity name

by Julie white -

Codes do not work for me, I can change them using firebug but it does not work  . You need clearly  tell us what you have done, if you think I am  wrong. That would be very helpful. 

In reply to Julie white

Re: Feedback won't allow HTML changes in activity name

by Richard Oelmann -
Picture of Core developers Picture of Plugin developers Picture of Testers
More clearly than stating that those are the lines in the other modules' mod_form.php that are not in the feedback one ?

OK - for the code:
1. I opened mod_assign/mod_form.php
2. I copied the lines in bold from that file
3. I went to mod_feedback/mod_form.php
4. I added the lines in bold into the similar location in that file ie. wrapping them around the $mform->setType('name', PARAM_TEXT); line as they were in the assign module equivalent
5. I resaved the mod_feedback/mod_form.php file

On my Moodle site:
1. I went to Site Admin > Appearance > HTML Settings and removed the tick to strip HTML tags from activity names - I presume you have already done this as you have previously posted that you can make these changes in other activities
2. I went to a test page on my moodle site
3. I add a feedback activity
4. In that activity title I added some span tags with style around the activity name as per the screenshot above

It worked, it was tested before writing the solution originally and if that solution wasn't clear enough for you then hopefully these steps are.
Average of ratings: Useful (2)
In reply to Richard Oelmann

Re: Feedback won't allow HTML changes in activity name

by Hartmut Scherer -

Hi Richard,

I just want to confirm that I tried all your steps and it works fine in Moodle 2.9.1. 

With kind regards,

Hartmut