original_string: protected function notify_student_submission_copied(stdClass $submission) {
          global $DB, $USER;
  
          $adminconfig = $this->get_admin_config();
          // Use the same setting for this - no need for another one.
          if (empty($adminconfig->submissionreceipts)) {
              // No need to do anything.
              return;
          }
          if ($submission->userid) {
              $user = $DB->get_record('user', array('id'=>$submission->userid), '*', MUST_EXIST);
          } else {
              $user = $USER;
          }
          $this->send_notification($user,
                                   $user,
                                   'submissioncopied',
                                   'assign_notification',
                                   $submission->timemodified);
      }
code: protected function notify_student_submission_copied(stdClass $submission) {
          global $DB, $USER;
  
          $adminconfig = $this->get_admin_config();
          // Use the same setting for this - no need for another one.
          if (empty($adminconfig->submissionreceipts)) {
              // No need to do anything.
              return;
          }
          if ($submission->userid) {
              $user = $DB->get_record('user', array('id'=>$submission->userid), '*', MUST_EXIST);
          } else {
              $user = $USER;
          }
          $this->send_notification($user,
                                   $user,
                                   'submissioncopied',
                                   'assign_notification',
                                   $submission->timemodified);
      }
code_tokens: protected function notify_student_submission_copied ( stdClass $ submission ) { global $ DB , $ USER ; $ adminconfig = $ this -> get_admin_config ( ) ; // Use the same setting for this - no need for another one. if ( empty ( $ adminconfig -> submissionreceipts ) ) { // No need to do anything. return ; } if ( $ submission -> userid ) { $ user = $ DB -> get_record ( 'user' , array ( 'id' => $ submission -> userid ) , '*' , MUST_EXIST ) ; } else { $ user = $ USER ; } $ this -> send_notification ( $ user , $ user , 'submissioncopied' , 'assign_notification' , $ submission -> timemodified ) ; }
docstring: Notify student upon successful submission copy.
  
  @param stdClass $submission
  @return void
docstring_tokens: Notify student upon successful submission copy .