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

Allow non editing teachers and students with award badge privilege award badges from settings block

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 2.5.1
    • 2.5
    • Badges
    • MOODLE_25_STABLE
    • MOODLE_25_STABLE
    • Hide

      1. Add a non-editing teacher to the course (this role can award and view recipients by default).
      2. Login as this non-editing teacher.
      3. Go to the course.
      4. Badges navigation should appear under course administration.
      5. If there are any badges, only one action should be available in manage badge table - award a badge.
      5a. If there are no badges, add new badge button should not appear. User should see just a message that there are no badges.
      6. Try to award a badge.
      7a. If the role is not among criteria, you should get a message that it is not possible.
      7b. If the role among criteria, you should be able to award badge.

      Show
      1. Add a non-editing teacher to the course (this role can award and view recipients by default). 2. Login as this non-editing teacher. 3. Go to the course. 4. Badges navigation should appear under course administration. 5. If there are any badges, only one action should be available in manage badge table - award a badge. 5a. If there are no badges, add new badge button should not appear. User should see just a message that there are no badges. 6. Try to award a badge. 7a. If the role is not among criteria, you should get a message that it is not possible. 7b. If the role among criteria, you should be able to award badge.

    Description

      Fixes MDL-39830 and MDL-39831 by modifying to the lib/badgeslib to add a badges node under course administration ADMIN_Category

      //@nneko added else clause to add not for non editing users with award privilege
      function badges_add_course_navigation(navigation_node $coursenode, stdClass $course) {
      global $CFG, $SITE;

      ...

      if (!empty($CFG->enablebadges) && !empty($CFG->badges_allowcoursebadges) && !$isfrontpage) {
      if (has_capability('moodle/badges:configuredetails', $coursecontext)) {

      ...

      else {//Add Badge category for non editing teachers and students that have award badge permission
      if(has_capability('moodle/badges:awardbadge', $coursecontext))

      { $coursenode->add(get_string('coursebadges', 'badges'), null, navigation_node::TYPE_CONTAINER, null, 'coursebadges', new pix_icon('i/badge', get_string('coursebadges', 'badges'))); $url = new moodle_url($CFG->wwwroot . '/badges/index.php', array('type' => BADGE_TYPE_COURSE, 'id' => $course->id)); $coursenode->get('coursebadges')->add(get_string('managebadges', 'badges'), $url, navigation_node::TYPE_SETTING, null, 'coursebadges'); }

      }
      }
      }

      Attachments

        Issue Links

          Activity

            People

              ybozhko Yuliya Bozhko
              nneko Nneko Branche
              Dan Poltawski Dan Poltawski
              Dan Poltawski Dan Poltawski
              Votes:
              2 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Clockify

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