\documentclass[10pt,oneside,a4paper]{article}
% \usepackage[scaled]{avant}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{ifthen}
\usepackage{geometry}
\usepackage{xspace}
\usepackage{xparse}
\usepackage{fancyhdr}
\usepackage{ulem}
\usepackage{tikz}
\usepackage{charter}

\newcommand{\purpose}{\textrm{Übungen zu Grundlagen der Logik in der Informatik, WS 2023}}
\newcommand{\institution}{Lehrstuhl für Informatik 8 (Theoretische Informatik)}

\renewcommand*\familydefault{\sfdefault}
\setlength{\headheight}{40pt}
\geometry{a4paper,top=40mm,left=20mm,right=20mm}

\ExplSyntaxOn
\NewDocumentCommand{\xhrulefill}{O{}}
 {
  \group_begin:
  \severin_xhrulefill:n { #1 }
  \group_end:
 }

\keys_define:nn { severin/xhrulefill }
 {
  height .dim_set:N    = \l_severin_xhrule_height_dim,
  thickness .dim_set:N = \l_severin_xhrule_thickness_dim,
  fill .skip_set:N     = \l_severin_xhrule_fill_skip,
  height .initial:n    = 0pt,
  thickness .initial:n = 0.4pt,
  fill .initial:n      = 0pt plus 1fill,
 }

\cs_new_protected:Nn \severin_xhrulefill:n
 {
  \keys_set:nn { severin/xhrulefill } { #1 }
  \leavevmode
  \leaders\hrule 
    height \dim_eval:n { \l_severin_xhrule_thickness_dim + \l_severin_xhrule_height_dim }
    depth  \dim_eval:n { -\l_severin_xhrule_height_dim }
  \skip_horizontal:N \l_severin_xhrule_fill_skip
  \kern 0pt
}
\ExplSyntaxOff

\pagestyle{fancy}

\fancyhf{}
\renewcommand{\headrulewidth}{0pt}
\fancyhead[L]{\purpose%\hfill\raisebox{-1.2\dp\strutbox}{\includegraphics[width=1cm]{logo.pdf}}
  \vspace{0.3em}
  \hrule
  \vspace{1.5em}
  {\hspace{1em}\Huge{\textrm{Übungsabgabe}}}\\
  \vspace{1.5em}
  \hrule
  \vspace{3em}
  \begin{minipage}{8cm}
  Tutor: \xhrulefill[height=-2pt] \\[1.5em]
  Parallelgruppe: \xhrulefill[height=-2pt] \\[1.5em]
  Abgabe zu Übungsblatt: \xhrulefill[height=-2pt]
\end{minipage}
\hfill
\begin{minipage}{5cm}
  \begin{tikzpicture}
    \node [fill=white!90!black,draw=white!20!black,text width=4cm,text height=2cm,align=center] {Punkte };
  \end{tikzpicture}
\end{minipage}
}
\fancyfoot[L]{\vspace{-3cm}\begin{center}\begin{tabular}{ll}
                Name: & \underline{\hspace{8cm}} \hspace{1cm} Matrikelnr.: \underline{\hspace{4cm}} \\[1.5em]
                Name: & \underline{\hspace{8cm}} \hspace{1cm} Matrikelnr.: \underline{\hspace{4cm}} \\[1.5em]
                Name: & \underline{\hspace{8cm}} \hspace{1cm} Matrikelnr.: \underline{\hspace{4cm}} \\[1.5em]
                Name: & \underline{\hspace{8cm}} \hspace{1cm} Matrikelnr.: \underline{\hspace{4cm}} \\[1.5em]
                Name: & \underline{\hspace{8cm}} \hspace{1cm} Matrikelnr.: \underline{\hspace{4cm}} 
                            \end{tabular}\end{center}}

\begin{document}
\begin{center}
  % \textbf{\institution} \\[1.5em]

\end{center}
\end{document}

\end{center}
