Hi,
I have moodle1.9 installed on my system and writing some custom reports.
I want to retrieve list of students registered for a particular course.
I have user profile field usercategoryid through which i figure out for which category he has enrolled. Course belongs to a particular category.
Through mdl_user_info_data table i retrieve the category for a particular user.
I have written a query to retrieve the users who have registered for a particular category for e.g. Financial Planning 2010. But the issue is that i now want users who have registered for a particular course for e.g. Insurance Planning.
There is a relation between course and course category but i am unable to find out the table where course and user information is linked.
Please help me on this
Thanks
I have a javascript function for checking errors which i am callin on OnClicentClick event of a button. Once it catch a error i want to stop execution of click event . But in my case it always it always executes the onclick event. Following is my function:
function DisplayError() {
if (document.getElementById('<%=txtPassword.ClientID %>').value.length < 6 || document.getElementById('<%=txtPassword.ClientID %>').value.length > 12) {
document.getElementById('<%=lblError.ClientID %>').innerText = "Password length must be between 6 to 12 characters";
return false;
}
var str = <%=PhoneNumber()%>;
if(str.length <10)
{
alert('<%=phoneNum%>'.length);
document.getElementById('<%=lblError.ClientID %>').innerText = "Phone Number not in correct format";
return false;
}
}
button html code:
<asp:Button runat="server" Text="Submit" ID="btnSubmit" ValidationGroup="submit" onclick="btnSubmit_Click" OnClientClick="DisplayError()"/>
It should not execute the button click event once it satisfies any of the IF condition in javascript function.
Hello All
i have a US states list
List<string> state // contain all 51 US states
Now i have a string which contain some text like okl (it means Oklahoma for me). what i want i want 'like' query in List state and get Oklahoma state.
I am searching a batter solution for creating xml through xml serialization. What i need, i have a given format like this
<product Id="1">
<name>2 1/2 X 6 PVC NIPPLE TOE SCH 80</name>
<notes>
<note>!--note 1---</note>
<note>!--note 2--</note>
......
</notes>
</product>
what i am doing here, i created a 2 classes like this
public class product
{
[XmlElement("name")]
public string Name { get; set; }
[XmlArray("notes")]
public List<notes> ListNotes { get; set; }
}
public class notes
{
[XmlIgnore]
public string Note { get; set; }
}
when i am serializing this then i am getting xml in this formate
<product Id="1">
<name>2 1/2 X 6 PVC NIPPLE TOE SCH 80</name>
<notes>
<notes>
<note>!--note 1---</note>
<note>!--note 2--</note>
</notes>
</notes>
</product>
i don't want extra <notes>. Any batter solution to solve this problem?
Thanks
Hello All
I have 2 tables Project and ProjectList like this
Project
ProjectID
Name
ProjectListID - allow null
In ProjectList
ProjectListID
ProjName
Now what i need here, i want only those recoed from ProjectList table which ProjectListID not in Project table.
I made a query but it is taking lot of time to execute.
select * FROM projectslist pl where pl.ProjectsListID not in (SELECT p.ProjectsListID FROM project p where (p.ProjectsListID is not null and p.ProjectsListID <>0))
Please help me to create optimize query. I am using My SQL.
string a="I am comparing 2 string";
string b="I am comparing 2 string";
if(a==b)
return true;
else
return false;
How does a .NET compiler compare two strings? Is string work like a struct or like an int?
Hi guys i am using android ndk and for that i am trying to create a c header file using javah tool how to use and where to use this tool i am unable to understand so please any one can
tell me the procedure how to do that i am waiting for the reply please.........
Hi,
I want to integrate paypal with my website.
I have studied the documentation available on paypal website.
My requirement is
A user selects a category, based on category course is populated,user selects course and discount. I want the user to pay through paypal according to the course selected. Also the data should be inserted into a table after successfull payment.
I have checked sample code also but i am unable to figure out how to accomplish this task ie how to make it dynamic according to the user choice. I think ipn would be used but not sure.
Plese help
Thanks
We have large scale web application which has millions of customer. Each customer can have document based on document type. We may have 20-30 types of documents. We are planning to use GlusterFS for storing these documents. I'm trying to find out what are the limitations of Gluster as far as number of files/directories ?
Do we need to have hierarchical directory structure ? What would be the optimal directory structure ? Does this make sense -
CustmerId
Documenttype
File1
File2
This code is not working on IE8
window.open(url, "find_users",
"resizable=yes,scrollbars=yes,menubar=no,toolbar=no,location=no,status=yes,height=300,width=500");
I am getting Object Expected error in only IE8, its working fine in all other brouser.
Hi,
I have installed osqa on server hosted on hostgator. Openid is not working at all.
When i click on google under login i get Page not found (404) error. I am unable to figure out the reason for the same?
Please help me on this
Thanks
I have created an windows service. I want to open some windows based application from this service.
But my windows service is unable to start desktop applications. To enable the access I had to do the following steps:
Opened the administrative tool "Services"
Right clicked on my service and had to select "properties"
Then in the "Log On" tab, selected "Allow service to interact with desktop".
After that my service can open desired windows based processes.
Can I configure my windows service in the code (C#) to access the desktop so that I won't have to change the access permission manually after installation?
Hello,
I have program where i want to scrap some Useful study material for me.
This site site maintaining session key and some other key also.
If I trying to go nested page then it will throw me out and showing session out message.
I unable to maintaining session key in web request class.
so please give me some idea that how can i maintain session in web request class.
Hello All
I have a class ClientState
Class ClientState
{
Public int ID{get;set;}
public string State{get;set;}
}
List<ClientState> listClientState which contain all states of USA, Now may problem is listClientState contain some objects which have duplicates states.
How can i filter listClientState to remove duplicate record
How can i return Last Insert Id on my store procedure using MySQL and use them with Nhibernate?
When i am inserting recording using Nhibernate + mysql store procedure then i am getting error that result not found
IQuery qry = session.CreateSQLQuery(string.Format("{0})", qryString)).AddScalar("ProductID", NHibernateUtil.Int32);
qry.List();
tx.Commit();
I have two image views, one on top of the another, with two different images. As the user touches the image and moves his/her finger, the top image should become transparent along the touch points with a fixed radius. (Like the PhotoChop app).
Currently I am doing it this way...
For each touch.
Get a copy of the image buffer from CGImage of the top image.
Edit the alpha channel of the buffer to create a transparent circle centered at the touch point.
Create new CGImage from the buffer.
Create UIImage from the CGImage and use the new UIImage as the top image view's image.
This works but as you can see too many copy, creates are involved and it is slow.
Can somebody please suggest me a faster way of doing the same thing?
Hello All
can i detecting keyPress inside an IFRAME using jQuery? when user paste any copy text in ifram i want to check this text, Is this text contain HTML tags or not.
Please help me.
<iframe class="abc">
<html>
<head>
</head>
<body>
some text here(This text may contain html tag)
</body>
</html>
</iframe>
Hi,
I am working on a application where i am using rowupdating event of the gridview. I am using templatefield in my columns so i am not able to get the new values from the textboxws that i am having in the gridview. How can i get the new values from the textboxes. Following is my code in rowupdating:
protected void gviewTemplate_RowUpdating(object sender, GridViewUpdateEventArgs e)
{
gviewTemplate.EditIndex = -1;
string rowNum = ViewState["ID"].ToString();
Label lbl2 = (Label)gviewTemplate.Rows[e.RowIndex].FindControl("lblTemplateName");
Label lbl1 = (Label)gviewTemplate.Rows[e.RowIndex].FindControl("lblUploaded");
TextBox txtTempName = (TextBox)gviewTemplate.Rows[e.RowIndex].FindControl("txtTemplateName");
TextBox txtHeading = (TextBox)gviewTemplate.Rows[e.RowIndex].FindControl("txtHeading");
TextBox txtCoupon = (TextBox)gviewTemplate.Rows[e.RowIndex].FindControl("txtCouponText");
TextBox txtBrand = (TextBox)gviewTemplate.Rows[e.RowIndex].FindControl("txtBrandName");
TextBox txtSearchText = (TextBox)gviewTemplate.Rows[e.RowIndex].FindControl("txtSearch");
TextBox txtDiscount = (TextBox)gviewTemplate.Rows[e.RowIndex].FindControl("txtDiscount");
TextBox txtStartDt = (TextBox)gviewTemplate.Rows[e.RowIndex].FindControl("txtStartDt");
}
i want to get the new values form these textboxes but it is always giving me old values. and yes, e.Newvalues is not giving me anything. It is always empty. This is small extract from my gridview design:
<asp:GridView runat="server" AutoGenerateColumns="False"
ID="gviewTemplate" onrowdatabound="gviewTemplate_RowDataBound" DataKeyNames="F1"
onrowcommand="gviewTemplate_RowCommand"
onrowediting="gviewTemplate_RowEditing"
onrowcancelingedit="gviewTemplate_RowCancelingEdit"
onrowupdating="gviewTemplate_RowUpdating"
onrowdeleting="gviewTemplate_RowDeleting"
onrowupdated="gviewTemplate_RowUpdated">
<Columns>
<asp:TemplateField HeaderText="Uploaded Image">
<EditItemTemplate>
<asp:LinkButton Text="Reload" runat="server" OnClick="lbtnReloadImage_Click" CommandName="reload" ID="lbtnReloadImage"></asp:LinkButton>
</EditItemTemplate>
<ItemTemplate>
<table id="Table2" runat="server" width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td>
<asp:Label Runat="server" Text='<%# Eval("Uploaded") %>' ID="lblUploaded"></asp:Label>
</td>
</tr>
</table>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Template Name">
<ItemStyle VerticalAlign="Top" HorizontalAlign="Center" />
<EditItemTemplate>
<asp:TextBox ID="txtTemplateName" Width="60" Runat="server" Text='<%# Eval("F1") %>'></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" Runat="server"
ErrorMessage="You must provide a Product Name." ControlToValidate="txtTemplateName">*</asp:RequiredFieldValidator>
</EditItemTemplate>
<ItemTemplate>
<table id="Table3" runat="server" width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td>
<asp:Label ID="lblTemplateName" runat="server" Text='<%# Eval("F1") %>'></asp:Label>
</td>
</tr>
</table>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Heading">
<ItemStyle VerticalAlign="Top" HorizontalAlign="Center" />
<EditItemTemplate>
<asp:TextBox ID="txtHeading" Runat="server" Width="60" Text='<%# Eval("F2") %>'></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator2" Runat="server"
ErrorMessage="You must provide a Product Name." ControlToValidate="txtHeading">*</asp:RequiredFieldValidator>
</EditItemTemplate>
<ItemTemplate>
<table id="Table4" runat="server" width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td>
<asp:Label ID="lblHeading" runat="server" Text='<%# Eval("F2") %>'></asp:Label>
</td>
</tr>
</table>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Coupon Text">
<ItemStyle VerticalAlign="Top" HorizontalAlign="Center" />
<EditItemTemplate>
<asp:TextBox ID="txtCouponText" Runat="server" Width="80" Text='<%# Bind("F3") %>'></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator3" Runat="server"
ErrorMessage="You must provide a Product Name." ControlToValidate="txtCouponText">*</asp:RequiredFieldValidator>
</EditItemTemplate>
<ItemTemplate>
<table id="Table5" runat="server" width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td>
<asp:Label Runat="server" Text='<%# Bind("F3") %>' ID="lblCouponText"></asp:Label>
</td>
</tr>
</table>
</ItemTemplate>
</asp:TemplateField>
Can anyone please tell me how to get the new values from these textboxes?
Hi,
I have added a link on a page clicking on which generates a pdf and asks for download for which i have used fpdf class.
My new requirement is that clicking on the link should generate n number of pdf with different content and should ask for downloading these pdfs.
I am unable to find out the method to accomplish the same.
Please help me on this.
Thanks