diff --git a/lang/en/ratingallocate.php b/lang/en/ratingallocate.php
index a9eeb55e..816d4935 100644
--- a/lang/en/ratingallocate.php
+++ b/lang/en/ratingallocate.php
@@ -175,12 +175,11 @@
$string['publish_allocation_group_desc_rating_in_progress'] =
'The rating phase is in progress. Please wait till the rating phase has ended and then start to create allocations, first.';
$string['publish_allocation_group_desc_ready'] = 'There are no allocations yet. Please see the modify allocation section.';
-$string['publish_allocation_group_desc_ready_alloc_started'] = 'The allocations can now be published.
-After publishing the allocations they can no longer be altered.
-Please have a look at the current allocations by following the link in the reports section.
-You can choose to create groups within your course for all allocations.
+$string['publish_allocation_group_desc_ready_alloc_started'] = 'The allocations can now be published and you can choose to create groups within your course for all allocations.';
+$string['publish_allocation_group_desc_ready_alloc_started_help'] = 'After publishing the allocations they can no longer be altered.
+Please have a look at the current allocations by following the link in the reports section.
If the same groups have already been created by this plugin, they will be purged before refilling them.
-This can be done before and after publishing the allocations.';
+Creating groups can be done before and after publishing the allocations.';
$string['publish_allocation_group_desc_published'] = 'The allocations are already published.
You can choose to create groups within your course for all allocations.
If the same groups have already been created by this plugin, they will be purged before refilling them.';
diff --git a/locallib.php b/locallib.php
index 85ec0490..14d7abdc 100644
--- a/locallib.php
+++ b/locallib.php
@@ -190,7 +190,7 @@ public function get_raters_in_course(): array {
$raters = get_enrolled_users($this->context, 'mod/ratingallocate:give_rating');
$info = new info_module($cm);
- // Only show raters who had the ability to access this activity. This funktion ignores the visibility setting,
+ // Only show raters who had the ability to access this activity. This function ignores the visibility setting,
// so the ratings and allocations are still shown, even when the activity is hidden.
$filteredraters = $info->filter_user_list($raters);
diff --git a/renderer.php b/renderer.php
index f201d2bf..ec2ca01a 100644
--- a/renderer.php
+++ b/renderer.php
@@ -147,6 +147,8 @@ public function render_ratingallocate_allocation_status($coursemoduleid, $status
);
$buttondisteq = new single_button($distributeunallocatedurleq,
get_string('distributeequally', RATINGALLOCATE_MOD_NAME), 'get');
+ $buttondisteq->class = 'ratingallocate_front_page_buttons';
+
$buttondisteq->add_action(new confirm_action(
get_string('distribute_unallocated_equally_confirm', RATINGALLOCATE_MOD_NAME)));
@@ -156,6 +158,7 @@ public function render_ratingallocate_allocation_status($coursemoduleid, $status
);
$buttondistfill = new single_button($distributeunallocatedurlfill,
get_string('distributefill', RATINGALLOCATE_MOD_NAME), 'get');
+ $buttondistfill->class = 'ratingallocate_front_page_buttons';
$buttondistfill->add_action(new confirm_action(
get_string('distribute_unallocated_fill_confirm', RATINGALLOCATE_MOD_NAME)));
@@ -213,8 +216,14 @@ public function render_ratingallocate_publish_allocation($ratingallocateid, $cou
$descriptionbaseid = 'publish_allocation_group_desc_';
$description = get_string($descriptionbaseid . $status, RATINGALLOCATE_MOD_NAME);
+ if ($isready) {
+ $description = $this->format_text($description) . $this->help_icon('publish_allocation_group_desc_' . $status, RATINGALLOCATE_MOD_NAME);
+ } else {
+ $description = $this->format_text($description);
+ }
+
$this->add_table_row_triple($table,
- $this->format_text($description),
+ $description,
$this->single_button(new moodle_url('/mod/ratingallocate/view.php', array('id' => $coursemoduleid,
'ratingallocateid' => $ratingallocateid,
'action' => ACTION_PUBLISH_ALLOCATIONS)), get_string('publish_allocation', RATINGALLOCATE_MOD_NAME), 'get',
@@ -818,7 +827,7 @@ public function statistics_table_for_ratingallocate(ratingallocate $ratingalloca
$cell = new html_table_cell();
$usersinchoice = $ratingallocate->get_raters_in_course();
- $cell->text = count($usersinchoice) - count($memberships);
+ $cell->text = count($ratingallocate->get_undistributed_users());
$allocationrow[] = $cell;
$cell = new html_table_cell();
@@ -969,8 +978,11 @@ private function add_table_row_tuple(html_table $table, $first, $second) {
private function add_table_row_triple(html_table $table, $first, $second, $third) {
$row = new html_table_row();
$cell1 = new html_table_cell($first);
+ $cell1->attributes['class'] = 'ratingallocate_front_page_table_1';
$cell2 = new html_table_cell($second);
+ $cell2->attributes['class'] = 'ratingallocate_front_page_table_23';
$cell3 = new html_table_cell($third);
+ $cell3->attributes['class'] = 'ratingallocate_front_page_table_23';
$row->cells = array($cell1, $cell2, $cell3);
$table->data[] = $row;
}
diff --git a/styles.css b/styles.css
index 9ef50c4a..fc57e615 100644
--- a/styles.css
+++ b/styles.css
@@ -124,3 +124,20 @@
.ratingallocate_ratings_table_container .no-overflow {
overflow: unset;
}
+
+.ratingallocate_front_page_table_1 {
+ margin: auto;
+ width: 40%;
+}
+
+.ratingallocate_front_page_table_23 {
+ margin: auto;
+ width: 30%;
+ padding-left: 50px;
+ padding-right: 50px;
+}
+
+.ratingallocate_front_page_buttons {
+ margin: auto;
+ width: fit-content;
+}
\ No newline at end of file