CyberNerd Posted January 10, 2009 Posted January 10, 2009 is the port correct? IIRC MSSQL 2000 and 2005 run on different ports 1433 and 1427?
Gatt Posted January 10, 2009 Author Posted January 10, 2009 yeah its set for 1427 in both FreeTDS and in the SIMS Course Template (as server-ip,1427)
CyberNerd Posted January 10, 2009 Posted January 10, 2009 telnet x.x.x.x 1427 if that doesn't connect it's probably that the sims server is firewalled, or isn't listening on the external interface.
Gatt Posted January 10, 2009 Author Posted January 10, 2009 Doesn't work - Will check firewalls If its not listening how do i get it to listen?
CyberNerd Posted January 10, 2009 Posted January 10, 2009 I just googled, and got back an awnser from Geoff ! http://www.edugeek.net/forums/virtual-learning-platforms/25090-moodle-sql-server-2005-a.html 2. Make sure MS SQL Server can accept incoming TCP/IP connections on port 1433 (the standard one). You might need to explicitly allow this in your Windows firewall (see the Control Panel). You may also need to edit options in the :SQL Server Configuration Manager -> Network Configuration -> Protocols -> TCP/IP enabled
Gatt Posted January 10, 2009 Author Posted January 10, 2009 Ok got a little closer - looks like SQL is running on an odd port.. tsql now connects but Moodle doesnt...
Gatt Posted January 12, 2009 Author Posted January 12, 2009 (edited) Ok think I'm getting closer to the issue.. 1) SQL Server installed on a non standard port!! 2) FreeTDS now connects and I can see the DBs when using the tsql command but.... In Moodle I enter the "enrol_dbhost" as \, Which, when I echo it in the view.php returns [b]\\[/b], Heres the strange bit - If I escape the \ ini "enrol_dbhost" in Moodle, it returns with \\\\, It looks like PHP is sensing it needs to escape the \ but then escapes the escape character!! ( so \ becomes \\ , \\ becomes \\\\ and so on...) Any thoughts here? Edited January 12, 2009 by Gatt
penfold_99 Posted January 12, 2009 Posted January 12, 2009 Ok think I'm getting closer to the issue.. 1) SQL Server installed on a non standard port!! 2) FreeTDS now connects and I can see the DBs when using the tsql command but.... In Moodle I enter the "enrol_dbhost" as \, Which, when I echo it in the view.php returns [b]\\[/b], Heres the strange bit - If I escape the \ ini "enrol_dbhost" in Moodle, it returns with \\\\, It looks like PHP is sensing it needs to escape the \ but then escapes the escape character!! ( so \ becomes \\ , \\ becomes \\\\ and so on...) Any thoughts here? Hi, out setup up for enrol_dbhost is , no need for the instance
Gatt Posted January 12, 2009 Author Posted January 12, 2009 Got it working!! 1) In FreeTDS - Set TDS version to 9.0 2) In Moodle - Removed Instance 3) In Moodle - Removed Port Also re-arranged the table array and labels for periods..
penfold_99 Posted January 12, 2009 Posted January 12, 2009 Got it working!! 1) In FreeTDS - Set TDS version to 9.0 2) In Moodle - Removed Instance 3) In Moodle - Removed Port Also re-arranged the table array and labels for periods.. what did you re-arrange? as i will update the documentation if needs be.
Gatt Posted January 12, 2009 Author Posted January 12, 2009 Changed the following line: $periods = array("" => 1,"1" => 2,"2"=> 3,"Reg"=> 4,"3"=> 5,"E4"=> 6,"L4"=> 7,"5"=> 8,"TWL"=> 9); to $periods = array("Reg" => 1,"1" => 2,"2"=> 3,"3"=> 4,"4"=> 5,"5"=> 6,"6"=> 7,""=> 8,""=> 9); also changed the table headers for Periods from: $periods_labels = array("","1","2","Reg","3","E4","L4","5","TWL"); to $periods_labels = array("Reg","1","2","3","4","5","6","",""); and finally to remove empty rows i changed for($i = 1; $i <= 9; ++$i) to for($i = 1; $i <= 7; ++$i) Obviously, some of this will be different depending on how schools work their timetables
penfold_99 Posted January 12, 2009 Posted January 12, 2009 Changed the following line: $periods = array("" => 1,"1" => 2,"2"=> 3,"Reg"=> 4,"3"=> 5,"E4"=> 6,"L4"=> 7,"5"=> 8,"TWL"=> 9); to $periods = array("Reg" => 1,"1" => 2,"2"=> 3,"3"=> 4,"4"=> 5,"5"=> 6,"6"=> 7,""=> 8,""=> 9); also changed the table headers for Periods from: $periods_labels = array("","1","2","Reg","3","E4","L4","5","TWL"); to $periods_labels = array("Reg","1","2","3","4","5","6","",""); and finally to remove empty rows i changed for($i = 1; $i <= 9; ++$i) to for($i = 1; $i <= 7; ++$i) Obviously, some of this will be different depending on how schools work their timetables Thanks Gatt, I will update the documentation to draw people attention to the label issue.
penfold_99 Posted January 16, 2009 Posted January 16, 2009 Changed the following line: $periods = array("" => 1,"1" => 2,"2"=> 3,"Reg"=> 4,"3"=> 5,"E4"=> 6,"L4"=> 7,"5"=> 8,"TWL"=> 9); to $periods = array("Reg" => 1,"1" => 2,"2"=> 3,"3"=> 4,"4"=> 5,"5"=> 6,"6"=> 7,""=> 8,""=> 9); also changed the table headers for Periods from: $periods_labels = array("","1","2","Reg","3","E4","L4","5","TWL"); to $periods_labels = array("Reg","1","2","3","4","5","6","",""); and finally to remove empty rows i changed for($i = 1; $i <= 9; ++$i) to for($i = 1; $i <= 7; ++$i) Obviously, some of this will be different depending on how schools work their timetables Hi Gatt, I noticed from the picture of your timetable you are missing registration from your timetable. Is this intentional?
Gatt Posted January 16, 2009 Author Posted January 16, 2009 No - it never pulled it from MS SQL - Didnt know if I missed anything but it just never came down..
Gatt Posted January 16, 2009 Author Posted January 16, 2009 Ok just rechecked my dbo.dml_student_timetable view on the SQL server - there is no sign of any registration periods they all say fri:1 , Mon:5 , thu:5 etc...
penfold_99 Posted January 16, 2009 Posted January 16, 2009 Hi Gatt, try these settings $periods = array("" => 1,"Reg" => 2,"1"=> 3,"2"=> 4,"3"=> 5,"4"=> 6,"5"=> 7,"6"=> 8,""=> 9); $periods_labels = array("","Reg","1","2","3","4","5","6",""); for($i = 1; $i <= 8; ++$i) This should display registration
Gatt Posted January 16, 2009 Author Posted January 16, 2009 Ta - though i dont think Reg has been dumped to the timetable views for Staff or pupils.. Did the following query on the mdl_student_timetable view.. SELECT period_name, class_name, unique_pupil_no, staff_initials, room_name FROM mdl_student_timetable WHERE (unique_pupil_no = 'upn_of pupil_removed') ORDER BY period_name This results in : Fri:1 - 7y/Ma1 Fri:2 - 7y/Sc1 Fri:3 - 7y/Tt3 Fri:4 - 7y/Tt3 Fri:5 - 7y/Gg3 Fri:6 - 7y/Pe3 Mon:1 - 7y/It3 Mon:2 - 7y/En1 . . . . (Only copied 1st two columns btw) No sign of any registrations...
penfold_99 Posted January 16, 2009 Posted January 16, 2009 Ta - though i dont think Reg has been dumped to the timetable views for Staff or pupils.. Did the following query on the mdl_student_timetable view.. SELECT period_name, class_name, unique_pupil_no, staff_initials, room_name FROM mdl_student_timetable WHERE (unique_pupil_no = 'upn_of pupil_removed') ORDER BY period_name This results in : Fri:1 - 7y/Ma1 Fri:2 - 7y/Sc1 Fri:3 - 7y/Tt3 Fri:4 - 7y/Tt3 Fri:5 - 7y/Gg3 Fri:6 - 7y/Pe3 Mon:1 - 7y/It3 Mon:2 - 7y/En1 . . . . (Only copied 1st two columns btw) No sign of any registrations... I doubt your school has timetabled the registration period. a question to ask your timetabler. if it not then $period should be $periods = array("" => 1,"1" => 2,"2"=> 3,"3"=> 4,"4"=> 5,"5"=> 6,"6"=> 7,""=> 8,""=> 9);
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