dhassen Posted February 22, 2010 Posted February 22, 2010 Hi everyone, not sure if to post this here or in the MIS forum, but here goes. I've got moodle working with courses brought in from SIMS with help from SIMS and Moodle Integration I used the view they suggest, but it brings all classes ever - not just the active, currently running ones. Can anyone help me out with a view that gives the same result but only brings back active classes? I've been trawling through the SIMS views and tables but I've had no joy so far. Many thanks Dave
penfold_99 Posted February 22, 2010 Posted February 22, 2010 Hi everyone, not sure if to post this here or in the MIS forum, but here goes. I've got moodle working with courses brought in from SIMS with help from SIMS and Moodle Integration I used the view they suggest, but it brings all classes ever - not just the active, currently running ones. Can anyone help me out with a view that gives the same result but only brings back active classes? I've been trawling through the SIMS views and tables but I've had no joy so far. Many thanks Dave Hi Dave, Can you expand on the term active classes? That version was design to create a course for every class thats stored in SIMS.net. Also that version is no longer supported by myself. There are other version of SIMS.net and moodle integrations avaliable.
dhassen Posted February 23, 2010 Author Posted February 23, 2010 Hi, yea by active classes I mean classes that are currently running - not legacy ones. That view did bring in all classes from SIMS, including ancient ones that are obviosuly no longer used. I did the usual thing of managing to find my own solution before an answer was posted here though, with the following ammended view: SELECT DISTINCT p.class_name AS course, p.staff_initials AS person, 'teacher' AS role FROM sims.curr_via_classperiods AS p INNER JOIN sims.sims_base_group ON p.base_group_id = sims.sims_base_group.base_group_id WHERE (sims.sims_base_group.active_state LIKE 'A') UNION SELECT DISTINCT TOP (100) PERCENT p.class_name AS course, m.unique_pupil_no AS person, 'student' AS role FROM sims.curr_via_classperiods AS p INNER JOIN sims.stud_via_group_members AS m ON m.base_group_id = p.base_group_id INNER JOIN sims.sims_base_group AS sims_base_group_1 ON p.base_group_id = sims_base_group_1.base_group_id WHERE (sims_base_group_1.active_state LIKE 'A') Thanks for the reply anyhow.
penfold_99 Posted February 23, 2010 Posted February 23, 2010 Hi, yea by active classes I mean classes that are currently running - not legacy ones. That view did bring in all classes from SIMS, including ancient ones that are obviosuly no longer used. I did the usual thing of managing to find my own solution before an answer was posted here though, with the following ammended view: SELECT DISTINCT p.class_name AS course, p.staff_initials AS person, 'teacher' AS role FROM sims.curr_via_classperiods AS p INNER JOIN sims.sims_base_group ON p.base_group_id = sims.sims_base_group.base_group_id WHERE (sims.sims_base_group.active_state LIKE 'A') UNION SELECT DISTINCT TOP (100) PERCENT p.class_name AS course, m.unique_pupil_no AS person, 'student' AS role FROM sims.curr_via_classperiods AS p INNER JOIN sims.stud_via_group_members AS m ON m.base_group_id = p.base_group_id INNER JOIN sims.sims_base_group AS sims_base_group_1 ON p.base_group_id = sims_base_group_1.base_group_id WHERE (sims_base_group_1.active_state LIKE 'A') Thanks for the reply anyhow. Hi Dave, there is a new version of the component over on the moodle docs website, but still out of date. As the other view check for the course end date.
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