You are on page 1of 4

Details of the Issue:

Details : Summary 0000475: NGA Demo Server Error


Description I am trying to demo a course for NGA in the NGA cp Demo account, but when I click on Click
to Qualify I get an error. Please see email with screenshots for details.
Steps To Reproduce Log in to production as NGA Administrator (ngacpdemo/welcome)
Go to My Requirements
Try to Launch VGOA-WE-Locating and Marking of Facilities A (1.0) 18381

The process I followed to replicate the Error and Rectified this issue.
1) I logged in with Username: ngacplayerdemo and Pwd : welcome in local database.
2) I open Requirements >My Requirements Page.
3) I got the output page as below









4) I got below output when I cliked on Click to Qualify link in MyRequirements Page.


5) I was unable to replicate the error in local database. InOrder to get an empty dataset from
database I manually changed EvalID in the URL link. In this case I am able to replicate the error.
Below is the error page image.


6) I changed the code according in one form from the project and then tried again to replicate the
error with the above followed steps.
7) Error is not replicated and I got the below output page.




Code I changed is in PROII.UI>EvalPreLoad.aspx.cs:
public void GetCourseDetials(string idcp, string evalid, string idver)
{

string sqlcon =
ConfigurationManager.ConnectionStrings["EWNConnection"].ConnectionString;
SqlConnection con = new SqlConnection(sqlcon);
SqlCommand cmd = new SqlCommand();

//id_cp and evalid values are taken dynamically
cmd.CommandText = "SELECT CV.*, AQN.SlideTime, AQN.ID_NewTest FROM CourseMain
CM INNER JOIN CourseVersions CV ON CM.CourseID = CV.CourseID Left Outer Join
AdminQuizNew AQN on AQN.ID_PreID = CV.ID_Version and AQN.evalTestType = 1 WHERE
(CV.CourseActive Not In ('-', 'N')) And (CM.CourseID = " + evalid + ") And (CV.ID_CP = " + idcp + ")
UNION SELECT CV.*, AQN.SlideTime, AQN.ID_NewTest FROM CourseVersions CV INNER JOIN
CourseMain CM ON CV.CourseID = CM.CourseID INNER JOIN CompanyProfile CP ON CV.ID_CP =
CP.ID_CP Left Outer Join AdminQuizNew AQN on AQN.ID_PreID = CV.ID_Version and
AQN.evalTestType = 1 WHERE (CV.CourseActive Not In ('-', 'N')) And (CM.CourseID = " + evalid +
") And ( CP.CP_Master = 1) order by cv.courselanguage; select * from company_users where
id_users = " + Session["id_users"].ToString();

cmd.Connection = con;
con.Open();
SqlDataAdapter da = new SqlDataAdapter(cmd);
DataSet ds = new DataSet();
da.Fill(ds);
if (ds.Tables.Count > 0) //added
{
if (ds.Tables[0].Rows.Count > 0) //added
{
lblTitle.Text = ds.Tables[0].Rows[0]["EvalID"].ToString();
lblcoursetitle.Text = ds.Tables[0].Rows[0]["CourseTitle"].ToString();
lblcousever.Text = ds.Tables[0].Rows[0]["CourseVersion"].ToString();
lbldesc.Text = ds.Tables[0].Rows[0]["Description"].ToString();
lblDuration.Text = ds.Tables[0].Rows[0]["CourseDuration"].ToString();
lblobj.Text = ds.Tables[0].Rows[0]["Objectives"].ToString();
destinationURL = ds.Tables[0].Rows[0]["LectoraCourseID"].ToString();

englishCourseURL = ds.Tables[0].Rows[0]["LECTORACOURSE_ENG"].ToString();
spanishCourseURL = ds.Tables[0].Rows[0]["LECTORACOURSE_SPN"].ToString();
destinationURLSPN = ds.Tables[0].Rows[0]["LECTORAEXAM_SPN"].ToString();
}
if (ds.Tables[1].Rows.Count > 0) //added
{
_userID = ds.Tables[1].Rows[0]["cu_userName"].ToString();
_password = ds.Tables[1].Rows[0]["cu_password"].ToString();
}
}
}

You might also like