Author Archives: Phil Barker

Getting data from wikidata into WordPress custom taxonomy⤴

from @ Sharing and learning

I created a custom taxonomy to use as an index of people mentioned. I wanted it to work nicely as linked data, and so wanted each term in it to refer to the wikidata identifier for the person mentioned. Then I thought, why not get the data for the terms from wikidata?

Brief details

Lots of tutorials on how to set up a custom taxonomy with with custom metadata fields. I worked from this one from smashingmagazine, to get a taxonomy call people, with a custom field for the wikidata id.

Once the wikidata is entered, this code will fetch & parse the data (it’s a work in progress as I add more fields)

<?php
function omni_get_wikidata($wd_id) {
    print('getting wikidata<br />');
    if ('' !== trim( $wd_id) ) {
	    $wd_api_uri = 'https://wikidata.org/entity/'.$wd_id.'.json';
    	$json = file_get_contents( $wd_api_uri );
    	$obj = json_decode($json);
    	return $obj;
    } else {
    	return false;
	}
}

function get_wikidata_value($claim, $datatype) {
	if ( isset( $claim->mainsnak->datavalue->value->$datatype ) ) {
		return $claim->mainsnak->datavalue->value->$datatype;
	} else {
		return false;
	}
}

function omni_get_people_wikidata($term) {
	$term_id = $term->term_id;
    $wd_id = get_term_meta( $term_id, 'wd_id', true );
   	$args = array();
   	$wikidata = omni_get_wikidata($wd_id);
   	if ( $wikidata ) {
    	$wd_name = $wikidata->entities->$wd_id->labels->en->value;
    	$wd_description = $wikidata->entities->$wd_id->descriptions->en->value;
    	$claims = $wikidata->entities->$wd_id->claims;
   		$type = get_wikidata_value($claims->P31[0], 'id');
   		if ( 'Q5' === $type ) {
			if ( isset ($claims->P569[0] ) ) {
				$wd_birth_date = get_wikidata_value($claims->P569[0], 'time');
				print( $wd_birth_date.'<br/>' );
			}
   		} else {
	   		echo(' Warning: that wikidata is not for a human, check the ID. ');
	   		echo(' <br /> ');
   		} 
    	$args['description'] = $wd_description;
    	$args['name'] = $wd_name;
		print_r( $args );print('<br />');
    	update_term_meta( $term_id, 'wd_name', $wd_name );
    	update_term_meta( $term_id, 'wd_description', $wd_description );
    	wp_update_term( $term_id, 'people', $args );
    	
   	} else {
   		echo(' Warning: no wikidata for you, check the Wikidata ID. ');
   	}
}
add_action( 'people_pre_edit_form', 'omni_get_people_wikidata' );
?>

(Note: don’t add this to edited_people hook unless you want along wait while causes itself to be called every time it is called…)

That on its own wasn’t enough. While the name and description of the term were being updated, the values for them displayed in the edit form weren’t updated until the page was refreshed. (Figuring out that it was mostly working took a while.) A bit of javascript inserted into the edit form fixed this:

function omni_taxonomies_edit_fields( $term, $taxonomy ) {
    $wd_id = get_term_meta( $term->term_id, 'wd_id', true );
    $wd_name = get_term_meta( $term->term_id, 'wd_name', true ); 
    $wd_description = get_term_meta( $term->term_id, 'wd_description', true ); 
//JavaScript required so that name and description fields are updated 
    ?>
    <script>
	  var f = document.getElementById("edittag");
	  var n = document.getElementById("name");
  	  var d = document.getElementById("description");
  	  function updateFields() {
  		n.value = "<?php echo($wd_name) ?>";
  		d.innerHTML = "<?php echo($wd_description) ?>";
  	  }

	  f.onsubmit=updateFields();
	</script>
    <tr class="form-field term-group-wrap">
        <th scope="row">
            <label for="wd_id"><?php _e( 'Wikidata ID', 'omniana' ); ?></label>
        </th>
        <td>
            <input type="text" id="wd_id"  name="wd_id" value="<?php echo $wd_id; ?>" />
        </td>
    </tr>
    <?php
}
add_action( 'people_edit_form_fields', 'omni_taxonomies_edit_fields', 10, 2 );

 

The post Getting data from wikidata into WordPress custom taxonomy appeared first on Sharing and learning.

Educational and occupational credentials in schema.org⤴

from @ Sharing and learning

Since the summer I have been working with the Credential Engine, which is based at Southern Illinois University, Carbondale, on a project to facilitate the description of educational and occupational credentials in schema.org. We have just reached the milestone of setting up a W3C Community Group to carry out that work.  If you would like to contribute to the work of the group (or even just lurk and follow what we do) please join it.

Educational and occupational credentials

By educational and occupational credentials I mean diplomas, academic degrees, certifications, qualifications, badges, etc., that a person can obtain by passing some test or examination of their abilities. (See also the Connecting Credentials project’s glossary of credentialing terms.)  These are already alluded to in some schema.org properties that are pending, for example an Occupation or JobPosting’s qualification or a Course’s educationalCredentialAwarded. These illustrate how educational and occupational credentials are useful for linking career aspirations with discovery of educational opportunities. The other entity type to which educational and occupational credentials link is Competence, i.e. the skills, knowledge and abilities that the credential attests. We have been discussing some work on how to describe competences with schema.org in recent LRMI meetings, more on that later.

Not surprisingly there is already a large amount of relevant work done in the area of educational and occupational credentials. The Credential Engine has developed the Credential Transparency Description Language (CTDL) which has a lot of detail, albeit with a US focus and far more detail that would be appropriate for schema.org. The Badge Alliance has a model for open badges metadata that is applicable more generally. There is a W3C Verifiable Claims working group which is looking at credentials more widely, and the claim to hold one. Also, there are many frameworks which describe credentials in terms of the level and extent of the knowledge and competencies they attest, in the US Connecting Credentials cover this domain, while in the EU there are many national qualification frameworks and a Framework for Qualifications of the European Higher Education Area.

Potential issues

One potential issue is collision with existing work. We’ll have to make sure that we know where the work of the educational and occupational credential working group ends, i.e what work would best be left to those other initiatives, and how we can link to the products of their work. Related to that is scope creep. I don’t want to get involved in describing credentials more widely, e.g. issues of identification, authentication, authorization; hence the rather verbose formula of ‘educational and occupational credential. That formula also encapsulates another issue, a tension I sense between the educational world and the work place: does a degree certificate qualify someone to do anything, or does it just relate to knowledge?  Is an exam certificate a qualification?

The planned approach

I plan to approach this work in the same way that the schema course extension community group worked. We’ll use brief outline use cases to define the scope, and from these define a set of requirements, i.e. what we need to describe in order to facilitate the discovery of educational and occupational credentials. We’ll work through these to define how to encode the information with existing schema.org terms, or if necessary, propose new terms. While doing this we’ll use a set of examples to provide evidence that the information required is actually available from existing credentialling organizations.

Get involved

If you want to help with this, please join the community group. You’ll need a W3C account, and you’ll need to sign an assurance that you are not contributing any intellectual property that cannot be openly and freely licensed.

The post Educational and occupational credentials in schema.org appeared first on Sharing and learning.

Partnership with Cetis LLP⤴

from @ Sharing and learning

I have worked with Cetis in one way or another for about 15 years, but am very happy to announce that at the end of last week I became a partner of Cetis LLP.

Cetis, a co-operative consultancy

For many years CETIS was a university-based innovation support centre funded by JISC. A few years ago the Jisc funding stopped, and most of my colleagues lost their university posts. They decided to keep offering the same range of services as a limited liability partnership, and so Cetis LLP was born as a cooperative consultancy for innovation in educational technology. I was lucky, and did not loose my position at Heriot-Watt at that time as Cetis was only a part of my role there, and I was able to fill the gap with other work. I did remain as an Associate of Cetis, i.e. someone with whom they work regularly, and we did several joint projects on that basis.

One of the first decisions I made when I left Heriot-Watt was that I wanted to be a full member of Cetis LLP. They are a great team, they do great work, and with them I will be able to continue to work on their many interesting projects, while also contributing what is necessary to keep the partnership going. I have already been working with them testing out the TrunkDB project (a cloud based relational database for researchers) which is in private beta, and we are starting a new project on data wrangling orchestration. And I know we need to sort out the Cetis website so that it properly reflects all the work that the partnership has done over the last two or three years.

Going forward, I hope most of my work will be through Cetis. I’ll keep PJJK Limited for any work that doesn’t fit in with their interests, and there is a chance I’ll do some work through other channels, but the benefits of working with such a brilliant group of partners far outweigh any benefits of independent work.

The post Partnership with Cetis LLP appeared first on Sharing and learning.

TIL: getting Skype for Linux working⤴

from @ Sharing and learning

Microsoft’s Skype for Linux is a pain for Linux (well, for Ubuntu at least). It stopped working for me, no one could hear me.

Apparently it needs pulse audio to  work properly, but as others have found “most problems with the sound in Linux can be solved by removing PulseAudio”. The answer, as outlined in this post, is apulse “PulseAudio emulation for ALSA”.

The post TIL: getting Skype for Linux working appeared first on Sharing and learning.

The end of Open Educational Practices in Scotland⤴

from @ Sharing and learning

On Monday I was at Our Dynamic Earth, by the Holyrood Parliament in Edinburgh, for a day meeting on the Promise of Open Education. This was the final event of the Open Educational Practices in Scotland project (OEPS), which (according to the evaluation report):

involved five universities in leading a project based in the Open University in Scotland. Its aims were to facilitate best practice in open education in Scotland, and to enhance capacity for developing publicly available online materials across the tertiary education sector in Scotland. The project particularly focused on fostering the use of open educational practices to build capacity and promote widening participation.

 

There have always been questions about this project, notably the funnelling of money to the OU without any sign of an open bidding process, but at least it was there. With the OEPS finishing, two things caught my attention: how do we get political support for open education, and what open educational practice is current in Scotland. To paraphrase Orwell: if there is hope, it lies in the grass roots [hmm, that didn’t end well for Winston].

Open Education in Policy

Good places to start looking for current practice at both policy and operational levels are the ALT-Scotland SIG and Scottish Open Education Declaration. There are strong links between the two: key members of ALT-Scotland (notably Lorna M Campbell and Joe Wilson) are involved in developing and promoting Scottish Open Education Declaration; and OEPS also supported some of this work. The Scottish Open Education Declaration and ALT-Scotland have been successful in supporting policy in Scottish HE around open education, and beyond, but it would be nice if this success were recognised and supported from outside of the Open Education community.

It seems you only get recognised at a political level if you claim to be able solve big problems: local and global inequalities, widening educational participation. Anyone who says Open Education will solve these inequalities is a charlatan, anyone who believes them is gullible. As Pete Cannell of OEPS said, open as in licensing content is not the whole answer (to widening participation) but it is important part of answer.

Open Education in Practice

More hopefully, there is a lot happening at grass roots level that is easy to overlook. Edinburgh University are leading the way,  with central support and a vision. As I saw, they are producing some fine OERs created by student interns.

A similar model for production is being used in my old workplace of Computer Science at Heriot-Watt University, but with less by way of strategic support. A small team of content interns, working under Lisa Scott, have been using open tools (WordPress, H5P, Lumen5) to create learning resources for the new Graduate Level Apprenticeship programme in Software Development. The actual course is closed, delivered in BlackBoard, but the resources are openly licensed and available to all (this not only allows the team to use CC:SA resources in their creation but saves the hassle of setting up access management to the collection).

Like Edinburgh, Glasgow Caledonian University has a policy for OER and a repository replete with resources, but the examples I found seemed locked for local use only. That’s not a criticism (and I may just have been unlucky in what I tried to view) because the important thing is that here is an example of open supporting the work of one of our Universities.

In Dundee, Natalie Lafferty runs a student selected component of the medical course on The Doctor as Digital Teacher for which students create a learning resource. Here’s an example of an iBook created by one student using original and openly licensed resources, and an account of its creation.


There are probably other examples from Scottish F&HE that I don’t know or have forgotten (sorry about that–but do use the comment box below to remedy this), but one of the key messages from the Promise of Open Education meeting was that Open Educational Practice is not just about Universities giving access to resources they create, valuable as that is.  There were great examples presented at the conference of OEPS working with Dyslexia Uk and Education Scotland, and working with Parkinson’s UK. And in the final discussion Lorna Campbell did a great job of highlighting the variety of open educational practice in Scotland, from Scotland’s three Wikimedians in residence and networks such as Girl Geek Scotland. And that really is just the tip of the iceberg.

The end?

So, in conclusion, this was not the end of open educational practices in Scotland. The future lies not just in continuing the legacy of one project, but in the ongoing efforts of a great diversity of effort. But you know what, it would be really nice if those efforts got the recognition and support from national policy makers.

[Acknowledgement: the feature image for this post, which you may see in Tweets etc,  is the conference pack for OEPS Promise of Open Education. Courtesy of OEPS project.]

The post The end of Open Educational Practices in Scotland appeared first on Sharing and learning.

Wikidata driven timeline⤴

from @ Sharing and learning

I have been to a couple of wikidata workshops recently, both involving Ewan McAndrew; between which I read Christine de Pizan‘s Book of the City of Ladies(*). Christine de Pizan is described as one of the first women in Europe to earn her living as a writer, which made me wonder what other female writers were around at that time (e.g. Julian of Norwich and, err…). So, at the second of these workshops, I took advantage of Ewan’s expertise, and the additional bonus of Navino Evans cofounder of Histropedia  also being there, to create a timeline of medieval European female writers.  (By the way, it’s interesting to compare this to Asian female writers–I was interested in Christina de Pizan and wanted to see how she fitted in with others who might have influenced her or attitudes to her, and so didn’t think that Chinese and Japanese writers fitted into the same timeline.)

Histropedia timeline of medieval female authors (click on image to go to interactive version)

This generated from a SPARQL query:

#Timeline of medieval european female writers
#defaultView:Timeline
SELECT ?person ?personLabel ?birth_date ?death_date ?country (SAMPLE(?image) AS ?image) WHERE {
  ?person wdt:P106 wd:Q36180; # find everything that is a writer
          wdt:P21 wd:Q6581072. # ...and a human female
  OPTIONAL{?person wdt:P2031 ?birth_date} # use florit if present for birth/death dates  
  OPTIONAL{?person wdt:P2032 ?death_date} # as some v impecise dates give odd results 
  ?person wdt:P570 ?death_date. # get their date of death
  OPTIONAL{?person wdt:P569 ?birth_date} # get their birth date if it is there
  ?person wdt:P27 ?country.   # get there country
  ?country wdt:P30  wd:Q46.   # we want country to be part of Europe
  FILTER (year(?death_date) < 1500) FILTER (year(?death_date) > 600)
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
  OPTIONAL { ?person wdt:P18 ?image. }
}
GROUP BY ?person ?personLabel ?birth_date ?death_date ?country
Limit 100

[run it on wikidata query service]

Reflections

I’m still trying to get my head around SPARQL, Ewan and Nav helped a lot, but I wouldn’t want to pass this off as exemplary SPARQL. In particular, I have no idea how to optimise SPARQL queries, and the way I get birth_date and death_date to be the start and end of when the writer flourished, if that data is there, seems a bit fragile.

It was necessary to to use florit dates because some of the imprecise birth & death dates lead to very odd timeline displays: born C12th . died C13th showed as being alive for 200 years.

There were other oddities in the wikidata. When I first tried, Julian of Norwich didn’t appear because she was a citizen of the Kingdom of England, which wasn’t listed as a country in Europe. Occitania, on the other hand was.  That was fixed. More difficult was a writer from Basra who was showing up because Basra was in the Umayyad Caliphate, which included Spain and so was classed as a European country. Deciding what we mean by European has never been easy.

Given the complexities of the data being represented, it’s no surprise that the Wikidata data model isn’t simple. In particular I found that dealing with qualifiers for properties was mind bending (especially with another query I tried to write).

Combining my novice level of SPARQL and the complexity of the Wikidata data model, I could definitely see the need for SPARQL tutorials that go beyond the simple “here’s how you find triple that matches a pattern” level.

Finally: histropedia is pretty cool.

Footnote:

The Book of the City of Ladies is a kind of women in red for Medieval Europe.  Rosalind Brown-Grant’s translation for Penguin Classics is very readable.

The post Wikidata driven timeline appeared first on Sharing and learning.

BTL Surpass for online assessment in Computer Science⤴

from @ Sharing and learning

Over the last couple of years I have been leading the introduction of BTL’s Surpass online assessment platform for  exams in Computer Science. I posted the requirements for an online exam system we agreed on a few months ago. I have now written up an evaluation case study: Use of BTL Surpass for online exams in Computer Science, an LTDI report (local copy). TL;DR: nothing is perfect, but Surpass did what we hoped, and it is planned to continue & expand its use.

My colleagues Hans-Wofgang has also presented on our experiences of “Enhancing the Learning Experience on Programming-focused Courses via Electronic Assessment Tools” at the Trends in Functional Programming in Education Conference, Canterbury, 19-21. This paper includes work by Sanusi Usman on using Surpass for formative assessment.

A question for online exams in computer science showing few lines of JAVA code with gaps for the student to complete.
A fill the blanks style question for online exams in computer coding. (Not from a real exam!)

The post BTL Surpass for online assessment in Computer Science appeared first on Sharing and learning.

Quick notes: Naomi Korn on copyright and educational resources⤴

from @ Sharing and learning

I gate-crashed a lecture on copyright that Naomi Korn gave at Edinburgh University. I’ve had an interest in copyright for as long as I have been working with open access and open educational resources, about ten years. I think I understand the basic concepts pretty well, but even so Naomi managed to catch a couple of misconceptions I held and also crystallised some ideas with well chosen examples.

hand drawn copyright symbol and word 'copyright' in cursive script.
from naomikorn.com

First, quick intro to Naomi. Naomi is a copyright consultant (but not a lawyer). I first met her through her work for UKOER, which I really liked because she gave us pragmatic advice that helped us release resources openly not just list of all the things we couldn’t do. Through that and other work Naomi & colleagues have created a set of really useful resources on copyright for OER (which are themselves openly licensed).

Naomi has also done some work with the Imperial War Museum from which she drew the story of Ethel Bilborough’s First World War diary. It’s there on her website so I won’t repeat here. The key lessons (to me) revolved around copyright existing from the moment of creation until 70 years after the author’s death; copyright is a property which can be inherited; ownership of the physical artifact does not necessarily mean ownership of the copyright; and composite works (the diary contained press cuttings and photos) creating more complex problems with several rights holders. All of these (and the last one especially) are relevant to modern teaching and learning resources.

In general copyright supports the copying and use of resources through permission from the  rights owner (a licence) and various copyright exceptions. However, sometimes it is necessary to fall back on a pragmatic approach of taking a reasonable risk, for example when the rights owner is not traceable.  Naomi described some interesting issues around the use of  copyright resources in teaching and learning. For example, there are exceptions to copyright for criticism, review or quotation and for teaching purposes. However these are limited in that such use must be fair dealing (I learnt this: that fair dealing/fair use is an additional limitation on an exception, not a type of exception). Fair dealing is undefined, and may not include putting materials online. Naomi described how easy it is for use of a resource under an exception to become an infringement in the context of modern teaching as the private space of teaching becomes more public. For example a resource used in lecture which is videoed, the video made public. All the more reason to be careful in the first place; all the more reason to use liberal licences such as creative commons, which are not limited to a specific scenario.

copyright pragmatics

All the way through her talk Naomi encouraged us to think about copyright in terms of being respectful of other people: giving the credit due to resource creators. She left left us with some key points of advice

  • make sure that you know the basics
  • make sure you know who can help you
  • ask when you’re not sure

fun fact

For copyright purposes, software is classed as a literary work.

 

 

The post Quick notes: Naomi Korn on copyright and educational resources appeared first on Sharing and learning.