original_string: public static function get_lesson($lessonid, $password = '') {
          global $PAGE;
  
          $params = array('lessonid' => $lessonid, 'password' => $password);
          $params = self::validate_parameters(self::get_lesson_parameters(), $params);
          $warnings = array();
  
          list($lesson, $course, $cm, $context, $lessonrecord) = self::validate_lesson($params['lessonid']);
  
          $lessonrecord = self::get_lesson_summary_for_exporter($lessonrecord, $params['password']);
          $exporter = new lesson_summary_exporter($lessonrecord, array('context' => $context));
  
          $result = array();
          $result['lesson'] = $exporter->export($PAGE->get_renderer('core'));
          $result['warnings'] = $warnings;
          return $result;
      }
code: public static function get_lesson($lessonid, $password = '') {
          global $PAGE;
  
          $params = array('lessonid' => $lessonid, 'password' => $password);
          $params = self::validate_parameters(self::get_lesson_parameters(), $params);
          $warnings = array();
  
          list($lesson, $course, $cm, $context, $lessonrecord) = self::validate_lesson($params['lessonid']);
  
          $lessonrecord = self::get_lesson_summary_for_exporter($lessonrecord, $params['password']);
          $exporter = new lesson_summary_exporter($lessonrecord, array('context' => $context));
  
          $result = array();
          $result['lesson'] = $exporter->export($PAGE->get_renderer('core'));
          $result['warnings'] = $warnings;
          return $result;
      }
code_tokens: public static function get_lesson ( $ lessonid , $ password = '' ) { global $ PAGE ; $ params = array ( 'lessonid' => $ lessonid , 'password' => $ password ) ; $ params = self :: validate_parameters ( self :: get_lesson_parameters ( ) , $ params ) ; $ warnings = array ( ) ; list ( $ lesson , $ course , $ cm , $ context , $ lessonrecord ) = self :: validate_lesson ( $ params [ 'lessonid' ] ) ; $ lessonrecord = self :: get_lesson_summary_for_exporter ( $ lessonrecord , $ params [ 'password' ] ) ; $ exporter = new lesson_summary_exporter ( $ lessonrecord , array ( 'context' => $ context ) ) ; $ result = array ( ) ; $ result [ 'lesson' ] = $ exporter -> export ( $ PAGE -> get_renderer ( 'core' ) ) ; $ result [ 'warnings' ] = $ warnings ; return $ result ; }
docstring: Return information of a given lesson.
  
  @param int $lessonid lesson instance id
  @param string $password optional password (the lesson may be protected)
  @return array of warnings and status result
  @since Moodle 3.3
  @throws moodle_exception
docstring_tokens: Return information of a given lesson .