Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-39983

Add badge actions to the course badges view

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Duplicate
    • Icon: Minor Minor
    • None
    • 2.5
    • Badges
    • MOODLE_25_STABLE

      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; }

      ....
      }

            Unassigned Unassigned
            nneko Nneko Branche
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.