Hi Liang Yap,
The questions will have a variable amount of checks on the structure of the SQL code, the initial ones such as the question mentioned do not specifically check for NOT NULL or any other restrictions. This is to give a little flexibility for those new to SQL in general, both the fully featured code mentioned, and basic SQL that only just satisfy the requirements mentioned will work.
As a slightly more specific answer, yes we can check for all features of the SQL code provided. Which options are used, the naming and types of attributes, even the use of alternative methods that are correct in output but not in the spirit of the question. So yes, there is a direct text matching component via output (you will need to have the database provide the correct output), as well as an indirect text matching component on the input side (forcing the use of specific keywords, or banning the use of others), but most of those restrictions are loosened on the initial questions to get everyone started.
We will make it clear via the instructions if there are any specifics you need to adhere to, we don't want this to be a trap for any newcomers, especially if the code appears to work when you try it on your SQL installation on your computer. But hopefully we can provide some interesting questions further along for more experienced SQL users.
Thanks,
Adam.
"Liang Yap" <24*3*9*
6@s*u*e*t*u*a*e*u*a*> wrote:
> Good day,
>
> I would like to know how is the grading system works in moodle?
>
> For example on the lab-01 Question 1, setting the primary key with/without Not Null will give you the same output unless data is inserted to verify the restriction.
>
> Question:
>
> 1. Is the system grade based on final output? or will it check the SQL written by the student?
>
>
> Thank you.
>
> Cheers