You add up products of percentages and their weights:

percentage * weight + percentage * weight + percentage * weight +... = overall percentage

In your case, there are only two categories:

(CW percentage) * (CW weight) + (exam percentage) * (exam weight) = overall percentage

Plug numbers in :

0 * 0.3 + x * 0.7 = .31

Now solve for x.