Jump to content

Recommended Posts

Posted
Hi gatt,

 

it could possible as the class code will be the same as the course code/name in moodle, it could be linked to the page with the class members in it.

 

i will mull it over next week and let you know,

 

Taking it a little (famous last words!) further, it may be useful if the class lists popped up in a new window.

 

:getmecoat:

Posted
This was something out Deputy Head asked - on the STAFF timetables so they can click on the class code and get a list of the pupils in that class?

 

Not sure how feasable that would be...

 

As soon as the class is populated, the teacher can see the classlist of a particular course-code by selecting 'participants'. It's only one click away from the timetable-mod. Some of our teachers already use the 'participants' block of moodle to send instant message/email to their classes.

Posted
Yea I know - but we dont use the sims generated courses - we have our own courses, which by default everyone is enrolled into...
Posted

I see, we use a mix of the SIMS generated courses and metacourses.

The metacourses are really useful as they are made dynamically of a range of SIMS courses. For example, we ks3 science that is populated from all yr7,8,9 sc courses - so when there is a new yr7 cohort the KS3 metacourse is automatically populated.

This approach helps de-clutter the users page, as they are not members of all courses. In teacher speak it can be interpreted as creating an 'individual learning plan' as the students only have the courses that are 'tailored' for them....

  • Thanks 1
Posted
BTW for me to get it to work i duplicated the table and made the following changes:

 

From

$days = array('Mon' => 1, 'Tue' => 2, 'Wed' => 3, 'Thu' => 4, 'Fri' => 5);
$periods = array("" => 1,"1" => 2,"2"=> 3,"Reg"=> 4,"3"=> 5,"E4"=> 6,"L4"=> 7,"5"=> 8,"TWL"=> 9);  

To

	$days = array('1Mon' => 1, '1Tue' => 2, '1Wed' => 3, '1Thu' => 4, '1Fri' => 5,'2Mon' => 6, '2Tue' => 7, '2Wed' => 8, '2Thu' => 9, '2Fri' => 10); 	
$periods = array("" => 1,"1" => 2,"2"=> 3,"3"=> 4,"4"=> 5,"5"=> 6,"6"=> 7,""=> 8,""=> 9);

 

From

$periods_labels = array("","1","2","Reg","3","E4","L4","5","TWL");

To

$periods_labels = array("","1","2","3","Lunch","5","6","","");

 

From

	$parts = explode(":", $row['period_name']);

To

	$parts = explode(" ", $row['period_name']);

 

The following changes are made in the duplicated table.

From

	echo '';
echo ''.$lessons[$i][$ii].'
';
echo $teachers[$i][$ii].'                               '.$rooms[$i][$ii];
echo '';

To

echo '';
echo ''.$lessons[$i][$ii+5].'
';
echo $teachers[$i][$ii+5].'                               '.$rooms[$i][$ii+5];
echo '';

 

Hi Apeo,

 

I have re-written the module to support a 2 week timetable, I have also simplified the setup.

 

Could you please test the new version to see if it supports your config out the box?

 

All that has changed is the view.php file in the mod folder.

 

the link for the name file is that same as the old one on this moodle page

Integrate Moodle, LDAP and SIMS.net - MoodleDocs

Posted
This was something out Deputy Head asked - on the STAFF timetables so they can click on the class code and get a list of the pupils in that class?

 

Not sure how feasable that would be...

 

Hi Gatt,

 

In the latest version of the module links the course name to the moodle course. I will upload this tomorrow when i get back into work.

 

For the course page there is a link in the top left hand corner for participants, this will list everyone on the course.

 

Also the updated version reduces the configuration burden for users, could you test and see if it works out of the box?

  • Thanks 1
Posted (edited)

Hi penfold - just test the new Mod - and its a hell of a lot easier! (though needed to change the block php file from :

 

   $this->content->text = 'My Timetable';

to

   $this->content->text = 'My Timetable';

 

to work with my site as I dont have moodle in my Root Directory..

 

Also, the Mod files - any chance you can put them into a sub-dir ease the deployment (eg Zip File/mod/simstimetable/files) - saves creating it on the Server..

Edited by Gatt
Posted

Nice work mate and the code is alot tidier but the 2 week timetable wont work because of this bit:

 

$days = array('Mon' => 1, 'Tue' => 2, 'Wed' => 3, 'Thu' => 4, 'Fri' => 5,
			  '1Mon' => 1, '1Tue' => 2, '1Wed' => 3, '1Thu' => 4, '1Fri' => 5,
			  'Mon1' => 1, 'Tue1' => 2, 'Wed1' => 3, 'Thu1' => 4, 'Fri1' => 5,
			  '2Mon' => 1, '2Tue' => 2, '2Wed' => 3, '2Thu' => 4, '2Fri' => 5,
			  'Mon2' => 1, 'Tue2' => 2, 'Wed2' => 3, 'Thu2' => 4, 'Fri2' => 5);

 

What happens is that it only prints 2 tables with 1 filled and 1 blank i.e. week 1 table is filled and week 2 table is blank. The week 1 table is wrong because the above code will override week 2 timetable with week1. For example a student has maths in '1Mon 1' (week 1 monday period 1) and English in '2Mon 1' (week 2 monday period 1) so if you take the period out (ie 1Mon and 2Mon) and apply the array above both of em will end up with a value of 1. I should have mentioned that the kids have different timetables for each week.

 

I havent really looked it too closely just yet as im working on something else but when i get a chance i'll try and bash it to work. :D

Posted
Hi penfold - just test the new Mod - and its a hell of a lot easier! (though needed to change the block php file from :

 

   $this->content->text = 'My Timetable';

to

   $this->content->text = 'My Timetable';

 

to work with my site as I dont have moodle in my Root Directory..

 

Also, the Mod files - any chance you can put them into a sub-dir ease the deployment (eg Zip File/mod/simstimetable/files) - saves creating it on the Server..

 

Hi gatt,

 

thanks for testing, i will repackage for you.

 

I will try and find a way of getting the block link to work correctly.

Posted
Hi penfold - just test the new Mod - and its a hell of a lot easier! (though needed to change the block php file from :

 

   $this->content->text = 'My Timetable';

to

   $this->content->text = 'My Timetable';

 

to work with my site as I dont have moodle in my Root Directory..

 

Also, the Mod files - any chance you can put them into a sub-dir ease the deployment (eg Zip File/mod/simstimetable/files) - saves creating it on the Server..

 

 

Hi Gatt,

 

could you swap $blockwww to $CFG->wwwroot and see if that removes the need for /moodle?

Posted
Nice work mate and the code is alot tidier but the 2 week timetable wont work because of this bit:

 

$days = array('Mon' => 1, 'Tue' => 2, 'Wed' => 3, 'Thu' => 4, 'Fri' => 5,
			  '1Mon' => 1, '1Tue' => 2, '1Wed' => 3, '1Thu' => 4, '1Fri' => 5,
			  'Mon1' => 1, 'Tue1' => 2, 'Wed1' => 3, 'Thu1' => 4, 'Fri1' => 5,
			  '2Mon' => 1, '2Tue' => 2, '2Wed' => 3, '2Thu' => 4, '2Fri' => 5,
			  'Mon2' => 1, 'Tue2' => 2, 'Wed2' => 3, 'Thu2' => 4, 'Fri2' => 5);

 

What happens is that it only prints 2 tables with 1 filled and 1 blank i.e. week 1 table is filled and week 2 table is blank. The week 1 table is wrong because the above code will override week 2 timetable with week1. For example a student has maths in '1Mon 1' (week 1 monday period 1) and English in '2Mon 1' (week 2 monday period 1) so if you take the period out (ie 1Mon and 2Mon) and apply the array above both of em will end up with a value of 1. I should have mentioned that the kids have different timetables for each week.

 

I havent really looked it too closely just yet as im working on something else but when i get a chance i'll try and bash it to work. :D

 

hi apeo,

 

that array is correct, the problem is do to will how i add lessons to the array before printing.

 

The timetables are printing out on top of each other i just need to add the correct off set.

Posted

Hi Gatt, Apeo

 

I have updated to the latest version, if you could download and test i would be grateful.

 

The latest version includes the link to from the timetable to the course.

Posted

Can anybody help me configure FreeTDS for Ubuntu 8.04LTS?

 

I've done a "sudo apt-get install freetds-dev" successfully but when editing /etc/freetds.conf I get a blank file - is this normal and do I have to populate it myself?

Posted

Nice one - though in the block_simstimetable.php you need to change /mod/simstimetable/ to mod/simstimetable/

 

Sorry - meant to remove it myself in my previous quote..

 

For some reason if its there it ignores the $CFG->wwwroot entirely!!

Posted
Can anybody help me configure FreeTDS for Ubuntu 8.04LTS?

 

I've done a "sudo apt-get install freetds-dev" successfully but when editing /etc/freetds.conf I get a blank file - is this normal and do I have to populate it myself?

 

Hmm this should have had some default content IIRC..

 

Mine is like so //

 

# $Id: freetds.conf,v 1.12 2007/12/25 06:02:36 jklowden Exp $
#
# This file is installed by FreeTDS if no file by the same 
# name is found in the installation directory. 
#
# For information about the layout of this file and its settings, 
# see the freetds.conf manpage "man freetds.conf". 
# Global settings are overridden by those in a database
# server specific section
[global]
host = [sql server ip]\[sql server instance]
port = [port number for sql server]
client charset = UTF-8
tds version = 9.0
text size = 20971520
 
 
# A typical Sybase server
 
# A typical Microsoft server
 

 

the tds version needs to be set to your SQL Server version

 

9.0 is SQL 2005

Posted

And also - I've set up two scheduled tasks on the server (as the documentation says)

 

SIMS2AD

SIMS2AD_access_manager

 

When they run I get the errors:

 

Script: D:\SIMS2AD\SIMS2AD.vbs
Line: 259
Char: 1
Error: Table does not exist.
Code: 80040E37
Source: Provider

 

and

 

Script: D:\SIMS2AD\SIMS2AD_access_manager.vbs
Line: 222
Char: 1
Error: [Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server does not exist or access denied.
Code: 80004005
Source: Microsoft OLE DB Provider for ODBS Drivers

 

Respectively.

 

I've tried to follow the instructions exactly as written in the documentation.

Posted
Hmm this should have had some default content IIRC..

 

Mine is like so //

 

# $Id: freetds.conf,v 1.12 2007/12/25 06:02:36 jklowden Exp $
#
# This file is installed by FreeTDS if no file by the same 
# name is found in the installation directory. 
#
# For information about the layout of this file and its settings, 
# see the freetds.conf manpage "man freetds.conf". 
# Global settings are overridden by those in a database
# server specific section
[global]
host = [sql server ip]\[sql server instance]
port = [port number for sql server]
client charset = UTF-8
tds version = 9.0
text size = 20971520
 
 
# A typical Sybase server
 
# A typical Microsoft server
 

the tds version needs to be set to your SQL Server version

 

9.0 is SQL 2005

 

Where is your freetds.conf stored? Is it /etc/freetds.conf?

Posted

yeah - sometimes a blank file means the file isnt there..

 

might be worth doing

whereis freetds.conf

to find out if its been put somewhere else!

 

But IIRC it should default to /etc

Posted
Where is your freetds.conf stored? Is it /etc/freetds.conf?

 

Never mind - found the location :)

 

Just the Scheduled tasks I'm having trouble with at the minute?

Posted
Can anybody help me configure FreeTDS for Ubuntu 8.04LTS?

 

I've done a "sudo apt-get install freetds-dev" successfully but when editing /etc/freetds.conf I get a blank file - is this normal and do I have to populate it myself?

 

I'm not using freetds on ubuntu, but it appears that the config file is just /etc/freetds/freetds.conf

 

 

 

dpkg --listfiles freetds-common 
/.
/usr
/usr/share
/usr/share/freetds
/usr/share/freetds/freetds.conf
/usr/share/doc
/usr/share/doc/freetds-common
/usr/share/doc/freetds-common/README
/usr/share/doc/freetds-common/README.Debian
/usr/share/doc/freetds-common/TODO.Debian
/usr/share/doc/freetds-common/copyright
/usr/share/doc/freetds-common/examples
/usr/share/doc/freetds-common/examples/freetds.conf.pl
/usr/share/doc/freetds-common/examples/locales.conf
/usr/share/doc/freetds-common/NEWS.gz
/usr/share/doc/freetds-common/TODO.gz
/usr/share/doc/freetds-common/changelog.Debian.gz
/etc
/etc/freetds
/usr/share/doc/freetds-common/examples/odbcinst.ini
/usr/share/doc/freetds-common/examples/freetds.conf

 

thing is, I can't find the tsql command that is present on RHEL?

can someone confirm that the freetds package works on ubuntu - you may be better of using the source, luke

Posted
Dont think I can help there - our AD is already setup so dont need to export from SIMS into AD..

 

Can you quickly bullet the install points it took you to get it to work?

Posted
Nice one - though in the block_simstimetable.php you need to change /mod/simstimetable/ to mod/simstimetable/

 

Sorry - meant to remove it myself in my previous quote..

 

For some reason if its there it ignores the $CFG->wwwroot entirely!!

 

I have fixed this and update the zip file

Posted
Hi Gatt, Apeo

 

I have updated to the latest version, if you could download and test i would be grateful.

 

The latest version includes the link to from the timetable to the course.

 

Just tested it, same problem.

 

Sorry for being and idiot but my logic is off today but with this line of code:

 

$parts = explode($periodseperator, $row['period_name']);
$lessons[$periods[$parts['1']]][$days[$parts['0']]] = $row['class_name'];
$rooms[$periods[$parts['1']]][$days[$parts['0']]] = $row['room_name'];
$teachers[$periods[$parts['1']]][$days[$parts['0']]] = $row['staff_initials'];

 

for '1Mon 1', which has a class of say En, it would work out like this:

 

$parts[0]='1Mon'
$parts[1]='1'
$lessons[$periods['1']][$days['1Mon']] = $lessons[1][1]
$lessons[1][1] = 'En' 

 

for '2Mon 1', which has a class of say Ma, it would look like this:

 

$parts[0]='2Mon'
$parts[1]='1'
$lessons[$periods['1']][$days['2Mon']] = $lessons[1][1]
$lessons[1][1] = 'Ma' 

 

So in the array $lessons the value En has been overriden with Ma. Am i right?

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 account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...