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

Add badge actions to the course badges view

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Duplicate
    • Affects Version/s: 2.5
    • Fix Version/s: None
    • Component/s: Badges
    • Labels:
    • Affected Branches:
      MOODLE_25_STABLE

      Description

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

      ....
      }

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                nneko Nneko Branche
                Participants:
                Component watchers:
                Yuliya Bozhko, Amaia Anabitarte, Bas Brands, Carlos Escobedo, Sara Arjona (@sarjona), Víctor Déniz Falcón
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: