learnweb/moodle-mod_ratingallocate

Feature request: Distribute users without choices

PhMemmel opened this issue · 3 comments

In many use cases you want to also distribute the users who didn't vote to a choice.

There should be different options to make the plugin do this:

  • Distribute equally: If you have 10 users without vote and 5 choices, you want to distribute them 2-2-2-2-2 (if max of each choice has not been reached yet). In case of 10 users and 4 choices it could be 3-3-2-2, for example
  • Distribute to fill max choices: 4 choices with 8/7/9/3 users distributed, each a maximum of 10, and 10 additional users who didn't vote it should just fill the choices, so the 10 additional users should be distributed 2-3-1-4, so all in all it's 10-10-10-7.

Implementation idea: I think the best place to do that would be in the manual allocation page. So there would be no necessarity to change anything about the algorithm and the current behavior of the plugin. After the distribution has been done, the instructor just goes to the manual allocation page, allocates some students manually and clicks a button "distribute users without allocation".

I offer to implement this and send a PR. If there are any ideas on implementation details, let me know, for example another useful algorithm besides the mentioned two?

FYI - this sounds like a partial duplicate of #124 - and... I actually have a version of this in our fork here:
danmarsden@e9c71d7

have been waiting for the other PR's to be accepted before we send through the other patches we have.

I definitely overlooked #124, sorry and thanks for pointing out. Also thank you for pointing to the commit with a solution for that.

I'm currently working on a version of that providing both of the algorithms I mentioned. I'm trying to use a heuristic in case of group restrictions, because I want to distribute as many users as possible: Users with least available choices should be assigned to these choices first before distributing all the others.

If #224 (and maybe even more :-)) finally lands, I will be happy to share.

Laur0r commented

Is fixed with merge of #248