//////////// to view question quiz by student
////////////////
var pageHits = (from erm in Examreportmappings
join qq in Quizquestions on erm.Erm_id equals qq.Erm_id
where
erm.Erm_institution_id==1 && erm.Erm_class_id==1 && erm.Erm_section_id==1 &&
qq.Subject_id==1
select new
{
qq.Question,
qq=qq.Choices,
});
pageHits.Dump();
////////////////////////////// quiz Result for single student/////////////////////
var q= (from r in Quizresults
where r.Student_id==4
group r by new {
r.Subject_id,
//
r.Result
} into g
select new {
g.Key.Subject_id,
// g.Key.Result,
Point = g.Sum(x => x.Result),
Question=g.Count(),
});
q.Dump();
//////////////////// ///////////////Teacher View/////////////////
/////////////// Student Input question and answer view ///////////////////
var pageHits = (from erm in Examreportmappings
join qq in Quizquestions on erm.Erm_id equals qq.Erm_id
join qr in Quizresults on qq.Ques_id equals qr.Ques_id
where
erm.Erm_institution_id==1 && erm.Erm_class_id==1 && erm.Erm_section_id==1 &&
qq.Subject_id==1
select new
{
qq.Question,
qr.Select_ans,
qr.Result,
});
////quiz Result for single subject by teacher
var q= (from r in Quizresults
where r.Student_id==4
group r by new {
r.Student_id,
//
r.Result
} into g
select new {
g.Key.Student_id,
// g.Key.Result,
Point = g.Sum(x => x.Result),
Question=g.Count(),
});
q.Dump();
No comments:
Post a Comment