Questions I would ask:
1) Can the STM32 output the sample clock at 40 MHz?
2) Can the STM32 DMA channel accept inputs at 40 MHz?
3) Does the DMA channel accept external parallel data as wide as the A/D at 50 MHz?
4) Is there enough RAM attached to the DMA channel to make a reasonable waveform buffer?
5) How do I trigger the beginning of the sample period?
6) How does another DMA channel grab the data and display it or is this just done by the uC code?
There's a reason that scopes use FPGAs or CPLDs for the timing critical portion of the circuit. I'll concede to 'just guessing' but I don't think the STM32 will have anything to do with data capture. Not at these data rates and with any reasonable sample depth. What the STM32 can do is set up the FPGA parameters which, on a school project, won't be much. The FPGA will clock the A/D and stuff the results into SRAM. I would try very hard to find 10 nS SRAM because I don't want to implement a DDR controller. Micron makes some 512 Mbit SRAM but that's not much.
OTOH, MANY FPGA boards come with a ton of DDR memory and some come with an IP license for the DDR controller. The Arty from Digilent comes this way with the Vivado Design Suite Voucher:
http://store.digilentinc.com/arty-board-artix-7-fpga-development-board-for-makers-and-hobbyists/The video leads me to believe that you get enough license certificate with the product to implement the Microblaze FreeRTOS Web Server without having to spend thousands of dollars on the development software. It would be worth a call.
It's clear that the STM32 can't read the data in a program loop because even if the CPU could do one IO or memory instruction per clock and there were no pipeline breaks, the CPU could still only do 6 instructions per sample. Often times, on an ARM, IO pins can't work at processor speeds. This was certainly the case with the ARM 7s.
There seems to be a lot of SRAM on the chip. Check out how the DMA channel works just to be certain you can grab the parallel output of the A/D converter and stuff the result in SRAM.
Even building this with an FPGA is a monumental project. Once you capture the waveform on the FPGA, you still have to get it to the STM32. Or maybe not... Why not use the Web Server above to display the output on a browser? Kind of slow but pretty easy to implement (I think...).
You might get some ideas from the Digilent Analog Discovery:
http://store.digilentinc.com/analog-discovery-2-100msps-usb-oscilloscope-logic-analyzer-and-variable-power-supply/Look through the documentation linked down near the bottom of the page.
Heck of a project!