Remove "Rating grade for" from forum gradebook item

Re: Moodle 3.8 Forum change suggestion

by Randy Thornton -
Number of replies: 16
Picture of Documentation writers
Rick,

Where else exactly does this string show up outside the gradebook item?

There's several strings related to the various places forum names show up. The one for "Rating grade for {forum name}" (gradeitemnameforrating) is the one for the grade items. The word "Rating" is a different string and shows up in a few other strings too as part of the phrase. So changing this would not affect those other strings.

The string in the grading item name is specific to just that one place as far as I can tell. When I grep the Moodle code, it shows me this string is only ever used once (mod/forum/lib.php line 882) : when creating / update the grade item name. It doesn't occur elsewhere in the forum itself.
In reply to Randy Thornton

Re: Moodle 3.8 Forum change suggestion

by Jason McGensy -
After seeing this post I tried it and it almost works (at least in our instance). I find I have to go into a forum and click save and display [or save and return] to get the grade item string to update for that activity. If I make a new forum, the grade item will appear with the custom string but any existing activities need to be manually re-saved to get the change to take effect. I purged the language strings cache and tested by making a different change in quiz.php that reflected as soon as I purged again [but not related to the grade item name], so I think it may have something to do with the fact that the change is to a grade item that already exists. Any ideas? Or is this the expected outcome?
Average of ratings: Useful (1)
In reply to Jason McGensy

Re: Remove "Rating grade for" from forum gradebook item

by Helen Foster -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Thanks Jason for your feedback. Good to hear that customising the language string works for new forums.

I think you're right about the name not changing because the grade item already exists i.e. it is the expected outcome.

Average of ratings: Useful (1)
In reply to Jason McGensy

Re: Moodle 3.8 Forum change suggestion

by Josh Manders -
Jason,
Did you ever figure out a way to refresh the cache? I'm in the same spot as you are. I've edited the two strings in my language file
-- Rating grade for = gradeitemnameforrating | Rating grade for {$a->name}
-- Whole forum grade for = gradeitemnameforwholeforum | Whole forum grade for {$a->name}

But Moodle won't pick them up for pre-existing activities. From Helen's response, this is 'as expected' but this seems different from other Language behavior where I can make a change and it effects the entire site.
Average of ratings: Useful (1)
In reply to Josh Manders

Re: Moodle 3.8 Forum change suggestion

by Jason McGensy -
No, I don't think there's gonna be a way around it. Should be okay, though; I am hoping that when we roll classes forward for our next term, the new courses are restored with the updated grade item string and there will be minimal manual updating that needs to occur and those who are eager for it can take the time; I think having even a 'workaround' for this will be welcomed warmly.
In reply to Jason McGensy

Re: Moodle 3.8 Forum change suggestion

by Josh Manders -
Gotcha. You might want to do a little testing of your own but I found when I just tried to import the forum activities into a new shell after making the string edits, Moodle did not update to the new name. However, when you go and manually edit/save a new title, it does.

@ Andrew: Thanks for giving me a hint as to why these language strings strings are different.

-Josh
Average of ratings: Useful (1)
In reply to Josh Manders

Re: Moodle 3.8 Forum change suggestion

by Jason McGensy -
Yup, I'm seeing the same thing. Oh well 🤷🏾‍♂️
In reply to Josh Manders

Re: Moodle 3.8 Forum change suggestion

by Andrew Lyons -
Picture of Core developers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Testers
Hi Josh,

This is a bit different to the usual language string changes in that these are used as the initial value when you create a grade item. The new language string will take effect if you create a new forum, but existing ones are not changed automatically. You can, of course, manually update them.

It is the same as the default name for the "Announcements" forum, and a few other places.
Average of ratings: Useful (2)
In reply to Randy Thornton

Re: Moodle 3.8 Forum change suggestion

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers
I have tried to search "gradeitemnameforrating" and when I put this into "string identifier" I cannot find it in the English (us) language customization admin utility. I might be using the language customization incorrectly.
In reply to Rick Jerz

Re: Moodle 3.8 Forum change suggestion

by Randy Thornton -
Picture of Documentation writers
Rick,

It will be in the main en language pack. The en_us pack is a "child" language pack that only holds the various differences from the standard "parent" pack, en (with its many misspellings our former British masters still quaintly persist in using ;)
In reply to Randy Thornton

Re: Moodle 3.8 Forum change suggestion

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers
Okay. I pick the English (en) language pack, load it, put in the "gradeitemnameforrating" into String identifier, and it is not found. What am I doing wrong?  Do I have to select a category in the "Show strings..." area?

Attachment en.png
Attachment not found.png
In reply to Rick Jerz

Re: Moodle 3.8 Forum change suggestion

by Josh Manders -

Rick,

You've likely already figured it out by now but if you haven't, make sure you select all of the components you want the search to apply to (i.e. click in the "core" and hit hit command-A on your keyboard for select all).

-Josh

In reply to Rick Jerz

Re: Moodle 3.8 Forum change suggestion

by Jason McGensy -

In the show strings area, scroll down to the 'mod' section and choose forum.php

In reply to Jason McGensy

Re: Moodle 3.8 Forum change suggestion

by Randy Thornton -
Picture of Documentation writers
Exactly, that string is in the forum.php component.

Usually, I just select ALL the component names when searching for something, since a string may sometimes be in a different component that you might expect.
In reply to Jason McGensy

Re: Moodle 3.8 Forum change suggestion

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers
Well folks, no luck yet. First, on my Moodle, the "English (United States) (en_us)" is my Default language. I go to Admin | Language Customization, and open "English (United States) (en_us)," and Moodle loads this language pack. In "Show strings..." I scroll down and select forum.php from the mod section. I search for "gradeitemnameforrating" and Moodle finds this string. I make a minor change, add X, just to see if this is working. I Save changes. I purge caches. This "X" change does not show in the grade book item.

More suggestions?  Am I not entering the string correctly?



Attachment change.png
In reply to Rick Jerz

Re: Moodle 3.8 Forum change suggestion

by Jason McGensy -
You have to go into the settings of each forum activity and re-save to see the change reflected.
In reply to Jason McGensy

Re: Moodle 3.8 Forum change suggestion

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers
"Bingo" Jason! Wow! That's interesting. It appears that one just needs to "Edit" the forum, and simply save. You don't need to actually change anything.

Thanks much! This did it.