original_string: private static function hash($assignment, $userid, $attemptnumber) {
          if (is_object($assignment)) {
              $assignmentid = $assignment->get_instance()->id;
          } else {
              $assignmentid = $assignment;
          }
          return sha1($assignmentid . '_' . $userid . '_' . $attemptnumber);
      }
code: private static function hash($assignment, $userid, $attemptnumber) {
          if (is_object($assignment)) {
              $assignmentid = $assignment->get_instance()->id;
          } else {
              $assignmentid = $assignment;
          }
          return sha1($assignmentid . '_' . $userid . '_' . $attemptnumber);
      }
code_tokens: private static function hash ( $ assignment , $ userid , $ attemptnumber ) { if ( is_object ( $ assignment ) ) { $ assignmentid = $ assignment -> get_instance ( ) -> id ; } else { $ assignmentid = $ assignment ; } return sha1 ( $ assignmentid . '_' . $ userid . '_' . $ attemptnumber ) ; }
docstring: Get a hash that will be unique and can be used in a path name.
  @param int|\assign $assignment
  @param int $userid
  @param int $attemptnumber (-1 means latest attempt)
docstring_tokens: Get a hash that will be unique and can be used in a path name .