Hal Fan Hour

  • Subscribe to our RSS feed.
  • Twitter
  • StumbleUpon
  • Reddit
  • Facebook
  • Digg

Friday, 6 September 2013

gRSShopper Setup (2)

Posted on 11:31 by Unknown
Making Optlists

Preparing for the MOOC-REL course I filled in a full set of optlists.

An 'optlist' is the information required to create a dropdown list. These lists create predefine options in the forms people use to create new posts, events, pages, etc.

So, for example, a 'post' might have a field called 'status'. Normally it would just be a plain text field, and you'd type in the name of the type. But it's easier just to select a value from a predefined list. The 'optlist' defines this list.

Administrators can crate optlists by clicking on [New] Optlist in the admin screen(the direct link is http://yoururl/cgi-bin/admin.cgi?db=optlist&action=edit ) and providing the following information:

Table: the name of the table

Field: the name of the field

Data: this is the list of options. It's a structured list: optiontitle,optionvalue;optiontitle2,optionvalue2
Just type out the just. (You can experiment with this to get it right).
For example: Approved,A;On Hold,O;Retired,R

Adding Fields to Tables

Setting up the optlists, I noticed some fields were not updating properly - I would enter the value and it would just disappear when I updated the form. This happens when the field is not defined in the table.

I can add a field to any table using the Database functions. Click on the 'Database' tab in the admin screen and look for 'Manage Database'. Select the table to look at, then select 'Show Columns' from the drop down. This will tell me the names of all the fields in the database.

To add the new field, type the name of the field in the space and select 'Add Column' from the dropdown.  

Note all table column field names begin with the name of the table. So, for example, to add a 'title' field to the 'event' table, the name of the field must be 'event_field'. This way, every single field in the database has a unique name.

Note to change the list of fields that will be displayed for any given table in admin.cgi, go to the edit_record() function (it's the content beginning my $showcols = ...). This is hard-coded for now but will one day be part of the general admin screen. You will need to do this if you add a field that wasn't previously defined.

grsshopper.js

I noticed things like the delete buttons were not working. Many of the basic functions (including delete alerts and login status updates are handled by the grsshopper.js Javascript library. The templates were still pointing to the older downes.js I was using previously. So I changed the script include to read src="http://123.45.67.89/assets/js/grsshopper.js"></script>

While I was looking at this I checked the grsshopper.js script. It is supposed to be configured by the installer but that does not always work properly. That was the case here. First, it was an older script. Second, the site information wasn't correctly added.

You can always get a correct up-to-date grsshopper sscript from my website:
http://www.downes.ca/assets/js/grsshopper.js
I downloaded this (you would replace 123.45.67.89 with your own base URL).

Then I reset the values at the top of the script (these are needed to make the 'login' script at the top of the page work properly):
var base_url = "http://123.45.67.89/";
var cgi_url = "http://123.45.67.89/cgi-bin/";
var title_cookie = "
123_45_67_89_person_title";




Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest
Posted in | No comments
Newer Post Older Post Home

0 comments:

Post a Comment

Subscribe to: Post Comments (Atom)

Popular Posts

  • Blogs in Education
    Submission for a forthcoming STRIDE handbook for The Indira Gandhi National Open University (IGNOU). See related handbooks here . What is a ...
  • Learning and Performance Support Systems
    This post is to introduce you to our Learning and Performance Support Systems program, a new $19 million 5-year initiative at the National R...
  • E-Learning: Générations
    ( English version ) Ces dernières années, j'ai travaillé sur deux grands concepts: d'abord, la théorie de l'apprentissage ...
  • E-Learning Generations
    ( version française ) In recent years I have been working on two major concepts: first, the connectivist theory of online learning, wh...
  • Open Educational Resources: A Definition
    The Definition Open educational resources are materials used to support education that may be freely accessed, reused, modified and shared b...
  • McLuhan - Understanding Media - Summary of Chapters 11-14
    My contribution to the Understanding Media Reading Group Chapter 11 McLuhan writes, in Chapter 11 of Understanding Media, that "The mys...
  • TTI Vanguard Conference Notes - 4
    Erin McKean, Wordnik The language is the Dictionary If you took the language, and you got rid of the dictionary, what would be left would be...
  • Progressive Taxation and Prosperity
    Responding to Justin Fox, editorial director of the Harvard Business Review Group, How big should a government be? in the Harvard Business ...
  • Bob Dylan in Moncton
  • International MOOCs Past and Present
    OpenLearning.com , a venture born out of the University of New South Wales ( UNSW ) in Sydney, Australia. Starting this week, you can begin ...

Categories

  • #change11
  • Connectivism
  • http://www.blogger.com/img/gl.link.gif
  • Shakespeare

Blog Archive

  • ▼  2013 (68)
    • ►  December (1)
    • ►  November (5)
    • ►  October (6)
    • ▼  September (7)
      • Foradian Technologies Interview
      • Two Comments on 'Open'
      • Notes from ALT-C
      • gRSShopper Setup (2)
      • gRSShopper Setup Log
      • 'Completely Wrong' but Not In Error
      • Moncton's Downtown Debate
    • ►  July (3)
    • ►  June (5)
    • ►  May (6)
    • ►  April (18)
    • ►  March (8)
    • ►  February (2)
    • ►  January (7)
  • ►  2012 (56)
    • ►  December (3)
    • ►  November (7)
    • ►  October (7)
    • ►  September (7)
    • ►  August (2)
    • ►  July (2)
    • ►  June (3)
    • ►  May (1)
    • ►  April (5)
    • ►  March (6)
    • ►  February (6)
    • ►  January (7)
  • ►  2011 (86)
    • ►  December (7)
    • ►  November (11)
    • ►  October (8)
    • ►  September (6)
    • ►  August (1)
    • ►  July (8)
    • ►  June (7)
    • ►  May (10)
    • ►  April (2)
    • ►  March (4)
    • ►  February (11)
    • ►  January (11)
  • ►  2010 (108)
    • ►  December (9)
    • ►  November (9)
    • ►  October (12)
    • ►  September (4)
    • ►  August (6)
    • ►  July (10)
    • ►  June (9)
    • ►  May (9)
    • ►  April (9)
    • ►  March (12)
    • ►  February (9)
    • ►  January (10)
  • ►  2009 (85)
    • ►  December (3)
    • ►  October (8)
    • ►  September (7)
    • ►  August (4)
    • ►  July (15)
    • ►  June (5)
    • ►  May (7)
    • ►  April (6)
    • ►  March (17)
    • ►  February (7)
    • ►  January (6)
  • ►  2008 (94)
    • ►  December (5)
    • ►  November (7)
    • ►  October (7)
    • ►  September (6)
    • ►  August (16)
    • ►  July (11)
    • ►  June (6)
    • ►  May (6)
    • ►  April (5)
    • ►  March (4)
    • ►  February (7)
    • ►  January (14)
  • ►  2007 (3)
    • ►  December (3)
Powered by Blogger.

About Me

Unknown
View my complete profile