lholland421 Posted February 19, 2014 Posted February 19, 2014 Hi all, Sorry if i have posted in the wrong place, I need to create a form that i can host on our intranet. This will be a form that teachers can fill out when incidents have happened in their classroom etc. Whats the best and easiest option of doing this? Thanks All !
Steve21 Posted February 19, 2014 Posted February 19, 2014 Depends how complex you want it to be, we have a few around the schools for different things, from as simple as an Access database with GUI front-end, to Sharepoint built form linked into SQL database etc. A lot of it depends on whether you want everyone to have access to see it, only certain people, what platforms you're running (in regards to the web end etc) Steve
lholland421 Posted February 19, 2014 Author Posted February 19, 2014 Well I want the teachers to fill out the form which is just composed of text boxes to email it when it is submitted , I have looked into Google forms . Has anyone else used these ?
fiza Posted February 19, 2014 Posted February 19, 2014 Hi all, Sorry if i have posted in the wrong place, I need to create a form that i can host on our intranet. This will be a form that teachers can fill out when incidents have happened in their classroom etc. Whats the best and easiest option of doing this? Thanks All ! what kind of incidents? If its to do with students then surely it should be recorded in your MIS directly. If its IT related incidents then a helpdesk like spiceworks would be the way to go.
lholland421 Posted February 19, 2014 Author Posted February 19, 2014 I did think they should be going straight into the mis. According the the pastoral manager they do record incidents into the mis but they do not want to record incidents like late homework /coursework etc into the mis hence why they have asked for some sort of form.
creese Posted February 19, 2014 Posted February 19, 2014 I assume they have considered Data Protection and the scenario where a pupil comes back in 5 years time and asks for all documentation recorded against him/her?
lholland421 Posted February 19, 2014 Author Posted February 19, 2014 I would like the think so but chances are they haven't :/
creese Posted February 19, 2014 Posted February 19, 2014 I would like the think so but chances are they haven't :/ Probably not . It's what the MIS is built for.
dhicks Posted February 19, 2014 Posted February 19, 2014 I need to create a form that i can host on our intranet. This will be a form that teachers can fill out when incidents have happened in their classroom etc. Whats the best and easiest option of doing this? What does your intranet consist of - a web server of some kind? A simple CGI script that takes input from a basic web-based form and emails it in to a specific address would probebly be the simplest option. Ideally it would submit the data straight to your MIS, but it sounds as though that's proving difficult, so an email would do. Just from a data protection point of view, as pointed out already, a search through your email archive would then find the information about a particular pupil recorded as an email, which should cover you.
lholland421 Posted February 20, 2014 Author Posted February 20, 2014 We are running an apache webserver on ubuntu. I want the form to be sent to our local exchange server. Could you point me in the direction for a cimple CGI script? Cheers
NotSoFast Posted February 22, 2014 Posted February 22, 2014 I did this in Access (split front end and back end) until we were ready to use our MIS. That was for a handful of users though. You could use Google forms, which I like a lot, but whatever you go for if it's not the MIS will get messy over time as staff and students leave/join/go up a year. The potential for data inconsistency is huge. I would definitely use your MIS if you can.
dhicks Posted February 23, 2014 Posted February 23, 2014 We are running an apache webserver on ubuntu. I want the form to be sent to our local exchange server. Could you point me in the direction for a cimple CGI script? The following is a Python CGI script I use for our helpdesk submition form. This goes in /usr/lib/cgi-bin/submitProblem.py on our Debian machine (probably the same for your Ubuntu machine), which is owned by www-data:www-data and executable by the user and group. #!/usr/bin/python import cgi import smtplib from email.mime.text import MIMEText form = cgi.FieldStorage() email = form.getvalue("email") subject = form.getvalue("subject") problem = form.getvalue("problem") if email == None: email = "test.person" if subject == None: subject = "Test email" if problem == None: problem = "Test problem" msg = MIMEText(problem) msg['Subject'] = subject msg['From'] = email + "@yourschool.domain" msg['To'] = "[email protected]" s = smtplib.SMTP("mail.yourdomain.com") s.sendmail(email + "@yourschool.domain", "[email protected]", msg.as_string()) s.quit() print "Content-Type: text/html;charset=utf-8" print print "" print "" print " " print " " print " " print " Helpdesk Submission" print " " print " " print " </pre><table align='\"center\"' verticle-align='\"center\"'>" print " " print " " print " " print " Your problem has been reported." print " " print " " print " You can now go back to the home page." print " " print " " print " " print " </table>"<br>print " "<br>print The above is used from a very basic HTML input form that just asks for an email address and some text. Remember you'll need to allow your Ubuntu server to submit SMTP mail to your Exchange server - you'll need to add a security exception to your Exchange server to allow the particular computer (probably by IP address) to submit SMTP email.
lholland421 Posted February 23, 2014 Author Posted February 23, 2014 Thanks , do you need to setup any sort of smtp on the ububtu? Also I know with most forms it just gets submitted as plain text. Is there anyway of getting the form to be submitted in the same template it was submitted in ? Thanks for your help much appreciated
dhicks Posted February 23, 2014 Posted February 23, 2014 Thanks , do you need to setup any sort of smtp on the ububtu? No - the Python SMTP library is connecting directly to your Exchange server. You do need to remember to tell your Exchange server that SMTP connections from your Ubuntu machine are okay, though, it won't allow them by default. Also I know with most forms it just gets submitted as plain text. Is there anyway of getting the form to be submitted in the same template it was submitted in ? You're programming it, you can format the email however you like. What is picking the emails up at the other end - are they being collected from your Exchange server by some automated process, or are they just going in to someone's inbox for them to read? HTML form submissions and CGI scripts are quite basic things, if you haven't used them before then this would seem like an excellent opportunity to learn. The above script should get you started, but you can add stuff to it to do whatever you like. If you just type "HTML form" into Google you'll get a bunch of links to examples and tutorials.
lholland421 Posted February 23, 2014 Author Posted February 23, 2014 Brilliant thanks for that it's going straight into someone's inbox to read I will have a look around and start learning ! Thanks for the advice
mjs_mjs Posted February 23, 2014 Posted February 23, 2014 For the data protection/integrity pov it might be worth having each mail sent to two inboxes - one that's read and used as an inbox and one that's simply a record of all entries in the system. Just a thought. All the above sujestions can equally be achieved using PHP if you have any experience with that over Python
lholland421 Posted February 25, 2014 Author Posted February 25, 2014 Sorry guys if I am being a total idiot , I am running php pages running on ubuntu in our network hosted using apache2. I want the form to email and I have added an smtp recieve connector on the exchange server and it's still not working , any configuration needed in the php.ini? And sample code I could take a look at would be awesome
mjs_mjs Posted February 25, 2014 Posted February 25, 2014 maybe try Email Form - Simple Form to Email PHP Contact Form
lholland421 Posted February 25, 2014 Author Posted February 25, 2014 maybe try Email Form - Simple Form to Email PHP Contact Form This is the code i am trying, it seems to work but im just not getting the mail, Would it be worth watching network traffic to see if anything gets sent on port 25 and is exchange is listening? Thanks
mjs_mjs Posted February 25, 2014 Posted February 25, 2014 do you have access to any other mail servers to test it on?
lholland421 Posted February 25, 2014 Author Posted February 25, 2014 (edited) Unfortunately we only run 1 internal exchange server, I have created the receive connector on the exchange box to accept mail from the ubuntu Server. Edited February 25, 2014 by lholland421
mjs_mjs Posted February 25, 2014 Posted February 25, 2014 bugger - urm, I'm not sure on the exchange configuring side of things - if you can't get it to play ball tho maybe try postfix - How to have my PHP Send mail? - Ask Ubuntu
lholland421 Posted February 25, 2014 Author Posted February 25, 2014 bugger - urm, I'm not sure on the exchange configuring side of things - if you can't get it to play ball tho maybe try postfix - How to have my PHP Send mail? - Ask Ubuntu Thanks will give that a try in a moment, I guess i am able to run this along side the exchange box. Thanks
lholland421 Posted February 25, 2014 Author Posted February 25, 2014 Which one do you think is the best option to go for if i only want the Ubuntu box to send mail Internet: Your own mail-server. Satellite: An extern mail provider (e.g. Google) will be used for sending and mail. The server will not receive any mail. Smarthost: Mixture between the two. Mail is storred locally but send through an extern mail provider. Local only: Will not concern you. That's a system intern mailserver. You can only send mail from user to user on the system.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now