original_string: public function get_used_module_names($plural = false) {
          $modnames = get_module_types_names($plural);
          $modnamesused = array();
          foreach ($this->get_cms() as $cmid => $mod) {
              if (!isset($modnamesused[$mod->modname]) && isset($modnames[$mod->modname]) && $mod->uservisible) {
                  $modnamesused[$mod->modname] = $modnames[$mod->modname];
              }
          }
          core_collator::asort($modnamesused);
          return $modnamesused;
      }
code: public function get_used_module_names($plural = false) {
          $modnames = get_module_types_names($plural);
          $modnamesused = array();
          foreach ($this->get_cms() as $cmid => $mod) {
              if (!isset($modnamesused[$mod->modname]) && isset($modnames[$mod->modname]) && $mod->uservisible) {
                  $modnamesused[$mod->modname] = $modnames[$mod->modname];
              }
          }
          core_collator::asort($modnamesused);
          return $modnamesused;
      }
code_tokens: public function get_used_module_names ( $ plural = false ) { $ modnames = get_module_types_names ( $ plural ) ; $ modnamesused = array ( ) ; foreach ( $ this -> get_cms ( ) as $ cmid => $ mod ) { if ( ! isset ( $ modnamesused [ $ mod -> modname ] ) && isset ( $ modnames [ $ mod -> modname ] ) && $ mod -> uservisible ) { $ modnamesused [ $ mod -> modname ] = $ modnames [ $ mod -> modname ] ; } } core_collator :: asort ( $ modnamesused ) ; return $ modnamesused ; }
docstring: Returns array of localised human-readable module names used in this course
  
  @param bool $plural if true returns the plural form of modules names
  @return array
docstring_tokens: Returns array of localised human - readable module names used in this course