CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Drupal Modules »
  • Using CiviSchool (Moderators: Donald Lobo, Deepak Srivastava) »
  • Features etc...
Pages: [1]

Author Topic: Features etc...  (Read 3531 times)

ymmatt

  • I’m new here
  • *
  • Posts: 29
  • Karma: 0
Features etc...
August 22, 2011, 01:38:18 pm
Ok, so now that I have a decent grasp of what CiviSchool (sfschool) can do I guess I can start dreaming about TODO items so here goes:

Desired pages:
    Class page that lists all classes with search/filter options
        Link to enroll students into class
        Link to page with all students enrolled in this class
        Link to empty, edit, delete class
    Currently enrolled students with search/filter options
        Link to edit, enroll etc...
    Batch enter attendance
        Lists all students in particular class with attendance checkbox (could be sign in/out times?)

Settings Page:
    Terms(Fall,Spring) available
    Years (2009, 2010) available
    Current term
    Attendance type: check box or in/out times

I'm sure the list will grow but anyway that is where I'm at now

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: Features etc...
August 22, 2011, 01:58:28 pm
Can you explain what a 'class' is in CiviSchool?
We have a client that has people sign up for classes - not a school - and we have developed Drupal Rules so that each Event creates an Organic Group - and each Participant becomes a member of the OG - and therefore we use OG and Views to give us the lists of class Participants along with a discussion space for them etc.
But we are now looking at implementing some sort of 'scheduler' so people can book an appointment with some of the teachers for private tuition.
I still haven't got around to investigating CiviSchool - so am following your exploration with interest ;-)
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Features etc...
August 23, 2011, 03:32:48 pm
Quote from: ymmatt on August 22, 2011, 01:38:18 pm
Desired pages:
    Class page that lists all classes with search/filter options
        Link to enroll students into class
        Link to page with all students enrolled in this class
        Link to empty, edit, delete class

Check:

q=civicrm/sfschool/extended/class&reset=1

gives u:

* all the current classes
* edit/disable a class
* add a new class
* all the students enrolled in the class
* ability to add a new class (at bottom of page, if u have lots of classes)

So most of the above :) We can add a student to a class,  but the flow is to do it from a student perspective. i..e get the student profile and then add it from there.

Quote from: ymmatt on August 22, 2011, 01:38:18 pm
    Currently enrolled students with search/filter options
        Link to edit, enroll etc...

check

q=civicrm/profile/reset=1&gid=4

u might need to replace 4 with the profile GID that displays student information. Basically an admin can do all the tasks a parent can do (i.e. edit / enroll etc)

Quote from: ymmatt on August 22, 2011, 01:38:18 pm
    Batch enter attendance
        Lists all students in particular class with attendance checkbox (could be sign in/out times?)

there are sign-in / sign-out sheets for a day. extending it to meet the above is not too hard. Check

q=civicrm/sfschool/signin&reset=1

Quote from: ymmatt on August 22, 2011, 01:38:18 pm
Settings Page:
    Terms(Fall,Spring) available
    Years (2009, 2010) available
    Current term
    Attendance type: check box or in/out times

yes, adding the above would be great :) However since it happens so rarely, it kinda slips down in priority for me

pete: events seems to heavy weight and hence a class is basically a very simple form of an event driven by a class table OUTSIDE of civicrm

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

ymmatt

  • I’m new here
  • *
  • Posts: 29
  • Karma: 0
Re: Features etc...
August 23, 2011, 05:35:54 pm
Quote from: Donald Lobo on August 23, 2011, 03:32:48 pm
there are sign-in / sign-out sheets for a day. extending it to meet the above is not too hard. Check

q=civicrm/sfschool/signin&reset=1

This is actually the most difficult page for me right now, any way to specify the date or are we stuck with using the current date?

The .post/ajax isn't working for me so the 'add a student' funciton on that page isn't working. Even when I manually set the variables in the url for (civicrm/ajax/school/addnew?contactID=5&course=...) it acts as if it was added but I don't see it on the class info page, or in the student count on this page: civicrm/school/extended/class

I'd still love to see a demo/sandbox site to see just how it is supposed to look/work.

ymmatt

  • I’m new here
  • *
  • Posts: 29
  • Karma: 0
Re: Features etc...
August 24, 2011, 09:14:09 am
I just noticed that the post url's in the sfschool/templates/SFS/Form/SignIn.tpl file were using
Code: [Select]
/civicrm/ajax/sfschool/...instead of what is specified in the sfschool.xml menu file which is:
Code: [Select]
/civicrm/ajas/school/...
I made the changes to the template file and it seems like the change worked, hopefully it was the right change.

One more question regarding civicrm/ajax/school/addnew:
What is it supposed to do, currently it adds a record under the users' 'Extended Care Signout' Tab, not the 'Extended Care' tab

I may not have the correct idea of the functionality of this page though:  civicrm/school/signin

Another note, which makes this post just a little too long, is that when viewing a user, the tab 'Extended Care' seems like the place that classes should go, but when I click 'edit extended care records' class names don't show up and I have to manually type them in. I guess this is the next thing for me to debug/work through

edit: it seems like the api will be the best way to do this:
  Upon installation add default name entry that we can find using the api
  Once a class is added
    remove this default entry
    add a new select field using the class names
  If a class is edited or if the select field exists
    use the api to edit the entry/add new entries
  If last class is deleted
    remove the select and change it back to the default
  Do the same for the instructor field
    Actually if we could pull the instructor field from the course info that would be nice
« Last Edit: August 24, 2011, 09:49:09 am by ymmatt »

ymmatt

  • I’m new here
  • *
  • Posts: 29
  • Karma: 0
Re: Features etc...
August 24, 2011, 01:39:04 pm
So obviously the desired setup that I mentioned earlier (select course name from drop down) takes a bit of work.

Every time you add a option group or custom field it gets its own table column name, so that changes all of the sql statements. I looked through and changed all instances where it use the name "name" for class name in sql statements and replaced it with the "column_name" that I retrieved using the API. This means that so long as we use the same "name" that is referenced in the API we should be able to find/edit/delete/change this field at will AND get its column name. (after re-reading this it sounds like gibberish, sorry but I can't think of a way to say this clearly)

One problem that I need help de-bugging is this:
Code: [Select]
Notice: Undefined index: options in _civicrm_api3_apply_options_to_dao() (line 442 of /home/client/mskeysis/sites/all/modules/civicrm/api/v3/utils.php).
Is this something that was fixed when you took care of this: http://drupal.org/node/1244632

-m
« Last Edit: August 24, 2011, 02:14:41 pm by ymmatt »

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Features etc...
August 24, 2011, 03:08:20 pm

1. could not find ajas in any of the school code. I did a recursive grep on the code

2. Yes, seems like the notice should be fixed in a recent release

3. Sorry, did not understand what u mean. I should be online most of the day-late evening UK time tomorrow, so feel free to ping me on IRC

4. The extended care tab is for all the classes that they have signed up for

5. the extended care signout is like an attendance sheet that records the class a student attends

6. Someone just wrote a drupal install script for the engage module. We should clone that and use it for school too :)

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

ymmatt

  • I’m new here
  • *
  • Posts: 29
  • Karma: 0
Re: Features etc...
August 24, 2011, 03:34:57 pm
Quote from: Donald Lobo on August 24, 2011, 03:08:20 pm

1. could not find ajas in any of the school code. I did a recursive grep on the code
Weird, I see a chunk of javascript in this file: sfschool/templates/SFS/Form/SignIn.tpl
making .post calls
Don't tell me that I have the wrong version of the code  :o
Quote
2. Yes, seems like the notice should be fixed in a recent release
A release to come, or one that was done?
Quote
3. Sorry, did not understand what u mean. I should be online most of the day-late evening UK time tomorrow, so feel free to ping me on IRC
Nevermind, I was able to get what I wanted done. Pretty cool to have the API in the state that it is, its awesome! I've got it setup to create/modify a select field for course name when a course is created. This field is used on the "extended care tab" so that you don't have to get the name exactly right for the student to show up in the course listing
Quote
6. Someone just wrote a drupal install script for the engage module. We should clone that and use it for school too :)
Sounds like a plan!

ymmatt

  • I’m new here
  • *
  • Posts: 29
  • Karma: 0
Re: Features etc...
August 24, 2011, 09:13:32 pm
Another thought/note. It seems that if a student is added on this page: civicrm/school/signin then not only should they have a sign-in record for that day but they should also be enrolled in the course (i.e. have a record under extended care) and appear in the course enrollment listings. Any thoughts?

ymmatt

  • I’m new here
  • *
  • Posts: 29
  • Karma: 0
Re: Features etc...
August 25, 2011, 10:46:03 am
Trying to figure out how to make the above happen. If I use the API then I have to create each customValue separately and it will be ugly but functional. Another option is to do something like this:
Code: [Select]
        require_once 'CRM/Core/BAO/CustomValueTable.php';
        CRM_Core_BAO_CustomValueTable::postProcess( $params, $customFields, $entityTable, $entityID, $customFieldExtends );

        // reset the group contact cache for this group
        require_once 'CRM/Contact/BAO/GroupContactCache.php';
        CRM_Contact_BAO_GroupContactCache::remove( );

Problem is that I don't quite know how to use this. I know that I can, and that it will work, just don't know what goes where and as far as I can tell there isn't any documentation? I'll keep poking around and eventually figure it out, but if anyone has any good tips please share :)

ymmatt

  • I’m new here
  • *
  • Posts: 29
  • Karma: 0
Re: Features etc...
August 26, 2011, 08:29:24 am
Ok so I got most of the base functionality that I use working in 4.0.5 and modified a lot to match my needs.

I used the API to take care of adding/enrolling the student from the /school/signin page using the 'contact' 'update' function, which adds records to fields that allow multiple records.

My next task it to tackle the 'time' issue which for me isn't important as I just care whether or not they were there (i'm not billing) and to figure out reports etc...

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Drupal Modules »
  • Using CiviSchool (Moderators: Donald Lobo, Deepak Srivastava) »
  • Features etc...

This forum was archived on 2017-11-26.