Merge branch 'MDL-78605_final-deprecation-of-token_table-col_token' of https://github.com/ziegenberg/moodle

This commit is contained in:
Huong Nguyen
2025-03-12 15:46:08 +07:00
-21
View File
@@ -204,27 +204,6 @@ class token_table extends \table_sql {
return $content;
}
/**
* Generate the token column.
*
* @param \stdClass $data Data for the current row
* @return string Content for the column
*
* @deprecated since Moodle 4.3 MDL-76656. Please do not use this function anymore.
* @todo MDL-78605 Final deprecation in Moodle 4.7.
*/
public function col_token($data) {
debugging('The function ' . __FUNCTION__ . '() is deprecated - please do not use it any more. ', DEBUG_DEVELOPER);
global $USER;
// Hide the token if it wasn't created by the current user.
if ($data->creatorid != $USER->id) {
return \html_writer::tag('small', get_string('onlyseecreatedtokens', 'core_webservice'), ['class' => 'text-muted']);
}
return $data->token;
}
/**
* Generate the name column.
*