original_string: protected static function delete_data_for_user_in_course_module(approved_contextlist $contextlist) {
          global $DB;
  
          foreach ($contextlist as $context) {
              if ($context instanceof \context_module) {
                  // Delete course completion data for this context.
                  \core_completion\privacy\provider::delete_completion($contextlist->get_user(), null, $context->instanceid);
              }
          }
  
      }
code: protected static function delete_data_for_user_in_course_module(approved_contextlist $contextlist) {
          global $DB;
  
          foreach ($contextlist as $context) {
              if ($context instanceof \context_module) {
                  // Delete course completion data for this context.
                  \core_completion\privacy\provider::delete_completion($contextlist->get_user(), null, $context->instanceid);
              }
          }
  
      }
code_tokens: protected static function delete_data_for_user_in_course_module ( approved_contextlist $ contextlist ) { global $ DB ; foreach ( $ contextlist as $ context ) { if ( $ context instanceof \ context_module ) { // Delete course completion data for this context. \ core_completion \ privacy \ provider :: delete_completion ( $ contextlist -> get_user ( ) , null , $ context -> instanceid ) ; } } }
docstring: Delete all 'standard' user data for the specified user in course modules.
  
  This will handle deletion for things such as activity completion.
  
  @param   approved_contextlist    $contextlist    The approved contexts and user information to delete information for.
docstring_tokens: Delete all standard user data for the specified user in course modules .