+ Post New Thread
Page 3 of 3 FirstFirst 123
Results 31 to 44 of 44
Virtual Learning Platforms Thread, SIMS Timetables & Moodle in Technical; Ok got a little closer - looks like SQL is running on an odd port.. tsql now connects but Moodle ...
  1. #31

    Gatt's Avatar
    Join Date
    Jan 2006
    Posts
    6,658
    Thank Post
    858
    Thanked 646 Times in 429 Posts
    Rep Power
    498
    Ok got a little closer - looks like SQL is running on an odd port..
    tsql now connects but Moodle doesnt...

  2. #32

    Gatt's Avatar
    Join Date
    Jan 2006
    Posts
    6,658
    Thank Post
    858
    Thanked 646 Times in 429 Posts
    Rep Power
    498
    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
    Code:
    <serverIP>\<instance>,<port>
    Which, when I echo it in the view.php returns
    Code:
    <serverIP>\\<instance>,<port>
    Heres the strange bit - If I escape the \ ini "enrol_dbhost" in Moodle, it returns with
    Code:
    <serverIP>\\\\<instance>,<port>
    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?
    Last edited by Gatt; 12th January 2009 at 08:38 AM.

  3. #33
    penfold_99's Avatar
    Join Date
    Feb 2008
    Location
    East Sussex
    Posts
    929
    Thank Post
    56
    Thanked 162 Times in 114 Posts
    Rep Power
    67
    Quote Originally Posted by Gatt View Post
    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
    Code:
    <serverIP>\<instance>,<port>
    Which, when I echo it in the view.php returns
    Code:
    <serverIP>\\<instance>,<port>
    Heres the strange bit - If I escape the \ ini "enrol_dbhost" in Moodle, it returns with
    Code:
    <serverIP>\\\\<instance>,<port>
    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

    Code:
    <serverIP>,<port>
    no need for the instance

  4. #34

    Gatt's Avatar
    Join Date
    Jan 2006
    Posts
    6,658
    Thank Post
    858
    Thanked 646 Times in 429 Posts
    Rep Power
    498
    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..

  5. #35
    penfold_99's Avatar
    Join Date
    Feb 2008
    Location
    East Sussex
    Posts
    929
    Thank Post
    56
    Thanked 162 Times in 114 Posts
    Rep Power
    67
    Quote Originally Posted by Gatt View Post
    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.

  6. #36

    Gatt's Avatar
    Join Date
    Jan 2006
    Posts
    6,658
    Thank Post
    858
    Thanked 646 Times in 429 Posts
    Rep Power
    498
    Changed the following line:
    PHP Code:
     $periods = array("" => 1,"1" => 2,"2"=> 3,"Reg"=> 4,"3"=> 5,"E4"=> 6,"L4"=> 7,"5"=> 8,"TWL"=> 9); 
    to
    PHP Code:
    $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:
    PHP Code:
     $periods_labels = array("","1","2","Reg","3","E4","L4","5","TWL"); 
    to
    PHP Code:
    $periods_labels = array("Reg","1","2","3","4","5","6","",""); 
    and finally to remove empty rows i changed
    PHP Code:
    for($i 1$i <= 9; ++$i
    to
    PHP Code:
    for($i 1$i <= 7; ++$i
    Obviously, some of this will be different depending on how schools work their timetables

  7. #37
    penfold_99's Avatar
    Join Date
    Feb 2008
    Location
    East Sussex
    Posts
    929
    Thank Post
    56
    Thanked 162 Times in 114 Posts
    Rep Power
    67
    Quote Originally Posted by Gatt View Post
    Changed the following line:
    PHP Code:
     $periods = array("" => 1,"1" => 2,"2"=> 3,"Reg"=> 4,"3"=> 5,"E4"=> 6,"L4"=> 7,"5"=> 8,"TWL"=> 9); 
    to
    PHP Code:
    $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:
    PHP Code:
     $periods_labels = array("","1","2","Reg","3","E4","L4","5","TWL"); 
    to
    PHP Code:
    $periods_labels = array("Reg","1","2","3","4","5","6","",""); 
    and finally to remove empty rows i changed
    PHP Code:
    for($i 1$i <= 9; ++$i
    to
    PHP Code:
    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.

  8. #38
    penfold_99's Avatar
    Join Date
    Feb 2008
    Location
    East Sussex
    Posts
    929
    Thank Post
    56
    Thanked 162 Times in 114 Posts
    Rep Power
    67
    Quote Originally Posted by Gatt View Post
    Changed the following line:
    PHP Code:
     $periods = array("" => 1,"1" => 2,"2"=> 3,"Reg"=> 4,"3"=> 5,"E4"=> 6,"L4"=> 7,"5"=> 8,"TWL"=> 9); 
    to
    PHP Code:
    $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:
    PHP Code:
     $periods_labels = array("","1","2","Reg","3","E4","L4","5","TWL"); 
    to
    PHP Code:
    $periods_labels = array("Reg","1","2","3","4","5","6","",""); 
    and finally to remove empty rows i changed
    PHP Code:
    for($i 1$i <= 9; ++$i
    to
    PHP Code:
    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?

  9. #39

    Gatt's Avatar
    Join Date
    Jan 2006
    Posts
    6,658
    Thank Post
    858
    Thanked 646 Times in 429 Posts
    Rep Power
    498
    No - it never pulled it from MS SQL - Didnt know if I missed anything but it just never came down..

  10. #40

    Gatt's Avatar
    Join Date
    Jan 2006
    Posts
    6,658
    Thank Post
    858
    Thanked 646 Times in 429 Posts
    Rep Power
    498
    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...

  11. #41
    penfold_99's Avatar
    Join Date
    Feb 2008
    Location
    East Sussex
    Posts
    929
    Thank Post
    56
    Thanked 162 Times in 114 Posts
    Rep Power
    67
    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

  12. #42

    Gatt's Avatar
    Join Date
    Jan 2006
    Posts
    6,658
    Thank Post
    858
    Thanked 646 Times in 429 Posts
    Rep Power
    498
    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..

    Code:
    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 :

    Code:
    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...

  13. #43
    penfold_99's Avatar
    Join Date
    Feb 2008
    Location
    East Sussex
    Posts
    929
    Thank Post
    56
    Thanked 162 Times in 114 Posts
    Rep Power
    67
    Quote Originally Posted by Gatt View Post
    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..

    Code:
    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 :

    Code:
    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);

  14. #44

    Gatt's Avatar
    Join Date
    Jan 2006
    Posts
    6,658
    Thank Post
    858
    Thanked 646 Times in 429 Posts
    Rep Power
    498
    Thanks - thats prorb what it is then...

SHARE:
+ Post New Thread
Page 3 of 3 FirstFirst 123

Similar Threads

  1. AD & VLE (Moodle), Mail (Zimbra), MIS (SIMS .Net)
    By kmount in forum How do you do....it?
    Replies: 1
    Last Post: 14th December 2008, 01:58 PM
  2. Moodle & Sub Categories
    By LOUD in forum Virtual Learning Platforms
    Replies: 1
    Last Post: 27th May 2008, 10:28 AM
  3. Timetables
    By binky in forum MIS Systems
    Replies: 6
    Last Post: 27th March 2008, 12:10 PM
  4. Export timetables from SIMS into Sharepoint 2007
    By scottyses in forum Virtual Learning Platforms
    Replies: 3
    Last Post: 11th March 2008, 10:42 AM
  5. SIMS.NET Timetables
    By BadComputerDay in forum MIS Systems
    Replies: 0
    Last Post: 2nd October 2006, 08:24 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •