original_string: public static function get_course_listitem_actions(\core_course_category $category, \core_course_list_element $course) {
          $baseurl = new \moodle_url(
              '/course/management.php',
              array('courseid' => $course->id, 'categoryid' => $course->category, 'sesskey' => \sesskey())
          );
          $actions = array();
          // Edit.
          if ($course->can_edit()) {
              $actions[] = array(
                  'url' => new \moodle_url('/course/edit.php', array('id' => $course->id, 'returnto' => 'catmanage')),
                  'icon' => new \pix_icon('t/edit', \get_string('edit')),
                  'attributes' => array('class' => 'action-edit')
              );
          }
          // Delete.
          if ($course->can_delete()) {
              $actions[] = array(
                  'url' => new \moodle_url('/course/delete.php', array('id' => $course->id)),
                  'icon' => new \pix_icon('t/delete', \get_string('delete')),
                  'attributes' => array('class' => 'action-delete')
              );
          }
          // Show/Hide.
          if ($course->can_change_visibility()) {
              $actions[] = array(
                  'url' => new \moodle_url($baseurl, array('action' => 'hidecourse')),
                  'icon' => new \pix_icon('t/hide', \get_string('hide')),
                  'attributes' => array('data-action' => 'hide', 'class' => 'action-hide')
              );
              $actions[] = array(
                  'url' => new \moodle_url($baseurl, array('action' => 'showcourse')),
                  'icon' => new \pix_icon('t/show', \get_string('show')),
                  'attributes' => array('data-action' => 'show', 'class' => 'action-show')
              );
          }
          // Move up/down.
          if ($category->can_resort_courses()) {
              $actions[] = array(
                  'url' => new \moodle_url($baseurl, array('action' => 'movecourseup')),
                  'icon' => new \pix_icon('t/up', \get_string('up')),
                  'attributes' => array('data-action' => 'moveup', 'class' => 'action-moveup')
              );
              $actions[] = array(
                  'url' => new \moodle_url($baseurl, array('action' => 'movecoursedown')),
                  'icon' => new \pix_icon('t/down', \get_string('down')),
                  'attributes' => array('data-action' => 'movedown', 'class' => 'action-movedown')
              );
          }
          return $actions;
      }
code: public static function get_course_listitem_actions(\core_course_category $category, \core_course_list_element $course) {
          $baseurl = new \moodle_url(
              '/course/management.php',
              array('courseid' => $course->id, 'categoryid' => $course->category, 'sesskey' => \sesskey())
          );
          $actions = array();
          // Edit.
          if ($course->can_edit()) {
              $actions[] = array(
                  'url' => new \moodle_url('/course/edit.php', array('id' => $course->id, 'returnto' => 'catmanage')),
                  'icon' => new \pix_icon('t/edit', \get_string('edit')),
                  'attributes' => array('class' => 'action-edit')
              );
          }
          // Delete.
          if ($course->can_delete()) {
              $actions[] = array(
                  'url' => new \moodle_url('/course/delete.php', array('id' => $course->id)),
                  'icon' => new \pix_icon('t/delete', \get_string('delete')),
                  'attributes' => array('class' => 'action-delete')
              );
          }
          // Show/Hide.
          if ($course->can_change_visibility()) {
              $actions[] = array(
                  'url' => new \moodle_url($baseurl, array('action' => 'hidecourse')),
                  'icon' => new \pix_icon('t/hide', \get_string('hide')),
                  'attributes' => array('data-action' => 'hide', 'class' => 'action-hide')
              );
              $actions[] = array(
                  'url' => new \moodle_url($baseurl, array('action' => 'showcourse')),
                  'icon' => new \pix_icon('t/show', \get_string('show')),
                  'attributes' => array('data-action' => 'show', 'class' => 'action-show')
              );
          }
          // Move up/down.
          if ($category->can_resort_courses()) {
              $actions[] = array(
                  'url' => new \moodle_url($baseurl, array('action' => 'movecourseup')),
                  'icon' => new \pix_icon('t/up', \get_string('up')),
                  'attributes' => array('data-action' => 'moveup', 'class' => 'action-moveup')
              );
              $actions[] = array(
                  'url' => new \moodle_url($baseurl, array('action' => 'movecoursedown')),
                  'icon' => new \pix_icon('t/down', \get_string('down')),
                  'attributes' => array('data-action' => 'movedown', 'class' => 'action-movedown')
              );
          }
          return $actions;
      }
code_tokens: public static function get_course_listitem_actions ( \ core_course_category $ category , \ core_course_list_element $ course ) { $ baseurl = new \ moodle_url ( '/course/management.php' , array ( 'courseid' => $ course -> id , 'categoryid' => $ course -> category , 'sesskey' => \ sesskey ( ) ) ) ; $ actions = array ( ) ; // Edit. if ( $ course -> can_edit ( ) ) { $ actions [ ] = array ( 'url' => new \ moodle_url ( '/course/edit.php' , array ( 'id' => $ course -> id , 'returnto' => 'catmanage' ) ) , 'icon' => new \ pix_icon ( 't/edit' , \ get_string ( 'edit' ) ) , 'attributes' => array ( 'class' => 'action-edit' ) ) ; } // Delete. if ( $ course -> can_delete ( ) ) { $ actions [ ] = array ( 'url' => new \ moodle_url ( '/course/delete.php' , array ( 'id' => $ course -> id ) ) , 'icon' => new \ pix_icon ( 't/delete' , \ get_string ( 'delete' ) ) , 'attributes' => array ( 'class' => 'action-delete' ) ) ; } // Show/Hide. if ( $ course -> can_change_visibility ( ) ) { $ actions [ ] = array ( 'url' => new \ moodle_url ( $ baseurl , array ( 'action' => 'hidecourse' ) ) , 'icon' => new \ pix_icon ( 't/hide' , \ get_string ( 'hide' ) ) , 'attributes' => array ( 'data-action' => 'hide' , 'class' => 'action-hide' ) ) ; $ actions [ ] = array ( 'url' => new \ moodle_url ( $ baseurl , array ( 'action' => 'showcourse' ) ) , 'icon' => new \ pix_icon ( 't/show' , \ get_string ( 'show' ) ) , 'attributes' => array ( 'data-action' => 'show' , 'class' => 'action-show' ) ) ; } // Move up/down. if ( $ category -> can_resort_courses ( ) ) { $ actions [ ] = array ( 'url' => new \ moodle_url ( $ baseurl , array ( 'action' => 'movecourseup' ) ) , 'icon' => new \ pix_icon ( 't/up' , \ get_string ( 'up' ) ) , 'attributes' => array ( 'data-action' => 'moveup' , 'class' => 'action-moveup' ) ) ; $ actions [ ] = array ( 'url' => new \ moodle_url ( $ baseurl , array ( 'action' => 'movecoursedown' ) ) , 'icon' => new \ pix_icon ( 't/down' , \ get_string ( 'down' ) ) , 'attributes' => array ( 'data-action' => 'movedown' , 'class' => 'action-movedown' ) ) ; } return $ actions ; }
docstring: Returns an array of actions for a course listitem.
  
  @param \core_course_category $category
  @param \core_course_list_element $course
  @return string
docstring_tokens: Returns an array of actions for a course listitem .