Provides a usability improvement and a patch for tracker bug MDL-39830 where the GUI provides no mechanism for students with the correct permissions to award badges from the navigation or settings_block.
This does not fix bug 39830 as the settings block will still not have a node for badges in course administration for students but this provides an alternate method for students to access the badge award page by selecting "course badges" from the navigation block. In the updated view each badge row will include the badge actions.
//@nneko modified render for badge/view to include badge actions on GUI
protected function render_badge_collection(badge_collection $badges) {
....
$table->head = array(
get_string('badgeimage', 'badges'),
$sortbyname,
get_string('description', 'badges'),
get_string('bcriteria', 'badges'),
get_string('actions'),//include table header for action buttons
$sortbyawarded
);
$table->colclasses = array('badgeimage', 'name', 'description', 'criteria', 'awards', 'actions');
....
foreach ($badges->badges as $badge)
{ ... $actions = self::print_badge_table_actions($badge, $this->page->context);//fetch allowed badge actions $row = array($badgeimage, $name, $description, $criteria, $actions, $awarded);//print actions before awards per row $table->data[] = $row; }....
}
- has a non-specific relationship to
-
MDL-39830 Badges link missing in admin block for users with permission to award badges
- Closed