original_string: protected static function has_marked_assignment_submissions($assignmentid, $userid) {
          global $DB;
  
          $params = [
              'assignment' => $assignmentid,
              'teacher'    => $userid
          ];
  
          $sql = "SELECT count(s.id) as nomarked
                    FROM {assignment_submissions} s
                   WHERE s.assignment = :assignment
                     AND s.teacher = :teacher";
  
          $results = $DB->get_record_sql($sql, $params);
  
          return ($results->nomarked > 0) ? true : false;
      }
code: protected static function has_marked_assignment_submissions($assignmentid, $userid) {
          global $DB;
  
          $params = [
              'assignment' => $assignmentid,
              'teacher'    => $userid
          ];
  
          $sql = "SELECT count(s.id) as nomarked
                    FROM {assignment_submissions} s
                   WHERE s.assignment = :assignment
                     AND s.teacher = :teacher";
  
          $results = $DB->get_record_sql($sql, $params);
  
          return ($results->nomarked > 0) ? true : false;
      }
code_tokens: protected static function has_marked_assignment_submissions ( $ assignmentid , $ userid ) { global $ DB ; $ params = [ 'assignment' => $ assignmentid , 'teacher' => $ userid ] ; $ sql = "SELECT count(s.id) as nomarked
                    FROM {assignment_submissions} s
                   WHERE s.assignment = :assignment
                     AND s.teacher = :teacher" ; $ results = $ DB -> get_record_sql ( $ sql , $ params ) ; return ( $ results -> nomarked > 0 ) ? true : false ; }
docstring: Helper function to check if a user has marked assignment submissions for a given assignment.
  
  @param int $assignmentid The assignment ID to check if user has marked associated submissions.
  @param int $userid       The user ID to check if user has marked associated submissions.
  @return bool             If user has marked associated submissions returns true, otherwise false.
  @throws \dml_exception
docstring_tokens: Helper function to check if a user has marked assignment submissions for a given assignment .