original_string: public function set_assign(\assign $assign) {
          if ($this->is_triggered()) {
              throw new \coding_exception('set_assign() must be done before triggerring of event');
          }
          if ($assign->get_context()->id != $this->get_context()->id) {
              throw new \coding_exception('Invalid assign isntance supplied!');
          }
          if ($assign->is_blind_marking()) {
              $this->data['anonymous'] = 1;
          }
          $this->assign = $assign;
      }
code: public function set_assign(\assign $assign) {
          if ($this->is_triggered()) {
              throw new \coding_exception('set_assign() must be done before triggerring of event');
          }
          if ($assign->get_context()->id != $this->get_context()->id) {
              throw new \coding_exception('Invalid assign isntance supplied!');
          }
          if ($assign->is_blind_marking()) {
              $this->data['anonymous'] = 1;
          }
          $this->assign = $assign;
      }
code_tokens: public function set_assign ( \ assign $ assign ) { if ( $ this -> is_triggered ( ) ) { throw new \ coding_exception ( 'set_assign() must be done before triggerring of event' ) ; } if ( $ assign -> get_context ( ) -> id != $ this -> get_context ( ) -> id ) { throw new \ coding_exception ( 'Invalid assign isntance supplied!' ) ; } if ( $ assign -> is_blind_marking ( ) ) { $ this -> data [ 'anonymous' ] = 1 ; } $ this -> assign = $ assign ; }
docstring: Set assign instance for this event.
  @param \assign $assign
  @throws \coding_exception
docstring_tokens: Set assign instance for this event .