Situation: A teacher, holding his lesson, is once more disturbed by a noise out of the classroom and asks the students "What is going on?" Will he ask « – De quoi s'agit-il ? » or « Qu'est-ce qui se passe ? » or something total different?
"Qu'est-ce qui se passe ?" is one possibility; a teacher in the context you describe will certainly say that when he/she is totally unaware of what is causing the commotion, that there is no likely explanation for it, and most of all as the noise means that something extreme is going on. (The other sentence would then be awkward.)
He/she will use "De quoi s'agit-il ?" only if there is an inkling that what is going on is within the bounds of normality, that it can be explained by more or less usual facts and is not too extreme a happening.
- If what the teacher hears is a series of loud firecrackers he might ask "Qu'est-ce qui se passe ?" but to no one in particular, so as to show that he/she doen't know and that the noise is worrying. On the other hand he/she might say that to a student coming into the classroom and then it is primarily a request for information, while still conferring the iea that the situation considered is worrisome.
Other options in replacement of only "Qu'est-ce qui se passe ?" and only in the contexts corresponding to that of this example; these sentences are not in all cases interchangeable with "Qu'est-ce qui se passe ?".
Qu'est-ce qui est arrivé ?
Qu'est-ce qui s'est passé ?
Qu'est-ce qu'il y a ?
- If the noise coming from outside the classroom is that of people talking loudly but that there are no signs such as those of a row in progress or something such as a student protest, for instance, he/she will possibly say "De quoi s'agit-il ?" but that can be said only to someone in particular this time, which shows that this utterance serves specifically the aim of getting information.
The loud talking might for instance be that of parents who, for some reason, are wanting to remove their child from the classroom and who behave somewhat virulently as they have been stopped by responsible personnel trying to tell them that they can't interfere that way in a teacher's class and that they have to go through some usual procedure. However, in this new context, the first sentence might still be used, and at that in both ways (said to nobody in particular or as a way of asking for explanations). The reason for this is that it is felt to apply to a wide range of situations, from the most innocuous ones to the most drastic ones. Nevertheless, the first two options of replacement shown in the preceding example are not likely to be used; only the third is a possible choice. The verb "arriver" carries connotations of dread in that construction.
complement: It's been suggested in the comments (user Sylvester) that "Quoi encore ?" could be one of the sentences that in the context of the question might come to someone's mind.
Yes, this sentence could be used, and I'll try to determine its use in relation to the particularisations of the context user Sylvester has prescribed. First of all, this is a mild utterance, it is not proper in relation to disasters, dreadful happenings and the like, and so it does not correspond to the situation in "example 1". Secondly, it comprises the word "encore", which means "one more time", "again". This is the meaning the word has in this sentence; comes to mind immediately the questions "What is characterised as occurring again ?", "What is that 'again' for ?". The answer is that it is nothing in particular except one more event in a series of events considered as unpleasant, but not drastic, that have taken place in the recent past or that take place reccurently. So, this commotion is something considered, among the unpleasant things that happen, as one more of them. By saying "encore" you make specific to the interlocutor that you are more or less used to this kind of thing and that it makes you weary, but not that you are alarmed by the situation; that, of course does not correspond to the example in "1". It will do in the second example provided there exists an additional element of context (a classroom where people, and in particular the teacher, are used to unpleasant happenings); do not forget these connotations, they will come across.
As suggestd by user Laurent S. the more formal "Que se passe-t-il (encore) ?" will be used at times.
Also the more abrupt "Qu'est-ce que c'est (encore) ?" will fit this situation.