Here is a method to extract subscores from Quiz (or any other Moodle activity that allows you to set different point values per question), without requiring any changes to Moodle code. It is a bit complex, but it does work. However, this method is only useful if you don't plan to use or display the final Quiz score, but you only want to display and use the subscores.
Step 1: Create Quiz and set values of Questions
Start by creating a quiz as usual. However, for each subscore you want to extract, you will need to set the values of questions for that subscore to an order of magnitude matching that subscore. This is easiest to understand with an example. Suppose you are creating a test that will contain questions from three areas: Mathematics, Language, and History. In this example, Mathematics is Topic 1, Language is Topic 2, and History is Topic 3.
For each topic, use a different point value for each question in that topic. For Topic 1 (Mathematics), each question is worth 1 point. For Topic 2 (Language), each question is worth 10 points. For Topic 3 (History), each question is worth 100 points. (Note that this is going to make your final quiz score meaningless.)
You also need to give the Quiz activity an ID number that you will be able to remember later. In this example we will use "Pretest".
Step 2: Create Grade Items for each topic
Next, create one new Manual Grade Item for each of your Topics. Important: put these Grade Items into a separate category that does NOT have Natural Weighting as the grade aggregation method. After saving each Grade Item, you can edit the Calculation for the item directly in the items Edit menu.
The calculation looks like this (where Pretest is the ID of the quiz score you are breaking into subscores):
=mod(floor([[Pretest]]/10^topicnumber),10) where "topicnumber" is the same as in step 1. So for Topic 1, the calculation is:
Topic 1, calc is: =mod(floor([[Pretest]]),10)
Topic 2, calc is: =mod(floor([[Pretest]]/10),10)
Topic 3, calc is: =mod(floor([[Pretest]]/100),10)
What this does is extract the digit from the quiz grade. So Topic 1 gets the "ones" digit, topic 2 gets the "tens" digit, etc. In my quiz, I made the whole quiz worth the total of all the question points, so these numbers don't get changed by proportions of questions in the quiz, but you need to keep track of how many points in each topic so you know what they mean.
Use your Subscores
Now, you have manual grade items for each topic, and they have values you can use in controlling visibility/access to activities. For example, set some labels to display or not display based on subscores from the first quiz. These labels can contain advisory text to students, letting them know whether they should complete a section of the course. You could also hide the section if the student has done well enough on the pretest, or show a section that is normally hidden if the student did poorly enough to need remedial material.