How can I make this if-condition simpler?
<p>I'm trying to make a simple if-condition. Unfortunately, I have the same condition twice in it (and I'd like to avoid it).</p>

<p>I'm building a flow on this site: <a href="http://code2flow.com/#" rel="nofollow">http://code2flow.com/#</a></p>

<p>The code looks like this:</p>

<pre><code>Prerequisite for certification and exam;
if(test 1 &gt;= 15 points)
{
  certification 1;
  exam 1;
  if(test 2 &gt;= 15 point)
  {
    certification 2;
    exam 1 + 2;
  }
}
else if(test 2 &gt;= 15 point)
{
  certification 2;
}
</code></pre>

<p>Explained: A person has to pass a test in a course (there are 2 courses). He has to achieve at least 15 points to get a certification for the course.</p>

<p>If the person has at least 15 points in test 1, he gets a certification for course 1 and is allowed to write the exam for course 1.</p>

<p>If the person has at least 15 points in test 2, he gets a certification for course 2.</p>

<p>At last, the person is allowed to write exam 2 only if he has in both test >= 15 points.</p>

<p>Here's an image of how it currently looks like: <a href="http://code2flow.com/Dkf6Vo.png" rel="nofollow">http://code2flow.com/Dkf6Vo.png</a></p>