Skip to content

Commit

Permalink
Merge branch 'MDL-83095_final-deprecation-of-functions-in-block_tag_y…
Browse files Browse the repository at this point in the history
  • Loading branch information
HuongNV13 committed Nov 14, 2024
2 parents 29d873b + 064e809 commit 1c67e24
Showing 1 changed file with 0 additions and 32 deletions.
32 changes: 0 additions & 32 deletions blocks/tag_youtube/block_tag_youtube.php
Original file line number Diff line number Diff line change
Expand Up @@ -203,38 +203,6 @@ function get_videos_by_tag_and_category(){
return $this->render_items($response);
}

/**
* Sends a request to fetch data.
*
* @see block_tag_youtube::service
* @deprecated since Moodle 2.8.8, 2.9.2 and 3.0 MDL-49085 - please do not use this function any more.
* @param string $request
* @throws coding_exception
*/
public function fetch_request($request) {
throw new coding_exception('Sorry, this function has been deprecated in Moodle 2.8.8, 2.9.2 and 3.0. Use block_tag_youtube::get_service instead.');

$c = new curl(array('cache' => true, 'module_cache'=>'tag_youtube'));
$c->setopt(array('CURLOPT_TIMEOUT' => 3, 'CURLOPT_CONNECTTIMEOUT' => 3));

$response = $c->get($request);

$xml = new SimpleXMLElement($response);
return $this->render_video_list($xml);
}

/**
* Renders the video list.
*
* @see block_tag_youtube::render_items
* @deprecated since Moodle 2.8.8, 2.9.2 and 3.0 MDL-49085 - please do not use this function any more.
* @param SimpleXMLElement $xml
* @throws coding_exception
*/
function render_video_list(SimpleXMLElement $xml){
throw new coding_exception('Sorry, this function has been deprecated in Moodle 2.8.8, 2.9.2 and 3.0. Use block_tag_youtube::render_items instead.');
}

/**
* Returns an error message.
*
Expand Down

0 comments on commit 1c67e24

Please sign in to comment.