forked from learnweb/moodle-mod_ratingallocate
-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft: Manual pre-allocation feature (Part 1) #2
Draft
DrCuriosity
wants to merge
18
commits into
feature/restrict-choices-group
Choose a base branch
from
feature/manual-allocation
base: feature/restrict-choices-group
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Draft: Manual pre-allocation feature (Part 1) #2
DrCuriosity
wants to merge
18
commits into
feature/restrict-choices-group
from
feature/manual-allocation
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…ingallocate knows its own ID.
…on; test_fill_choices() to test distribute_user() allocations in this case.
…t given the option to use rating buttons.
…me tidy up and code standards tweaks.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Given further database field changes, this builds on my previous PRs.
This feature relates to issue learnweb#208. This is quite a large chunk of work all at once, for which I unreservedly apologise.
The feature accounts for situations where particular users in the course need to be pre-assigned to specific choices before the rating process has occurred. This could for example account for students:
This pull request is "Part 1" of a larger change, providing a manual pre-allocation interface so that administrators can:
Part 2 will add further features, including settings at a plugin and course module level to specify a default set of
reasons to select from, and better visibility for pre-allocation data in the allocations reports.
Summary of Significant Changes
AMD Javascript and templates:
form-user-selector
: adapted from the user lookup inmod_forum
, callingmod_ratingallocate_search_users
insteadDB:
ratingallocate_allocations
: new fields: "manual", "reason", "allocatorid"mod_ratingallocate_search_users
service for user lookupsClasses:
external/search_users
: webservice for looking up users not pre-allocated to the current choiceForms:
preallocate_form
: Adds user preallocations for a ratingallocation choice. The pre-allocating administrator and a text reason are recorded. (Future work will support choosing from one or more default reasons as well.)Lang strings:
preallocate_form
above, and integrating it into other actionsLocallib:
preallocate_choice
andpreallocate_remove
add_allocation
,clear_all_allocations
to support manual pre-allocationsfilter_choices_by_full_preallocations
)process_default
)get_manual_preallocations
get_preallocated_userids
get_preallocation_counts
filter_choices_by_full_preallocations
Renderer:
render_tools
)ratingallocate_preallocations_table
Strategy/solver:
solver-template
to:maxsize
values down to account for pre-allocated usersTests:
mod_ratingallocate_manual_preallocation_test
: Tests around manual preallocation, especially the parts nearest the solver.