Remove Columns for Priority and Heat
demontech opened this issue · 11 comments
Hi
Is there a way to remove the columns for Priority and Heat?
Thanks and congrats on this wonderful plugin!
Sorry, no way to do that currently.
Is there any way via the code?
I'm using your plugin for a live auction for my students with fake coins that they earned for different accomplishments, and I would like to remove those columns. All I need is their answers.
I really appreciate in advance for any kind of help that you can offer.
Thanks!
"...via the code." is the only way to hide them. I presume you mean a quick and dirty way to hide them without waiting for a new version. I can do that, but you need to know that it will affect EVERY Hot Question activity on your Moodle site.
In renderer.php comment out lines 241 and 243, 272 and 286, 305 and 332.
These changes will still leave the column headings, which would require a bit more complicated work to hide, but I think it will be usable if you need something temporary, right away. Otherwise, settings to hide those columns in just the current Hot Question activity, will probably take me a couple of days as it is bedtime here, and I have a doctors appointment tomorrow afternoon in another town.
Hi AL,
That's great! this temporary fix worked for me. I was able to hide the column headings via language customization.
This auction will happen in around two weeks, before Christmas break. I'm looking forward if you add the option to hide those columns. I'll be profoundly grateful. I hope everything went fine at your doctor's appointment.
Thank you !!
I spoke incorrectly. The doctor's appointment I mentioned was just for the lab work. The actual Dr. appointment is next Wednesday. Our fingers are crossed. Which, made my typing error prone and slow. Just kidding.
I have implemented the code changes needed to replace the Priority and Heat column headings and data, with spaces which allows the Question column to automatically expand and without having to do anything to CSS. I did it by making two new setting on the HQ activity edit page. Doing it this way makes it possible to customize every Hot Question in your site, without one affecting the other. It also makes it so that you can change your mind at anytime, It also makes each column independent of the other making it possible to hide both, either one, or neither of them.
Just pushed all the changes to master branch. I have to stop for the day and will do final testing tomorrow before I try to create the new 3.8.0 release. If you want to experiment with the master branch, go ahead. If you would rather try it on my dev server, send me an email drachels at drachels do com, and I will tell you how to log in.
Yep. Just had a chance to run codechecker and I do have a few comments, indents, and other items to fix before release of the new version. I will do that sometime Saturday morning.
Hi AL,
Awesome!! I tested on my personal computer, and I can hide both columns, Priority and Heat from the HQ settings, which that's exactly what I need, but I just wanted to go further with the testing and I try to display them back, but they always default to Yes, even though I changed them to No
Also, I'm not sure how the answers to the questions are sorted, but I just wanted to confirm if they are sorted them by the most recent response to the oldest?
Thank you very much!
Have a great weekend!
I suspect there is something caching what you are seeing. On my setup, when I change to No, and then go back, they are still on No.
NOTE: In the rush to try and finish before suppertime yesterday, I totally forgot to add the two new settings to the settings.php file. I also did code cleanup to get rid of some left over comments and a couple of missing comment periods.
I have pushed everything to master branch, and created a new MOODLE-380_STABLE branch to use for testing on Moodle 2.8 thru Moodle 3.8. If everything checks out, I will place the new release on Moodle later today, and close out this issue.
As to the order, it is generally from newest to oldest, but any priority or heat can change the order.
Just made a small change in locallib.php to fix a calendar bug in Moodle versions 3.2 and lower.
By the way, just looked at the sql in localib.php, function get_questions, and the sort order is:
tpriority DESC, votecount DESC, q.time DESC', $params
and $params is three more items:
$this->instance->id, $this->currentround->starttime, $this->currentround->endtime
q.time will cause the order to be newest to oldest - as long as they are the SAME DAY.
otherwise, $this->currentround->starttime kicks in and entries from previous days will come before current day entries.
Change included in v3.8.0.
Closed late due to family member health problem, so I got side tracked.