original_string: public function prediction_actions(\core_analytics\prediction $prediction, $includedetailsaction = false,
              $isinsightuser = false) {
          global $PAGE;
  
          $predictionid = $prediction->get_prediction_data()->id;
  
          $PAGE->requires->js_call_amd('report_insights/actions', 'init', array($predictionid));
  
          $actions = array();
  
          if ($includedetailsaction) {
  
              $predictionurl = new \moodle_url('/report/insights/prediction.php', array('id' => $predictionid));
              $detailstext = $this->get_view_details_text();
  
              $actions[] = new \core_analytics\prediction_action(\core_analytics\prediction::ACTION_PREDICTION_DETAILS, $prediction,
                  $predictionurl, new \pix_icon('t/preview', $detailstext),
                  $detailstext);
          }
  
          // Flag as fixed / solved.
          $fixedattrs = array(
              'data-prediction-id' => $predictionid,
              'data-prediction-methodname' => 'report_insights_set_fixed_prediction'
          );
          $actions[] = new \core_analytics\prediction_action(\core_analytics\prediction::ACTION_FIXED,
              $prediction, new \moodle_url(''), new \pix_icon('t/check', get_string('fixedack', 'analytics')),
              get_string('fixedack', 'analytics'), false, $fixedattrs);
  
          // Flag as not useful.
          $notusefulattrs = array(
              'data-prediction-id' => $predictionid,
              'data-prediction-methodname' => 'report_insights_set_notuseful_prediction'
          );
          $actions[] = new \core_analytics\prediction_action(\core_analytics\prediction::ACTION_NOT_USEFUL,
              $prediction, new \moodle_url(''), new \pix_icon('t/delete', get_string('notuseful', 'analytics')),
              get_string('notuseful', 'analytics'), false, $notusefulattrs);
  
          return $actions;
      }
code: public function prediction_actions(\core_analytics\prediction $prediction, $includedetailsaction = false,
              $isinsightuser = false) {
          global $PAGE;
  
          $predictionid = $prediction->get_prediction_data()->id;
  
          $PAGE->requires->js_call_amd('report_insights/actions', 'init', array($predictionid));
  
          $actions = array();
  
          if ($includedetailsaction) {
  
              $predictionurl = new \moodle_url('/report/insights/prediction.php', array('id' => $predictionid));
              $detailstext = $this->get_view_details_text();
  
              $actions[] = new \core_analytics\prediction_action(\core_analytics\prediction::ACTION_PREDICTION_DETAILS, $prediction,
                  $predictionurl, new \pix_icon('t/preview', $detailstext),
                  $detailstext);
          }
  
          // Flag as fixed / solved.
          $fixedattrs = array(
              'data-prediction-id' => $predictionid,
              'data-prediction-methodname' => 'report_insights_set_fixed_prediction'
          );
          $actions[] = new \core_analytics\prediction_action(\core_analytics\prediction::ACTION_FIXED,
              $prediction, new \moodle_url(''), new \pix_icon('t/check', get_string('fixedack', 'analytics')),
              get_string('fixedack', 'analytics'), false, $fixedattrs);
  
          // Flag as not useful.
          $notusefulattrs = array(
              'data-prediction-id' => $predictionid,
              'data-prediction-methodname' => 'report_insights_set_notuseful_prediction'
          );
          $actions[] = new \core_analytics\prediction_action(\core_analytics\prediction::ACTION_NOT_USEFUL,
              $prediction, new \moodle_url(''), new \pix_icon('t/delete', get_string('notuseful', 'analytics')),
              get_string('notuseful', 'analytics'), false, $notusefulattrs);
  
          return $actions;
      }
code_tokens: public function prediction_actions ( \ core_analytics \ prediction $ prediction , $ includedetailsaction = false , $ isinsightuser = false ) { global $ PAGE ; $ predictionid = $ prediction -> get_prediction_data ( ) -> id ; $ PAGE -> requires -> js_call_amd ( 'report_insights/actions' , 'init' , array ( $ predictionid ) ) ; $ actions = array ( ) ; if ( $ includedetailsaction ) { $ predictionurl = new \ moodle_url ( '/report/insights/prediction.php' , array ( 'id' => $ predictionid ) ) ; $ detailstext = $ this -> get_view_details_text ( ) ; $ actions [ ] = new \ core_analytics \ prediction_action ( \ core_analytics \ prediction :: ACTION_PREDICTION_DETAILS , $ prediction , $ predictionurl , new \ pix_icon ( 't/preview' , $ detailstext ) , $ detailstext ) ; } // Flag as fixed / solved. $ fixedattrs = array ( 'data-prediction-id' => $ predictionid , 'data-prediction-methodname' => 'report_insights_set_fixed_prediction' ) ; $ actions [ ] = new \ core_analytics \ prediction_action ( \ core_analytics \ prediction :: ACTION_FIXED , $ prediction , new \ moodle_url ( '' ) , new \ pix_icon ( 't/check' , get_string ( 'fixedack' , 'analytics' ) ) , get_string ( 'fixedack' , 'analytics' ) , false , $ fixedattrs ) ; // Flag as not useful. $ notusefulattrs = array ( 'data-prediction-id' => $ predictionid , 'data-prediction-methodname' => 'report_insights_set_notuseful_prediction' ) ; $ actions [ ] = new \ core_analytics \ prediction_action ( \ core_analytics \ prediction :: ACTION_NOT_USEFUL , $ prediction , new \ moodle_url ( '' ) , new \ pix_icon ( 't/delete' , get_string ( 'notuseful' , 'analytics' ) ) , get_string ( 'notuseful' , 'analytics' ) , false , $ notusefulattrs ) ; return $ actions ; }
docstring: Suggested actions for a user.
  
  @param \core_analytics\prediction $prediction
  @param bool $includedetailsaction
  @param bool $isinsightuser
  @return \core_analytics\prediction_action[]
docstring_tokens: Suggested actions for a user .