Analysis of passed/not passed students by enrolled year
To start with, you could use a simple thresholding.
If you have the dataset $S$ where an element has the form $(x,y,c) \in S$, $x$ denotes the year,  $y$ is a binary value (exam passed or not), and $c$ is the student id.
you can obtain a classifier by using
$\{(x,y,c) \in S \mid x \leq \theta\}$ and $\{(x,y,c) \in S \mid x &gt; \theta\}$.
Now you can check all plausible $\theta$ values (..,2008,2009,..,2020) to see how good your data can be seperated. For example you could use Matthews correlation coefficient to evalute which $\theta$ is best.
But If you want to see if there is some linear correlation, yes you could compute the correlation coefficient, but I would assume that there is no linear correlation. Essentially you are computing the Point-biserial correlation coefficient.
Also with the thresholding method, in case you see that all $\theta$ perform more or less the same, and badly, you can see that there is no linear correlation.
You should have a look at histograms to see how your data is distributed.