Author | Message |
---|---|
aligh1979
Posts: 121
|
Posted 21:31 Oct 13, 2011 |
in csns-create.sql we have "submissions" table which has the field "grade" , does adding rubric score substitute the "grade " or it is another form of extra grading field ? |
cysun
Posts: 2935
|
Posted 22:10 Oct 13, 2011 |
You need to keep the grade field. |
aligh1979
Posts: 121
|
Posted 22:42 Oct 13, 2011 |
1.are we allowed to have extra classes to implement Rubric itself (its properties) ?
2. there is a confusion on the class design , specially after going over the "RubricScoreDao" class . ----------List<RubricScore> getRubricScores( Assignment assignment, Rubric rubric );-------------- each assignment has a rubric associated , but the score does not get assigned to an assignment directly , so how we can get the rated score (given by the instructor for a given assignment to a student ) only by providing the assignment ? Last edited by aligh1979 at
23:13 Oct 13, 2011.
|
cysun
Posts: 2935
|
Posted 07:53 Oct 14, 2011 |
1. Yes. 2. First of all, there could be more than one rubric assigned to an assignment, which is why the arguments give you both the assignment and the rubric. Secondly, notice that the return value is List<RurbricScore>, not just one RubricScore, which means that the method should return all the rubric scores given by the instructor to the students on that rubric for the assignment. |
aligh1979
Posts: 121
|
Posted 21:51 Oct 14, 2011 |
1-is it possible for two different Rubrics to have the same kind of Criteria?
2- A rubric has a name, a rating scale which is either 1-3, or 1-4, or 1-5, and a number of criteria. , so there is no rubric allowed with 1 or 2 scale rate?
Last edited by aligh1979 at
23:20 Oct 14, 2011.
|
cysun
Posts: 2935
|
Posted 00:10 Oct 15, 2011 |
1. Yes, though I wouldn't recommend "sharing" a criterion because the design is more complex with practically no benefit. 2. Right. 3. It's up to you to decide which design is better. |
aligh1979
Posts: 121
|
Posted 01:38 Oct 16, 2011 |
I am starting to run TestNG and I am running to some errors. in the powerpoint slides that we are going to cover for next lecture , we have some part for "Cascade" . I had that cascade annotation in my class and the interesting thing was that after Maven process-clases nothing wa changed in the produced DDL file .? because I am getting some errors for TestNG ,-that is saying it couldn't drop the table because other objects depend on it - I had to add some cascade keyword after the the drop table name in my drop.sql file , but here comes another question that might be more of sql type . suppose we have a couple of classes , our criteria class depends on the rubric class , so if there is no Rubric , then there would not be any criteria at all , so it totally make sense to drop all criteria tables dependent on the rubric table in a cascading manner. but our rubric table relate to assignment class , they have relationship , sort of the same as the above (rubric and criteria), but it does not make sense to delete a rubric when we delete an assignment , although a rubric is linked to assignments , but it is a separate entity and cascading does not make sense here . but the problem / question is that what we should do , there is a constraint but we do not want to delete them , and TESTNG generate an error in this case that it is not able to drop the table because of dependancy? TestNg fails two tests and skip the rest , and the other error that I have been getting so far is "illegal state exception: it is failed to load application context ". and it mentions the path org.springframework.test.context....... |
cysun
Posts: 2935
|
Posted 08:48 Oct 16, 2011 |
If you run "mvn process-classes" and your csns.ddl doesn't change, there's something wrong with either your mapping annotations (e.g. missing @Entity) or your setup. And you seem to be confused about cascading behavior in ORM and cascade drop in SQL, which are two completely different things. In SQL, you cannot drop a table when there's a foreign key constraint referencing that table. To drop such a table you can a) drop the table(s) depending on it first, or b) drop the foreign key constraint(s) first, or c) add a CASCADE keyword to DROP TABLE (like you did) so the table(s) referencing this table will be dropped as well. The last error about missing Spring context and such is on me. Sorry about that. The RubricScoreDaoTest class needs another annotation:
Please check out the updated RubricScoreDaoTest.java. |
aligh1979
Posts: 121
|
Posted 10:06 Oct 16, 2011 |
Thank you professor , just to clarify , I do not see any change in my DDl file , only in case of adding such a thing : @OneToMany(mappedBy=“owner”, cascade=CascadeType.ALL) List<Account> accounts; otherwise it will change for other annotations . I guess Ill better wait till tomorrow till you cover this section and I will have more understanding of it . Last edited by aligh1979 at
14:06 Oct 16, 2011.
|