original_string: private function get_role_name($rid) {
          global $DB, $PAGE;
          $rec = $DB->get_record('role', array('id' => $rid));
  
          if ($rec) {
              return role_get_name($rec, $PAGE->context, ROLENAME_ALIAS);
          } else {
              return null;
          }
      }
code: private function get_role_name($rid) {
          global $DB, $PAGE;
          $rec = $DB->get_record('role', array('id' => $rid));
  
          if ($rec) {
              return role_get_name($rec, $PAGE->context, ROLENAME_ALIAS);
          } else {
              return null;
          }
      }
code_tokens: private function get_role_name ( $ rid ) { global $ DB , $ PAGE ; $ rec = $ DB -> get_record ( 'role' , array ( 'id' => $ rid ) ) ; if ( $ rec ) { return role_get_name ( $ rec , $ PAGE -> context , ROLENAME_ALIAS ) ; } else { return null ; } }
docstring: Gets role name.
  If no such role exists this function returns null.
  
  @return string|null
docstring_tokens: Gets role name . If no such role exists this function returns null .