original_string: public function col_tobedeleted($expiredctx) {
          if ($expiredctx->is_fully_expired()) {
              return get_string('defaultexpired', 'tool_dataprivacy');
          }
  
          $purpose = $this->get_purpose_for_expiry($expiredctx);
  
          $a = (object) [];
  
          $expiredroles = [];
          foreach ($expiredctx->get('expiredroles') as $roleid) {
              $expiredroles[] = html_writer::tag('li', $this->roles[$roleid]->localname);
          }
          $a->expired = html_writer::tag('ul', implode($expiredroles));
  
          $unexpiredroles = [];
          foreach ($expiredctx->get('unexpiredroles') as $roleid) {
              $unexpiredroles[] = html_writer::tag('li', $this->roles[$roleid]->localname);
          }
          $a->unexpired = html_writer::tag('ul', implode($unexpiredroles));
  
          if ($expiredctx->get('defaultexpired')) {
              return get_string('defaultexpiredexcept', 'tool_dataprivacy', $a);
          } else if (empty($unexpiredroles)) {
              return get_string('defaultunexpired', 'tool_dataprivacy', $a);
          } else {
              return get_string('defaultunexpiredwithexceptions', 'tool_dataprivacy', $a);
          }
      }
code: public function col_tobedeleted($expiredctx) {
          if ($expiredctx->is_fully_expired()) {
              return get_string('defaultexpired', 'tool_dataprivacy');
          }
  
          $purpose = $this->get_purpose_for_expiry($expiredctx);
  
          $a = (object) [];
  
          $expiredroles = [];
          foreach ($expiredctx->get('expiredroles') as $roleid) {
              $expiredroles[] = html_writer::tag('li', $this->roles[$roleid]->localname);
          }
          $a->expired = html_writer::tag('ul', implode($expiredroles));
  
          $unexpiredroles = [];
          foreach ($expiredctx->get('unexpiredroles') as $roleid) {
              $unexpiredroles[] = html_writer::tag('li', $this->roles[$roleid]->localname);
          }
          $a->unexpired = html_writer::tag('ul', implode($unexpiredroles));
  
          if ($expiredctx->get('defaultexpired')) {
              return get_string('defaultexpiredexcept', 'tool_dataprivacy', $a);
          } else if (empty($unexpiredroles)) {
              return get_string('defaultunexpired', 'tool_dataprivacy', $a);
          } else {
              return get_string('defaultunexpiredwithexceptions', 'tool_dataprivacy', $a);
          }
      }
code_tokens: public function col_tobedeleted ( $ expiredctx ) { if ( $ expiredctx -> is_fully_expired ( ) ) { return get_string ( 'defaultexpired' , 'tool_dataprivacy' ) ; } $ purpose = $ this -> get_purpose_for_expiry ( $ expiredctx ) ; $ a = ( object ) [ ] ; $ expiredroles = [ ] ; foreach ( $ expiredctx -> get ( 'expiredroles' ) as $ roleid ) { $ expiredroles [ ] = html_writer :: tag ( 'li' , $ this -> roles [ $ roleid ] -> localname ) ; } $ a -> expired = html_writer :: tag ( 'ul' , implode ( $ expiredroles ) ) ; $ unexpiredroles = [ ] ; foreach ( $ expiredctx -> get ( 'unexpiredroles' ) as $ roleid ) { $ unexpiredroles [ ] = html_writer :: tag ( 'li' , $ this -> roles [ $ roleid ] -> localname ) ; } $ a -> unexpired = html_writer :: tag ( 'ul' , implode ( $ unexpiredroles ) ) ; if ( $ expiredctx -> get ( 'defaultexpired' ) ) { return get_string ( 'defaultexpiredexcept' , 'tool_dataprivacy' , $ a ) ; } else if ( empty ( $ unexpiredroles ) ) { return get_string ( 'defaultunexpired' , 'tool_dataprivacy' , $ a ) ; } else { return get_string ( 'defaultunexpiredwithexceptions' , 'tool_dataprivacy' , $ a ) ; } }
docstring: Formatting for the 'tobedeleted' column which indicates in a friendlier fashion whose data will be removed.
  
  @param stdClass $expiredctx The row data.
  @return string
docstring_tokens: Formatting for the tobedeleted column which indicates in a friendlier fashion whose data will be removed .