Here is an outline that uses Deduction Theorem (DT). I assume that (not p) is an abbreviation for (p -> false). If negation is a primitive connective (i.e., not an abbreviation for anything), then some steps below need to be adjusted.

Code:

(1) not q assumption
(2) q assumption
(3) false (1), (2), MP
(4) r (3), EFQ
(5) q -> r (2), (4), DT; close assumption (2)
(6) not (q -> r) assumption
(7) false (5), (6), MP
(8) not (not q) (1), (7), DT; close assumption (1)
(9) q (8), DNE (double-negation elimination)