That's going to flood your fort with magma. The magma will come up to the level of the screw pump.
If you get rid of the pump, it won't flood you, but it will fill slowly. Remove the last two tiles of channel designations and get an engraver down there with a staircase; then carve a fortification in the 2nd tile next to the magma, evacuate the engraver, channel the last wall to admit magma from the pipe, and build a floor over that channel. The fortification will keep imps out.
If you move the pump and its intake channel down one level, that will also work nicely. In that case, put a grate over the intake channel to obstruct imps.
Now, about your other questions.
Does magma move diagonally at the same speed as orthogonally?
Yes. Magma moving on its own power - local diffusion - will move any direction at the same speed. However, pumps will teleport magma only along orthogonal paths, so an orthogonal pump-fed channel will fill more quickly than a diagonal one (which will have almost no improvement over a channel without a pump).
Where should I put grates and floodgates, can I make them out of normal stone or glass?
Anything that is not submerged in magma can be made of any material. (Except that wooden screw pumps will catch fire.)
Stone will melt if submerged; glass will be fine. Remember that you need magma-safe mechanisms for anything that will be submerged in magma, because the mechanisms will otherwise melt and cause the building to deconstruct.
However, the design you're showing really has no reason to use a door or floodgate - and, incidentally, doors are better for almost every purpose. Floodgates are pretty much vestigial remnants from the 2D version.
Is there any danger to walking over a magma channel on a grate?
Not in the least.
if a magma workshop is over a magma tile but the magma tile is covered by a grate will the workshop function?
That situation is impossible. You can't build two buildings (a grate and a workshop) in the same tile.