<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://docs.moodle.org/dev/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Bushido</id>
	<title>MoodleDocs - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://docs.moodle.org/dev/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Bushido"/>
	<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/Special:Contributions/Bushido"/>
	<updated>2026-08-13T16:40:42Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.5</generator>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=External_tool&amp;diff=44838</id>
		<title>External tool</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=External_tool&amp;diff=44838"/>
		<updated>2014-05-16T19:54:33Z</updated>

		<summary type="html">&lt;p&gt;Bushido: /* Addition to the add activities menu */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page documents the External tool plugin in Moodle and its features.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== LTI Source Plugins ==&lt;br /&gt;
&lt;br /&gt;
The External tool supports sub plugins that live under the &#039;&#039;mod/lti/source&#039;&#039; directory with the plugin type of &#039;&#039;ltisource&#039;&#039;.  The purpose of a LTI source plugin is to extend the functionality of the External Tool activity.&lt;br /&gt;
&lt;br /&gt;
The LTI source plugins support the following standard plugin features:&lt;br /&gt;
&lt;br /&gt;
* Language file: &#039;&#039;mod/lti/source/pluginname/lang/en/ltisource_pluginname.php&#039;&#039;&lt;br /&gt;
* [[Upgrade_API| Plugin upgrade API]] under the &#039;&#039;mod/lti/source/pluginname/db&#039;&#039; directory.&lt;br /&gt;
&lt;br /&gt;
=== Extending the LTI protocol ===&lt;br /&gt;
&lt;br /&gt;
The most powerful extension that the LTI source plugins can perform is to extend the LTI services provided by the External Tool activity.  All incoming requests are handled by &#039;&#039;mod/lti/service.php&#039;&#039; and all standard LTI requests are automatically handled.  But, if the request is non-standard, then a LTI source plugin can have an opportunity to handle the request.&lt;br /&gt;
&lt;br /&gt;
The request is routed to the LTI source plugin by using the message type.  For example, let&#039;s say this request was sent to the External Tool:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code xml&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;imsx_POXEnvelopeRequest xmlns=&amp;quot;http://www.imsglobal.org/services/ltiv1p1/xsd/imsoms_v1p0&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;imsx_POXHeader&amp;gt;&lt;br /&gt;
        &amp;lt;imsx_POXRequestHeaderInfo&amp;gt;&lt;br /&gt;
            &amp;lt;imsx_version&amp;gt;V1.0&amp;lt;/imsx_version&amp;gt;&lt;br /&gt;
            &amp;lt;imsx_messageIdentifier&amp;gt;999998123&amp;lt;/imsx_messageIdentifier&amp;gt;&lt;br /&gt;
        &amp;lt;/imsx_POXRequestHeaderInfo&amp;gt;&lt;br /&gt;
    &amp;lt;/imsx_POXHeader&amp;gt;&lt;br /&gt;
    &amp;lt;imsx_POXBody&amp;gt;&lt;br /&gt;
        &amp;lt;myCustomRequest&amp;gt;&amp;lt;!-- LOOK HERE! --&amp;gt;&lt;br /&gt;
            &amp;lt;myRecord&amp;gt;&amp;lt;!-- This can be named whatever you want --&amp;gt;&lt;br /&gt;
                &amp;lt;sourcedGUID&amp;gt;&lt;br /&gt;
                    &amp;lt;sourcedId&amp;gt;3124567&amp;lt;/sourcedId&amp;gt;&lt;br /&gt;
                &amp;lt;/sourcedGUID&amp;gt;&lt;br /&gt;
                &amp;lt;!-- You custom data in XML format --&amp;gt;&lt;br /&gt;
            &amp;lt;/myRecord&amp;gt;&lt;br /&gt;
        &amp;lt;/myCustomRequest&amp;gt;&lt;br /&gt;
    &amp;lt;/imsx_POXBody&amp;gt;&lt;br /&gt;
&amp;lt;/imsx_POXEnvelopeRequest&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above request, the message type is &#039;&#039;&#039;myCustomRequest&#039;&#039;&#039;.  Since this is not a standard request, a LTI source plugin can handle it.  We can do this by adding a LTI source plugin and for this example, we will call it &#039;&#039;widget&#039;&#039;.  Then, in our &#039;&#039;ltisource_widget&#039;&#039; plugin, we must define a specific function In order to handle the request.  The function name takes on the form of &#039;&#039;&#039;component&#039;&#039;&#039;_&#039;&#039;&#039;messageType&#039;&#039;&#039;.  So, for our above request example we would create &#039;&#039;mod/lti/source/widget/lib.php&#039;&#039; and add this function to the file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
/**&lt;br /&gt;
 * Handle a custom widget request.&lt;br /&gt;
 *&lt;br /&gt;
 * @param object $data The LTI request details&lt;br /&gt;
 */&lt;br /&gt;
function ltisource_widget_myCustomRequest($data) {&lt;br /&gt;
    $data-&amp;gt;body;         // The raw LTI request XML body.&lt;br /&gt;
    $data-&amp;gt;xml;          // A SimpleXMLElement of the XML body.&lt;br /&gt;
    $data-&amp;gt;messageid;    // The value of the &amp;lt;imsx_messageIdentifier&amp;gt; element in the request.&lt;br /&gt;
    $data-&amp;gt;messagetype;  // The message type.&lt;br /&gt;
    $data-&amp;gt;consumerkey;  // OAuth consumer key.&lt;br /&gt;
    $data-&amp;gt;sharedsecret; // The shared secret used to verify the request body.&lt;br /&gt;
&lt;br /&gt;
    // Do your custom work here.&lt;br /&gt;
&lt;br /&gt;
    // Throw exceptions on error, they will be sent back appropriately.&lt;br /&gt;
&lt;br /&gt;
    // When done, echo out your response XML.&lt;br /&gt;
    $responsexml = lti_get_response_xml(&lt;br /&gt;
        &#039;success&#039;,&lt;br /&gt;
        &#039;Widget handled&#039;,&lt;br /&gt;
        $data-&amp;gt;messageid,&lt;br /&gt;
        $data-&amp;gt;messagetype&lt;br /&gt;
    );&lt;br /&gt;
&lt;br /&gt;
    echo $responsexml-&amp;gt;asXML();&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Word of warning:&#039;&#039;&#039; If more than one LTI source plugins implement a function for handling the &#039;&#039;myCustomRequest&#039;&#039; message, then an exception will be thrown.  So, when coming up with names for your message types, try to keep them unique and perhaps prefix them with something unique about your service.&lt;br /&gt;
&lt;br /&gt;
And that&#039;s about it!  With this extension point, you can build deep integrations with external services all while communicating through the LTI protocol.&lt;br /&gt;
&lt;br /&gt;
=== Addition to the add activities menu ===&lt;br /&gt;
&lt;br /&gt;
Overall, the following has a narrow use case, but it might be expanded in the future.&lt;br /&gt;
&lt;br /&gt;
A LTI source plugin can add itself to the add activities menu by implementing a &#039;&#039;&#039;component&#039;&#039;&#039;_get_types function in its lib.php file.  So, for example, if our LTI source plugin was &#039;&#039;widget&#039;&#039;, then in &#039;&#039;mod/lti/source/widget/lib.php&#039;&#039; we would add the following function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
function ltisource_widget_get_types() {&lt;br /&gt;
    $types   = array();&lt;br /&gt;
    $types[] = (object) array(&lt;br /&gt;
        &#039;modclass&#039; =&amp;gt; MOD_CLASS_ACTIVITY,&lt;br /&gt;
        &#039;type&#039;     =&amp;gt; &#039;lti&amp;amp;amp;type=widget&#039;,&lt;br /&gt;
        &#039;typestr&#039;  =&amp;gt; get_string(&#039;addwidget&#039;, &#039;ltisource_widget&#039;),&lt;br /&gt;
        &#039;help&#039;     =&amp;gt; get_string(&#039;addwidget_help&#039;, &#039;ltisource_widget&#039;),&lt;br /&gt;
    );&lt;br /&gt;
    return $types;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
But, this on its own doesn&#039;t actually do much at the moment.  You must also add another callback that gets called from the External Tool add instance form.  The callback takes on the form of &#039;&#039;&#039;component&#039;&#039;&#039;_add_instance_hook.  So, also add this function to &#039;&#039;mod/lti/source/widget/lib.php&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
function ltisource_widget_add_instance_hook() {&lt;br /&gt;
    // Do custom work here.&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At this point, the most common use case is to redirect to an external site to browse &#039;&#039;widget-like&#039;&#039; content.  Then the &#039;&#039;&#039;Extending the LTI protocol&#039;&#039;&#039; section can be used to create &#039;&#039;widget-like&#039;&#039; content in Moodle.&lt;/div&gt;</summary>
		<author><name>Bushido</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=External_tool&amp;diff=44837</id>
		<title>External tool</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=External_tool&amp;diff=44837"/>
		<updated>2014-05-16T18:55:56Z</updated>

		<summary type="html">&lt;p&gt;Bushido: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page documents the External tool plugin in Moodle and its features.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== LTI Source Plugins ==&lt;br /&gt;
&lt;br /&gt;
The External tool supports sub plugins that live under the &#039;&#039;mod/lti/source&#039;&#039; directory with the plugin type of &#039;&#039;ltisource&#039;&#039;.  The purpose of a LTI source plugin is to extend the functionality of the External Tool activity.&lt;br /&gt;
&lt;br /&gt;
The LTI source plugins support the following standard plugin features:&lt;br /&gt;
&lt;br /&gt;
* Language file: &#039;&#039;mod/lti/source/pluginname/lang/en/ltisource_pluginname.php&#039;&#039;&lt;br /&gt;
* [[Upgrade_API| Plugin upgrade API]] under the &#039;&#039;mod/lti/source/pluginname/db&#039;&#039; directory.&lt;br /&gt;
&lt;br /&gt;
=== Extending the LTI protocol ===&lt;br /&gt;
&lt;br /&gt;
The most powerful extension that the LTI source plugins can perform is to extend the LTI services provided by the External Tool activity.  All incoming requests are handled by &#039;&#039;mod/lti/service.php&#039;&#039; and all standard LTI requests are automatically handled.  But, if the request is non-standard, then a LTI source plugin can have an opportunity to handle the request.&lt;br /&gt;
&lt;br /&gt;
The request is routed to the LTI source plugin by using the message type.  For example, let&#039;s say this request was sent to the External Tool:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code xml&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;imsx_POXEnvelopeRequest xmlns=&amp;quot;http://www.imsglobal.org/services/ltiv1p1/xsd/imsoms_v1p0&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;imsx_POXHeader&amp;gt;&lt;br /&gt;
        &amp;lt;imsx_POXRequestHeaderInfo&amp;gt;&lt;br /&gt;
            &amp;lt;imsx_version&amp;gt;V1.0&amp;lt;/imsx_version&amp;gt;&lt;br /&gt;
            &amp;lt;imsx_messageIdentifier&amp;gt;999998123&amp;lt;/imsx_messageIdentifier&amp;gt;&lt;br /&gt;
        &amp;lt;/imsx_POXRequestHeaderInfo&amp;gt;&lt;br /&gt;
    &amp;lt;/imsx_POXHeader&amp;gt;&lt;br /&gt;
    &amp;lt;imsx_POXBody&amp;gt;&lt;br /&gt;
        &amp;lt;myCustomRequest&amp;gt;&amp;lt;!-- LOOK HERE! --&amp;gt;&lt;br /&gt;
            &amp;lt;myRecord&amp;gt;&amp;lt;!-- This can be named whatever you want --&amp;gt;&lt;br /&gt;
                &amp;lt;sourcedGUID&amp;gt;&lt;br /&gt;
                    &amp;lt;sourcedId&amp;gt;3124567&amp;lt;/sourcedId&amp;gt;&lt;br /&gt;
                &amp;lt;/sourcedGUID&amp;gt;&lt;br /&gt;
                &amp;lt;!-- You custom data in XML format --&amp;gt;&lt;br /&gt;
            &amp;lt;/myRecord&amp;gt;&lt;br /&gt;
        &amp;lt;/myCustomRequest&amp;gt;&lt;br /&gt;
    &amp;lt;/imsx_POXBody&amp;gt;&lt;br /&gt;
&amp;lt;/imsx_POXEnvelopeRequest&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above request, the message type is &#039;&#039;&#039;myCustomRequest&#039;&#039;&#039;.  Since this is not a standard request, a LTI source plugin can handle it.  We can do this by adding a LTI source plugin and for this example, we will call it &#039;&#039;widget&#039;&#039;.  Then, in our &#039;&#039;ltisource_widget&#039;&#039; plugin, we must define a specific function In order to handle the request.  The function name takes on the form of &#039;&#039;&#039;component&#039;&#039;&#039;_&#039;&#039;&#039;messageType&#039;&#039;&#039;.  So, for our above request example we would create &#039;&#039;mod/lti/source/widget/lib.php&#039;&#039; and add this function to the file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
/**&lt;br /&gt;
 * Handle a custom widget request.&lt;br /&gt;
 *&lt;br /&gt;
 * @param object $data The LTI request details&lt;br /&gt;
 */&lt;br /&gt;
function ltisource_widget_myCustomRequest($data) {&lt;br /&gt;
    $data-&amp;gt;body;         // The raw LTI request XML body.&lt;br /&gt;
    $data-&amp;gt;xml;          // A SimpleXMLElement of the XML body.&lt;br /&gt;
    $data-&amp;gt;messageid;    // The value of the &amp;lt;imsx_messageIdentifier&amp;gt; element in the request.&lt;br /&gt;
    $data-&amp;gt;messagetype;  // The message type.&lt;br /&gt;
    $data-&amp;gt;consumerkey;  // OAuth consumer key.&lt;br /&gt;
    $data-&amp;gt;sharedsecret; // The shared secret used to verify the request body.&lt;br /&gt;
&lt;br /&gt;
    // Do your custom work here.&lt;br /&gt;
&lt;br /&gt;
    // Throw exceptions on error, they will be sent back appropriately.&lt;br /&gt;
&lt;br /&gt;
    // When done, echo out your response XML.&lt;br /&gt;
    $responsexml = lti_get_response_xml(&lt;br /&gt;
        &#039;success&#039;,&lt;br /&gt;
        &#039;Widget handled&#039;,&lt;br /&gt;
        $data-&amp;gt;messageid,&lt;br /&gt;
        $data-&amp;gt;messagetype&lt;br /&gt;
    );&lt;br /&gt;
&lt;br /&gt;
    echo $responsexml-&amp;gt;asXML();&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Word of warning:&#039;&#039;&#039; If more than one LTI source plugins implement a function for handling the &#039;&#039;myCustomRequest&#039;&#039; message, then an exception will be thrown.  So, when coming up with names for your message types, try to keep them unique and perhaps prefix them with something unique about your service.&lt;br /&gt;
&lt;br /&gt;
And that&#039;s about it!  With this extension point, you can build deep integrations with external services all while communicating through the LTI protocol.&lt;br /&gt;
&lt;br /&gt;
=== Addition to the add activities menu ===&lt;br /&gt;
&lt;br /&gt;
Overall, the following has a narrow use case, but it might be expanded in the future.&lt;br /&gt;
&lt;br /&gt;
A LTI source plugin can add itself to the add activities menu by implementing a &#039;&#039;&#039;component&#039;&#039;&#039;_get_types function in its lib.php file.  So, for example, if our LTI source plugin was &#039;&#039;widget&#039;&#039;, then in &#039;&#039;mod/lti/source/widget/lib.php&#039;&#039; we would add the following function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
function ltisource_widget_get_types() {&lt;br /&gt;
    $types   = array();&lt;br /&gt;
    $types[] = (object) array(&lt;br /&gt;
        &#039;modclass&#039; =&amp;gt; MOD_CLASS_ACTIVITY,&lt;br /&gt;
        &#039;type&#039;     =&amp;gt; &#039;lti&amp;amp;amp;type=widget&#039;,&lt;br /&gt;
        &#039;typestr&#039;  =&amp;gt; get_string(&#039;addwidget&#039;, &#039;ltisource_widget&#039;),&lt;br /&gt;
        &#039;help&#039;     =&amp;gt; get_string(&#039;addwidget_help&#039;, &#039;ltisource_widget&#039;),&lt;br /&gt;
    );&lt;br /&gt;
    return $types;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
But, this on its own doesn&#039;t actually do much at the moment.  You must also add another callback that gets called from the External Tool add instance form.  The callback takes on the form of &#039;&#039;&#039;component&#039;&#039;&#039;_add_instance_hook.  So, also add this function to &#039;&#039;mod/lti/source/widget/lib.php&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
function ltisource_widget_add_instance_hook() {&lt;br /&gt;
    // Do custom work here.&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At this point, the most common use case is to redirect to an external site to browse &#039;&#039;widget&#039;&#039; like content.  Then the &#039;&#039;&#039;Extending the LTI protocol&#039;&#039;&#039; section can be used to create &#039;&#039;widget&#039;&#039; content in Moodle.&lt;/div&gt;</summary>
		<author><name>Bushido</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=External_tool&amp;diff=44836</id>
		<title>External tool</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=External_tool&amp;diff=44836"/>
		<updated>2014-05-16T18:52:58Z</updated>

		<summary type="html">&lt;p&gt;Bushido: /* LTI Source Plugins */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page documents the External tool plugin in Moodle and its features.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== LTI Source Plugins ==&lt;br /&gt;
&lt;br /&gt;
The External tool supports sub plugins that live under the &#039;&#039;mod/lti/source&#039;&#039; directory with the plugin type of &#039;&#039;ltisource&#039;&#039;.  The purpose of a LTI source plugin is to extend the functionality of the External Tool activity.&lt;br /&gt;
&lt;br /&gt;
The LTI source plugins support the following standard plugin features:&lt;br /&gt;
&lt;br /&gt;
* Language file: &#039;&#039;mod/lti/source/pluginname/lang/en/ltisource_pluginname.php&#039;&#039;&lt;br /&gt;
* [[Upgrade_API| Plugin upgrade API]] under the &#039;&#039;mod/lti/source/pluginname/db&#039;&#039; directory.&lt;br /&gt;
&lt;br /&gt;
=== Extending the LTI protocol ===&lt;br /&gt;
&lt;br /&gt;
The most powerful extension that the LTI source plugins can perform is to extend the LTI services provided by the External Tool activity.  All incoming requests are handled by &#039;&#039;mod/lti/service.php&#039;&#039; and all standard LTI requests are automatically handled.  But, if the request is non-standard, then a LTI source plugin can have an opportunity to handle the request.&lt;br /&gt;
&lt;br /&gt;
The request is routed to the LTI source plugin by using the message type.  For example, let&#039;s say this request was sent to the External Tool:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code xml&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;imsx_POXEnvelopeRequest xmlns=&amp;quot;http://www.imsglobal.org/services/ltiv1p1/xsd/imsoms_v1p0&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;imsx_POXHeader&amp;gt;&lt;br /&gt;
        &amp;lt;imsx_POXRequestHeaderInfo&amp;gt;&lt;br /&gt;
            &amp;lt;imsx_version&amp;gt;V1.0&amp;lt;/imsx_version&amp;gt;&lt;br /&gt;
            &amp;lt;imsx_messageIdentifier&amp;gt;999998123&amp;lt;/imsx_messageIdentifier&amp;gt;&lt;br /&gt;
        &amp;lt;/imsx_POXRequestHeaderInfo&amp;gt;&lt;br /&gt;
    &amp;lt;/imsx_POXHeader&amp;gt;&lt;br /&gt;
    &amp;lt;imsx_POXBody&amp;gt;&lt;br /&gt;
        &amp;lt;widgetCustomRequest&amp;gt;&amp;lt;!-- LOOK HERE! --&amp;gt;&lt;br /&gt;
            &amp;lt;widgetRecord&amp;gt;&amp;lt;!-- This can be named whatever you want --&amp;gt;&lt;br /&gt;
                &amp;lt;sourcedGUID&amp;gt;&lt;br /&gt;
                    &amp;lt;sourcedId&amp;gt;3124567&amp;lt;/sourcedId&amp;gt;&lt;br /&gt;
                &amp;lt;/sourcedGUID&amp;gt;&lt;br /&gt;
                &amp;lt;!-- You custom data in XML format --&amp;gt;&lt;br /&gt;
            &amp;lt;/widgetRecord&amp;gt;&lt;br /&gt;
        &amp;lt;/widgetCustomRequest&amp;gt;&lt;br /&gt;
    &amp;lt;/imsx_POXBody&amp;gt;&lt;br /&gt;
&amp;lt;/imsx_POXEnvelopeRequest&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above request, the message type is &#039;&#039;&#039;widgetCustomRequest&#039;&#039;&#039;.  Since this is not a standard request, a LTI source plugin can handle it.  We can do this by adding a LTI source plugin and for this example, we will call it &#039;&#039;widget&#039;&#039;.  Then, in our &#039;&#039;ltisource_widget&#039;&#039; plugin, we must define a specific function In order to handle the request.  The function name takes on the form of &#039;&#039;&#039;component&#039;&#039;&#039;_&#039;&#039;&#039;messageType&#039;&#039;&#039;.  So, for our above request example we would create &#039;&#039;mod/lti/source/widget/lib.php&#039;&#039; and add this function to the file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
/**&lt;br /&gt;
 * Handle a custom widget request.&lt;br /&gt;
 *&lt;br /&gt;
 * @param object $data The LTI request details&lt;br /&gt;
 */&lt;br /&gt;
function ltisource_widget_widgetCustomRequest($data) {&lt;br /&gt;
    $data-&amp;gt;body;         // The raw LTI request XML body.&lt;br /&gt;
    $data-&amp;gt;xml;          // A SimpleXMLElement of the XML body.&lt;br /&gt;
    $data-&amp;gt;messageid;    // The value of the &amp;lt;imsx_messageIdentifier&amp;gt; element in the request.&lt;br /&gt;
    $data-&amp;gt;messagetype;  // The message type.&lt;br /&gt;
    $data-&amp;gt;consumerkey;  // OAuth consumer key.&lt;br /&gt;
    $data-&amp;gt;sharedsecret; // The shared secret used to verify the request body.&lt;br /&gt;
&lt;br /&gt;
    // Do your custom work here.&lt;br /&gt;
&lt;br /&gt;
    // Throw exceptions on error, they will be sent back appropriately.&lt;br /&gt;
&lt;br /&gt;
    // When done, echo out your response XML.&lt;br /&gt;
    $responsexml = lti_get_response_xml(&lt;br /&gt;
        &#039;success&#039;,&lt;br /&gt;
        &#039;Widget handled&#039;,&lt;br /&gt;
        $data-&amp;gt;messageid,&lt;br /&gt;
        $data-&amp;gt;messagetype&lt;br /&gt;
    );&lt;br /&gt;
&lt;br /&gt;
    echo $responsexml-&amp;gt;asXML();&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Word of warning:&#039;&#039;&#039; If more than one LTI source plugins implement a function for handling the &#039;&#039;widgetCustomRequest&#039;&#039; message, then an exception will be thrown.  So, when coming up with names for your message types, try to keep them unique and perhaps prefix them with something unique about your service.&lt;br /&gt;
&lt;br /&gt;
And that&#039;s about it!  With this extension point, you can build deep integrations with external services all while communicating through the LTI protocol.&lt;br /&gt;
&lt;br /&gt;
=== Addition to the add activities menu ===&lt;br /&gt;
&lt;br /&gt;
Overall, the following has a narrow use case, but it might be expanded in the future.&lt;br /&gt;
&lt;br /&gt;
A LTI source plugin can add itself to the add activities menu by implementing a &#039;&#039;&#039;component&#039;&#039;&#039;_get_types function in its lib.php file.  So, for example, if our LTI source plugin was &#039;&#039;widget&#039;&#039;, then in &#039;&#039;mod/lti/source/widget/lib.php&#039;&#039; we would add the following function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
function ltisource_widget_get_types() {&lt;br /&gt;
    $types   = array();&lt;br /&gt;
    $types[] = (object) array(&lt;br /&gt;
        &#039;modclass&#039; =&amp;gt; MOD_CLASS_ACTIVITY,&lt;br /&gt;
        &#039;type&#039;     =&amp;gt; &#039;lti&amp;amp;amp;type=widget&#039;,&lt;br /&gt;
        &#039;typestr&#039;  =&amp;gt; get_string(&#039;addwidget&#039;, &#039;ltisource_widget&#039;),&lt;br /&gt;
        &#039;help&#039;     =&amp;gt; get_string(&#039;addwidget_help&#039;, &#039;ltisource_widget&#039;),&lt;br /&gt;
    );&lt;br /&gt;
    return $types;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
But, this on its own doesn&#039;t actually do much at the moment.  You must also add another callback that gets called from the External Tool add instance form.  The callback takes on the form of &#039;&#039;&#039;component&#039;&#039;&#039;_add_instance_hook.  So, also add this function to &#039;&#039;mod/lti/source/widget/lib.php&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
function ltisource_widget_add_instance_hook() {&lt;br /&gt;
    // Do custom work here.&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At this point, the most common use case is to redirect to an external site to browse &#039;&#039;widget&#039;&#039; like content.  Then the &#039;&#039;&#039;Extending the LTI protocol&#039;&#039;&#039; section can be used to create &#039;&#039;widget&#039;&#039; content in Moodle.&lt;/div&gt;</summary>
		<author><name>Bushido</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=External_tool&amp;diff=44835</id>
		<title>External tool</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=External_tool&amp;diff=44835"/>
		<updated>2014-05-16T17:59:36Z</updated>

		<summary type="html">&lt;p&gt;Bushido: /* Addition to the add activities menu */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page documents the External tool plugin in Moodle and its features.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== LTI Source Plugins ==&lt;br /&gt;
&lt;br /&gt;
The External tool supports sub plugins that live under the &#039;&#039;mod/lti/source&#039;&#039; directory with the plugin type of &#039;&#039;ltisource&#039;&#039;.  The purpose of a LTI source plugin is to extend the functionality of the External Tool activity.  Those extensions are discussed below.&lt;br /&gt;
&lt;br /&gt;
=== Extending the LTI protocol ===&lt;br /&gt;
&lt;br /&gt;
The most powerful extension that the LTI source plugins can perform is to extend the LTI services provided by the External Tool activity.  All incoming requests are handled by &#039;&#039;mod/lti/service.php&#039;&#039; and all standard LTI requests are automatically handled.  But, if the request is non-standard, then a LTI source plugin can have an opportunity to handle the request.&lt;br /&gt;
&lt;br /&gt;
The request is routed to the LTI source plugin by using the message type.  For example, let&#039;s say this request was sent to the External Tool:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code xml&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;imsx_POXEnvelopeRequest xmlns=&amp;quot;http://www.imsglobal.org/services/ltiv1p1/xsd/imsoms_v1p0&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;imsx_POXHeader&amp;gt;&lt;br /&gt;
        &amp;lt;imsx_POXRequestHeaderInfo&amp;gt;&lt;br /&gt;
            &amp;lt;imsx_version&amp;gt;V1.0&amp;lt;/imsx_version&amp;gt;&lt;br /&gt;
            &amp;lt;imsx_messageIdentifier&amp;gt;999998123&amp;lt;/imsx_messageIdentifier&amp;gt;&lt;br /&gt;
        &amp;lt;/imsx_POXRequestHeaderInfo&amp;gt;&lt;br /&gt;
    &amp;lt;/imsx_POXHeader&amp;gt;&lt;br /&gt;
    &amp;lt;imsx_POXBody&amp;gt;&lt;br /&gt;
        &amp;lt;widgetCustomRequest&amp;gt;&amp;lt;!-- LOOK HERE! --&amp;gt;&lt;br /&gt;
            &amp;lt;widgetRecord&amp;gt;&amp;lt;!-- This can be named whatever you want --&amp;gt;&lt;br /&gt;
                &amp;lt;sourcedGUID&amp;gt;&lt;br /&gt;
                    &amp;lt;sourcedId&amp;gt;3124567&amp;lt;/sourcedId&amp;gt;&lt;br /&gt;
                &amp;lt;/sourcedGUID&amp;gt;&lt;br /&gt;
                &amp;lt;!-- You custom data in XML format --&amp;gt;&lt;br /&gt;
            &amp;lt;/widgetRecord&amp;gt;&lt;br /&gt;
        &amp;lt;/widgetCustomRequest&amp;gt;&lt;br /&gt;
    &amp;lt;/imsx_POXBody&amp;gt;&lt;br /&gt;
&amp;lt;/imsx_POXEnvelopeRequest&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above request, the message type is &#039;&#039;&#039;widgetCustomRequest&#039;&#039;&#039;.  Since this is not a standard request, a LTI source plugin can handle it.  We can do this by adding a LTI source plugin and for this example, we will call it &#039;&#039;widget&#039;&#039;.  Then, in our &#039;&#039;ltisource_widget&#039;&#039; plugin, we must define a specific function In order to handle the request.  The function name takes on the form of &#039;&#039;&#039;component&#039;&#039;&#039;_&#039;&#039;&#039;messageType&#039;&#039;&#039;.  So, for our above request example we would create &#039;&#039;mod/lti/source/widget/lib.php&#039;&#039; and add this function to the file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
/**&lt;br /&gt;
 * Handle a custom widget request.&lt;br /&gt;
 *&lt;br /&gt;
 * @param object $data The LTI request details&lt;br /&gt;
 */&lt;br /&gt;
function ltisource_widget_widgetCustomRequest($data) {&lt;br /&gt;
    $data-&amp;gt;body;         // The raw LTI request XML body.&lt;br /&gt;
    $data-&amp;gt;xml;          // A SimpleXMLElement of the XML body.&lt;br /&gt;
    $data-&amp;gt;messageid;    // The value of the &amp;lt;imsx_messageIdentifier&amp;gt; element in the request.&lt;br /&gt;
    $data-&amp;gt;messagetype;  // The message type.&lt;br /&gt;
    $data-&amp;gt;consumerkey;  // OAuth consumer key.&lt;br /&gt;
    $data-&amp;gt;sharedsecret; // The shared secret used to verify the request body.&lt;br /&gt;
&lt;br /&gt;
    // Do your custom work here.&lt;br /&gt;
&lt;br /&gt;
    // Throw exceptions on error, they will be sent back appropriately.&lt;br /&gt;
&lt;br /&gt;
    // When done, echo out your response XML.&lt;br /&gt;
    $responsexml = lti_get_response_xml(&lt;br /&gt;
        &#039;success&#039;,&lt;br /&gt;
        &#039;Widget handled&#039;,&lt;br /&gt;
        $data-&amp;gt;messageid,&lt;br /&gt;
        $data-&amp;gt;messagetype&lt;br /&gt;
    );&lt;br /&gt;
&lt;br /&gt;
    echo $responsexml-&amp;gt;asXML();&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Word of warning:&#039;&#039;&#039; If more than one LTI source plugins implement a function for handling the &#039;&#039;widgetCustomRequest&#039;&#039; message, then an exception will be thrown.  So, when coming up with names for your message types, try to keep them unique and perhaps prefix them with something unique about your service.&lt;br /&gt;
&lt;br /&gt;
And that&#039;s about it!  With this extension point, you can build deep integrations with external services all while communicating through the LTI protocol.&lt;br /&gt;
&lt;br /&gt;
=== Addition to the add activities menu ===&lt;br /&gt;
&lt;br /&gt;
Overall, the following has a narrow use case, but it might be expanded in the future.&lt;br /&gt;
&lt;br /&gt;
A LTI source plugin can add itself to the add activities menu by implementing a &#039;&#039;&#039;component&#039;&#039;&#039;_get_types function in its lib.php file.  So, for example, if our LTI source plugin was &#039;&#039;widget&#039;&#039;, then in &#039;&#039;mod/lti/source/widget/lib.php&#039;&#039; we would add the following function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
function ltisource_widget_get_types() {&lt;br /&gt;
    $types   = array();&lt;br /&gt;
    $types[] = (object) array(&lt;br /&gt;
        &#039;modclass&#039; =&amp;gt; MOD_CLASS_ACTIVITY,&lt;br /&gt;
        &#039;type&#039;     =&amp;gt; &#039;lti&amp;amp;amp;type=widget&#039;,&lt;br /&gt;
        &#039;typestr&#039;  =&amp;gt; get_string(&#039;addwidget&#039;, &#039;ltisource_widget&#039;),&lt;br /&gt;
        &#039;help&#039;     =&amp;gt; get_string(&#039;addwidget_help&#039;, &#039;ltisource_widget&#039;),&lt;br /&gt;
    );&lt;br /&gt;
    return $types;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
But, this on its own doesn&#039;t actually do much at the moment.  You must also add another callback that gets called from the External Tool add instance form.  The callback takes on the form of &#039;&#039;&#039;component&#039;&#039;&#039;_add_instance_hook.  So, also add this function to &#039;&#039;mod/lti/source/widget/lib.php&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
function ltisource_widget_add_instance_hook() {&lt;br /&gt;
    // Do custom work here.&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At this point, the most common use case is to redirect to an external site to browse &#039;&#039;widget&#039;&#039; like content.  Then the &#039;&#039;&#039;Extending the LTI protocol&#039;&#039;&#039; section can be used to create &#039;&#039;widget&#039;&#039; content in Moodle.&lt;/div&gt;</summary>
		<author><name>Bushido</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=External_tool&amp;diff=44834</id>
		<title>External tool</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=External_tool&amp;diff=44834"/>
		<updated>2014-05-16T17:45:16Z</updated>

		<summary type="html">&lt;p&gt;Bushido: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page documents the External tool plugin in Moodle and its features.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== LTI Source Plugins ==&lt;br /&gt;
&lt;br /&gt;
The External tool supports sub plugins that live under the &#039;&#039;mod/lti/source&#039;&#039; directory with the plugin type of &#039;&#039;ltisource&#039;&#039;.  The purpose of a LTI source plugin is to extend the functionality of the External Tool activity.  Those extensions are discussed below.&lt;br /&gt;
&lt;br /&gt;
=== Extending the LTI protocol ===&lt;br /&gt;
&lt;br /&gt;
The most powerful extension that the LTI source plugins can perform is to extend the LTI services provided by the External Tool activity.  All incoming requests are handled by &#039;&#039;mod/lti/service.php&#039;&#039; and all standard LTI requests are automatically handled.  But, if the request is non-standard, then a LTI source plugin can have an opportunity to handle the request.&lt;br /&gt;
&lt;br /&gt;
The request is routed to the LTI source plugin by using the message type.  For example, let&#039;s say this request was sent to the External Tool:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code xml&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;imsx_POXEnvelopeRequest xmlns=&amp;quot;http://www.imsglobal.org/services/ltiv1p1/xsd/imsoms_v1p0&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;imsx_POXHeader&amp;gt;&lt;br /&gt;
        &amp;lt;imsx_POXRequestHeaderInfo&amp;gt;&lt;br /&gt;
            &amp;lt;imsx_version&amp;gt;V1.0&amp;lt;/imsx_version&amp;gt;&lt;br /&gt;
            &amp;lt;imsx_messageIdentifier&amp;gt;999998123&amp;lt;/imsx_messageIdentifier&amp;gt;&lt;br /&gt;
        &amp;lt;/imsx_POXRequestHeaderInfo&amp;gt;&lt;br /&gt;
    &amp;lt;/imsx_POXHeader&amp;gt;&lt;br /&gt;
    &amp;lt;imsx_POXBody&amp;gt;&lt;br /&gt;
        &amp;lt;widgetCustomRequest&amp;gt;&amp;lt;!-- LOOK HERE! --&amp;gt;&lt;br /&gt;
            &amp;lt;widgetRecord&amp;gt;&amp;lt;!-- This can be named whatever you want --&amp;gt;&lt;br /&gt;
                &amp;lt;sourcedGUID&amp;gt;&lt;br /&gt;
                    &amp;lt;sourcedId&amp;gt;3124567&amp;lt;/sourcedId&amp;gt;&lt;br /&gt;
                &amp;lt;/sourcedGUID&amp;gt;&lt;br /&gt;
                &amp;lt;!-- You custom data in XML format --&amp;gt;&lt;br /&gt;
            &amp;lt;/widgetRecord&amp;gt;&lt;br /&gt;
        &amp;lt;/widgetCustomRequest&amp;gt;&lt;br /&gt;
    &amp;lt;/imsx_POXBody&amp;gt;&lt;br /&gt;
&amp;lt;/imsx_POXEnvelopeRequest&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above request, the message type is &#039;&#039;&#039;widgetCustomRequest&#039;&#039;&#039;.  Since this is not a standard request, a LTI source plugin can handle it.  We can do this by adding a LTI source plugin and for this example, we will call it &#039;&#039;widget&#039;&#039;.  Then, in our &#039;&#039;ltisource_widget&#039;&#039; plugin, we must define a specific function In order to handle the request.  The function name takes on the form of &#039;&#039;&#039;component&#039;&#039;&#039;_&#039;&#039;&#039;messageType&#039;&#039;&#039;.  So, for our above request example we would create &#039;&#039;mod/lti/source/widget/lib.php&#039;&#039; and add this function to the file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
/**&lt;br /&gt;
 * Handle a custom widget request.&lt;br /&gt;
 *&lt;br /&gt;
 * @param object $data The LTI request details&lt;br /&gt;
 */&lt;br /&gt;
function ltisource_widget_widgetCustomRequest($data) {&lt;br /&gt;
    $data-&amp;gt;body;         // The raw LTI request XML body.&lt;br /&gt;
    $data-&amp;gt;xml;          // A SimpleXMLElement of the XML body.&lt;br /&gt;
    $data-&amp;gt;messageid;    // The value of the &amp;lt;imsx_messageIdentifier&amp;gt; element in the request.&lt;br /&gt;
    $data-&amp;gt;messagetype;  // The message type.&lt;br /&gt;
    $data-&amp;gt;consumerkey;  // OAuth consumer key.&lt;br /&gt;
    $data-&amp;gt;sharedsecret; // The shared secret used to verify the request body.&lt;br /&gt;
&lt;br /&gt;
    // Do your custom work here.&lt;br /&gt;
&lt;br /&gt;
    // Throw exceptions on error, they will be sent back appropriately.&lt;br /&gt;
&lt;br /&gt;
    // When done, echo out your response XML.&lt;br /&gt;
    $responsexml = lti_get_response_xml(&lt;br /&gt;
        &#039;success&#039;,&lt;br /&gt;
        &#039;Widget handled&#039;,&lt;br /&gt;
        $data-&amp;gt;messageid,&lt;br /&gt;
        $data-&amp;gt;messagetype&lt;br /&gt;
    );&lt;br /&gt;
&lt;br /&gt;
    echo $responsexml-&amp;gt;asXML();&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Word of warning:&#039;&#039;&#039; If more than one LTI source plugins implement a function for handling the &#039;&#039;widgetCustomRequest&#039;&#039; message, then an exception will be thrown.  So, when coming up with names for your message types, try to keep them unique and perhaps prefix them with something unique about your service.&lt;br /&gt;
&lt;br /&gt;
And that&#039;s about it!  With this extension point, you can build deep integrations with external services all while communicating through the LTI protocol.&lt;br /&gt;
&lt;br /&gt;
=== Addition to the add activities menu ===&lt;br /&gt;
&lt;br /&gt;
Overall, the following has a narrow use case, but it might be expanded in the future.&lt;br /&gt;
&lt;br /&gt;
A LTI source plugin can add itself to the [[Course_homepage#Activities_and_resources|add activities menu]]&lt;/div&gt;</summary>
		<author><name>Bushido</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=External_tool&amp;diff=44833</id>
		<title>External tool</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=External_tool&amp;diff=44833"/>
		<updated>2014-05-16T17:38:56Z</updated>

		<summary type="html">&lt;p&gt;Bushido: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page documents the External tool plugin in Moodle and its features.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== LTI Source Plugins ==&lt;br /&gt;
&lt;br /&gt;
The External tool supports sub plugins that live under the &#039;&#039;mod/lti/source&#039;&#039; directory with the plugin type of &#039;&#039;ltisource&#039;&#039;.  The purpose of a LTI source plugin is to extend the functionality of the External Tool activity.  Those extensions are discussed below.&lt;br /&gt;
&lt;br /&gt;
=== Extending the LTI protocol ===&lt;br /&gt;
&lt;br /&gt;
The most powerful extension that the LTI source plugins can perform is to extend the LTI services provided by the External Tool activity.  All incoming requests are handled by &#039;&#039;mod/lti/service.php&#039;&#039; and all standard LTI requests are automatically handled.  But, if the request is non-standard, then a LTI source plugin can have an opportunity to handle the request.&lt;br /&gt;
&lt;br /&gt;
The request is routed to the LTI source plugin by using the message type.  For example, let&#039;s say this request was sent to the External Tool:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code xml&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;imsx_POXEnvelopeRequest xmlns=&amp;quot;http://www.imsglobal.org/services/ltiv1p1/xsd/imsoms_v1p0&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;imsx_POXHeader&amp;gt;&lt;br /&gt;
        &amp;lt;imsx_POXRequestHeaderInfo&amp;gt;&lt;br /&gt;
            &amp;lt;imsx_version&amp;gt;V1.0&amp;lt;/imsx_version&amp;gt;&lt;br /&gt;
            &amp;lt;imsx_messageIdentifier&amp;gt;999998123&amp;lt;/imsx_messageIdentifier&amp;gt;&lt;br /&gt;
        &amp;lt;/imsx_POXRequestHeaderInfo&amp;gt;&lt;br /&gt;
    &amp;lt;/imsx_POXHeader&amp;gt;&lt;br /&gt;
    &amp;lt;imsx_POXBody&amp;gt;&lt;br /&gt;
        &amp;lt;widgetCustomRequest&amp;gt;&amp;lt;!-- LOOK HERE! --&amp;gt;&lt;br /&gt;
            &amp;lt;widgetRecord&amp;gt;&amp;lt;!-- This can be named whatever you want --&amp;gt;&lt;br /&gt;
                &amp;lt;sourcedGUID&amp;gt;&lt;br /&gt;
                    &amp;lt;sourcedId&amp;gt;3124567&amp;lt;/sourcedId&amp;gt;&lt;br /&gt;
                &amp;lt;/sourcedGUID&amp;gt;&lt;br /&gt;
                &amp;lt;!-- You custom data in XML format --&amp;gt;&lt;br /&gt;
            &amp;lt;/widgetRecord&amp;gt;&lt;br /&gt;
        &amp;lt;/widgetCustomRequest&amp;gt;&lt;br /&gt;
    &amp;lt;/imsx_POXBody&amp;gt;&lt;br /&gt;
&amp;lt;/imsx_POXEnvelopeRequest&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above request, the message type is &#039;&#039;&#039;widgetCustomRequest&#039;&#039;&#039;.  Since this is not a standard request, a LTI source plugin can handle it.  We can do this by adding a LTI source plugin and for this example, we will call it &#039;&#039;widget&#039;&#039;.  Then, in our &#039;&#039;ltisource_widget&#039;&#039; plugin, we must define a specific function In order to handle the request.  The function name takes on the form of &#039;&#039;&#039;component&#039;&#039;&#039;_&#039;&#039;&#039;messageType&#039;&#039;&#039;.  So, for our above request example we would create &#039;&#039;mod/lti/source/widget/lib.php&#039;&#039; and add this function to the file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
/**&lt;br /&gt;
 * Handle a custom widget request.&lt;br /&gt;
 *&lt;br /&gt;
 * @param object $data The LTI request details&lt;br /&gt;
 */&lt;br /&gt;
function ltisource_widget_widgetCustomRequest($data) {&lt;br /&gt;
    $data-&amp;gt;body;         // The raw LTI request XML body.&lt;br /&gt;
    $data-&amp;gt;xml;          // A SimpleXMLElement of the XML body.&lt;br /&gt;
    $data-&amp;gt;messageid;    // The value of the &amp;lt;imsx_messageIdentifier&amp;gt; element in the request.&lt;br /&gt;
    $data-&amp;gt;messagetype;  // The message type.&lt;br /&gt;
    $data-&amp;gt;consumerkey;  // OAuth consumer key.&lt;br /&gt;
    $data-&amp;gt;sharedsecret; // The shared secret used to verify the request body.&lt;br /&gt;
&lt;br /&gt;
    // Do your custom work here.&lt;br /&gt;
&lt;br /&gt;
    // Throw exceptions on error, they will be sent back appropriately.&lt;br /&gt;
&lt;br /&gt;
    // When done, echo out your response XML.&lt;br /&gt;
    $responsexml = lti_get_response_xml(&lt;br /&gt;
        &#039;success&#039;,&lt;br /&gt;
        &#039;Widget handled&#039;,&lt;br /&gt;
        $data-&amp;gt;messageid,&lt;br /&gt;
        $data-&amp;gt;messagetype&lt;br /&gt;
    );&lt;br /&gt;
&lt;br /&gt;
    echo $responsexml-&amp;gt;asXML();&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Word of warning:&#039;&#039;&#039; If more than one LTI source plugins implement a function for handling the &#039;&#039;widgetCustomRequest&#039;&#039; message, then an exception will be thrown.  So, when coming up with names for your message types, try to keep them unique and perhaps prefix them with something unique about your service.&lt;br /&gt;
&lt;br /&gt;
And that&#039;s about it!  With this extension point, you can build deep integrations with external services all while communicating through the LTI protocol.&lt;/div&gt;</summary>
		<author><name>Bushido</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=External_tool&amp;diff=44832</id>
		<title>External tool</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=External_tool&amp;diff=44832"/>
		<updated>2014-05-16T17:23:29Z</updated>

		<summary type="html">&lt;p&gt;Bushido: /* Extending the LTI protocol */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page documents the External tool plugin in Moodle and its features.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== LTI Source Plugins ==&lt;br /&gt;
&lt;br /&gt;
The External tool supports sub plugins that live under the &#039;&#039;mod/lti/source&#039;&#039; directory with the plugin type of &#039;&#039;ltisource&#039;&#039;.  The purpose of a LTI source plugin is to extend the functionality of the External Tool activity.  Those extensions are discussed below.&lt;br /&gt;
&lt;br /&gt;
=== Extending the LTI protocol ===&lt;br /&gt;
&lt;br /&gt;
The most powerful extension that the LTI source plugins can perform is to extend the LTI services provided by the External Tool activity.  All incoming requests are handled by &#039;&#039;mod/lti/service.php&#039;&#039; and all standard LTI requests are automatically handled.  But, if the request is non-standard, then a LTI source plugin can have an opportunity to handle the request.&lt;br /&gt;
&lt;br /&gt;
The request is routed to the LTI source plugin by using the message type.  For example, let&#039;s say this request was sent to the External Tool:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code xml&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;imsx_POXEnvelopeRequest xmlns=&amp;quot;http://www.imsglobal.org/services/ltiv1p1/xsd/imsoms_v1p0&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;imsx_POXHeader&amp;gt;&lt;br /&gt;
        &amp;lt;imsx_POXRequestHeaderInfo&amp;gt;&lt;br /&gt;
            &amp;lt;imsx_version&amp;gt;V1.0&amp;lt;/imsx_version&amp;gt;&lt;br /&gt;
            &amp;lt;imsx_messageIdentifier&amp;gt;999998123&amp;lt;/imsx_messageIdentifier&amp;gt;&lt;br /&gt;
        &amp;lt;/imsx_POXRequestHeaderInfo&amp;gt;&lt;br /&gt;
    &amp;lt;/imsx_POXHeader&amp;gt;&lt;br /&gt;
    &amp;lt;imsx_POXBody&amp;gt;&lt;br /&gt;
        &amp;lt;widgetCustomRequest&amp;gt;&amp;lt;!-- LOOK HERE! --&amp;gt;&lt;br /&gt;
            &amp;lt;widgetRecord&amp;gt;&amp;lt;!-- This can be named whatever you want --&amp;gt;&lt;br /&gt;
                &amp;lt;sourcedGUID&amp;gt;&lt;br /&gt;
                    &amp;lt;sourcedId&amp;gt;3124567&amp;lt;/sourcedId&amp;gt;&lt;br /&gt;
                &amp;lt;/sourcedGUID&amp;gt;&lt;br /&gt;
                &amp;lt;!-- You custom data in XML format --&amp;gt;&lt;br /&gt;
            &amp;lt;/widgetRecord&amp;gt;&lt;br /&gt;
        &amp;lt;/widgetCustomRequest&amp;gt;&lt;br /&gt;
    &amp;lt;/imsx_POXBody&amp;gt;&lt;br /&gt;
&amp;lt;/imsx_POXEnvelopeRequest&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above request, the message type is &#039;&#039;&#039;widgetCustomRequest&#039;&#039;&#039;.  Since this is not a standard request, a LTI source plugin can handle it.  We can do this by adding a LTI source plugin and for this example, we will call it &#039;&#039;widget&#039;&#039;.  Then, in our &#039;&#039;ltisource_widget&#039;&#039; plugin, we must define a specific function In order to handle the request.  The function name takes on the form of &#039;&#039;&#039;component&#039;&#039;&#039;_&#039;&#039;&#039;messageType&#039;&#039;&#039;.  So, for our above request example we would create &#039;&#039;mod/lti/source/widget/lib.php&#039;&#039; and add this function to the file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
/**&lt;br /&gt;
 * Handle a custom widget request.&lt;br /&gt;
 *&lt;br /&gt;
 * @param object $data The LTI request details&lt;br /&gt;
 */&lt;br /&gt;
function ltisource_widget_widgetCustomRequest($data) {&lt;br /&gt;
    $data-&amp;gt;body;         // The raw LTI request XML body.&lt;br /&gt;
    $data-&amp;gt;xml;          // A SimpleXMLElement of the XML body.&lt;br /&gt;
    $data-&amp;gt;messageid;    // The value of the &amp;lt;imsx_messageIdentifier&amp;gt; element in the request.&lt;br /&gt;
    $data-&amp;gt;messagetype;  // The message type.&lt;br /&gt;
    $data-&amp;gt;consumerkey;  // OAuth consumer key.&lt;br /&gt;
    $data-&amp;gt;sharedsecret; // The shared secret used to verify the request body.&lt;br /&gt;
&lt;br /&gt;
    // Do your custom work here.&lt;br /&gt;
&lt;br /&gt;
    // Throw exceptions on error, they will be sent back appropriately.&lt;br /&gt;
&lt;br /&gt;
    // When done, echo out your response XML.&lt;br /&gt;
    $responsexml = lti_get_response_xml(&lt;br /&gt;
        &#039;success&#039;,&lt;br /&gt;
        &#039;Widget handled&#039;,&lt;br /&gt;
        $data-&amp;gt;messageid,&lt;br /&gt;
        $data-&amp;gt;messagetype&lt;br /&gt;
    );&lt;br /&gt;
&lt;br /&gt;
    echo $responsexml-&amp;gt;asXML();&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Bushido</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=External_tool&amp;diff=44831</id>
		<title>External tool</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=External_tool&amp;diff=44831"/>
		<updated>2014-05-16T17:16:21Z</updated>

		<summary type="html">&lt;p&gt;Bushido: /* LTI Source Plugins */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page documents the External tool plugin in Moodle and its features.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== LTI Source Plugins ==&lt;br /&gt;
&lt;br /&gt;
The External tool supports sub plugins that live under the &#039;&#039;mod/lti/source&#039;&#039; directory with the plugin type of &#039;&#039;ltisource&#039;&#039;.  The purpose of a LTI source plugin is to extend the functionality of the External Tool activity.  Those extensions are discussed below.&lt;br /&gt;
&lt;br /&gt;
=== Extending the LTI protocol ===&lt;br /&gt;
&lt;br /&gt;
The most powerful thing that the LTI source plugins can do is extend the LTI services provided by the External Tool activity.  All incoming requests are handled by &#039;&#039;mod/lti/service.php&#039;&#039; and all standard LTI requests are automatically handled.  But, if the request is not one of the standard LTI requests, then an LTI source plugin has an opportunity to handle the request.&lt;br /&gt;
&lt;br /&gt;
The request is routed to the LTI source plugin by using the message type.  For example, let&#039;s say this request was sent to the External Tool:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code xml&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;imsx_POXEnvelopeRequest xmlns=&amp;quot;http://www.imsglobal.org/services/ltiv1p1/xsd/imsoms_v1p0&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;imsx_POXHeader&amp;gt;&lt;br /&gt;
        &amp;lt;imsx_POXRequestHeaderInfo&amp;gt;&lt;br /&gt;
            &amp;lt;imsx_version&amp;gt;V1.0&amp;lt;/imsx_version&amp;gt;&lt;br /&gt;
            &amp;lt;imsx_messageIdentifier&amp;gt;999998123&amp;lt;/imsx_messageIdentifier&amp;gt;&lt;br /&gt;
        &amp;lt;/imsx_POXRequestHeaderInfo&amp;gt;&lt;br /&gt;
    &amp;lt;/imsx_POXHeader&amp;gt;&lt;br /&gt;
    &amp;lt;imsx_POXBody&amp;gt;&lt;br /&gt;
        &amp;lt;widgetCustomRequest&amp;gt;&amp;lt;!-- LOOK HERE! --&amp;gt;&lt;br /&gt;
            &amp;lt;widgetRecord&amp;gt;&amp;lt;!-- This can be named whatever you want --&amp;gt;&lt;br /&gt;
                &amp;lt;sourcedGUID&amp;gt;&lt;br /&gt;
                    &amp;lt;sourcedId&amp;gt;3124567&amp;lt;/sourcedId&amp;gt;&lt;br /&gt;
                &amp;lt;/sourcedGUID&amp;gt;&lt;br /&gt;
                &amp;lt;!-- You custom data in XML format --&amp;gt;&lt;br /&gt;
            &amp;lt;/widgetRecord&amp;gt;&lt;br /&gt;
        &amp;lt;/widgetCustomRequest&amp;gt;&lt;br /&gt;
    &amp;lt;/imsx_POXBody&amp;gt;&lt;br /&gt;
&amp;lt;/imsx_POXEnvelopeRequest&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above request, the message type is &#039;&#039;&#039;widgetCustomRequest&#039;&#039;&#039;.  Since this is not a standard request, a LTI source plugin can handle it.  We can do this by adding a LTI source plugin and for this example, we will call it &#039;&#039;widget&#039;&#039;.  In order to handle the request, we must make a function in our &#039;&#039;widget&#039;&#039; plugin to handle the request.  The function name takes on the form of &#039;&#039;&#039;component&#039;&#039;&#039;_&#039;&#039;&#039;messageType&#039;&#039;&#039;.  So, for our above example we would create &#039;&#039;mod/lti/source/widget/lib.php&#039;&#039; and add this to the file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
/**&lt;br /&gt;
 * Handle a custom widget request.&lt;br /&gt;
 *&lt;br /&gt;
 * @param object $data The LTI request details&lt;br /&gt;
 */&lt;br /&gt;
function ltisource_widget_widgetCustomRequest($data) {&lt;br /&gt;
    $data-&amp;gt;body;         // The raw LTI request XML body.&lt;br /&gt;
    $data-&amp;gt;xml;          // A SimpleXMLElement of the XML body.&lt;br /&gt;
    $data-&amp;gt;messageid;    // The value of the &amp;lt;imsx_messageIdentifier&amp;gt; element in the request.&lt;br /&gt;
    $data-&amp;gt;messagetype;  // The message type.&lt;br /&gt;
    $data-&amp;gt;consumerkey;  // OAuth consumer key.&lt;br /&gt;
    $data-&amp;gt;sharedsecret; // The shared secret used to verify the request body.&lt;br /&gt;
&lt;br /&gt;
    // Do your custom work here.&lt;br /&gt;
&lt;br /&gt;
    // Throw exceptions on error, they will be sent back appropriately.&lt;br /&gt;
&lt;br /&gt;
    // When done, echo out your response XML.&lt;br /&gt;
    $responsexml = lti_get_response_xml(&lt;br /&gt;
        &#039;success&#039;,&lt;br /&gt;
        &#039;Widget handled&#039;,&lt;br /&gt;
        $data-&amp;gt;messageid,&lt;br /&gt;
        $data-&amp;gt;messagetype&lt;br /&gt;
    );&lt;br /&gt;
&lt;br /&gt;
    echo $responsexml-&amp;gt;asXML();&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Bushido</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=External_tool&amp;diff=44830</id>
		<title>External tool</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=External_tool&amp;diff=44830"/>
		<updated>2014-05-16T17:15:32Z</updated>

		<summary type="html">&lt;p&gt;Bushido: /* LTI Source Plugins */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page documents the External tool plugin in Moodle and its features.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== LTI Source Plugins ==&lt;br /&gt;
&lt;br /&gt;
The External tool supports sub plugins that live under the &#039;&#039;mod/lti/source&#039;&#039; directory and the plugin type is &#039;&#039;ltisource&#039;&#039;.  The purpose of a LTI source plugin is to extend the functionality of the External Tool activity.  Those extensions are discussed below.&lt;br /&gt;
&lt;br /&gt;
=== Extending the LTI protocol ===&lt;br /&gt;
&lt;br /&gt;
The most powerful thing that the LTI source plugins can do is extend the LTI services provided by the External Tool activity.  All incoming requests are handled by &#039;&#039;mod/lti/service.php&#039;&#039; and all standard LTI requests are automatically handled.  But, if the request is not one of the standard LTI requests, then an LTI source plugin has an opportunity to handle the request.&lt;br /&gt;
&lt;br /&gt;
The request is routed to the LTI source plugin by using the message type.  For example, let&#039;s say this request was sent to the External Tool:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code xml&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;imsx_POXEnvelopeRequest xmlns=&amp;quot;http://www.imsglobal.org/services/ltiv1p1/xsd/imsoms_v1p0&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;imsx_POXHeader&amp;gt;&lt;br /&gt;
        &amp;lt;imsx_POXRequestHeaderInfo&amp;gt;&lt;br /&gt;
            &amp;lt;imsx_version&amp;gt;V1.0&amp;lt;/imsx_version&amp;gt;&lt;br /&gt;
            &amp;lt;imsx_messageIdentifier&amp;gt;999998123&amp;lt;/imsx_messageIdentifier&amp;gt;&lt;br /&gt;
        &amp;lt;/imsx_POXRequestHeaderInfo&amp;gt;&lt;br /&gt;
    &amp;lt;/imsx_POXHeader&amp;gt;&lt;br /&gt;
    &amp;lt;imsx_POXBody&amp;gt;&lt;br /&gt;
        &amp;lt;widgetCustomRequest&amp;gt;&amp;lt;!-- LOOK HERE! --&amp;gt;&lt;br /&gt;
            &amp;lt;widgetRecord&amp;gt;&amp;lt;!-- This can be named whatever you want --&amp;gt;&lt;br /&gt;
                &amp;lt;sourcedGUID&amp;gt;&lt;br /&gt;
                    &amp;lt;sourcedId&amp;gt;3124567&amp;lt;/sourcedId&amp;gt;&lt;br /&gt;
                &amp;lt;/sourcedGUID&amp;gt;&lt;br /&gt;
                &amp;lt;!-- You custom data in XML format --&amp;gt;&lt;br /&gt;
            &amp;lt;/widgetRecord&amp;gt;&lt;br /&gt;
        &amp;lt;/widgetCustomRequest&amp;gt;&lt;br /&gt;
    &amp;lt;/imsx_POXBody&amp;gt;&lt;br /&gt;
&amp;lt;/imsx_POXEnvelopeRequest&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above request, the message type is &#039;&#039;&#039;widgetCustomRequest&#039;&#039;&#039;.  Since this is not a standard request, a LTI source plugin can handle it.  We can do this by adding a LTI source plugin and for this example, we will call it &#039;&#039;widget&#039;&#039;.  In order to handle the request, we must make a function in our &#039;&#039;widget&#039;&#039; plugin to handle the request.  The function name takes on the form of &#039;&#039;&#039;component&#039;&#039;&#039;_&#039;&#039;&#039;messageType&#039;&#039;&#039;.  So, for our above example we would create &#039;&#039;mod/lti/source/widget/lib.php&#039;&#039; and add this to the file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
/**&lt;br /&gt;
 * Handle a custom widget request.&lt;br /&gt;
 *&lt;br /&gt;
 * @param object $data The LTI request details&lt;br /&gt;
 */&lt;br /&gt;
function ltisource_widget_widgetCustomRequest($data) {&lt;br /&gt;
    $data-&amp;gt;body;         // The raw LTI request XML body.&lt;br /&gt;
    $data-&amp;gt;xml;          // A SimpleXMLElement of the XML body.&lt;br /&gt;
    $data-&amp;gt;messageid;    // The value of the &amp;lt;imsx_messageIdentifier&amp;gt; element in the request.&lt;br /&gt;
    $data-&amp;gt;messagetype;  // The message type.&lt;br /&gt;
    $data-&amp;gt;consumerkey;  // OAuth consumer key.&lt;br /&gt;
    $data-&amp;gt;sharedsecret; // The shared secret used to verify the request body.&lt;br /&gt;
&lt;br /&gt;
    // Do your custom work here.&lt;br /&gt;
&lt;br /&gt;
    // Throw exceptions on error, they will be sent back appropriately.&lt;br /&gt;
&lt;br /&gt;
    // When done, echo out your response XML.&lt;br /&gt;
    $responsexml = lti_get_response_xml(&lt;br /&gt;
        &#039;success&#039;,&lt;br /&gt;
        &#039;Widget handled&#039;,&lt;br /&gt;
        $data-&amp;gt;messageid,&lt;br /&gt;
        $data-&amp;gt;messagetype&lt;br /&gt;
    );&lt;br /&gt;
&lt;br /&gt;
    echo $responsexml-&amp;gt;asXML();&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Bushido</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=External_tool&amp;diff=44829</id>
		<title>External tool</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=External_tool&amp;diff=44829"/>
		<updated>2014-05-16T17:12:46Z</updated>

		<summary type="html">&lt;p&gt;Bushido: Created page with &amp;quot;This page documents the External tool plugin in Moodle and its features.   == LTI Source Plugins ==  The External tool supports sub plugins that live under the &amp;#039;&amp;#039;mod/lti/sourc...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page documents the External tool plugin in Moodle and its features.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== LTI Source Plugins ==&lt;br /&gt;
&lt;br /&gt;
The External tool supports sub plugins that live under the &#039;&#039;mod/lti/source&#039;&#039; directory and the plugin type is &amp;quot;ltisource&amp;quot;.  The purpose of a LTI source plugin is to extend the functionality of the External Tool activity.  Those extensions are discussed below.&lt;br /&gt;
&lt;br /&gt;
=== Extending the LTI protocol ===&lt;br /&gt;
&lt;br /&gt;
The most powerful thing that the LTI source plugins can do is extend the LTI services provided by the External Tool activity.  All incoming requests are handled by &amp;quot;mod/lti/service.php&amp;quot; and all standard LTI requests are automatically handled.  But, if the request is not one of the standard LTI requests, then an LTI source plugin has an opportunity to handle the request.&lt;br /&gt;
&lt;br /&gt;
The request is routed to the LTI source plugin by using the message type.  For example, let&#039;s say this request was sent to the External Tool:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code xml&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;imsx_POXEnvelopeRequest xmlns=&amp;quot;http://www.imsglobal.org/services/ltiv1p1/xsd/imsoms_v1p0&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;imsx_POXHeader&amp;gt;&lt;br /&gt;
        &amp;lt;imsx_POXRequestHeaderInfo&amp;gt;&lt;br /&gt;
            &amp;lt;imsx_version&amp;gt;V1.0&amp;lt;/imsx_version&amp;gt;&lt;br /&gt;
            &amp;lt;imsx_messageIdentifier&amp;gt;999998123&amp;lt;/imsx_messageIdentifier&amp;gt;&lt;br /&gt;
        &amp;lt;/imsx_POXRequestHeaderInfo&amp;gt;&lt;br /&gt;
    &amp;lt;/imsx_POXHeader&amp;gt;&lt;br /&gt;
    &amp;lt;imsx_POXBody&amp;gt;&lt;br /&gt;
        &amp;lt;widgetCustomRequest&amp;gt;&amp;lt;!-- LOOK HERE! --&amp;gt;&lt;br /&gt;
            &amp;lt;widgetRecord&amp;gt;&amp;lt;!-- This can be named whatever you want --&amp;gt;&lt;br /&gt;
                &amp;lt;sourcedGUID&amp;gt;&lt;br /&gt;
                    &amp;lt;sourcedId&amp;gt;3124567&amp;lt;/sourcedId&amp;gt;&lt;br /&gt;
                &amp;lt;/sourcedGUID&amp;gt;&lt;br /&gt;
                &amp;lt;!-- You custom data in XML format --&amp;gt;&lt;br /&gt;
            &amp;lt;/widgetRecord&amp;gt;&lt;br /&gt;
        &amp;lt;/widgetCustomRequest&amp;gt;&lt;br /&gt;
    &amp;lt;/imsx_POXBody&amp;gt;&lt;br /&gt;
&amp;lt;/imsx_POXEnvelopeRequest&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above request, the message type is &#039;&#039;&#039;widgetCustomRequest&#039;&#039;&#039;.  Since this is not a standard request, a LTI source plugin can handle it.  We can do this by adding a LTI source plugin and for this example, we will call it &amp;quot;widget&amp;quot;.  In order to handle the request, we must make a function in our &amp;quot;widget&amp;quot; plugin to handle the request.  The function name takes on the form of &#039;&#039;&#039;component&#039;&#039;&#039;_&#039;&#039;&#039;messageType&#039;&#039;&#039;.  So, for our above example we would create &amp;quot;mod/lti/source/widget/lib.php&amp;quot; and add this to the file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
/**&lt;br /&gt;
 * Handle a custom widget request.&lt;br /&gt;
 *&lt;br /&gt;
 * @param object $data The LTI request details&lt;br /&gt;
 */&lt;br /&gt;
function ltisource_widget_widgetCustomRequest($data) {&lt;br /&gt;
    $data-&amp;gt;body;         // The raw LTI request XML body.&lt;br /&gt;
    $data-&amp;gt;xml;          // A SimpleXMLElement of the XML body.&lt;br /&gt;
    $data-&amp;gt;messageid;    // The value of the &amp;lt;imsx_messageIdentifier&amp;gt; element in the request.&lt;br /&gt;
    $data-&amp;gt;messagetype;  // The message type.&lt;br /&gt;
    $data-&amp;gt;consumerkey;  // OAuth consumer key.&lt;br /&gt;
    $data-&amp;gt;sharedsecret; // The shared secret used to verify the request body.&lt;br /&gt;
&lt;br /&gt;
    // Do your custom work here.&lt;br /&gt;
&lt;br /&gt;
    // Throw exceptions on error, they will be sent back appropriately.&lt;br /&gt;
&lt;br /&gt;
    // When done, echo out your response XML.&lt;br /&gt;
    $responsexml = lti_get_response_xml(&lt;br /&gt;
        &#039;success&#039;,&lt;br /&gt;
        &#039;Widget handled&#039;,&lt;br /&gt;
        $data-&amp;gt;messageid,&lt;br /&gt;
        $data-&amp;gt;messagetype&lt;br /&gt;
    );&lt;br /&gt;
&lt;br /&gt;
    echo $responsexml-&amp;gt;asXML();&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Bushido</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=Outcomes_Technical_Specification&amp;diff=39615</id>
		<title>Outcomes Technical Specification</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=Outcomes_Technical_Specification&amp;diff=39615"/>
		<updated>2013-05-12T17:36:11Z</updated>

		<summary type="html">&lt;p&gt;Bushido: /* Change History */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
&lt;br /&gt;
Please be familiar with the function specification as outlined in the [[Outcomes Specification]]. The functional specification will provide details about the concepts and goals of this project. In particular, the following sections provide the overview of the system by user role:&lt;br /&gt;
&lt;br /&gt;
* [[Outcomes Administrator Specification]]&lt;br /&gt;
* [[Outcomes Instructor Specification]]&lt;br /&gt;
* [[Outcomes Student Specification]]&lt;br /&gt;
&lt;br /&gt;
In addition, some features and use cases are known but not yet being implemented. Please see [[Specifically Excluded Use Cases]]. Specifically, this initial version will not be attempting to map an existing outcome set to a new version of the outcome set on import.&lt;br /&gt;
&lt;br /&gt;
This document attempts to capture how the functional specification would be implemented in Moodle.&lt;br /&gt;
&lt;br /&gt;
= Backwards compatibility breaks =&lt;br /&gt;
&lt;br /&gt;
First and foremost, it is important to identify key differences between the current outcome system and this proposal as there are some philosophical shifts as well as breaking of existing code.&lt;br /&gt;
&lt;br /&gt;
# Outcomes will now only be created at the site level and then mapped to courses and content. Outcomes will no longer be created at the course level.&lt;br /&gt;
# Anything using the current outcome API or tables will have to be updated to use the new outcomes when appropriate.&lt;br /&gt;
# Outcomes will no longer appear in the grade book.&lt;br /&gt;
# Outcomes will no longer support scales. It is just a simple pass or fail.&lt;br /&gt;
&lt;br /&gt;
These changes will be documented in the relevant change log files.&lt;br /&gt;
&lt;br /&gt;
= Settings =&lt;br /&gt;
&lt;br /&gt;
== Site ==&lt;br /&gt;
&lt;br /&gt;
At the site level, there will be an area to do all of the configuration and setup of outcome sets. The proposed location is under Settings &amp;gt; Site Administration &amp;gt; Grades &amp;gt; Outcomes.&lt;br /&gt;
&lt;br /&gt;
In addition to managing outcomes, there will be site settings page for general outcome settings. For example, a setting to toggle if outcome idnumbers are editable or not.&lt;br /&gt;
&lt;br /&gt;
== Course ==&lt;br /&gt;
&lt;br /&gt;
When editing a course, there will be a section to associate multiple outcome sets to the course. The section will appear below the course General settings.&lt;br /&gt;
&lt;br /&gt;
This association is used to determine the relevant outcomes for the course for reporting and as a way to pre-filter outcome pickers when associating outcomes to content.&lt;br /&gt;
&lt;br /&gt;
== Activity ==&lt;br /&gt;
&lt;br /&gt;
When editing an activity, there will be a section to associate individual outcomes to the activity. This section will be provided by the moodleform_mod::standard_coursemodule_elements() callback so that all activities will be able to be associated to outcomes automatically.  In the flow of the activity&#039;s form, the outcome mapping options would appear below the grades section.  Do note though that if an activity does not support grades, it can still be mapped to outcomes.&lt;br /&gt;
&lt;br /&gt;
Graded activities will have to add additional integration points with outcomes in order to capture user attempts.&lt;br /&gt;
&lt;br /&gt;
== Advanced grading ==&lt;br /&gt;
&lt;br /&gt;
Rubrics and Marking guides will be able to associate an outcome for a criteria. API will be provided to support this, but each grading method will have to integrate with outcomes where it makes sense.&lt;br /&gt;
&lt;br /&gt;
== Questions ==&lt;br /&gt;
&lt;br /&gt;
When editing a question, there will be a section to associate individual outcomes to the question. The section can be added to question_edit_form::definition() before the Tags section.&lt;br /&gt;
&lt;br /&gt;
This association UI might behave a little differently based on the context in Moodle. If the question is being authored at the site level, then the outcome association is more free form, meaning one can select any outcome from any outcome set. If the question is being authored at the course level, then the outcome association defaults to those outcome sets that are associated to the course.&lt;br /&gt;
&lt;br /&gt;
= Data structure =&lt;br /&gt;
&lt;br /&gt;
This diagram provides an overview of how the tables relate to each other and to core tables.  Please see the below sections for details about each table.&lt;br /&gt;
&lt;br /&gt;
[[File:Outcome_ERD.jpg|frame|center|Outcomes ERD]]&lt;br /&gt;
&lt;br /&gt;
== outcome_sets ==&lt;br /&gt;
&lt;br /&gt;
Relations: none&lt;br /&gt;
&lt;br /&gt;
Purpose: An outcome set represents a collection of outcomes and perhaps some meta data regarding the revision or applicable region. Outcome sets are mapped to courses, which makes the outcomes within the set available to be mapped to course content. An example outcome set would be [http://asn.jesandco.org/resources/D2403043 Health Education Content Standards for California Public Schools, Kindergarten Through Grade Twelve].&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| idnumber&lt;br /&gt;
| varchar(255), unique index&lt;br /&gt;
| GUID that is auto-generated if missing. Generally on import, these are provided. This would be used to identify the outcome set during import or course restore.&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| varchar(255)&lt;br /&gt;
| The name of the outcome set&lt;br /&gt;
|-&lt;br /&gt;
| description&lt;br /&gt;
| text, default null, optional&lt;br /&gt;
| The plain text description of the outcome.&lt;br /&gt;
|-&lt;br /&gt;
| provider&lt;br /&gt;
| varchar(255), default null, optional&lt;br /&gt;
| Provider information regarding the outcome set. EG: Could be set to ASN.&lt;br /&gt;
|-&lt;br /&gt;
| revision&lt;br /&gt;
| varchar(255), default null, optional&lt;br /&gt;
| Version information regarding the outcome set. This will typically be a date or year, EG: 2011&lt;br /&gt;
|-&lt;br /&gt;
| region&lt;br /&gt;
| varchar(255), default null, optional&lt;br /&gt;
| Any region information. Example: In the US this could be a state name.&lt;br /&gt;
|-&lt;br /&gt;
| deleted&lt;br /&gt;
| int(1), default 0&lt;br /&gt;
| If the outcome set has been deleted.&lt;br /&gt;
|-&lt;br /&gt;
| timemodified&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time modified.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome_sets, outcome&lt;br /&gt;
&lt;br /&gt;
Purpose: Stores information regarding an individual outcome. Outcomes can be stored in a hierarchy, but the hierarchy is visual only. This means that if an outcome is earned, then only that outcome is earned, not it and all of its children. Also, if all child outcomes are earned, then parent outcomes are not also automatically earned. In addition, sometimes outcomes are not assessable, but are only there for extra context in the hierarchy. This identifies that the outcome cannot be mapped to content, nor can a student earn it.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomesetid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_sets table.&lt;br /&gt;
|-&lt;br /&gt;
| parentid&lt;br /&gt;
| int(10), indexed, default null&lt;br /&gt;
| Self referencing key. Identifies the parent outcome in the hierarchy.&lt;br /&gt;
|-&lt;br /&gt;
| idnumber&lt;br /&gt;
| varchar(255), unique index&lt;br /&gt;
| GUID that is auto-generated if missing. Generally on import, these are provided. This would be used to identify the outcome set during import or course restore.&lt;br /&gt;
|-&lt;br /&gt;
| docnum&lt;br /&gt;
| varchar(255), default null, optional&lt;br /&gt;
| Field for tracking additional information on the outcome. EG: 2.3.A&lt;br /&gt;
|-&lt;br /&gt;
| description&lt;br /&gt;
| text&lt;br /&gt;
| The plain text description of the outcome.&lt;br /&gt;
|-&lt;br /&gt;
| assessable&lt;br /&gt;
| int(1)&lt;br /&gt;
| If set to 1, then the outcome is assessable and can be mapped to content. If set to 0, then the outcome is not assessable and cannot be mapped to content.&lt;br /&gt;
|-&lt;br /&gt;
| deleted&lt;br /&gt;
| int(1), default 0&lt;br /&gt;
| If the outcome has been deleted.&lt;br /&gt;
|-&lt;br /&gt;
| sortorder&lt;br /&gt;
| int(10)&lt;br /&gt;
| The sort order. This is 0-X for all outcomes that belong to the same outcome set.&lt;br /&gt;
|-&lt;br /&gt;
| timemodified&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time modified.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_metadata ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome&lt;br /&gt;
&lt;br /&gt;
Purpose: Represents additional meta information regarding outcomes. Only support for “Education Level” (K, 1, … 12, etc.) and “Subjects” (e.g. Math, English, etc.) will be available out of the box, but additional data points can be added later (which would need to be added to the UI). One outcome could have many meta values. For example: an outcome could be associated to many educational levels and subjects.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| varchar(255), indexed&lt;br /&gt;
| The name of the meta data.&lt;br /&gt;
|-&lt;br /&gt;
| value&lt;br /&gt;
| varchar(1333), indexed&lt;br /&gt;
| The value of the meta data.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_areas ==&lt;br /&gt;
&lt;br /&gt;
Relations: dynamic with core tables&lt;br /&gt;
&lt;br /&gt;
Purpose: This represents that a content item has been mapped to an outcome or to multiple outcomes. Check the outcome_area_outcomes table for the specific outcomes.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| component&lt;br /&gt;
| varchar(100), indexed&lt;br /&gt;
| The name of the component.&lt;br /&gt;
|-&lt;br /&gt;
| area&lt;br /&gt;
| varchar(50), default null, indexed, optional&lt;br /&gt;
| The name of the area. Used when a component has multiple items to associate to outcomes.&lt;br /&gt;
|-&lt;br /&gt;
| itemid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| The item ID.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_area_outcomes ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome, outcome_areas&lt;br /&gt;
&lt;br /&gt;
Purpose: This represents the one to many relationship of a single content item mapped to many outcomes.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomeareaid&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Foreign key to outcome_areas table.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_used_areas ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome_areas, course_modules&lt;br /&gt;
&lt;br /&gt;
Purpose: Associates an outcome content item with an activity. For example: a question is created in the site question bank and outcomes are associated to the question. Once that question is added to a Quiz then that association is stored in this table so the outcome system knows that the content item and its outcomes are in use.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| cmid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to course_modules table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomeareaid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_areas table.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_used_sets ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome_sets, course&lt;br /&gt;
&lt;br /&gt;
Purpose: Associates an outcome set with the course. Filtering of the outcome set is optionally allowed since outcome sets can span multiple educational levels and even subjects. Once an outcome set is mapped to the course, then the outcomes in the outcome set are available to be mapped to course content.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| courseid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to course table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomesetid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_sets table.&lt;br /&gt;
|-&lt;br /&gt;
| filter&lt;br /&gt;
| text, default null&lt;br /&gt;
| Some outcome sets span multiple education levels and subjects. So, when mapping an outcome set to a course, it may make sense to restrict the available outcomes to a specific education level(s) and/or subject(s). This information would be serialized into this field.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_attempts ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome_used_areas, user&lt;br /&gt;
&lt;br /&gt;
Purpose: Track a user attempt against a content item within a particular activity. The idea here is to aggregate attempt information so that the recommendation engines (detailed below) have an easily accessible data set to process. This does not mean however that recommendation engines are only limited to this data as one could mine for additional data where needed.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomeusedareaid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_used_areas table.&lt;br /&gt;
|-&lt;br /&gt;
| userid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table.&lt;br /&gt;
|-&lt;br /&gt;
| itemid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Used to identify the attempt for updates.  For example, might be a quiz attempt record ID.&lt;br /&gt;
|-&lt;br /&gt;
| percentgrade&lt;br /&gt;
| float(10,5)&lt;br /&gt;
| Percent grade earned on this attempt.&lt;br /&gt;
|-&lt;br /&gt;
| mingrade&lt;br /&gt;
| float(10,5)&lt;br /&gt;
| The minimum possible grade.&lt;br /&gt;
|-&lt;br /&gt;
| maxgrade&lt;br /&gt;
| float(10,5)&lt;br /&gt;
| The maximum possible grade.&lt;br /&gt;
|-&lt;br /&gt;
| rawgrade&lt;br /&gt;
| float(10,5)&lt;br /&gt;
| The points earned, should be between the minimum and maximum grades.&lt;br /&gt;
|-&lt;br /&gt;
| timemodified&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time modified.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_marks ==&lt;br /&gt;
&lt;br /&gt;
Relations: course, user, outcome&lt;br /&gt;
&lt;br /&gt;
Purpose: Graders will manually mark the student as having Met or Not Met an outcome. The recommendation engines will make a recommendation to the grader based on user attempts against content that has been mapped to the outcome.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| courseid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to course table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| userid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table. This is the user who is receiving the mark.&lt;br /&gt;
|-&lt;br /&gt;
| graderid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table. This is the user is doing the marking.&lt;br /&gt;
|-&lt;br /&gt;
| result&lt;br /&gt;
| int(2)&lt;br /&gt;
| 0 is not pass, 1 is pass, null is that no decision has been made yet.&lt;br /&gt;
|-&lt;br /&gt;
| timemodified&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time modified.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_marks_history ==&lt;br /&gt;
&lt;br /&gt;
Relations: course, user, outcome, outcome_marks&lt;br /&gt;
&lt;br /&gt;
Purpose: Keep track of past markings.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| action&lt;br /&gt;
| int(3)&lt;br /&gt;
| The action taken against the outcome_mark record: 1 is create, 2 is update and 3 is delete.&lt;br /&gt;
|-&lt;br /&gt;
| outcomemarkid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_marks table. Though the record could be missing from outcome_marks.&lt;br /&gt;
|-&lt;br /&gt;
| courseid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to course table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| userid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table. This is the user who is receiving the mark.&lt;br /&gt;
|-&lt;br /&gt;
| graderid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table. This is the user is doing the marking.&lt;br /&gt;
|-&lt;br /&gt;
| result&lt;br /&gt;
| int(2)&lt;br /&gt;
| 0 is not pass, 1 is pass, null is that no decision has been made yet.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_awards ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome, user&lt;br /&gt;
&lt;br /&gt;
Purpose: This preserves any outcomes earned by a student, regardless if the course is deleted or not.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| userid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Architecture =&lt;br /&gt;
&lt;br /&gt;
The outcome API, outcome administrative settings, outcome associations and other UIs that drives outcomes will be located inside of the top level outcome/ directory.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Models and repository mappers:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* outcome: Represents a single outcome&lt;br /&gt;
* outcome set: Represents a group of outcomes&lt;br /&gt;
* outcome content: An outcome association to content.&lt;br /&gt;
* outcome attempt: An attempt made against an outcome.&lt;br /&gt;
* outcome mark: A teacher marking an outcome against a user.&lt;br /&gt;
* outcome award: An awarded outcome at the site level.&lt;br /&gt;
&lt;br /&gt;
A repository mapper would include ways to store the model and ways to retrieve them in a re-usable and organized manner.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Collections:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
A group of models that you may take action on or filter. Example of a third party library that helps to manage collections: https://github.com/doctrine/collections&lt;br /&gt;
&lt;br /&gt;
Collections may or may not be used, but some possible collections would be the following:&lt;br /&gt;
&lt;br /&gt;
* outcomes&lt;br /&gt;
* outcome attempts&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;New mform elements:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
For most plugins, the process of associating an outcome would be done through a Moodle form. Proposing adding a new Moodle form element that can be added to a form to provide the necessary UI. An API for validating and saving the new mform element will be provided. In addition, the mform element will just be a wrapper around a well formed API that could be used on it’s own when other use cases present themselves.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;API for plugins&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Beyond the mform element, plugins may interact with outcomes in order to provide a richer integration. An API will be provided to assist with the following (not an exhaustive list):&lt;br /&gt;
&lt;br /&gt;
* A way to notify the outcome system that a content item is or is not being used within a course.&lt;br /&gt;
** Example: When a question is authored at the site level and then is actually used within a course, it must inform the outcome system that it is in use. This could potentially be done via events or just direct API calls at the appropriate times. Same goes for when a question is no longer used within a course.&lt;br /&gt;
* Record an attempt made against a content item.&lt;br /&gt;
** Examples: A question has been attempted or an assignment submission has been graded.&lt;br /&gt;
* A way to retrieve associated outcomes.&lt;br /&gt;
* A way to update, delete or otherwise modify the associated outcomes.&lt;br /&gt;
* A way to pick outcome associations (EG: what the mform element would do).&lt;br /&gt;
* A method of syncing up attempts against a content item. This would be used when associating an outcome on content that has already been graded/attempted.&lt;br /&gt;
* API to cleanup tables on course deletion.&lt;br /&gt;
&lt;br /&gt;
== Attempts ==&lt;br /&gt;
&lt;br /&gt;
Addition information about outcome attempt handling.&lt;br /&gt;
&lt;br /&gt;
* If Advanced Grading Method used then remove attempts if submission is removed&lt;br /&gt;
* If directly associated to activity then remove attempts if submission is removed and multiple graded submissions are allowed (i.e. Quiz, Lesson, Scorm) OR if grade removed from gradebook for other activities&lt;br /&gt;
* Whenever the all outcomes are removed from the object, it would remove the associated attempts.&lt;br /&gt;
* If a question is in use and is edited to now include outcomes, then outcome attempts are not generated unless the quiz is re-graded.&lt;br /&gt;
&lt;br /&gt;
== Supported plugin type plugins ==&lt;br /&gt;
&lt;br /&gt;
This may sound a little odd, but basically the point of these plugins is to add support for a plugin type to the outcome system. These types would assist in interpreting outcome content associations. Examples:&lt;br /&gt;
&lt;br /&gt;
* Given an outcome association, please provide a link to the mapped content.&lt;br /&gt;
** For an activity, this would be a link to the module.&lt;br /&gt;
** For a grading form, a link to the grading instance.&lt;br /&gt;
** For a question, a link to the question instance in the question bank.&lt;br /&gt;
* What are all of the content items that have not been mapped?&lt;br /&gt;
** For activities, this would return instances that are not mapped.&lt;br /&gt;
** For grading form, this would return sub-plugin specific information, like criteria.&lt;br /&gt;
** For questions, this would return questions from the course question bank that are not mapped.&lt;br /&gt;
* May assist with automatic cleanup when the content is deleted.&lt;br /&gt;
* Also other meta data could be derived, like plugin type name.&lt;br /&gt;
&lt;br /&gt;
This plugin would live under outcome/support/ and would initially ship with support of the following plugin types:&lt;br /&gt;
&lt;br /&gt;
* mod&lt;br /&gt;
* qtype&lt;br /&gt;
* gradingform: note that this integration would be deeper in that each gradingform plugin would need to implement something in order to help interpret associations. The reason being is that outcomes are being associated to plugin specific content, instead of something generic like the grading instance.&lt;br /&gt;
&lt;br /&gt;
== Import and export plugins ==&lt;br /&gt;
&lt;br /&gt;
The outcome system would support the exporting of outcome sets. The first export plugin would be a very simple JSON export that is specific to Moodle itself. This would be used for moving custom outcomes from one Moodle site to another.&lt;br /&gt;
&lt;br /&gt;
The outcome system would support importing outcome sets. Initially, there would be support for importing outcomes from [http://asn.jesandco.org Achievement Standards Network (ASN)] ([http://standards.jesandco.org/wiki/ASN_Application_Profile Format Specification]) and importing the JSON export from above.&lt;br /&gt;
&lt;br /&gt;
Both of the outcomes import and export processes would be a plugin based, so other formats could be supported by creating new plugins. The import and export plugins would live under outcome/import/ and outcome/export/.&lt;br /&gt;
&lt;br /&gt;
== Recommendation engine plugins ==&lt;br /&gt;
&lt;br /&gt;
The outcome system would provide a way to recommend to a teacher whether a student should be marked as completing the outcome or not. These plugins should have full Moodle plugin support because they may need to listen to events, run crons, have DB tables, global settings, etc. These plugins would live under outcome/engine/. Recommendations would be generated on demand and stored in MUC.&lt;br /&gt;
&lt;br /&gt;
Initially, the only plugin would be a percentage based recommendation engine. It would be configurable for a specific threshold that would determine if an attempt against an outcome should be considered correct or incorrect. It would then process the outcome attempts to determine the recommendation.&lt;br /&gt;
&lt;br /&gt;
Recommendation engines should also be enabled or disabled at the site level. This would require a “Manage recommendation engines” section in the admin site settings.&lt;br /&gt;
&lt;br /&gt;
= Reporting =&lt;br /&gt;
&lt;br /&gt;
== Site ==&lt;br /&gt;
&lt;br /&gt;
The following reports:&lt;br /&gt;
&lt;br /&gt;
* Outcomes Coverage report - shows outcomes that have been mapped to content in the site.&lt;br /&gt;
* Outcomes Performance report - shows performance on outcomes at the site level. Optionally broken down by course.&lt;br /&gt;
&lt;br /&gt;
== Course ==&lt;br /&gt;
&lt;br /&gt;
The following reports:&lt;br /&gt;
&lt;br /&gt;
* Outcomes Coverage report - shows outcomes that have been mapped in this course.&lt;br /&gt;
* Outcomes: Unmapped Content report - shows content that is not mapped to an outcome.&lt;br /&gt;
* Outcomes Performance report - shows aggregated performance on outcomes in the course.&lt;br /&gt;
* Outcomes Student Performance report - shows student performance on outcomes in the course for the teacher.&lt;br /&gt;
* Outcomes Personal Performance report - shows student performance on outcomes in the course for the student.&lt;br /&gt;
&lt;br /&gt;
== User profile ==&lt;br /&gt;
&lt;br /&gt;
At the very least, there will be a user site report where the user can see earned outcomes.&lt;br /&gt;
&lt;br /&gt;
= Grading =&lt;br /&gt;
&lt;br /&gt;
Outcome Completion Marking is done by course graders and is the final check point for if a learner has earned an outcome or not. The proposed location is to use the Outcome tab that is currently in the grades section of the course. This would also highjack the Outcomes link under Grade administration and Course administration.&lt;br /&gt;
&lt;br /&gt;
= Logging =&lt;br /&gt;
&lt;br /&gt;
We want to audit most actions in the Moodle log. These actions include:&lt;br /&gt;
&lt;br /&gt;
* CRUD type actions.&lt;br /&gt;
* Any association editing. EG: associating an outcome with a course, content item, etc.&lt;br /&gt;
* Outcome marking.&lt;br /&gt;
* User attempts against outcomes.&lt;br /&gt;
&lt;br /&gt;
= Role capabilities =&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Description&lt;br /&gt;
! Capability&lt;br /&gt;
|-&lt;br /&gt;
| Map outcomes to content&lt;br /&gt;
| moodle/outcome:mapoutcomes&lt;br /&gt;
|-&lt;br /&gt;
| Map outcome sets to courses&lt;br /&gt;
| moodle/outcome:mapoutcomesets&lt;br /&gt;
|-&lt;br /&gt;
| Edit outcomes&lt;br /&gt;
| moodle/outcome:edit&lt;br /&gt;
|-&lt;br /&gt;
| Export outcomes&lt;br /&gt;
| moodle/outcome:export&lt;br /&gt;
|-&lt;br /&gt;
| Import outcomes&lt;br /&gt;
| moodle/outcome:import&lt;br /&gt;
|-&lt;br /&gt;
| Each report will have a capability to view them.&lt;br /&gt;
| report/REPORTNAME:view&lt;br /&gt;
|-&lt;br /&gt;
| Marking outcomes by graders&lt;br /&gt;
| moodle/grade:edit&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Backup and restore =&lt;br /&gt;
&lt;br /&gt;
The workflow for backup and restore may go like:&lt;br /&gt;
&lt;br /&gt;
* Same site, then just map to existing outcomes via the identifier.&lt;br /&gt;
* Not same site, then the assumption is that the outcome set should be imported first, then we can map to existing outcomes via the identifier like in our same site scenario.&lt;br /&gt;
&lt;br /&gt;
Outcomes would probably take advantage of the backup plugin API to backup outcome associations to modules, question, etc. So, for example:&lt;br /&gt;
&lt;br /&gt;
* Outcomes would plug into activities in order to backup outcome associations and attempts.&lt;br /&gt;
* Outcomes would plug into questions in order to backup outcome associations and attempts.&lt;br /&gt;
* Grading forms would have to manually outcome associations and attempts. Will strive to make code re-usable.&lt;br /&gt;
&lt;br /&gt;
= Migration of old outcomes =&lt;br /&gt;
&lt;br /&gt;
Please first review [[Migration and Technical Issues]]. This still needs to be flushed out some more, but since the migration requires user interaction, we may need to create an admin tool to handle the migration. Until outcomes are migrated, it might make sense to continue to show the outcomes in the grade book, but remove the ability to do any editing of old outcomes.&lt;br /&gt;
&lt;br /&gt;
= Change History =&lt;br /&gt;
&lt;br /&gt;
* Removed outcome.name field and outcome.description field is now required --[[User:Mark Nielsen|Mark Nielsen]] 01:36, 13 May 2013 (WST)&lt;br /&gt;
* Added outcome_marks_history.action field to keep track of the action performed to generate the history --[[User:Mark Nielsen|Mark Nielsen]] 01:36, 13 May 2013 (WST)&lt;br /&gt;
* Added Architecture &amp;gt; Attempts section --[[User:Mark Nielsen|Mark Nielsen]] 08:01, 4 May 2013 (WST)&lt;br /&gt;
* Schema changes --[[User:Mark Nielsen|Mark Nielsen]] 07:57, 4 May 2013 (WST)&lt;br /&gt;
** Removed outcome_sets.userid&lt;br /&gt;
** Removed outcome_areas.deleted&lt;br /&gt;
** Added outcome_attempts.itemid&lt;br /&gt;
** Added outcome_attempts.timemodified&lt;/div&gt;</summary>
		<author><name>Bushido</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=Outcomes_Technical_Specification&amp;diff=39614</id>
		<title>Outcomes Technical Specification</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=Outcomes_Technical_Specification&amp;diff=39614"/>
		<updated>2013-05-12T17:35:00Z</updated>

		<summary type="html">&lt;p&gt;Bushido: /* outcome_marks_history */ Added outcome_marks_history.action field&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
&lt;br /&gt;
Please be familiar with the function specification as outlined in the [[Outcomes Specification]]. The functional specification will provide details about the concepts and goals of this project. In particular, the following sections provide the overview of the system by user role:&lt;br /&gt;
&lt;br /&gt;
* [[Outcomes Administrator Specification]]&lt;br /&gt;
* [[Outcomes Instructor Specification]]&lt;br /&gt;
* [[Outcomes Student Specification]]&lt;br /&gt;
&lt;br /&gt;
In addition, some features and use cases are known but not yet being implemented. Please see [[Specifically Excluded Use Cases]]. Specifically, this initial version will not be attempting to map an existing outcome set to a new version of the outcome set on import.&lt;br /&gt;
&lt;br /&gt;
This document attempts to capture how the functional specification would be implemented in Moodle.&lt;br /&gt;
&lt;br /&gt;
= Backwards compatibility breaks =&lt;br /&gt;
&lt;br /&gt;
First and foremost, it is important to identify key differences between the current outcome system and this proposal as there are some philosophical shifts as well as breaking of existing code.&lt;br /&gt;
&lt;br /&gt;
# Outcomes will now only be created at the site level and then mapped to courses and content. Outcomes will no longer be created at the course level.&lt;br /&gt;
# Anything using the current outcome API or tables will have to be updated to use the new outcomes when appropriate.&lt;br /&gt;
# Outcomes will no longer appear in the grade book.&lt;br /&gt;
# Outcomes will no longer support scales. It is just a simple pass or fail.&lt;br /&gt;
&lt;br /&gt;
These changes will be documented in the relevant change log files.&lt;br /&gt;
&lt;br /&gt;
= Settings =&lt;br /&gt;
&lt;br /&gt;
== Site ==&lt;br /&gt;
&lt;br /&gt;
At the site level, there will be an area to do all of the configuration and setup of outcome sets. The proposed location is under Settings &amp;gt; Site Administration &amp;gt; Grades &amp;gt; Outcomes.&lt;br /&gt;
&lt;br /&gt;
In addition to managing outcomes, there will be site settings page for general outcome settings. For example, a setting to toggle if outcome idnumbers are editable or not.&lt;br /&gt;
&lt;br /&gt;
== Course ==&lt;br /&gt;
&lt;br /&gt;
When editing a course, there will be a section to associate multiple outcome sets to the course. The section will appear below the course General settings.&lt;br /&gt;
&lt;br /&gt;
This association is used to determine the relevant outcomes for the course for reporting and as a way to pre-filter outcome pickers when associating outcomes to content.&lt;br /&gt;
&lt;br /&gt;
== Activity ==&lt;br /&gt;
&lt;br /&gt;
When editing an activity, there will be a section to associate individual outcomes to the activity. This section will be provided by the moodleform_mod::standard_coursemodule_elements() callback so that all activities will be able to be associated to outcomes automatically.  In the flow of the activity&#039;s form, the outcome mapping options would appear below the grades section.  Do note though that if an activity does not support grades, it can still be mapped to outcomes.&lt;br /&gt;
&lt;br /&gt;
Graded activities will have to add additional integration points with outcomes in order to capture user attempts.&lt;br /&gt;
&lt;br /&gt;
== Advanced grading ==&lt;br /&gt;
&lt;br /&gt;
Rubrics and Marking guides will be able to associate an outcome for a criteria. API will be provided to support this, but each grading method will have to integrate with outcomes where it makes sense.&lt;br /&gt;
&lt;br /&gt;
== Questions ==&lt;br /&gt;
&lt;br /&gt;
When editing a question, there will be a section to associate individual outcomes to the question. The section can be added to question_edit_form::definition() before the Tags section.&lt;br /&gt;
&lt;br /&gt;
This association UI might behave a little differently based on the context in Moodle. If the question is being authored at the site level, then the outcome association is more free form, meaning one can select any outcome from any outcome set. If the question is being authored at the course level, then the outcome association defaults to those outcome sets that are associated to the course.&lt;br /&gt;
&lt;br /&gt;
= Data structure =&lt;br /&gt;
&lt;br /&gt;
This diagram provides an overview of how the tables relate to each other and to core tables.  Please see the below sections for details about each table.&lt;br /&gt;
&lt;br /&gt;
[[File:Outcome_ERD.jpg|frame|center|Outcomes ERD]]&lt;br /&gt;
&lt;br /&gt;
== outcome_sets ==&lt;br /&gt;
&lt;br /&gt;
Relations: none&lt;br /&gt;
&lt;br /&gt;
Purpose: An outcome set represents a collection of outcomes and perhaps some meta data regarding the revision or applicable region. Outcome sets are mapped to courses, which makes the outcomes within the set available to be mapped to course content. An example outcome set would be [http://asn.jesandco.org/resources/D2403043 Health Education Content Standards for California Public Schools, Kindergarten Through Grade Twelve].&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| idnumber&lt;br /&gt;
| varchar(255), unique index&lt;br /&gt;
| GUID that is auto-generated if missing. Generally on import, these are provided. This would be used to identify the outcome set during import or course restore.&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| varchar(255)&lt;br /&gt;
| The name of the outcome set&lt;br /&gt;
|-&lt;br /&gt;
| description&lt;br /&gt;
| text, default null, optional&lt;br /&gt;
| The plain text description of the outcome.&lt;br /&gt;
|-&lt;br /&gt;
| provider&lt;br /&gt;
| varchar(255), default null, optional&lt;br /&gt;
| Provider information regarding the outcome set. EG: Could be set to ASN.&lt;br /&gt;
|-&lt;br /&gt;
| revision&lt;br /&gt;
| varchar(255), default null, optional&lt;br /&gt;
| Version information regarding the outcome set. This will typically be a date or year, EG: 2011&lt;br /&gt;
|-&lt;br /&gt;
| region&lt;br /&gt;
| varchar(255), default null, optional&lt;br /&gt;
| Any region information. Example: In the US this could be a state name.&lt;br /&gt;
|-&lt;br /&gt;
| deleted&lt;br /&gt;
| int(1), default 0&lt;br /&gt;
| If the outcome set has been deleted.&lt;br /&gt;
|-&lt;br /&gt;
| timemodified&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time modified.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome_sets, outcome&lt;br /&gt;
&lt;br /&gt;
Purpose: Stores information regarding an individual outcome. Outcomes can be stored in a hierarchy, but the hierarchy is visual only. This means that if an outcome is earned, then only that outcome is earned, not it and all of its children. Also, if all child outcomes are earned, then parent outcomes are not also automatically earned. In addition, sometimes outcomes are not assessable, but are only there for extra context in the hierarchy. This identifies that the outcome cannot be mapped to content, nor can a student earn it.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomesetid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_sets table.&lt;br /&gt;
|-&lt;br /&gt;
| parentid&lt;br /&gt;
| int(10), indexed, default null&lt;br /&gt;
| Self referencing key. Identifies the parent outcome in the hierarchy.&lt;br /&gt;
|-&lt;br /&gt;
| idnumber&lt;br /&gt;
| varchar(255), unique index&lt;br /&gt;
| GUID that is auto-generated if missing. Generally on import, these are provided. This would be used to identify the outcome set during import or course restore.&lt;br /&gt;
|-&lt;br /&gt;
| docnum&lt;br /&gt;
| varchar(255), default null, optional&lt;br /&gt;
| Field for tracking additional information on the outcome. EG: 2.3.A&lt;br /&gt;
|-&lt;br /&gt;
| description&lt;br /&gt;
| text&lt;br /&gt;
| The plain text description of the outcome.&lt;br /&gt;
|-&lt;br /&gt;
| assessable&lt;br /&gt;
| int(1)&lt;br /&gt;
| If set to 1, then the outcome is assessable and can be mapped to content. If set to 0, then the outcome is not assessable and cannot be mapped to content.&lt;br /&gt;
|-&lt;br /&gt;
| deleted&lt;br /&gt;
| int(1), default 0&lt;br /&gt;
| If the outcome has been deleted.&lt;br /&gt;
|-&lt;br /&gt;
| sortorder&lt;br /&gt;
| int(10)&lt;br /&gt;
| The sort order. This is 0-X for all outcomes that belong to the same outcome set.&lt;br /&gt;
|-&lt;br /&gt;
| timemodified&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time modified.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_metadata ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome&lt;br /&gt;
&lt;br /&gt;
Purpose: Represents additional meta information regarding outcomes. Only support for “Education Level” (K, 1, … 12, etc.) and “Subjects” (e.g. Math, English, etc.) will be available out of the box, but additional data points can be added later (which would need to be added to the UI). One outcome could have many meta values. For example: an outcome could be associated to many educational levels and subjects.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| varchar(255), indexed&lt;br /&gt;
| The name of the meta data.&lt;br /&gt;
|-&lt;br /&gt;
| value&lt;br /&gt;
| varchar(1333), indexed&lt;br /&gt;
| The value of the meta data.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_areas ==&lt;br /&gt;
&lt;br /&gt;
Relations: dynamic with core tables&lt;br /&gt;
&lt;br /&gt;
Purpose: This represents that a content item has been mapped to an outcome or to multiple outcomes. Check the outcome_area_outcomes table for the specific outcomes.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| component&lt;br /&gt;
| varchar(100), indexed&lt;br /&gt;
| The name of the component.&lt;br /&gt;
|-&lt;br /&gt;
| area&lt;br /&gt;
| varchar(50), default null, indexed, optional&lt;br /&gt;
| The name of the area. Used when a component has multiple items to associate to outcomes.&lt;br /&gt;
|-&lt;br /&gt;
| itemid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| The item ID.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_area_outcomes ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome, outcome_areas&lt;br /&gt;
&lt;br /&gt;
Purpose: This represents the one to many relationship of a single content item mapped to many outcomes.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomeareaid&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Foreign key to outcome_areas table.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_used_areas ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome_areas, course_modules&lt;br /&gt;
&lt;br /&gt;
Purpose: Associates an outcome content item with an activity. For example: a question is created in the site question bank and outcomes are associated to the question. Once that question is added to a Quiz then that association is stored in this table so the outcome system knows that the content item and its outcomes are in use.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| cmid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to course_modules table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomeareaid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_areas table.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_used_sets ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome_sets, course&lt;br /&gt;
&lt;br /&gt;
Purpose: Associates an outcome set with the course. Filtering of the outcome set is optionally allowed since outcome sets can span multiple educational levels and even subjects. Once an outcome set is mapped to the course, then the outcomes in the outcome set are available to be mapped to course content.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| courseid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to course table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomesetid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_sets table.&lt;br /&gt;
|-&lt;br /&gt;
| filter&lt;br /&gt;
| text, default null&lt;br /&gt;
| Some outcome sets span multiple education levels and subjects. So, when mapping an outcome set to a course, it may make sense to restrict the available outcomes to a specific education level(s) and/or subject(s). This information would be serialized into this field.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_attempts ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome_used_areas, user&lt;br /&gt;
&lt;br /&gt;
Purpose: Track a user attempt against a content item within a particular activity. The idea here is to aggregate attempt information so that the recommendation engines (detailed below) have an easily accessible data set to process. This does not mean however that recommendation engines are only limited to this data as one could mine for additional data where needed.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomeusedareaid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_used_areas table.&lt;br /&gt;
|-&lt;br /&gt;
| userid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table.&lt;br /&gt;
|-&lt;br /&gt;
| itemid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Used to identify the attempt for updates.  For example, might be a quiz attempt record ID.&lt;br /&gt;
|-&lt;br /&gt;
| percentgrade&lt;br /&gt;
| float(10,5)&lt;br /&gt;
| Percent grade earned on this attempt.&lt;br /&gt;
|-&lt;br /&gt;
| mingrade&lt;br /&gt;
| float(10,5)&lt;br /&gt;
| The minimum possible grade.&lt;br /&gt;
|-&lt;br /&gt;
| maxgrade&lt;br /&gt;
| float(10,5)&lt;br /&gt;
| The maximum possible grade.&lt;br /&gt;
|-&lt;br /&gt;
| rawgrade&lt;br /&gt;
| float(10,5)&lt;br /&gt;
| The points earned, should be between the minimum and maximum grades.&lt;br /&gt;
|-&lt;br /&gt;
| timemodified&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time modified.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_marks ==&lt;br /&gt;
&lt;br /&gt;
Relations: course, user, outcome&lt;br /&gt;
&lt;br /&gt;
Purpose: Graders will manually mark the student as having Met or Not Met an outcome. The recommendation engines will make a recommendation to the grader based on user attempts against content that has been mapped to the outcome.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| courseid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to course table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| userid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table. This is the user who is receiving the mark.&lt;br /&gt;
|-&lt;br /&gt;
| graderid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table. This is the user is doing the marking.&lt;br /&gt;
|-&lt;br /&gt;
| result&lt;br /&gt;
| int(2)&lt;br /&gt;
| 0 is not pass, 1 is pass, null is that no decision has been made yet.&lt;br /&gt;
|-&lt;br /&gt;
| timemodified&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time modified.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_marks_history ==&lt;br /&gt;
&lt;br /&gt;
Relations: course, user, outcome, outcome_marks&lt;br /&gt;
&lt;br /&gt;
Purpose: Keep track of past markings.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| action&lt;br /&gt;
| int(3)&lt;br /&gt;
| The action taken against the outcome_mark record: 1 is create, 2 is update and 3 is delete.&lt;br /&gt;
|-&lt;br /&gt;
| outcomemarkid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_marks table. Though the record could be missing from outcome_marks.&lt;br /&gt;
|-&lt;br /&gt;
| courseid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to course table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| userid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table. This is the user who is receiving the mark.&lt;br /&gt;
|-&lt;br /&gt;
| graderid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table. This is the user is doing the marking.&lt;br /&gt;
|-&lt;br /&gt;
| result&lt;br /&gt;
| int(2)&lt;br /&gt;
| 0 is not pass, 1 is pass, null is that no decision has been made yet.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_awards ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome, user&lt;br /&gt;
&lt;br /&gt;
Purpose: This preserves any outcomes earned by a student, regardless if the course is deleted or not.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| userid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Architecture =&lt;br /&gt;
&lt;br /&gt;
The outcome API, outcome administrative settings, outcome associations and other UIs that drives outcomes will be located inside of the top level outcome/ directory.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Models and repository mappers:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* outcome: Represents a single outcome&lt;br /&gt;
* outcome set: Represents a group of outcomes&lt;br /&gt;
* outcome content: An outcome association to content.&lt;br /&gt;
* outcome attempt: An attempt made against an outcome.&lt;br /&gt;
* outcome mark: A teacher marking an outcome against a user.&lt;br /&gt;
* outcome award: An awarded outcome at the site level.&lt;br /&gt;
&lt;br /&gt;
A repository mapper would include ways to store the model and ways to retrieve them in a re-usable and organized manner.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Collections:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
A group of models that you may take action on or filter. Example of a third party library that helps to manage collections: https://github.com/doctrine/collections&lt;br /&gt;
&lt;br /&gt;
Collections may or may not be used, but some possible collections would be the following:&lt;br /&gt;
&lt;br /&gt;
* outcomes&lt;br /&gt;
* outcome attempts&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;New mform elements:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
For most plugins, the process of associating an outcome would be done through a Moodle form. Proposing adding a new Moodle form element that can be added to a form to provide the necessary UI. An API for validating and saving the new mform element will be provided. In addition, the mform element will just be a wrapper around a well formed API that could be used on it’s own when other use cases present themselves.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;API for plugins&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Beyond the mform element, plugins may interact with outcomes in order to provide a richer integration. An API will be provided to assist with the following (not an exhaustive list):&lt;br /&gt;
&lt;br /&gt;
* A way to notify the outcome system that a content item is or is not being used within a course.&lt;br /&gt;
** Example: When a question is authored at the site level and then is actually used within a course, it must inform the outcome system that it is in use. This could potentially be done via events or just direct API calls at the appropriate times. Same goes for when a question is no longer used within a course.&lt;br /&gt;
* Record an attempt made against a content item.&lt;br /&gt;
** Examples: A question has been attempted or an assignment submission has been graded.&lt;br /&gt;
* A way to retrieve associated outcomes.&lt;br /&gt;
* A way to update, delete or otherwise modify the associated outcomes.&lt;br /&gt;
* A way to pick outcome associations (EG: what the mform element would do).&lt;br /&gt;
* A method of syncing up attempts against a content item. This would be used when associating an outcome on content that has already been graded/attempted.&lt;br /&gt;
* API to cleanup tables on course deletion.&lt;br /&gt;
&lt;br /&gt;
== Attempts ==&lt;br /&gt;
&lt;br /&gt;
Addition information about outcome attempt handling.&lt;br /&gt;
&lt;br /&gt;
* If Advanced Grading Method used then remove attempts if submission is removed&lt;br /&gt;
* If directly associated to activity then remove attempts if submission is removed and multiple graded submissions are allowed (i.e. Quiz, Lesson, Scorm) OR if grade removed from gradebook for other activities&lt;br /&gt;
* Whenever the all outcomes are removed from the object, it would remove the associated attempts.&lt;br /&gt;
* If a question is in use and is edited to now include outcomes, then outcome attempts are not generated unless the quiz is re-graded.&lt;br /&gt;
&lt;br /&gt;
== Supported plugin type plugins ==&lt;br /&gt;
&lt;br /&gt;
This may sound a little odd, but basically the point of these plugins is to add support for a plugin type to the outcome system. These types would assist in interpreting outcome content associations. Examples:&lt;br /&gt;
&lt;br /&gt;
* Given an outcome association, please provide a link to the mapped content.&lt;br /&gt;
** For an activity, this would be a link to the module.&lt;br /&gt;
** For a grading form, a link to the grading instance.&lt;br /&gt;
** For a question, a link to the question instance in the question bank.&lt;br /&gt;
* What are all of the content items that have not been mapped?&lt;br /&gt;
** For activities, this would return instances that are not mapped.&lt;br /&gt;
** For grading form, this would return sub-plugin specific information, like criteria.&lt;br /&gt;
** For questions, this would return questions from the course question bank that are not mapped.&lt;br /&gt;
* May assist with automatic cleanup when the content is deleted.&lt;br /&gt;
* Also other meta data could be derived, like plugin type name.&lt;br /&gt;
&lt;br /&gt;
This plugin would live under outcome/support/ and would initially ship with support of the following plugin types:&lt;br /&gt;
&lt;br /&gt;
* mod&lt;br /&gt;
* qtype&lt;br /&gt;
* gradingform: note that this integration would be deeper in that each gradingform plugin would need to implement something in order to help interpret associations. The reason being is that outcomes are being associated to plugin specific content, instead of something generic like the grading instance.&lt;br /&gt;
&lt;br /&gt;
== Import and export plugins ==&lt;br /&gt;
&lt;br /&gt;
The outcome system would support the exporting of outcome sets. The first export plugin would be a very simple JSON export that is specific to Moodle itself. This would be used for moving custom outcomes from one Moodle site to another.&lt;br /&gt;
&lt;br /&gt;
The outcome system would support importing outcome sets. Initially, there would be support for importing outcomes from [http://asn.jesandco.org Achievement Standards Network (ASN)] ([http://standards.jesandco.org/wiki/ASN_Application_Profile Format Specification]) and importing the JSON export from above.&lt;br /&gt;
&lt;br /&gt;
Both of the outcomes import and export processes would be a plugin based, so other formats could be supported by creating new plugins. The import and export plugins would live under outcome/import/ and outcome/export/.&lt;br /&gt;
&lt;br /&gt;
== Recommendation engine plugins ==&lt;br /&gt;
&lt;br /&gt;
The outcome system would provide a way to recommend to a teacher whether a student should be marked as completing the outcome or not. These plugins should have full Moodle plugin support because they may need to listen to events, run crons, have DB tables, global settings, etc. These plugins would live under outcome/engine/. Recommendations would be generated on demand and stored in MUC.&lt;br /&gt;
&lt;br /&gt;
Initially, the only plugin would be a percentage based recommendation engine. It would be configurable for a specific threshold that would determine if an attempt against an outcome should be considered correct or incorrect. It would then process the outcome attempts to determine the recommendation.&lt;br /&gt;
&lt;br /&gt;
Recommendation engines should also be enabled or disabled at the site level. This would require a “Manage recommendation engines” section in the admin site settings.&lt;br /&gt;
&lt;br /&gt;
= Reporting =&lt;br /&gt;
&lt;br /&gt;
== Site ==&lt;br /&gt;
&lt;br /&gt;
The following reports:&lt;br /&gt;
&lt;br /&gt;
* Outcomes Coverage report - shows outcomes that have been mapped to content in the site.&lt;br /&gt;
* Outcomes Performance report - shows performance on outcomes at the site level. Optionally broken down by course.&lt;br /&gt;
&lt;br /&gt;
== Course ==&lt;br /&gt;
&lt;br /&gt;
The following reports:&lt;br /&gt;
&lt;br /&gt;
* Outcomes Coverage report - shows outcomes that have been mapped in this course.&lt;br /&gt;
* Outcomes: Unmapped Content report - shows content that is not mapped to an outcome.&lt;br /&gt;
* Outcomes Performance report - shows aggregated performance on outcomes in the course.&lt;br /&gt;
* Outcomes Student Performance report - shows student performance on outcomes in the course for the teacher.&lt;br /&gt;
* Outcomes Personal Performance report - shows student performance on outcomes in the course for the student.&lt;br /&gt;
&lt;br /&gt;
== User profile ==&lt;br /&gt;
&lt;br /&gt;
At the very least, there will be a user site report where the user can see earned outcomes.&lt;br /&gt;
&lt;br /&gt;
= Grading =&lt;br /&gt;
&lt;br /&gt;
Outcome Completion Marking is done by course graders and is the final check point for if a learner has earned an outcome or not. The proposed location is to use the Outcome tab that is currently in the grades section of the course. This would also highjack the Outcomes link under Grade administration and Course administration.&lt;br /&gt;
&lt;br /&gt;
= Logging =&lt;br /&gt;
&lt;br /&gt;
We want to audit most actions in the Moodle log. These actions include:&lt;br /&gt;
&lt;br /&gt;
* CRUD type actions.&lt;br /&gt;
* Any association editing. EG: associating an outcome with a course, content item, etc.&lt;br /&gt;
* Outcome marking.&lt;br /&gt;
* User attempts against outcomes.&lt;br /&gt;
&lt;br /&gt;
= Role capabilities =&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Description&lt;br /&gt;
! Capability&lt;br /&gt;
|-&lt;br /&gt;
| Map outcomes to content&lt;br /&gt;
| moodle/outcome:mapoutcomes&lt;br /&gt;
|-&lt;br /&gt;
| Map outcome sets to courses&lt;br /&gt;
| moodle/outcome:mapoutcomesets&lt;br /&gt;
|-&lt;br /&gt;
| Edit outcomes&lt;br /&gt;
| moodle/outcome:edit&lt;br /&gt;
|-&lt;br /&gt;
| Export outcomes&lt;br /&gt;
| moodle/outcome:export&lt;br /&gt;
|-&lt;br /&gt;
| Import outcomes&lt;br /&gt;
| moodle/outcome:import&lt;br /&gt;
|-&lt;br /&gt;
| Each report will have a capability to view them.&lt;br /&gt;
| report/REPORTNAME:view&lt;br /&gt;
|-&lt;br /&gt;
| Marking outcomes by graders&lt;br /&gt;
| moodle/grade:edit&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Backup and restore =&lt;br /&gt;
&lt;br /&gt;
The workflow for backup and restore may go like:&lt;br /&gt;
&lt;br /&gt;
* Same site, then just map to existing outcomes via the identifier.&lt;br /&gt;
* Not same site, then the assumption is that the outcome set should be imported first, then we can map to existing outcomes via the identifier like in our same site scenario.&lt;br /&gt;
&lt;br /&gt;
Outcomes would probably take advantage of the backup plugin API to backup outcome associations to modules, question, etc. So, for example:&lt;br /&gt;
&lt;br /&gt;
* Outcomes would plug into activities in order to backup outcome associations and attempts.&lt;br /&gt;
* Outcomes would plug into questions in order to backup outcome associations and attempts.&lt;br /&gt;
* Grading forms would have to manually outcome associations and attempts. Will strive to make code re-usable.&lt;br /&gt;
&lt;br /&gt;
= Migration of old outcomes =&lt;br /&gt;
&lt;br /&gt;
Please first review [[Migration and Technical Issues]]. This still needs to be flushed out some more, but since the migration requires user interaction, we may need to create an admin tool to handle the migration. Until outcomes are migrated, it might make sense to continue to show the outcomes in the grade book, but remove the ability to do any editing of old outcomes.&lt;br /&gt;
&lt;br /&gt;
= Change History =&lt;br /&gt;
&lt;br /&gt;
* Added Architecture &amp;gt; Attempts section --[[User:Mark Nielsen|Mark Nielsen]] 08:01, 4 May 2013 (WST)&lt;br /&gt;
* Schema changes --[[User:Mark Nielsen|Mark Nielsen]] 07:57, 4 May 2013 (WST)&lt;br /&gt;
** Removed outcome_sets.userid&lt;br /&gt;
** Removed outcome_areas.deleted&lt;br /&gt;
** Added outcome_attempts.itemid&lt;br /&gt;
** Added outcome_attempts.timemodified&lt;/div&gt;</summary>
		<author><name>Bushido</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=Outcomes_Technical_Specification&amp;diff=39613</id>
		<title>Outcomes Technical Specification</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=Outcomes_Technical_Specification&amp;diff=39613"/>
		<updated>2013-05-12T17:32:47Z</updated>

		<summary type="html">&lt;p&gt;Bushido: /* outcome */ Removed outcome.name and outcome.description is now required&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
&lt;br /&gt;
Please be familiar with the function specification as outlined in the [[Outcomes Specification]]. The functional specification will provide details about the concepts and goals of this project. In particular, the following sections provide the overview of the system by user role:&lt;br /&gt;
&lt;br /&gt;
* [[Outcomes Administrator Specification]]&lt;br /&gt;
* [[Outcomes Instructor Specification]]&lt;br /&gt;
* [[Outcomes Student Specification]]&lt;br /&gt;
&lt;br /&gt;
In addition, some features and use cases are known but not yet being implemented. Please see [[Specifically Excluded Use Cases]]. Specifically, this initial version will not be attempting to map an existing outcome set to a new version of the outcome set on import.&lt;br /&gt;
&lt;br /&gt;
This document attempts to capture how the functional specification would be implemented in Moodle.&lt;br /&gt;
&lt;br /&gt;
= Backwards compatibility breaks =&lt;br /&gt;
&lt;br /&gt;
First and foremost, it is important to identify key differences between the current outcome system and this proposal as there are some philosophical shifts as well as breaking of existing code.&lt;br /&gt;
&lt;br /&gt;
# Outcomes will now only be created at the site level and then mapped to courses and content. Outcomes will no longer be created at the course level.&lt;br /&gt;
# Anything using the current outcome API or tables will have to be updated to use the new outcomes when appropriate.&lt;br /&gt;
# Outcomes will no longer appear in the grade book.&lt;br /&gt;
# Outcomes will no longer support scales. It is just a simple pass or fail.&lt;br /&gt;
&lt;br /&gt;
These changes will be documented in the relevant change log files.&lt;br /&gt;
&lt;br /&gt;
= Settings =&lt;br /&gt;
&lt;br /&gt;
== Site ==&lt;br /&gt;
&lt;br /&gt;
At the site level, there will be an area to do all of the configuration and setup of outcome sets. The proposed location is under Settings &amp;gt; Site Administration &amp;gt; Grades &amp;gt; Outcomes.&lt;br /&gt;
&lt;br /&gt;
In addition to managing outcomes, there will be site settings page for general outcome settings. For example, a setting to toggle if outcome idnumbers are editable or not.&lt;br /&gt;
&lt;br /&gt;
== Course ==&lt;br /&gt;
&lt;br /&gt;
When editing a course, there will be a section to associate multiple outcome sets to the course. The section will appear below the course General settings.&lt;br /&gt;
&lt;br /&gt;
This association is used to determine the relevant outcomes for the course for reporting and as a way to pre-filter outcome pickers when associating outcomes to content.&lt;br /&gt;
&lt;br /&gt;
== Activity ==&lt;br /&gt;
&lt;br /&gt;
When editing an activity, there will be a section to associate individual outcomes to the activity. This section will be provided by the moodleform_mod::standard_coursemodule_elements() callback so that all activities will be able to be associated to outcomes automatically.  In the flow of the activity&#039;s form, the outcome mapping options would appear below the grades section.  Do note though that if an activity does not support grades, it can still be mapped to outcomes.&lt;br /&gt;
&lt;br /&gt;
Graded activities will have to add additional integration points with outcomes in order to capture user attempts.&lt;br /&gt;
&lt;br /&gt;
== Advanced grading ==&lt;br /&gt;
&lt;br /&gt;
Rubrics and Marking guides will be able to associate an outcome for a criteria. API will be provided to support this, but each grading method will have to integrate with outcomes where it makes sense.&lt;br /&gt;
&lt;br /&gt;
== Questions ==&lt;br /&gt;
&lt;br /&gt;
When editing a question, there will be a section to associate individual outcomes to the question. The section can be added to question_edit_form::definition() before the Tags section.&lt;br /&gt;
&lt;br /&gt;
This association UI might behave a little differently based on the context in Moodle. If the question is being authored at the site level, then the outcome association is more free form, meaning one can select any outcome from any outcome set. If the question is being authored at the course level, then the outcome association defaults to those outcome sets that are associated to the course.&lt;br /&gt;
&lt;br /&gt;
= Data structure =&lt;br /&gt;
&lt;br /&gt;
This diagram provides an overview of how the tables relate to each other and to core tables.  Please see the below sections for details about each table.&lt;br /&gt;
&lt;br /&gt;
[[File:Outcome_ERD.jpg|frame|center|Outcomes ERD]]&lt;br /&gt;
&lt;br /&gt;
== outcome_sets ==&lt;br /&gt;
&lt;br /&gt;
Relations: none&lt;br /&gt;
&lt;br /&gt;
Purpose: An outcome set represents a collection of outcomes and perhaps some meta data regarding the revision or applicable region. Outcome sets are mapped to courses, which makes the outcomes within the set available to be mapped to course content. An example outcome set would be [http://asn.jesandco.org/resources/D2403043 Health Education Content Standards for California Public Schools, Kindergarten Through Grade Twelve].&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| idnumber&lt;br /&gt;
| varchar(255), unique index&lt;br /&gt;
| GUID that is auto-generated if missing. Generally on import, these are provided. This would be used to identify the outcome set during import or course restore.&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| varchar(255)&lt;br /&gt;
| The name of the outcome set&lt;br /&gt;
|-&lt;br /&gt;
| description&lt;br /&gt;
| text, default null, optional&lt;br /&gt;
| The plain text description of the outcome.&lt;br /&gt;
|-&lt;br /&gt;
| provider&lt;br /&gt;
| varchar(255), default null, optional&lt;br /&gt;
| Provider information regarding the outcome set. EG: Could be set to ASN.&lt;br /&gt;
|-&lt;br /&gt;
| revision&lt;br /&gt;
| varchar(255), default null, optional&lt;br /&gt;
| Version information regarding the outcome set. This will typically be a date or year, EG: 2011&lt;br /&gt;
|-&lt;br /&gt;
| region&lt;br /&gt;
| varchar(255), default null, optional&lt;br /&gt;
| Any region information. Example: In the US this could be a state name.&lt;br /&gt;
|-&lt;br /&gt;
| deleted&lt;br /&gt;
| int(1), default 0&lt;br /&gt;
| If the outcome set has been deleted.&lt;br /&gt;
|-&lt;br /&gt;
| timemodified&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time modified.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome_sets, outcome&lt;br /&gt;
&lt;br /&gt;
Purpose: Stores information regarding an individual outcome. Outcomes can be stored in a hierarchy, but the hierarchy is visual only. This means that if an outcome is earned, then only that outcome is earned, not it and all of its children. Also, if all child outcomes are earned, then parent outcomes are not also automatically earned. In addition, sometimes outcomes are not assessable, but are only there for extra context in the hierarchy. This identifies that the outcome cannot be mapped to content, nor can a student earn it.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomesetid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_sets table.&lt;br /&gt;
|-&lt;br /&gt;
| parentid&lt;br /&gt;
| int(10), indexed, default null&lt;br /&gt;
| Self referencing key. Identifies the parent outcome in the hierarchy.&lt;br /&gt;
|-&lt;br /&gt;
| idnumber&lt;br /&gt;
| varchar(255), unique index&lt;br /&gt;
| GUID that is auto-generated if missing. Generally on import, these are provided. This would be used to identify the outcome set during import or course restore.&lt;br /&gt;
|-&lt;br /&gt;
| docnum&lt;br /&gt;
| varchar(255), default null, optional&lt;br /&gt;
| Field for tracking additional information on the outcome. EG: 2.3.A&lt;br /&gt;
|-&lt;br /&gt;
| description&lt;br /&gt;
| text&lt;br /&gt;
| The plain text description of the outcome.&lt;br /&gt;
|-&lt;br /&gt;
| assessable&lt;br /&gt;
| int(1)&lt;br /&gt;
| If set to 1, then the outcome is assessable and can be mapped to content. If set to 0, then the outcome is not assessable and cannot be mapped to content.&lt;br /&gt;
|-&lt;br /&gt;
| deleted&lt;br /&gt;
| int(1), default 0&lt;br /&gt;
| If the outcome has been deleted.&lt;br /&gt;
|-&lt;br /&gt;
| sortorder&lt;br /&gt;
| int(10)&lt;br /&gt;
| The sort order. This is 0-X for all outcomes that belong to the same outcome set.&lt;br /&gt;
|-&lt;br /&gt;
| timemodified&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time modified.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_metadata ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome&lt;br /&gt;
&lt;br /&gt;
Purpose: Represents additional meta information regarding outcomes. Only support for “Education Level” (K, 1, … 12, etc.) and “Subjects” (e.g. Math, English, etc.) will be available out of the box, but additional data points can be added later (which would need to be added to the UI). One outcome could have many meta values. For example: an outcome could be associated to many educational levels and subjects.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| varchar(255), indexed&lt;br /&gt;
| The name of the meta data.&lt;br /&gt;
|-&lt;br /&gt;
| value&lt;br /&gt;
| varchar(1333), indexed&lt;br /&gt;
| The value of the meta data.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_areas ==&lt;br /&gt;
&lt;br /&gt;
Relations: dynamic with core tables&lt;br /&gt;
&lt;br /&gt;
Purpose: This represents that a content item has been mapped to an outcome or to multiple outcomes. Check the outcome_area_outcomes table for the specific outcomes.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| component&lt;br /&gt;
| varchar(100), indexed&lt;br /&gt;
| The name of the component.&lt;br /&gt;
|-&lt;br /&gt;
| area&lt;br /&gt;
| varchar(50), default null, indexed, optional&lt;br /&gt;
| The name of the area. Used when a component has multiple items to associate to outcomes.&lt;br /&gt;
|-&lt;br /&gt;
| itemid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| The item ID.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_area_outcomes ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome, outcome_areas&lt;br /&gt;
&lt;br /&gt;
Purpose: This represents the one to many relationship of a single content item mapped to many outcomes.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomeareaid&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Foreign key to outcome_areas table.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_used_areas ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome_areas, course_modules&lt;br /&gt;
&lt;br /&gt;
Purpose: Associates an outcome content item with an activity. For example: a question is created in the site question bank and outcomes are associated to the question. Once that question is added to a Quiz then that association is stored in this table so the outcome system knows that the content item and its outcomes are in use.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| cmid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to course_modules table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomeareaid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_areas table.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_used_sets ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome_sets, course&lt;br /&gt;
&lt;br /&gt;
Purpose: Associates an outcome set with the course. Filtering of the outcome set is optionally allowed since outcome sets can span multiple educational levels and even subjects. Once an outcome set is mapped to the course, then the outcomes in the outcome set are available to be mapped to course content.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| courseid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to course table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomesetid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_sets table.&lt;br /&gt;
|-&lt;br /&gt;
| filter&lt;br /&gt;
| text, default null&lt;br /&gt;
| Some outcome sets span multiple education levels and subjects. So, when mapping an outcome set to a course, it may make sense to restrict the available outcomes to a specific education level(s) and/or subject(s). This information would be serialized into this field.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_attempts ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome_used_areas, user&lt;br /&gt;
&lt;br /&gt;
Purpose: Track a user attempt against a content item within a particular activity. The idea here is to aggregate attempt information so that the recommendation engines (detailed below) have an easily accessible data set to process. This does not mean however that recommendation engines are only limited to this data as one could mine for additional data where needed.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomeusedareaid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_used_areas table.&lt;br /&gt;
|-&lt;br /&gt;
| userid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table.&lt;br /&gt;
|-&lt;br /&gt;
| itemid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Used to identify the attempt for updates.  For example, might be a quiz attempt record ID.&lt;br /&gt;
|-&lt;br /&gt;
| percentgrade&lt;br /&gt;
| float(10,5)&lt;br /&gt;
| Percent grade earned on this attempt.&lt;br /&gt;
|-&lt;br /&gt;
| mingrade&lt;br /&gt;
| float(10,5)&lt;br /&gt;
| The minimum possible grade.&lt;br /&gt;
|-&lt;br /&gt;
| maxgrade&lt;br /&gt;
| float(10,5)&lt;br /&gt;
| The maximum possible grade.&lt;br /&gt;
|-&lt;br /&gt;
| rawgrade&lt;br /&gt;
| float(10,5)&lt;br /&gt;
| The points earned, should be between the minimum and maximum grades.&lt;br /&gt;
|-&lt;br /&gt;
| timemodified&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time modified.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_marks ==&lt;br /&gt;
&lt;br /&gt;
Relations: course, user, outcome&lt;br /&gt;
&lt;br /&gt;
Purpose: Graders will manually mark the student as having Met or Not Met an outcome. The recommendation engines will make a recommendation to the grader based on user attempts against content that has been mapped to the outcome.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| courseid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to course table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| userid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table. This is the user who is receiving the mark.&lt;br /&gt;
|-&lt;br /&gt;
| graderid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table. This is the user is doing the marking.&lt;br /&gt;
|-&lt;br /&gt;
| result&lt;br /&gt;
| int(2)&lt;br /&gt;
| 0 is not pass, 1 is pass, null is that no decision has been made yet.&lt;br /&gt;
|-&lt;br /&gt;
| timemodified&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time modified.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_marks_history ==&lt;br /&gt;
&lt;br /&gt;
Relations: course, user, outcome, outcome_marks&lt;br /&gt;
&lt;br /&gt;
Purpose: Keep track of past markings.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomemarkid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_marks table. Though the record could be missing from outcome_marks.&lt;br /&gt;
|-&lt;br /&gt;
| courseid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to course table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| userid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table. This is the user who is receiving the mark.&lt;br /&gt;
|-&lt;br /&gt;
| graderid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table. This is the user is doing the marking.&lt;br /&gt;
|-&lt;br /&gt;
| result&lt;br /&gt;
| int(2)&lt;br /&gt;
| 0 is not pass, 1 is pass, null is that no decision has been made yet.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_awards ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome, user&lt;br /&gt;
&lt;br /&gt;
Purpose: This preserves any outcomes earned by a student, regardless if the course is deleted or not.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| userid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Architecture =&lt;br /&gt;
&lt;br /&gt;
The outcome API, outcome administrative settings, outcome associations and other UIs that drives outcomes will be located inside of the top level outcome/ directory.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Models and repository mappers:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* outcome: Represents a single outcome&lt;br /&gt;
* outcome set: Represents a group of outcomes&lt;br /&gt;
* outcome content: An outcome association to content.&lt;br /&gt;
* outcome attempt: An attempt made against an outcome.&lt;br /&gt;
* outcome mark: A teacher marking an outcome against a user.&lt;br /&gt;
* outcome award: An awarded outcome at the site level.&lt;br /&gt;
&lt;br /&gt;
A repository mapper would include ways to store the model and ways to retrieve them in a re-usable and organized manner.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Collections:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
A group of models that you may take action on or filter. Example of a third party library that helps to manage collections: https://github.com/doctrine/collections&lt;br /&gt;
&lt;br /&gt;
Collections may or may not be used, but some possible collections would be the following:&lt;br /&gt;
&lt;br /&gt;
* outcomes&lt;br /&gt;
* outcome attempts&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;New mform elements:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
For most plugins, the process of associating an outcome would be done through a Moodle form. Proposing adding a new Moodle form element that can be added to a form to provide the necessary UI. An API for validating and saving the new mform element will be provided. In addition, the mform element will just be a wrapper around a well formed API that could be used on it’s own when other use cases present themselves.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;API for plugins&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Beyond the mform element, plugins may interact with outcomes in order to provide a richer integration. An API will be provided to assist with the following (not an exhaustive list):&lt;br /&gt;
&lt;br /&gt;
* A way to notify the outcome system that a content item is or is not being used within a course.&lt;br /&gt;
** Example: When a question is authored at the site level and then is actually used within a course, it must inform the outcome system that it is in use. This could potentially be done via events or just direct API calls at the appropriate times. Same goes for when a question is no longer used within a course.&lt;br /&gt;
* Record an attempt made against a content item.&lt;br /&gt;
** Examples: A question has been attempted or an assignment submission has been graded.&lt;br /&gt;
* A way to retrieve associated outcomes.&lt;br /&gt;
* A way to update, delete or otherwise modify the associated outcomes.&lt;br /&gt;
* A way to pick outcome associations (EG: what the mform element would do).&lt;br /&gt;
* A method of syncing up attempts against a content item. This would be used when associating an outcome on content that has already been graded/attempted.&lt;br /&gt;
* API to cleanup tables on course deletion.&lt;br /&gt;
&lt;br /&gt;
== Attempts ==&lt;br /&gt;
&lt;br /&gt;
Addition information about outcome attempt handling.&lt;br /&gt;
&lt;br /&gt;
* If Advanced Grading Method used then remove attempts if submission is removed&lt;br /&gt;
* If directly associated to activity then remove attempts if submission is removed and multiple graded submissions are allowed (i.e. Quiz, Lesson, Scorm) OR if grade removed from gradebook for other activities&lt;br /&gt;
* Whenever the all outcomes are removed from the object, it would remove the associated attempts.&lt;br /&gt;
* If a question is in use and is edited to now include outcomes, then outcome attempts are not generated unless the quiz is re-graded.&lt;br /&gt;
&lt;br /&gt;
== Supported plugin type plugins ==&lt;br /&gt;
&lt;br /&gt;
This may sound a little odd, but basically the point of these plugins is to add support for a plugin type to the outcome system. These types would assist in interpreting outcome content associations. Examples:&lt;br /&gt;
&lt;br /&gt;
* Given an outcome association, please provide a link to the mapped content.&lt;br /&gt;
** For an activity, this would be a link to the module.&lt;br /&gt;
** For a grading form, a link to the grading instance.&lt;br /&gt;
** For a question, a link to the question instance in the question bank.&lt;br /&gt;
* What are all of the content items that have not been mapped?&lt;br /&gt;
** For activities, this would return instances that are not mapped.&lt;br /&gt;
** For grading form, this would return sub-plugin specific information, like criteria.&lt;br /&gt;
** For questions, this would return questions from the course question bank that are not mapped.&lt;br /&gt;
* May assist with automatic cleanup when the content is deleted.&lt;br /&gt;
* Also other meta data could be derived, like plugin type name.&lt;br /&gt;
&lt;br /&gt;
This plugin would live under outcome/support/ and would initially ship with support of the following plugin types:&lt;br /&gt;
&lt;br /&gt;
* mod&lt;br /&gt;
* qtype&lt;br /&gt;
* gradingform: note that this integration would be deeper in that each gradingform plugin would need to implement something in order to help interpret associations. The reason being is that outcomes are being associated to plugin specific content, instead of something generic like the grading instance.&lt;br /&gt;
&lt;br /&gt;
== Import and export plugins ==&lt;br /&gt;
&lt;br /&gt;
The outcome system would support the exporting of outcome sets. The first export plugin would be a very simple JSON export that is specific to Moodle itself. This would be used for moving custom outcomes from one Moodle site to another.&lt;br /&gt;
&lt;br /&gt;
The outcome system would support importing outcome sets. Initially, there would be support for importing outcomes from [http://asn.jesandco.org Achievement Standards Network (ASN)] ([http://standards.jesandco.org/wiki/ASN_Application_Profile Format Specification]) and importing the JSON export from above.&lt;br /&gt;
&lt;br /&gt;
Both of the outcomes import and export processes would be a plugin based, so other formats could be supported by creating new plugins. The import and export plugins would live under outcome/import/ and outcome/export/.&lt;br /&gt;
&lt;br /&gt;
== Recommendation engine plugins ==&lt;br /&gt;
&lt;br /&gt;
The outcome system would provide a way to recommend to a teacher whether a student should be marked as completing the outcome or not. These plugins should have full Moodle plugin support because they may need to listen to events, run crons, have DB tables, global settings, etc. These plugins would live under outcome/engine/. Recommendations would be generated on demand and stored in MUC.&lt;br /&gt;
&lt;br /&gt;
Initially, the only plugin would be a percentage based recommendation engine. It would be configurable for a specific threshold that would determine if an attempt against an outcome should be considered correct or incorrect. It would then process the outcome attempts to determine the recommendation.&lt;br /&gt;
&lt;br /&gt;
Recommendation engines should also be enabled or disabled at the site level. This would require a “Manage recommendation engines” section in the admin site settings.&lt;br /&gt;
&lt;br /&gt;
= Reporting =&lt;br /&gt;
&lt;br /&gt;
== Site ==&lt;br /&gt;
&lt;br /&gt;
The following reports:&lt;br /&gt;
&lt;br /&gt;
* Outcomes Coverage report - shows outcomes that have been mapped to content in the site.&lt;br /&gt;
* Outcomes Performance report - shows performance on outcomes at the site level. Optionally broken down by course.&lt;br /&gt;
&lt;br /&gt;
== Course ==&lt;br /&gt;
&lt;br /&gt;
The following reports:&lt;br /&gt;
&lt;br /&gt;
* Outcomes Coverage report - shows outcomes that have been mapped in this course.&lt;br /&gt;
* Outcomes: Unmapped Content report - shows content that is not mapped to an outcome.&lt;br /&gt;
* Outcomes Performance report - shows aggregated performance on outcomes in the course.&lt;br /&gt;
* Outcomes Student Performance report - shows student performance on outcomes in the course for the teacher.&lt;br /&gt;
* Outcomes Personal Performance report - shows student performance on outcomes in the course for the student.&lt;br /&gt;
&lt;br /&gt;
== User profile ==&lt;br /&gt;
&lt;br /&gt;
At the very least, there will be a user site report where the user can see earned outcomes.&lt;br /&gt;
&lt;br /&gt;
= Grading =&lt;br /&gt;
&lt;br /&gt;
Outcome Completion Marking is done by course graders and is the final check point for if a learner has earned an outcome or not. The proposed location is to use the Outcome tab that is currently in the grades section of the course. This would also highjack the Outcomes link under Grade administration and Course administration.&lt;br /&gt;
&lt;br /&gt;
= Logging =&lt;br /&gt;
&lt;br /&gt;
We want to audit most actions in the Moodle log. These actions include:&lt;br /&gt;
&lt;br /&gt;
* CRUD type actions.&lt;br /&gt;
* Any association editing. EG: associating an outcome with a course, content item, etc.&lt;br /&gt;
* Outcome marking.&lt;br /&gt;
* User attempts against outcomes.&lt;br /&gt;
&lt;br /&gt;
= Role capabilities =&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Description&lt;br /&gt;
! Capability&lt;br /&gt;
|-&lt;br /&gt;
| Map outcomes to content&lt;br /&gt;
| moodle/outcome:mapoutcomes&lt;br /&gt;
|-&lt;br /&gt;
| Map outcome sets to courses&lt;br /&gt;
| moodle/outcome:mapoutcomesets&lt;br /&gt;
|-&lt;br /&gt;
| Edit outcomes&lt;br /&gt;
| moodle/outcome:edit&lt;br /&gt;
|-&lt;br /&gt;
| Export outcomes&lt;br /&gt;
| moodle/outcome:export&lt;br /&gt;
|-&lt;br /&gt;
| Import outcomes&lt;br /&gt;
| moodle/outcome:import&lt;br /&gt;
|-&lt;br /&gt;
| Each report will have a capability to view them.&lt;br /&gt;
| report/REPORTNAME:view&lt;br /&gt;
|-&lt;br /&gt;
| Marking outcomes by graders&lt;br /&gt;
| moodle/grade:edit&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Backup and restore =&lt;br /&gt;
&lt;br /&gt;
The workflow for backup and restore may go like:&lt;br /&gt;
&lt;br /&gt;
* Same site, then just map to existing outcomes via the identifier.&lt;br /&gt;
* Not same site, then the assumption is that the outcome set should be imported first, then we can map to existing outcomes via the identifier like in our same site scenario.&lt;br /&gt;
&lt;br /&gt;
Outcomes would probably take advantage of the backup plugin API to backup outcome associations to modules, question, etc. So, for example:&lt;br /&gt;
&lt;br /&gt;
* Outcomes would plug into activities in order to backup outcome associations and attempts.&lt;br /&gt;
* Outcomes would plug into questions in order to backup outcome associations and attempts.&lt;br /&gt;
* Grading forms would have to manually outcome associations and attempts. Will strive to make code re-usable.&lt;br /&gt;
&lt;br /&gt;
= Migration of old outcomes =&lt;br /&gt;
&lt;br /&gt;
Please first review [[Migration and Technical Issues]]. This still needs to be flushed out some more, but since the migration requires user interaction, we may need to create an admin tool to handle the migration. Until outcomes are migrated, it might make sense to continue to show the outcomes in the grade book, but remove the ability to do any editing of old outcomes.&lt;br /&gt;
&lt;br /&gt;
= Change History =&lt;br /&gt;
&lt;br /&gt;
* Added Architecture &amp;gt; Attempts section --[[User:Mark Nielsen|Mark Nielsen]] 08:01, 4 May 2013 (WST)&lt;br /&gt;
* Schema changes --[[User:Mark Nielsen|Mark Nielsen]] 07:57, 4 May 2013 (WST)&lt;br /&gt;
** Removed outcome_sets.userid&lt;br /&gt;
** Removed outcome_areas.deleted&lt;br /&gt;
** Added outcome_attempts.itemid&lt;br /&gt;
** Added outcome_attempts.timemodified&lt;/div&gt;</summary>
		<author><name>Bushido</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=File:Outcome_ERD.jpg&amp;diff=39612</id>
		<title>File:Outcome ERD.jpg</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=File:Outcome_ERD.jpg&amp;diff=39612"/>
		<updated>2013-05-12T17:31:15Z</updated>

		<summary type="html">&lt;p&gt;Bushido: uploaded a new version of &amp;amp;quot;File:Outcome ERD.jpg&amp;amp;quot;: Added outcome_marks_history.action field
Removed outcome.name field&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Outcomes ERD&lt;/div&gt;</summary>
		<author><name>Bushido</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=Outcomes_Technical_Specification&amp;diff=39515</id>
		<title>Outcomes Technical Specification</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=Outcomes_Technical_Specification&amp;diff=39515"/>
		<updated>2013-05-04T00:01:09Z</updated>

		<summary type="html">&lt;p&gt;Bushido: /* Change History */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
&lt;br /&gt;
Please be familiar with the function specification as outlined in the [[Outcomes Specification]]. The functional specification will provide details about the concepts and goals of this project. In particular, the following sections provide the overview of the system by user role:&lt;br /&gt;
&lt;br /&gt;
* [[Outcomes Administrator Specification]]&lt;br /&gt;
* [[Outcomes Instructor Specification]]&lt;br /&gt;
* [[Outcomes Student Specification]]&lt;br /&gt;
&lt;br /&gt;
In addition, some features and use cases are known but not yet being implemented. Please see [[Specifically Excluded Use Cases]]. Specifically, this initial version will not be attempting to map an existing outcome set to a new version of the outcome set on import.&lt;br /&gt;
&lt;br /&gt;
This document attempts to capture how the functional specification would be implemented in Moodle.&lt;br /&gt;
&lt;br /&gt;
= Backwards compatibility breaks =&lt;br /&gt;
&lt;br /&gt;
First and foremost, it is important to identify key differences between the current outcome system and this proposal as there are some philosophical shifts as well as breaking of existing code.&lt;br /&gt;
&lt;br /&gt;
# Outcomes will now only be created at the site level and then mapped to courses and content. Outcomes will no longer be created at the course level.&lt;br /&gt;
# Anything using the current outcome API or tables will have to be updated to use the new outcomes when appropriate.&lt;br /&gt;
# Outcomes will no longer appear in the grade book.&lt;br /&gt;
# Outcomes will no longer support scales. It is just a simple pass or fail.&lt;br /&gt;
&lt;br /&gt;
These changes will be documented in the relevant change log files.&lt;br /&gt;
&lt;br /&gt;
= Settings =&lt;br /&gt;
&lt;br /&gt;
== Site ==&lt;br /&gt;
&lt;br /&gt;
At the site level, there will be an area to do all of the configuration and setup of outcome sets. The proposed location is under Settings &amp;gt; Site Administration &amp;gt; Grades &amp;gt; Outcomes.&lt;br /&gt;
&lt;br /&gt;
In addition to managing outcomes, there will be site settings page for general outcome settings. For example, a setting to toggle if outcome idnumbers are editable or not.&lt;br /&gt;
&lt;br /&gt;
== Course ==&lt;br /&gt;
&lt;br /&gt;
When editing a course, there will be a section to associate multiple outcome sets to the course. The section will appear below the course General settings.&lt;br /&gt;
&lt;br /&gt;
This association is used to determine the relevant outcomes for the course for reporting and as a way to pre-filter outcome pickers when associating outcomes to content.&lt;br /&gt;
&lt;br /&gt;
== Activity ==&lt;br /&gt;
&lt;br /&gt;
When editing an activity, there will be a section to associate individual outcomes to the activity. This section will be provided by the moodleform_mod::standard_coursemodule_elements() callback so that all activities will be able to be associated to outcomes automatically.  In the flow of the activity&#039;s form, the outcome mapping options would appear below the grades section.  Do note though that if an activity does not support grades, it can still be mapped to outcomes.&lt;br /&gt;
&lt;br /&gt;
Graded activities will have to add additional integration points with outcomes in order to capture user attempts.&lt;br /&gt;
&lt;br /&gt;
== Advanced grading ==&lt;br /&gt;
&lt;br /&gt;
Rubrics and Marking guides will be able to associate an outcome for a criteria. API will be provided to support this, but each grading method will have to integrate with outcomes where it makes sense.&lt;br /&gt;
&lt;br /&gt;
== Questions ==&lt;br /&gt;
&lt;br /&gt;
When editing a question, there will be a section to associate individual outcomes to the question. The section can be added to question_edit_form::definition() before the Tags section.&lt;br /&gt;
&lt;br /&gt;
This association UI might behave a little differently based on the context in Moodle. If the question is being authored at the site level, then the outcome association is more free form, meaning one can select any outcome from any outcome set. If the question is being authored at the course level, then the outcome association defaults to those outcome sets that are associated to the course.&lt;br /&gt;
&lt;br /&gt;
= Data structure =&lt;br /&gt;
&lt;br /&gt;
This diagram provides an overview of how the tables relate to each other and to core tables.  Please see the below sections for details about each table.&lt;br /&gt;
&lt;br /&gt;
[[File:Outcome_ERD.jpg|frame|center|Outcomes ERD]]&lt;br /&gt;
&lt;br /&gt;
== outcome_sets ==&lt;br /&gt;
&lt;br /&gt;
Relations: none&lt;br /&gt;
&lt;br /&gt;
Purpose: An outcome set represents a collection of outcomes and perhaps some meta data regarding the revision or applicable region. Outcome sets are mapped to courses, which makes the outcomes within the set available to be mapped to course content. An example outcome set would be [http://asn.jesandco.org/resources/D2403043 Health Education Content Standards for California Public Schools, Kindergarten Through Grade Twelve].&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| idnumber&lt;br /&gt;
| varchar(255), unique index&lt;br /&gt;
| GUID that is auto-generated if missing. Generally on import, these are provided. This would be used to identify the outcome set during import or course restore.&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| varchar(255)&lt;br /&gt;
| The name of the outcome set&lt;br /&gt;
|-&lt;br /&gt;
| description&lt;br /&gt;
| text, default null, optional&lt;br /&gt;
| The plain text description of the outcome.&lt;br /&gt;
|-&lt;br /&gt;
| provider&lt;br /&gt;
| varchar(255), default null, optional&lt;br /&gt;
| Provider information regarding the outcome set. EG: Could be set to ASN.&lt;br /&gt;
|-&lt;br /&gt;
| revision&lt;br /&gt;
| varchar(255), default null, optional&lt;br /&gt;
| Version information regarding the outcome set. This will typically be a date or year, EG: 2011&lt;br /&gt;
|-&lt;br /&gt;
| region&lt;br /&gt;
| varchar(255), default null, optional&lt;br /&gt;
| Any region information. Example: In the US this could be a state name.&lt;br /&gt;
|-&lt;br /&gt;
| deleted&lt;br /&gt;
| int(1), default 0&lt;br /&gt;
| If the outcome set has been deleted.&lt;br /&gt;
|-&lt;br /&gt;
| timemodified&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time modified.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome_sets, outcome&lt;br /&gt;
&lt;br /&gt;
Purpose: Stores information regarding an individual outcome. Outcomes can be stored in a hierarchy, but the hierarchy is visual only. This means that if an outcome is earned, then only that outcome is earned, not it and all of its children. Also, if all child outcomes are earned, then parent outcomes are not also automatically earned. In addition, sometimes outcomes are not assessable, but are only there for extra context in the hierarchy. This identifies that the outcome cannot be mapped to content, nor can a student earn it.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomesetid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_sets table.&lt;br /&gt;
|-&lt;br /&gt;
| parentid&lt;br /&gt;
| int(10), indexed, default null&lt;br /&gt;
| Self referencing key. Identifies the parent outcome in the hierarchy.&lt;br /&gt;
|-&lt;br /&gt;
| idnumber&lt;br /&gt;
| varchar(255), unique index&lt;br /&gt;
| GUID that is auto-generated if missing. Generally on import, these are provided. This would be used to identify the outcome set during import or course restore.&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| varchar(255)&lt;br /&gt;
| The name of the outcome.&lt;br /&gt;
|-&lt;br /&gt;
| docnum&lt;br /&gt;
| varchar(255), default null, optional&lt;br /&gt;
| Field for tracking additional information on the outcome. EG: 2.3.A&lt;br /&gt;
|-&lt;br /&gt;
| description&lt;br /&gt;
| text, default null, optional&lt;br /&gt;
| The plain text description of the outcome.&lt;br /&gt;
|-&lt;br /&gt;
| assessable&lt;br /&gt;
| int(1)&lt;br /&gt;
| If set to 1, then the outcome is assessable and can be mapped to content. If set to 0, then the outcome is not assessable and cannot be mapped to content.&lt;br /&gt;
|-&lt;br /&gt;
| deleted&lt;br /&gt;
| int(1), default 0&lt;br /&gt;
| If the outcome has been deleted.&lt;br /&gt;
|-&lt;br /&gt;
| sortorder&lt;br /&gt;
| int(10)&lt;br /&gt;
| The sort order. This is 0-X for all outcomes that belong to the same outcome set.&lt;br /&gt;
|-&lt;br /&gt;
| timemodified&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time modified.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_metadata ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome&lt;br /&gt;
&lt;br /&gt;
Purpose: Represents additional meta information regarding outcomes. Only support for “Education Level” (K, 1, … 12, etc.) and “Subjects” (e.g. Math, English, etc.) will be available out of the box, but additional data points can be added later (which would need to be added to the UI). One outcome could have many meta values. For example: an outcome could be associated to many educational levels and subjects.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| varchar(255), indexed&lt;br /&gt;
| The name of the meta data.&lt;br /&gt;
|-&lt;br /&gt;
| value&lt;br /&gt;
| varchar(1333), indexed&lt;br /&gt;
| The value of the meta data.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_areas ==&lt;br /&gt;
&lt;br /&gt;
Relations: dynamic with core tables&lt;br /&gt;
&lt;br /&gt;
Purpose: This represents that a content item has been mapped to an outcome or to multiple outcomes. Check the outcome_area_outcomes table for the specific outcomes.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| component&lt;br /&gt;
| varchar(100), indexed&lt;br /&gt;
| The name of the component.&lt;br /&gt;
|-&lt;br /&gt;
| area&lt;br /&gt;
| varchar(50), default null, indexed, optional&lt;br /&gt;
| The name of the area. Used when a component has multiple items to associate to outcomes.&lt;br /&gt;
|-&lt;br /&gt;
| itemid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| The item ID.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_area_outcomes ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome, outcome_areas&lt;br /&gt;
&lt;br /&gt;
Purpose: This represents the one to many relationship of a single content item mapped to many outcomes.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomeareaid&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Foreign key to outcome_areas table.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_used_areas ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome_areas, course_modules&lt;br /&gt;
&lt;br /&gt;
Purpose: Associates an outcome content item with an activity. For example: a question is created in the site question bank and outcomes are associated to the question. Once that question is added to a Quiz then that association is stored in this table so the outcome system knows that the content item and its outcomes are in use.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| cmid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to course_modules table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomeareaid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_areas table.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_used_sets ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome_sets, course&lt;br /&gt;
&lt;br /&gt;
Purpose: Associates an outcome set with the course. Filtering of the outcome set is optionally allowed since outcome sets can span multiple educational levels and even subjects. Once an outcome set is mapped to the course, then the outcomes in the outcome set are available to be mapped to course content.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| courseid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to course table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomesetid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_sets table.&lt;br /&gt;
|-&lt;br /&gt;
| filter&lt;br /&gt;
| text, default null&lt;br /&gt;
| Some outcome sets span multiple education levels and subjects. So, when mapping an outcome set to a course, it may make sense to restrict the available outcomes to a specific education level(s) and/or subject(s). This information would be serialized into this field.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_attempts ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome_used_areas, user&lt;br /&gt;
&lt;br /&gt;
Purpose: Track a user attempt against a content item within a particular activity. The idea here is to aggregate attempt information so that the recommendation engines (detailed below) have an easily accessible data set to process. This does not mean however that recommendation engines are only limited to this data as one could mine for additional data where needed.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomeusedareaid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_used_areas table.&lt;br /&gt;
|-&lt;br /&gt;
| userid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table.&lt;br /&gt;
|-&lt;br /&gt;
| itemid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Used to identify the attempt for updates.  For example, might be a quiz attempt record ID.&lt;br /&gt;
|-&lt;br /&gt;
| percentgrade&lt;br /&gt;
| float(10,5)&lt;br /&gt;
| Percent grade earned on this attempt.&lt;br /&gt;
|-&lt;br /&gt;
| mingrade&lt;br /&gt;
| float(10,5)&lt;br /&gt;
| The minimum possible grade.&lt;br /&gt;
|-&lt;br /&gt;
| maxgrade&lt;br /&gt;
| float(10,5)&lt;br /&gt;
| The maximum possible grade.&lt;br /&gt;
|-&lt;br /&gt;
| rawgrade&lt;br /&gt;
| float(10,5)&lt;br /&gt;
| The points earned, should be between the minimum and maximum grades.&lt;br /&gt;
|-&lt;br /&gt;
| timemodified&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time modified.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_marks ==&lt;br /&gt;
&lt;br /&gt;
Relations: course, user, outcome&lt;br /&gt;
&lt;br /&gt;
Purpose: Graders will manually mark the student as having Met or Not Met an outcome. The recommendation engines will make a recommendation to the grader based on user attempts against content that has been mapped to the outcome.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| courseid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to course table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| userid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table. This is the user who is receiving the mark.&lt;br /&gt;
|-&lt;br /&gt;
| graderid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table. This is the user is doing the marking.&lt;br /&gt;
|-&lt;br /&gt;
| result&lt;br /&gt;
| int(2)&lt;br /&gt;
| 0 is not pass, 1 is pass, null is that no decision has been made yet.&lt;br /&gt;
|-&lt;br /&gt;
| timemodified&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time modified.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_marks_history ==&lt;br /&gt;
&lt;br /&gt;
Relations: course, user, outcome, outcome_marks&lt;br /&gt;
&lt;br /&gt;
Purpose: Keep track of past markings.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomemarkid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_marks table. Though the record could be missing from outcome_marks.&lt;br /&gt;
|-&lt;br /&gt;
| courseid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to course table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| userid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table. This is the user who is receiving the mark.&lt;br /&gt;
|-&lt;br /&gt;
| graderid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table. This is the user is doing the marking.&lt;br /&gt;
|-&lt;br /&gt;
| result&lt;br /&gt;
| int(2)&lt;br /&gt;
| 0 is not pass, 1 is pass, null is that no decision has been made yet.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_awards ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome, user&lt;br /&gt;
&lt;br /&gt;
Purpose: This preserves any outcomes earned by a student, regardless if the course is deleted or not.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| userid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Architecture =&lt;br /&gt;
&lt;br /&gt;
The outcome API, outcome administrative settings, outcome associations and other UIs that drives outcomes will be located inside of the top level outcome/ directory.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Models and repository mappers:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* outcome: Represents a single outcome&lt;br /&gt;
* outcome set: Represents a group of outcomes&lt;br /&gt;
* outcome content: An outcome association to content.&lt;br /&gt;
* outcome attempt: An attempt made against an outcome.&lt;br /&gt;
* outcome mark: A teacher marking an outcome against a user.&lt;br /&gt;
* outcome award: An awarded outcome at the site level.&lt;br /&gt;
&lt;br /&gt;
A repository mapper would include ways to store the model and ways to retrieve them in a re-usable and organized manner.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Collections:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
A group of models that you may take action on or filter. Example of a third party library that helps to manage collections: https://github.com/doctrine/collections&lt;br /&gt;
&lt;br /&gt;
Collections may or may not be used, but some possible collections would be the following:&lt;br /&gt;
&lt;br /&gt;
* outcomes&lt;br /&gt;
* outcome attempts&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;New mform elements:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
For most plugins, the process of associating an outcome would be done through a Moodle form. Proposing adding a new Moodle form element that can be added to a form to provide the necessary UI. An API for validating and saving the new mform element will be provided. In addition, the mform element will just be a wrapper around a well formed API that could be used on it’s own when other use cases present themselves.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;API for plugins&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Beyond the mform element, plugins may interact with outcomes in order to provide a richer integration. An API will be provided to assist with the following (not an exhaustive list):&lt;br /&gt;
&lt;br /&gt;
* A way to notify the outcome system that a content item is or is not being used within a course.&lt;br /&gt;
** Example: When a question is authored at the site level and then is actually used within a course, it must inform the outcome system that it is in use. This could potentially be done via events or just direct API calls at the appropriate times. Same goes for when a question is no longer used within a course.&lt;br /&gt;
* Record an attempt made against a content item.&lt;br /&gt;
** Examples: A question has been attempted or an assignment submission has been graded.&lt;br /&gt;
* A way to retrieve associated outcomes.&lt;br /&gt;
* A way to update, delete or otherwise modify the associated outcomes.&lt;br /&gt;
* A way to pick outcome associations (EG: what the mform element would do).&lt;br /&gt;
* A method of syncing up attempts against a content item. This would be used when associating an outcome on content that has already been graded/attempted.&lt;br /&gt;
* API to cleanup tables on course deletion.&lt;br /&gt;
&lt;br /&gt;
== Attempts ==&lt;br /&gt;
&lt;br /&gt;
Addition information about outcome attempt handling.&lt;br /&gt;
&lt;br /&gt;
* If Advanced Grading Method used then remove attempts if submission is removed&lt;br /&gt;
* If directly associated to activity then remove attempts if submission is removed and multiple graded submissions are allowed (i.e. Quiz, Lesson, Scorm) OR if grade removed from gradebook for other activities&lt;br /&gt;
* Whenever the all outcomes are removed from the object, it would remove the associated attempts.&lt;br /&gt;
* If a question is in use and is edited to now include outcomes, then outcome attempts are not generated unless the quiz is re-graded.&lt;br /&gt;
&lt;br /&gt;
== Supported plugin type plugins ==&lt;br /&gt;
&lt;br /&gt;
This may sound a little odd, but basically the point of these plugins is to add support for a plugin type to the outcome system. These types would assist in interpreting outcome content associations. Examples:&lt;br /&gt;
&lt;br /&gt;
* Given an outcome association, please provide a link to the mapped content.&lt;br /&gt;
** For an activity, this would be a link to the module.&lt;br /&gt;
** For a grading form, a link to the grading instance.&lt;br /&gt;
** For a question, a link to the question instance in the question bank.&lt;br /&gt;
* What are all of the content items that have not been mapped?&lt;br /&gt;
** For activities, this would return instances that are not mapped.&lt;br /&gt;
** For grading form, this would return sub-plugin specific information, like criteria.&lt;br /&gt;
** For questions, this would return questions from the course question bank that are not mapped.&lt;br /&gt;
* May assist with automatic cleanup when the content is deleted.&lt;br /&gt;
* Also other meta data could be derived, like plugin type name.&lt;br /&gt;
&lt;br /&gt;
This plugin would live under outcome/support/ and would initially ship with support of the following plugin types:&lt;br /&gt;
&lt;br /&gt;
* mod&lt;br /&gt;
* qtype&lt;br /&gt;
* gradingform: note that this integration would be deeper in that each gradingform plugin would need to implement something in order to help interpret associations. The reason being is that outcomes are being associated to plugin specific content, instead of something generic like the grading instance.&lt;br /&gt;
&lt;br /&gt;
== Import and export plugins ==&lt;br /&gt;
&lt;br /&gt;
The outcome system would support the exporting of outcome sets. The first export plugin would be a very simple JSON export that is specific to Moodle itself. This would be used for moving custom outcomes from one Moodle site to another.&lt;br /&gt;
&lt;br /&gt;
The outcome system would support importing outcome sets. Initially, there would be support for importing outcomes from [http://asn.jesandco.org Achievement Standards Network (ASN)] ([http://standards.jesandco.org/wiki/ASN_Application_Profile Format Specification]) and importing the JSON export from above.&lt;br /&gt;
&lt;br /&gt;
Both of the outcomes import and export processes would be a plugin based, so other formats could be supported by creating new plugins. The import and export plugins would live under outcome/import/ and outcome/export/.&lt;br /&gt;
&lt;br /&gt;
== Recommendation engine plugins ==&lt;br /&gt;
&lt;br /&gt;
The outcome system would provide a way to recommend to a teacher whether a student should be marked as completing the outcome or not. These plugins should have full Moodle plugin support because they may need to listen to events, run crons, have DB tables, global settings, etc. These plugins would live under outcome/engine/. Recommendations would be generated on demand and stored in MUC.&lt;br /&gt;
&lt;br /&gt;
Initially, the only plugin would be a percentage based recommendation engine. It would be configurable for a specific threshold that would determine if an attempt against an outcome should be considered correct or incorrect. It would then process the outcome attempts to determine the recommendation.&lt;br /&gt;
&lt;br /&gt;
Recommendation engines should also be enabled or disabled at the site level. This would require a “Manage recommendation engines” section in the admin site settings.&lt;br /&gt;
&lt;br /&gt;
= Reporting =&lt;br /&gt;
&lt;br /&gt;
== Site ==&lt;br /&gt;
&lt;br /&gt;
The following reports:&lt;br /&gt;
&lt;br /&gt;
* Outcomes Coverage report - shows outcomes that have been mapped to content in the site.&lt;br /&gt;
* Outcomes Performance report - shows performance on outcomes at the site level. Optionally broken down by course.&lt;br /&gt;
&lt;br /&gt;
== Course ==&lt;br /&gt;
&lt;br /&gt;
The following reports:&lt;br /&gt;
&lt;br /&gt;
* Outcomes Coverage report - shows outcomes that have been mapped in this course.&lt;br /&gt;
* Outcomes: Unmapped Content report - shows content that is not mapped to an outcome.&lt;br /&gt;
* Outcomes Performance report - shows aggregated performance on outcomes in the course.&lt;br /&gt;
* Outcomes Student Performance report - shows student performance on outcomes in the course for the teacher.&lt;br /&gt;
* Outcomes Personal Performance report - shows student performance on outcomes in the course for the student.&lt;br /&gt;
&lt;br /&gt;
== User profile ==&lt;br /&gt;
&lt;br /&gt;
At the very least, there will be a user site report where the user can see earned outcomes.&lt;br /&gt;
&lt;br /&gt;
= Grading =&lt;br /&gt;
&lt;br /&gt;
Outcome Completion Marking is done by course graders and is the final check point for if a learner has earned an outcome or not. The proposed location is to use the Outcome tab that is currently in the grades section of the course. This would also highjack the Outcomes link under Grade administration and Course administration.&lt;br /&gt;
&lt;br /&gt;
= Logging =&lt;br /&gt;
&lt;br /&gt;
We want to audit most actions in the Moodle log. These actions include:&lt;br /&gt;
&lt;br /&gt;
* CRUD type actions.&lt;br /&gt;
* Any association editing. EG: associating an outcome with a course, content item, etc.&lt;br /&gt;
* Outcome marking.&lt;br /&gt;
* User attempts against outcomes.&lt;br /&gt;
&lt;br /&gt;
= Role capabilities =&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Description&lt;br /&gt;
! Capability&lt;br /&gt;
|-&lt;br /&gt;
| Map outcomes to content&lt;br /&gt;
| moodle/outcome:mapoutcomes&lt;br /&gt;
|-&lt;br /&gt;
| Map outcome sets to courses&lt;br /&gt;
| moodle/outcome:mapoutcomesets&lt;br /&gt;
|-&lt;br /&gt;
| Edit outcomes&lt;br /&gt;
| moodle/outcome:edit&lt;br /&gt;
|-&lt;br /&gt;
| Export outcomes&lt;br /&gt;
| moodle/outcome:export&lt;br /&gt;
|-&lt;br /&gt;
| Import outcomes&lt;br /&gt;
| moodle/outcome:import&lt;br /&gt;
|-&lt;br /&gt;
| Each report will have a capability to view them.&lt;br /&gt;
| report/REPORTNAME:view&lt;br /&gt;
|-&lt;br /&gt;
| Marking outcomes by graders&lt;br /&gt;
| moodle/grade:edit&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Backup and restore =&lt;br /&gt;
&lt;br /&gt;
The workflow for backup and restore may go like:&lt;br /&gt;
&lt;br /&gt;
* Same site, then just map to existing outcomes via the identifier.&lt;br /&gt;
* Not same site, then the assumption is that the outcome set should be imported first, then we can map to existing outcomes via the identifier like in our same site scenario.&lt;br /&gt;
&lt;br /&gt;
Outcomes would probably take advantage of the backup plugin API to backup outcome associations to modules, question, etc. So, for example:&lt;br /&gt;
&lt;br /&gt;
* Outcomes would plug into activities in order to backup outcome associations and attempts.&lt;br /&gt;
* Outcomes would plug into questions in order to backup outcome associations and attempts.&lt;br /&gt;
* Grading forms would have to manually outcome associations and attempts. Will strive to make code re-usable.&lt;br /&gt;
&lt;br /&gt;
= Migration of old outcomes =&lt;br /&gt;
&lt;br /&gt;
Please first review [[Migration and Technical Issues]]. This still needs to be flushed out some more, but since the migration requires user interaction, we may need to create an admin tool to handle the migration. Until outcomes are migrated, it might make sense to continue to show the outcomes in the grade book, but remove the ability to do any editing of old outcomes.&lt;br /&gt;
&lt;br /&gt;
= Change History =&lt;br /&gt;
&lt;br /&gt;
* Added Architecture &amp;gt; Attempts section --[[User:Mark Nielsen|Mark Nielsen]] 08:01, 4 May 2013 (WST)&lt;br /&gt;
* Schema changes --[[User:Mark Nielsen|Mark Nielsen]] 07:57, 4 May 2013 (WST)&lt;br /&gt;
** Removed outcome_sets.userid&lt;br /&gt;
** Removed outcome_areas.deleted&lt;br /&gt;
** Added outcome_attempts.itemid&lt;br /&gt;
** Added outcome_attempts.timemodified&lt;/div&gt;</summary>
		<author><name>Bushido</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=Outcomes_Technical_Specification&amp;diff=39514</id>
		<title>Outcomes Technical Specification</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=Outcomes_Technical_Specification&amp;diff=39514"/>
		<updated>2013-05-04T00:00:23Z</updated>

		<summary type="html">&lt;p&gt;Bushido: /* Architecture */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
&lt;br /&gt;
Please be familiar with the function specification as outlined in the [[Outcomes Specification]]. The functional specification will provide details about the concepts and goals of this project. In particular, the following sections provide the overview of the system by user role:&lt;br /&gt;
&lt;br /&gt;
* [[Outcomes Administrator Specification]]&lt;br /&gt;
* [[Outcomes Instructor Specification]]&lt;br /&gt;
* [[Outcomes Student Specification]]&lt;br /&gt;
&lt;br /&gt;
In addition, some features and use cases are known but not yet being implemented. Please see [[Specifically Excluded Use Cases]]. Specifically, this initial version will not be attempting to map an existing outcome set to a new version of the outcome set on import.&lt;br /&gt;
&lt;br /&gt;
This document attempts to capture how the functional specification would be implemented in Moodle.&lt;br /&gt;
&lt;br /&gt;
= Backwards compatibility breaks =&lt;br /&gt;
&lt;br /&gt;
First and foremost, it is important to identify key differences between the current outcome system and this proposal as there are some philosophical shifts as well as breaking of existing code.&lt;br /&gt;
&lt;br /&gt;
# Outcomes will now only be created at the site level and then mapped to courses and content. Outcomes will no longer be created at the course level.&lt;br /&gt;
# Anything using the current outcome API or tables will have to be updated to use the new outcomes when appropriate.&lt;br /&gt;
# Outcomes will no longer appear in the grade book.&lt;br /&gt;
# Outcomes will no longer support scales. It is just a simple pass or fail.&lt;br /&gt;
&lt;br /&gt;
These changes will be documented in the relevant change log files.&lt;br /&gt;
&lt;br /&gt;
= Settings =&lt;br /&gt;
&lt;br /&gt;
== Site ==&lt;br /&gt;
&lt;br /&gt;
At the site level, there will be an area to do all of the configuration and setup of outcome sets. The proposed location is under Settings &amp;gt; Site Administration &amp;gt; Grades &amp;gt; Outcomes.&lt;br /&gt;
&lt;br /&gt;
In addition to managing outcomes, there will be site settings page for general outcome settings. For example, a setting to toggle if outcome idnumbers are editable or not.&lt;br /&gt;
&lt;br /&gt;
== Course ==&lt;br /&gt;
&lt;br /&gt;
When editing a course, there will be a section to associate multiple outcome sets to the course. The section will appear below the course General settings.&lt;br /&gt;
&lt;br /&gt;
This association is used to determine the relevant outcomes for the course for reporting and as a way to pre-filter outcome pickers when associating outcomes to content.&lt;br /&gt;
&lt;br /&gt;
== Activity ==&lt;br /&gt;
&lt;br /&gt;
When editing an activity, there will be a section to associate individual outcomes to the activity. This section will be provided by the moodleform_mod::standard_coursemodule_elements() callback so that all activities will be able to be associated to outcomes automatically.  In the flow of the activity&#039;s form, the outcome mapping options would appear below the grades section.  Do note though that if an activity does not support grades, it can still be mapped to outcomes.&lt;br /&gt;
&lt;br /&gt;
Graded activities will have to add additional integration points with outcomes in order to capture user attempts.&lt;br /&gt;
&lt;br /&gt;
== Advanced grading ==&lt;br /&gt;
&lt;br /&gt;
Rubrics and Marking guides will be able to associate an outcome for a criteria. API will be provided to support this, but each grading method will have to integrate with outcomes where it makes sense.&lt;br /&gt;
&lt;br /&gt;
== Questions ==&lt;br /&gt;
&lt;br /&gt;
When editing a question, there will be a section to associate individual outcomes to the question. The section can be added to question_edit_form::definition() before the Tags section.&lt;br /&gt;
&lt;br /&gt;
This association UI might behave a little differently based on the context in Moodle. If the question is being authored at the site level, then the outcome association is more free form, meaning one can select any outcome from any outcome set. If the question is being authored at the course level, then the outcome association defaults to those outcome sets that are associated to the course.&lt;br /&gt;
&lt;br /&gt;
= Data structure =&lt;br /&gt;
&lt;br /&gt;
This diagram provides an overview of how the tables relate to each other and to core tables.  Please see the below sections for details about each table.&lt;br /&gt;
&lt;br /&gt;
[[File:Outcome_ERD.jpg|frame|center|Outcomes ERD]]&lt;br /&gt;
&lt;br /&gt;
== outcome_sets ==&lt;br /&gt;
&lt;br /&gt;
Relations: none&lt;br /&gt;
&lt;br /&gt;
Purpose: An outcome set represents a collection of outcomes and perhaps some meta data regarding the revision or applicable region. Outcome sets are mapped to courses, which makes the outcomes within the set available to be mapped to course content. An example outcome set would be [http://asn.jesandco.org/resources/D2403043 Health Education Content Standards for California Public Schools, Kindergarten Through Grade Twelve].&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| idnumber&lt;br /&gt;
| varchar(255), unique index&lt;br /&gt;
| GUID that is auto-generated if missing. Generally on import, these are provided. This would be used to identify the outcome set during import or course restore.&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| varchar(255)&lt;br /&gt;
| The name of the outcome set&lt;br /&gt;
|-&lt;br /&gt;
| description&lt;br /&gt;
| text, default null, optional&lt;br /&gt;
| The plain text description of the outcome.&lt;br /&gt;
|-&lt;br /&gt;
| provider&lt;br /&gt;
| varchar(255), default null, optional&lt;br /&gt;
| Provider information regarding the outcome set. EG: Could be set to ASN.&lt;br /&gt;
|-&lt;br /&gt;
| revision&lt;br /&gt;
| varchar(255), default null, optional&lt;br /&gt;
| Version information regarding the outcome set. This will typically be a date or year, EG: 2011&lt;br /&gt;
|-&lt;br /&gt;
| region&lt;br /&gt;
| varchar(255), default null, optional&lt;br /&gt;
| Any region information. Example: In the US this could be a state name.&lt;br /&gt;
|-&lt;br /&gt;
| deleted&lt;br /&gt;
| int(1), default 0&lt;br /&gt;
| If the outcome set has been deleted.&lt;br /&gt;
|-&lt;br /&gt;
| timemodified&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time modified.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome_sets, outcome&lt;br /&gt;
&lt;br /&gt;
Purpose: Stores information regarding an individual outcome. Outcomes can be stored in a hierarchy, but the hierarchy is visual only. This means that if an outcome is earned, then only that outcome is earned, not it and all of its children. Also, if all child outcomes are earned, then parent outcomes are not also automatically earned. In addition, sometimes outcomes are not assessable, but are only there for extra context in the hierarchy. This identifies that the outcome cannot be mapped to content, nor can a student earn it.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomesetid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_sets table.&lt;br /&gt;
|-&lt;br /&gt;
| parentid&lt;br /&gt;
| int(10), indexed, default null&lt;br /&gt;
| Self referencing key. Identifies the parent outcome in the hierarchy.&lt;br /&gt;
|-&lt;br /&gt;
| idnumber&lt;br /&gt;
| varchar(255), unique index&lt;br /&gt;
| GUID that is auto-generated if missing. Generally on import, these are provided. This would be used to identify the outcome set during import or course restore.&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| varchar(255)&lt;br /&gt;
| The name of the outcome.&lt;br /&gt;
|-&lt;br /&gt;
| docnum&lt;br /&gt;
| varchar(255), default null, optional&lt;br /&gt;
| Field for tracking additional information on the outcome. EG: 2.3.A&lt;br /&gt;
|-&lt;br /&gt;
| description&lt;br /&gt;
| text, default null, optional&lt;br /&gt;
| The plain text description of the outcome.&lt;br /&gt;
|-&lt;br /&gt;
| assessable&lt;br /&gt;
| int(1)&lt;br /&gt;
| If set to 1, then the outcome is assessable and can be mapped to content. If set to 0, then the outcome is not assessable and cannot be mapped to content.&lt;br /&gt;
|-&lt;br /&gt;
| deleted&lt;br /&gt;
| int(1), default 0&lt;br /&gt;
| If the outcome has been deleted.&lt;br /&gt;
|-&lt;br /&gt;
| sortorder&lt;br /&gt;
| int(10)&lt;br /&gt;
| The sort order. This is 0-X for all outcomes that belong to the same outcome set.&lt;br /&gt;
|-&lt;br /&gt;
| timemodified&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time modified.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_metadata ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome&lt;br /&gt;
&lt;br /&gt;
Purpose: Represents additional meta information regarding outcomes. Only support for “Education Level” (K, 1, … 12, etc.) and “Subjects” (e.g. Math, English, etc.) will be available out of the box, but additional data points can be added later (which would need to be added to the UI). One outcome could have many meta values. For example: an outcome could be associated to many educational levels and subjects.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| varchar(255), indexed&lt;br /&gt;
| The name of the meta data.&lt;br /&gt;
|-&lt;br /&gt;
| value&lt;br /&gt;
| varchar(1333), indexed&lt;br /&gt;
| The value of the meta data.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_areas ==&lt;br /&gt;
&lt;br /&gt;
Relations: dynamic with core tables&lt;br /&gt;
&lt;br /&gt;
Purpose: This represents that a content item has been mapped to an outcome or to multiple outcomes. Check the outcome_area_outcomes table for the specific outcomes.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| component&lt;br /&gt;
| varchar(100), indexed&lt;br /&gt;
| The name of the component.&lt;br /&gt;
|-&lt;br /&gt;
| area&lt;br /&gt;
| varchar(50), default null, indexed, optional&lt;br /&gt;
| The name of the area. Used when a component has multiple items to associate to outcomes.&lt;br /&gt;
|-&lt;br /&gt;
| itemid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| The item ID.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_area_outcomes ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome, outcome_areas&lt;br /&gt;
&lt;br /&gt;
Purpose: This represents the one to many relationship of a single content item mapped to many outcomes.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomeareaid&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Foreign key to outcome_areas table.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_used_areas ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome_areas, course_modules&lt;br /&gt;
&lt;br /&gt;
Purpose: Associates an outcome content item with an activity. For example: a question is created in the site question bank and outcomes are associated to the question. Once that question is added to a Quiz then that association is stored in this table so the outcome system knows that the content item and its outcomes are in use.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| cmid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to course_modules table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomeareaid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_areas table.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_used_sets ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome_sets, course&lt;br /&gt;
&lt;br /&gt;
Purpose: Associates an outcome set with the course. Filtering of the outcome set is optionally allowed since outcome sets can span multiple educational levels and even subjects. Once an outcome set is mapped to the course, then the outcomes in the outcome set are available to be mapped to course content.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| courseid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to course table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomesetid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_sets table.&lt;br /&gt;
|-&lt;br /&gt;
| filter&lt;br /&gt;
| text, default null&lt;br /&gt;
| Some outcome sets span multiple education levels and subjects. So, when mapping an outcome set to a course, it may make sense to restrict the available outcomes to a specific education level(s) and/or subject(s). This information would be serialized into this field.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_attempts ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome_used_areas, user&lt;br /&gt;
&lt;br /&gt;
Purpose: Track a user attempt against a content item within a particular activity. The idea here is to aggregate attempt information so that the recommendation engines (detailed below) have an easily accessible data set to process. This does not mean however that recommendation engines are only limited to this data as one could mine for additional data where needed.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomeusedareaid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_used_areas table.&lt;br /&gt;
|-&lt;br /&gt;
| userid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table.&lt;br /&gt;
|-&lt;br /&gt;
| itemid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Used to identify the attempt for updates.  For example, might be a quiz attempt record ID.&lt;br /&gt;
|-&lt;br /&gt;
| percentgrade&lt;br /&gt;
| float(10,5)&lt;br /&gt;
| Percent grade earned on this attempt.&lt;br /&gt;
|-&lt;br /&gt;
| mingrade&lt;br /&gt;
| float(10,5)&lt;br /&gt;
| The minimum possible grade.&lt;br /&gt;
|-&lt;br /&gt;
| maxgrade&lt;br /&gt;
| float(10,5)&lt;br /&gt;
| The maximum possible grade.&lt;br /&gt;
|-&lt;br /&gt;
| rawgrade&lt;br /&gt;
| float(10,5)&lt;br /&gt;
| The points earned, should be between the minimum and maximum grades.&lt;br /&gt;
|-&lt;br /&gt;
| timemodified&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time modified.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_marks ==&lt;br /&gt;
&lt;br /&gt;
Relations: course, user, outcome&lt;br /&gt;
&lt;br /&gt;
Purpose: Graders will manually mark the student as having Met or Not Met an outcome. The recommendation engines will make a recommendation to the grader based on user attempts against content that has been mapped to the outcome.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| courseid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to course table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| userid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table. This is the user who is receiving the mark.&lt;br /&gt;
|-&lt;br /&gt;
| graderid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table. This is the user is doing the marking.&lt;br /&gt;
|-&lt;br /&gt;
| result&lt;br /&gt;
| int(2)&lt;br /&gt;
| 0 is not pass, 1 is pass, null is that no decision has been made yet.&lt;br /&gt;
|-&lt;br /&gt;
| timemodified&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time modified.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_marks_history ==&lt;br /&gt;
&lt;br /&gt;
Relations: course, user, outcome, outcome_marks&lt;br /&gt;
&lt;br /&gt;
Purpose: Keep track of past markings.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomemarkid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_marks table. Though the record could be missing from outcome_marks.&lt;br /&gt;
|-&lt;br /&gt;
| courseid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to course table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| userid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table. This is the user who is receiving the mark.&lt;br /&gt;
|-&lt;br /&gt;
| graderid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table. This is the user is doing the marking.&lt;br /&gt;
|-&lt;br /&gt;
| result&lt;br /&gt;
| int(2)&lt;br /&gt;
| 0 is not pass, 1 is pass, null is that no decision has been made yet.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_awards ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome, user&lt;br /&gt;
&lt;br /&gt;
Purpose: This preserves any outcomes earned by a student, regardless if the course is deleted or not.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| userid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Architecture =&lt;br /&gt;
&lt;br /&gt;
The outcome API, outcome administrative settings, outcome associations and other UIs that drives outcomes will be located inside of the top level outcome/ directory.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Models and repository mappers:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* outcome: Represents a single outcome&lt;br /&gt;
* outcome set: Represents a group of outcomes&lt;br /&gt;
* outcome content: An outcome association to content.&lt;br /&gt;
* outcome attempt: An attempt made against an outcome.&lt;br /&gt;
* outcome mark: A teacher marking an outcome against a user.&lt;br /&gt;
* outcome award: An awarded outcome at the site level.&lt;br /&gt;
&lt;br /&gt;
A repository mapper would include ways to store the model and ways to retrieve them in a re-usable and organized manner.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Collections:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
A group of models that you may take action on or filter. Example of a third party library that helps to manage collections: https://github.com/doctrine/collections&lt;br /&gt;
&lt;br /&gt;
Collections may or may not be used, but some possible collections would be the following:&lt;br /&gt;
&lt;br /&gt;
* outcomes&lt;br /&gt;
* outcome attempts&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;New mform elements:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
For most plugins, the process of associating an outcome would be done through a Moodle form. Proposing adding a new Moodle form element that can be added to a form to provide the necessary UI. An API for validating and saving the new mform element will be provided. In addition, the mform element will just be a wrapper around a well formed API that could be used on it’s own when other use cases present themselves.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;API for plugins&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Beyond the mform element, plugins may interact with outcomes in order to provide a richer integration. An API will be provided to assist with the following (not an exhaustive list):&lt;br /&gt;
&lt;br /&gt;
* A way to notify the outcome system that a content item is or is not being used within a course.&lt;br /&gt;
** Example: When a question is authored at the site level and then is actually used within a course, it must inform the outcome system that it is in use. This could potentially be done via events or just direct API calls at the appropriate times. Same goes for when a question is no longer used within a course.&lt;br /&gt;
* Record an attempt made against a content item.&lt;br /&gt;
** Examples: A question has been attempted or an assignment submission has been graded.&lt;br /&gt;
* A way to retrieve associated outcomes.&lt;br /&gt;
* A way to update, delete or otherwise modify the associated outcomes.&lt;br /&gt;
* A way to pick outcome associations (EG: what the mform element would do).&lt;br /&gt;
* A method of syncing up attempts against a content item. This would be used when associating an outcome on content that has already been graded/attempted.&lt;br /&gt;
* API to cleanup tables on course deletion.&lt;br /&gt;
&lt;br /&gt;
== Attempts ==&lt;br /&gt;
&lt;br /&gt;
Addition information about outcome attempt handling.&lt;br /&gt;
&lt;br /&gt;
* If Advanced Grading Method used then remove attempts if submission is removed&lt;br /&gt;
* If directly associated to activity then remove attempts if submission is removed and multiple graded submissions are allowed (i.e. Quiz, Lesson, Scorm) OR if grade removed from gradebook for other activities&lt;br /&gt;
* Whenever the all outcomes are removed from the object, it would remove the associated attempts.&lt;br /&gt;
* If a question is in use and is edited to now include outcomes, then outcome attempts are not generated unless the quiz is re-graded.&lt;br /&gt;
&lt;br /&gt;
== Supported plugin type plugins ==&lt;br /&gt;
&lt;br /&gt;
This may sound a little odd, but basically the point of these plugins is to add support for a plugin type to the outcome system. These types would assist in interpreting outcome content associations. Examples:&lt;br /&gt;
&lt;br /&gt;
* Given an outcome association, please provide a link to the mapped content.&lt;br /&gt;
** For an activity, this would be a link to the module.&lt;br /&gt;
** For a grading form, a link to the grading instance.&lt;br /&gt;
** For a question, a link to the question instance in the question bank.&lt;br /&gt;
* What are all of the content items that have not been mapped?&lt;br /&gt;
** For activities, this would return instances that are not mapped.&lt;br /&gt;
** For grading form, this would return sub-plugin specific information, like criteria.&lt;br /&gt;
** For questions, this would return questions from the course question bank that are not mapped.&lt;br /&gt;
* May assist with automatic cleanup when the content is deleted.&lt;br /&gt;
* Also other meta data could be derived, like plugin type name.&lt;br /&gt;
&lt;br /&gt;
This plugin would live under outcome/support/ and would initially ship with support of the following plugin types:&lt;br /&gt;
&lt;br /&gt;
* mod&lt;br /&gt;
* qtype&lt;br /&gt;
* gradingform: note that this integration would be deeper in that each gradingform plugin would need to implement something in order to help interpret associations. The reason being is that outcomes are being associated to plugin specific content, instead of something generic like the grading instance.&lt;br /&gt;
&lt;br /&gt;
== Import and export plugins ==&lt;br /&gt;
&lt;br /&gt;
The outcome system would support the exporting of outcome sets. The first export plugin would be a very simple JSON export that is specific to Moodle itself. This would be used for moving custom outcomes from one Moodle site to another.&lt;br /&gt;
&lt;br /&gt;
The outcome system would support importing outcome sets. Initially, there would be support for importing outcomes from [http://asn.jesandco.org Achievement Standards Network (ASN)] ([http://standards.jesandco.org/wiki/ASN_Application_Profile Format Specification]) and importing the JSON export from above.&lt;br /&gt;
&lt;br /&gt;
Both of the outcomes import and export processes would be a plugin based, so other formats could be supported by creating new plugins. The import and export plugins would live under outcome/import/ and outcome/export/.&lt;br /&gt;
&lt;br /&gt;
== Recommendation engine plugins ==&lt;br /&gt;
&lt;br /&gt;
The outcome system would provide a way to recommend to a teacher whether a student should be marked as completing the outcome or not. These plugins should have full Moodle plugin support because they may need to listen to events, run crons, have DB tables, global settings, etc. These plugins would live under outcome/engine/. Recommendations would be generated on demand and stored in MUC.&lt;br /&gt;
&lt;br /&gt;
Initially, the only plugin would be a percentage based recommendation engine. It would be configurable for a specific threshold that would determine if an attempt against an outcome should be considered correct or incorrect. It would then process the outcome attempts to determine the recommendation.&lt;br /&gt;
&lt;br /&gt;
Recommendation engines should also be enabled or disabled at the site level. This would require a “Manage recommendation engines” section in the admin site settings.&lt;br /&gt;
&lt;br /&gt;
= Reporting =&lt;br /&gt;
&lt;br /&gt;
== Site ==&lt;br /&gt;
&lt;br /&gt;
The following reports:&lt;br /&gt;
&lt;br /&gt;
* Outcomes Coverage report - shows outcomes that have been mapped to content in the site.&lt;br /&gt;
* Outcomes Performance report - shows performance on outcomes at the site level. Optionally broken down by course.&lt;br /&gt;
&lt;br /&gt;
== Course ==&lt;br /&gt;
&lt;br /&gt;
The following reports:&lt;br /&gt;
&lt;br /&gt;
* Outcomes Coverage report - shows outcomes that have been mapped in this course.&lt;br /&gt;
* Outcomes: Unmapped Content report - shows content that is not mapped to an outcome.&lt;br /&gt;
* Outcomes Performance report - shows aggregated performance on outcomes in the course.&lt;br /&gt;
* Outcomes Student Performance report - shows student performance on outcomes in the course for the teacher.&lt;br /&gt;
* Outcomes Personal Performance report - shows student performance on outcomes in the course for the student.&lt;br /&gt;
&lt;br /&gt;
== User profile ==&lt;br /&gt;
&lt;br /&gt;
At the very least, there will be a user site report where the user can see earned outcomes.&lt;br /&gt;
&lt;br /&gt;
= Grading =&lt;br /&gt;
&lt;br /&gt;
Outcome Completion Marking is done by course graders and is the final check point for if a learner has earned an outcome or not. The proposed location is to use the Outcome tab that is currently in the grades section of the course. This would also highjack the Outcomes link under Grade administration and Course administration.&lt;br /&gt;
&lt;br /&gt;
= Logging =&lt;br /&gt;
&lt;br /&gt;
We want to audit most actions in the Moodle log. These actions include:&lt;br /&gt;
&lt;br /&gt;
* CRUD type actions.&lt;br /&gt;
* Any association editing. EG: associating an outcome with a course, content item, etc.&lt;br /&gt;
* Outcome marking.&lt;br /&gt;
* User attempts against outcomes.&lt;br /&gt;
&lt;br /&gt;
= Role capabilities =&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Description&lt;br /&gt;
! Capability&lt;br /&gt;
|-&lt;br /&gt;
| Map outcomes to content&lt;br /&gt;
| moodle/outcome:mapoutcomes&lt;br /&gt;
|-&lt;br /&gt;
| Map outcome sets to courses&lt;br /&gt;
| moodle/outcome:mapoutcomesets&lt;br /&gt;
|-&lt;br /&gt;
| Edit outcomes&lt;br /&gt;
| moodle/outcome:edit&lt;br /&gt;
|-&lt;br /&gt;
| Export outcomes&lt;br /&gt;
| moodle/outcome:export&lt;br /&gt;
|-&lt;br /&gt;
| Import outcomes&lt;br /&gt;
| moodle/outcome:import&lt;br /&gt;
|-&lt;br /&gt;
| Each report will have a capability to view them.&lt;br /&gt;
| report/REPORTNAME:view&lt;br /&gt;
|-&lt;br /&gt;
| Marking outcomes by graders&lt;br /&gt;
| moodle/grade:edit&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Backup and restore =&lt;br /&gt;
&lt;br /&gt;
The workflow for backup and restore may go like:&lt;br /&gt;
&lt;br /&gt;
* Same site, then just map to existing outcomes via the identifier.&lt;br /&gt;
* Not same site, then the assumption is that the outcome set should be imported first, then we can map to existing outcomes via the identifier like in our same site scenario.&lt;br /&gt;
&lt;br /&gt;
Outcomes would probably take advantage of the backup plugin API to backup outcome associations to modules, question, etc. So, for example:&lt;br /&gt;
&lt;br /&gt;
* Outcomes would plug into activities in order to backup outcome associations and attempts.&lt;br /&gt;
* Outcomes would plug into questions in order to backup outcome associations and attempts.&lt;br /&gt;
* Grading forms would have to manually outcome associations and attempts. Will strive to make code re-usable.&lt;br /&gt;
&lt;br /&gt;
= Migration of old outcomes =&lt;br /&gt;
&lt;br /&gt;
Please first review [[Migration and Technical Issues]]. This still needs to be flushed out some more, but since the migration requires user interaction, we may need to create an admin tool to handle the migration. Until outcomes are migrated, it might make sense to continue to show the outcomes in the grade book, but remove the ability to do any editing of old outcomes.&lt;br /&gt;
&lt;br /&gt;
= Change History =&lt;br /&gt;
&lt;br /&gt;
* Schema changes --[[User:Mark Nielsen|Mark Nielsen]] 07:57, 4 May 2013 (WST)&lt;br /&gt;
** Removed outcome_sets.userid&lt;br /&gt;
** Removed outcome_areas.deleted&lt;br /&gt;
** Added outcome_attempts.itemid&lt;br /&gt;
** Added outcome_attempts.timemodified&lt;/div&gt;</summary>
		<author><name>Bushido</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=Outcomes_Technical_Specification&amp;diff=39513</id>
		<title>Outcomes Technical Specification</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=Outcomes_Technical_Specification&amp;diff=39513"/>
		<updated>2013-05-03T23:57:19Z</updated>

		<summary type="html">&lt;p&gt;Bushido: /* Change History */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
&lt;br /&gt;
Please be familiar with the function specification as outlined in the [[Outcomes Specification]]. The functional specification will provide details about the concepts and goals of this project. In particular, the following sections provide the overview of the system by user role:&lt;br /&gt;
&lt;br /&gt;
* [[Outcomes Administrator Specification]]&lt;br /&gt;
* [[Outcomes Instructor Specification]]&lt;br /&gt;
* [[Outcomes Student Specification]]&lt;br /&gt;
&lt;br /&gt;
In addition, some features and use cases are known but not yet being implemented. Please see [[Specifically Excluded Use Cases]]. Specifically, this initial version will not be attempting to map an existing outcome set to a new version of the outcome set on import.&lt;br /&gt;
&lt;br /&gt;
This document attempts to capture how the functional specification would be implemented in Moodle.&lt;br /&gt;
&lt;br /&gt;
= Backwards compatibility breaks =&lt;br /&gt;
&lt;br /&gt;
First and foremost, it is important to identify key differences between the current outcome system and this proposal as there are some philosophical shifts as well as breaking of existing code.&lt;br /&gt;
&lt;br /&gt;
# Outcomes will now only be created at the site level and then mapped to courses and content. Outcomes will no longer be created at the course level.&lt;br /&gt;
# Anything using the current outcome API or tables will have to be updated to use the new outcomes when appropriate.&lt;br /&gt;
# Outcomes will no longer appear in the grade book.&lt;br /&gt;
# Outcomes will no longer support scales. It is just a simple pass or fail.&lt;br /&gt;
&lt;br /&gt;
These changes will be documented in the relevant change log files.&lt;br /&gt;
&lt;br /&gt;
= Settings =&lt;br /&gt;
&lt;br /&gt;
== Site ==&lt;br /&gt;
&lt;br /&gt;
At the site level, there will be an area to do all of the configuration and setup of outcome sets. The proposed location is under Settings &amp;gt; Site Administration &amp;gt; Grades &amp;gt; Outcomes.&lt;br /&gt;
&lt;br /&gt;
In addition to managing outcomes, there will be site settings page for general outcome settings. For example, a setting to toggle if outcome idnumbers are editable or not.&lt;br /&gt;
&lt;br /&gt;
== Course ==&lt;br /&gt;
&lt;br /&gt;
When editing a course, there will be a section to associate multiple outcome sets to the course. The section will appear below the course General settings.&lt;br /&gt;
&lt;br /&gt;
This association is used to determine the relevant outcomes for the course for reporting and as a way to pre-filter outcome pickers when associating outcomes to content.&lt;br /&gt;
&lt;br /&gt;
== Activity ==&lt;br /&gt;
&lt;br /&gt;
When editing an activity, there will be a section to associate individual outcomes to the activity. This section will be provided by the moodleform_mod::standard_coursemodule_elements() callback so that all activities will be able to be associated to outcomes automatically.  In the flow of the activity&#039;s form, the outcome mapping options would appear below the grades section.  Do note though that if an activity does not support grades, it can still be mapped to outcomes.&lt;br /&gt;
&lt;br /&gt;
Graded activities will have to add additional integration points with outcomes in order to capture user attempts.&lt;br /&gt;
&lt;br /&gt;
== Advanced grading ==&lt;br /&gt;
&lt;br /&gt;
Rubrics and Marking guides will be able to associate an outcome for a criteria. API will be provided to support this, but each grading method will have to integrate with outcomes where it makes sense.&lt;br /&gt;
&lt;br /&gt;
== Questions ==&lt;br /&gt;
&lt;br /&gt;
When editing a question, there will be a section to associate individual outcomes to the question. The section can be added to question_edit_form::definition() before the Tags section.&lt;br /&gt;
&lt;br /&gt;
This association UI might behave a little differently based on the context in Moodle. If the question is being authored at the site level, then the outcome association is more free form, meaning one can select any outcome from any outcome set. If the question is being authored at the course level, then the outcome association defaults to those outcome sets that are associated to the course.&lt;br /&gt;
&lt;br /&gt;
= Data structure =&lt;br /&gt;
&lt;br /&gt;
This diagram provides an overview of how the tables relate to each other and to core tables.  Please see the below sections for details about each table.&lt;br /&gt;
&lt;br /&gt;
[[File:Outcome_ERD.jpg|frame|center|Outcomes ERD]]&lt;br /&gt;
&lt;br /&gt;
== outcome_sets ==&lt;br /&gt;
&lt;br /&gt;
Relations: none&lt;br /&gt;
&lt;br /&gt;
Purpose: An outcome set represents a collection of outcomes and perhaps some meta data regarding the revision or applicable region. Outcome sets are mapped to courses, which makes the outcomes within the set available to be mapped to course content. An example outcome set would be [http://asn.jesandco.org/resources/D2403043 Health Education Content Standards for California Public Schools, Kindergarten Through Grade Twelve].&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| idnumber&lt;br /&gt;
| varchar(255), unique index&lt;br /&gt;
| GUID that is auto-generated if missing. Generally on import, these are provided. This would be used to identify the outcome set during import or course restore.&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| varchar(255)&lt;br /&gt;
| The name of the outcome set&lt;br /&gt;
|-&lt;br /&gt;
| description&lt;br /&gt;
| text, default null, optional&lt;br /&gt;
| The plain text description of the outcome.&lt;br /&gt;
|-&lt;br /&gt;
| provider&lt;br /&gt;
| varchar(255), default null, optional&lt;br /&gt;
| Provider information regarding the outcome set. EG: Could be set to ASN.&lt;br /&gt;
|-&lt;br /&gt;
| revision&lt;br /&gt;
| varchar(255), default null, optional&lt;br /&gt;
| Version information regarding the outcome set. This will typically be a date or year, EG: 2011&lt;br /&gt;
|-&lt;br /&gt;
| region&lt;br /&gt;
| varchar(255), default null, optional&lt;br /&gt;
| Any region information. Example: In the US this could be a state name.&lt;br /&gt;
|-&lt;br /&gt;
| deleted&lt;br /&gt;
| int(1), default 0&lt;br /&gt;
| If the outcome set has been deleted.&lt;br /&gt;
|-&lt;br /&gt;
| timemodified&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time modified.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome_sets, outcome&lt;br /&gt;
&lt;br /&gt;
Purpose: Stores information regarding an individual outcome. Outcomes can be stored in a hierarchy, but the hierarchy is visual only. This means that if an outcome is earned, then only that outcome is earned, not it and all of its children. Also, if all child outcomes are earned, then parent outcomes are not also automatically earned. In addition, sometimes outcomes are not assessable, but are only there for extra context in the hierarchy. This identifies that the outcome cannot be mapped to content, nor can a student earn it.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomesetid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_sets table.&lt;br /&gt;
|-&lt;br /&gt;
| parentid&lt;br /&gt;
| int(10), indexed, default null&lt;br /&gt;
| Self referencing key. Identifies the parent outcome in the hierarchy.&lt;br /&gt;
|-&lt;br /&gt;
| idnumber&lt;br /&gt;
| varchar(255), unique index&lt;br /&gt;
| GUID that is auto-generated if missing. Generally on import, these are provided. This would be used to identify the outcome set during import or course restore.&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| varchar(255)&lt;br /&gt;
| The name of the outcome.&lt;br /&gt;
|-&lt;br /&gt;
| docnum&lt;br /&gt;
| varchar(255), default null, optional&lt;br /&gt;
| Field for tracking additional information on the outcome. EG: 2.3.A&lt;br /&gt;
|-&lt;br /&gt;
| description&lt;br /&gt;
| text, default null, optional&lt;br /&gt;
| The plain text description of the outcome.&lt;br /&gt;
|-&lt;br /&gt;
| assessable&lt;br /&gt;
| int(1)&lt;br /&gt;
| If set to 1, then the outcome is assessable and can be mapped to content. If set to 0, then the outcome is not assessable and cannot be mapped to content.&lt;br /&gt;
|-&lt;br /&gt;
| deleted&lt;br /&gt;
| int(1), default 0&lt;br /&gt;
| If the outcome has been deleted.&lt;br /&gt;
|-&lt;br /&gt;
| sortorder&lt;br /&gt;
| int(10)&lt;br /&gt;
| The sort order. This is 0-X for all outcomes that belong to the same outcome set.&lt;br /&gt;
|-&lt;br /&gt;
| timemodified&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time modified.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_metadata ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome&lt;br /&gt;
&lt;br /&gt;
Purpose: Represents additional meta information regarding outcomes. Only support for “Education Level” (K, 1, … 12, etc.) and “Subjects” (e.g. Math, English, etc.) will be available out of the box, but additional data points can be added later (which would need to be added to the UI). One outcome could have many meta values. For example: an outcome could be associated to many educational levels and subjects.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| varchar(255), indexed&lt;br /&gt;
| The name of the meta data.&lt;br /&gt;
|-&lt;br /&gt;
| value&lt;br /&gt;
| varchar(1333), indexed&lt;br /&gt;
| The value of the meta data.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_areas ==&lt;br /&gt;
&lt;br /&gt;
Relations: dynamic with core tables&lt;br /&gt;
&lt;br /&gt;
Purpose: This represents that a content item has been mapped to an outcome or to multiple outcomes. Check the outcome_area_outcomes table for the specific outcomes.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| component&lt;br /&gt;
| varchar(100), indexed&lt;br /&gt;
| The name of the component.&lt;br /&gt;
|-&lt;br /&gt;
| area&lt;br /&gt;
| varchar(50), default null, indexed, optional&lt;br /&gt;
| The name of the area. Used when a component has multiple items to associate to outcomes.&lt;br /&gt;
|-&lt;br /&gt;
| itemid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| The item ID.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_area_outcomes ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome, outcome_areas&lt;br /&gt;
&lt;br /&gt;
Purpose: This represents the one to many relationship of a single content item mapped to many outcomes.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomeareaid&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Foreign key to outcome_areas table.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_used_areas ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome_areas, course_modules&lt;br /&gt;
&lt;br /&gt;
Purpose: Associates an outcome content item with an activity. For example: a question is created in the site question bank and outcomes are associated to the question. Once that question is added to a Quiz then that association is stored in this table so the outcome system knows that the content item and its outcomes are in use.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| cmid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to course_modules table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomeareaid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_areas table.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_used_sets ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome_sets, course&lt;br /&gt;
&lt;br /&gt;
Purpose: Associates an outcome set with the course. Filtering of the outcome set is optionally allowed since outcome sets can span multiple educational levels and even subjects. Once an outcome set is mapped to the course, then the outcomes in the outcome set are available to be mapped to course content.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| courseid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to course table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomesetid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_sets table.&lt;br /&gt;
|-&lt;br /&gt;
| filter&lt;br /&gt;
| text, default null&lt;br /&gt;
| Some outcome sets span multiple education levels and subjects. So, when mapping an outcome set to a course, it may make sense to restrict the available outcomes to a specific education level(s) and/or subject(s). This information would be serialized into this field.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_attempts ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome_used_areas, user&lt;br /&gt;
&lt;br /&gt;
Purpose: Track a user attempt against a content item within a particular activity. The idea here is to aggregate attempt information so that the recommendation engines (detailed below) have an easily accessible data set to process. This does not mean however that recommendation engines are only limited to this data as one could mine for additional data where needed.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomeusedareaid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_used_areas table.&lt;br /&gt;
|-&lt;br /&gt;
| userid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table.&lt;br /&gt;
|-&lt;br /&gt;
| itemid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Used to identify the attempt for updates.  For example, might be a quiz attempt record ID.&lt;br /&gt;
|-&lt;br /&gt;
| percentgrade&lt;br /&gt;
| float(10,5)&lt;br /&gt;
| Percent grade earned on this attempt.&lt;br /&gt;
|-&lt;br /&gt;
| mingrade&lt;br /&gt;
| float(10,5)&lt;br /&gt;
| The minimum possible grade.&lt;br /&gt;
|-&lt;br /&gt;
| maxgrade&lt;br /&gt;
| float(10,5)&lt;br /&gt;
| The maximum possible grade.&lt;br /&gt;
|-&lt;br /&gt;
| rawgrade&lt;br /&gt;
| float(10,5)&lt;br /&gt;
| The points earned, should be between the minimum and maximum grades.&lt;br /&gt;
|-&lt;br /&gt;
| timemodified&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time modified.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_marks ==&lt;br /&gt;
&lt;br /&gt;
Relations: course, user, outcome&lt;br /&gt;
&lt;br /&gt;
Purpose: Graders will manually mark the student as having Met or Not Met an outcome. The recommendation engines will make a recommendation to the grader based on user attempts against content that has been mapped to the outcome.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| courseid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to course table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| userid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table. This is the user who is receiving the mark.&lt;br /&gt;
|-&lt;br /&gt;
| graderid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table. This is the user is doing the marking.&lt;br /&gt;
|-&lt;br /&gt;
| result&lt;br /&gt;
| int(2)&lt;br /&gt;
| 0 is not pass, 1 is pass, null is that no decision has been made yet.&lt;br /&gt;
|-&lt;br /&gt;
| timemodified&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time modified.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_marks_history ==&lt;br /&gt;
&lt;br /&gt;
Relations: course, user, outcome, outcome_marks&lt;br /&gt;
&lt;br /&gt;
Purpose: Keep track of past markings.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomemarkid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_marks table. Though the record could be missing from outcome_marks.&lt;br /&gt;
|-&lt;br /&gt;
| courseid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to course table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| userid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table. This is the user who is receiving the mark.&lt;br /&gt;
|-&lt;br /&gt;
| graderid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table. This is the user is doing the marking.&lt;br /&gt;
|-&lt;br /&gt;
| result&lt;br /&gt;
| int(2)&lt;br /&gt;
| 0 is not pass, 1 is pass, null is that no decision has been made yet.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_awards ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome, user&lt;br /&gt;
&lt;br /&gt;
Purpose: This preserves any outcomes earned by a student, regardless if the course is deleted or not.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| userid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Architecture =&lt;br /&gt;
&lt;br /&gt;
The outcome API, outcome administrative settings, outcome associations and other UIs that drives outcomes will be located inside of the top level outcome/ directory.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Models and repository mappers:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* outcome: Represents a single outcome&lt;br /&gt;
* outcome set: Represents a group of outcomes&lt;br /&gt;
* outcome content: An outcome association to content.&lt;br /&gt;
* outcome attempt: An attempt made against an outcome.&lt;br /&gt;
* outcome mark: A teacher marking an outcome against a user.&lt;br /&gt;
* outcome award: An awarded outcome at the site level.&lt;br /&gt;
&lt;br /&gt;
A repository mapper would include ways to store the model and ways to retrieve them in a re-usable and organized manner.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Collections:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
A group of models that you may take action on or filter. Example of a third party library that helps to manage collections: https://github.com/doctrine/collections&lt;br /&gt;
&lt;br /&gt;
Collections may or may not be used, but some possible collections would be the following:&lt;br /&gt;
&lt;br /&gt;
* outcomes&lt;br /&gt;
* outcome attempts&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;New mform elements:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
For most plugins, the process of associating an outcome would be done through a Moodle form. Proposing adding a new Moodle form element that can be added to a form to provide the necessary UI. An API for validating and saving the new mform element will be provided. In addition, the mform element will just be a wrapper around a well formed API that could be used on it’s own when other use cases present themselves.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;API for plugins&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Beyond the mform element, plugins may interact with outcomes in order to provide a richer integration. An API will be provided to assist with the following (not an exhaustive list):&lt;br /&gt;
&lt;br /&gt;
* A way to notify the outcome system that a content item is or is not being used within a course.&lt;br /&gt;
** Example: When a question is authored at the site level and then is actually used within a course, it must inform the outcome system that it is in use. This could potentially be done via events or just direct API calls at the appropriate times. Same goes for when a question is no longer used within a course.&lt;br /&gt;
* Record an attempt made against a content item.&lt;br /&gt;
** Examples: A question has been attempted or an assignment submission has been graded.&lt;br /&gt;
* A way to retrieve associated outcomes.&lt;br /&gt;
* A way to update, delete or otherwise modify the associated outcomes.&lt;br /&gt;
* A way to pick outcome associations (EG: what the mform element would do).&lt;br /&gt;
* A method of syncing up attempts against a content item. This would be used when associating an outcome on content that has already been graded/attempted.&lt;br /&gt;
* API to cleanup tables on course deletion.&lt;br /&gt;
&lt;br /&gt;
== Supported plugin type plugins ==&lt;br /&gt;
&lt;br /&gt;
This may sound a little odd, but basically the point of these plugins is to add support for a plugin type to the outcome system. These types would assist in interpreting outcome content associations. Examples:&lt;br /&gt;
&lt;br /&gt;
* Given an outcome association, please provide a link to the mapped content.&lt;br /&gt;
** For an activity, this would be a link to the module.&lt;br /&gt;
** For a grading form, a link to the grading instance.&lt;br /&gt;
** For a question, a link to the question instance in the question bank.&lt;br /&gt;
* What are all of the content items that have not been mapped?&lt;br /&gt;
** For activities, this would return instances that are not mapped.&lt;br /&gt;
** For grading form, this would return sub-plugin specific information, like criteria.&lt;br /&gt;
** For questions, this would return questions from the course question bank that are not mapped.&lt;br /&gt;
* May assist with automatic cleanup when the content is deleted.&lt;br /&gt;
* Also other meta data could be derived, like plugin type name.&lt;br /&gt;
&lt;br /&gt;
This plugin would live under outcome/support/ and would initially ship with support of the following plugin types:&lt;br /&gt;
&lt;br /&gt;
* mod&lt;br /&gt;
* qtype&lt;br /&gt;
* gradingform: note that this integration would be deeper in that each gradingform plugin would need to implement something in order to help interpret associations. The reason being is that outcomes are being associated to plugin specific content, instead of something generic like the grading instance.&lt;br /&gt;
&lt;br /&gt;
== Import and export plugins ==&lt;br /&gt;
&lt;br /&gt;
The outcome system would support the exporting of outcome sets. The first export plugin would be a very simple JSON export that is specific to Moodle itself. This would be used for moving custom outcomes from one Moodle site to another.&lt;br /&gt;
&lt;br /&gt;
The outcome system would support importing outcome sets. Initially, there would be support for importing outcomes from [http://asn.jesandco.org Achievement Standards Network (ASN)] ([http://standards.jesandco.org/wiki/ASN_Application_Profile Format Specification]) and importing the JSON export from above.&lt;br /&gt;
&lt;br /&gt;
Both of the outcomes import and export processes would be a plugin based, so other formats could be supported by creating new plugins. The import and export plugins would live under outcome/import/ and outcome/export/.&lt;br /&gt;
&lt;br /&gt;
== Recommendation engine plugins ==&lt;br /&gt;
&lt;br /&gt;
The outcome system would provide a way to recommend to a teacher whether a student should be marked as completing the outcome or not. These plugins should have full Moodle plugin support because they may need to listen to events, run crons, have DB tables, global settings, etc. These plugins would live under outcome/engine/. Recommendations would be generated on demand and stored in MUC.&lt;br /&gt;
&lt;br /&gt;
Initially, the only plugin would be a percentage based recommendation engine. It would be configurable for a specific threshold that would determine if an attempt against an outcome should be considered correct or incorrect. It would then process the outcome attempts to determine the recommendation.&lt;br /&gt;
&lt;br /&gt;
Recommendation engines should also be enabled or disabled at the site level. This would require a “Manage recommendation engines” section in the admin site settings.&lt;br /&gt;
&lt;br /&gt;
= Reporting =&lt;br /&gt;
&lt;br /&gt;
== Site ==&lt;br /&gt;
&lt;br /&gt;
The following reports:&lt;br /&gt;
&lt;br /&gt;
* Outcomes Coverage report - shows outcomes that have been mapped to content in the site.&lt;br /&gt;
* Outcomes Performance report - shows performance on outcomes at the site level. Optionally broken down by course.&lt;br /&gt;
&lt;br /&gt;
== Course ==&lt;br /&gt;
&lt;br /&gt;
The following reports:&lt;br /&gt;
&lt;br /&gt;
* Outcomes Coverage report - shows outcomes that have been mapped in this course.&lt;br /&gt;
* Outcomes: Unmapped Content report - shows content that is not mapped to an outcome.&lt;br /&gt;
* Outcomes Performance report - shows aggregated performance on outcomes in the course.&lt;br /&gt;
* Outcomes Student Performance report - shows student performance on outcomes in the course for the teacher.&lt;br /&gt;
* Outcomes Personal Performance report - shows student performance on outcomes in the course for the student.&lt;br /&gt;
&lt;br /&gt;
== User profile ==&lt;br /&gt;
&lt;br /&gt;
At the very least, there will be a user site report where the user can see earned outcomes.&lt;br /&gt;
&lt;br /&gt;
= Grading =&lt;br /&gt;
&lt;br /&gt;
Outcome Completion Marking is done by course graders and is the final check point for if a learner has earned an outcome or not. The proposed location is to use the Outcome tab that is currently in the grades section of the course. This would also highjack the Outcomes link under Grade administration and Course administration.&lt;br /&gt;
&lt;br /&gt;
= Logging =&lt;br /&gt;
&lt;br /&gt;
We want to audit most actions in the Moodle log. These actions include:&lt;br /&gt;
&lt;br /&gt;
* CRUD type actions.&lt;br /&gt;
* Any association editing. EG: associating an outcome with a course, content item, etc.&lt;br /&gt;
* Outcome marking.&lt;br /&gt;
* User attempts against outcomes.&lt;br /&gt;
&lt;br /&gt;
= Role capabilities =&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Description&lt;br /&gt;
! Capability&lt;br /&gt;
|-&lt;br /&gt;
| Map outcomes to content&lt;br /&gt;
| moodle/outcome:mapoutcomes&lt;br /&gt;
|-&lt;br /&gt;
| Map outcome sets to courses&lt;br /&gt;
| moodle/outcome:mapoutcomesets&lt;br /&gt;
|-&lt;br /&gt;
| Edit outcomes&lt;br /&gt;
| moodle/outcome:edit&lt;br /&gt;
|-&lt;br /&gt;
| Export outcomes&lt;br /&gt;
| moodle/outcome:export&lt;br /&gt;
|-&lt;br /&gt;
| Import outcomes&lt;br /&gt;
| moodle/outcome:import&lt;br /&gt;
|-&lt;br /&gt;
| Each report will have a capability to view them.&lt;br /&gt;
| report/REPORTNAME:view&lt;br /&gt;
|-&lt;br /&gt;
| Marking outcomes by graders&lt;br /&gt;
| moodle/grade:edit&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Backup and restore =&lt;br /&gt;
&lt;br /&gt;
The workflow for backup and restore may go like:&lt;br /&gt;
&lt;br /&gt;
* Same site, then just map to existing outcomes via the identifier.&lt;br /&gt;
* Not same site, then the assumption is that the outcome set should be imported first, then we can map to existing outcomes via the identifier like in our same site scenario.&lt;br /&gt;
&lt;br /&gt;
Outcomes would probably take advantage of the backup plugin API to backup outcome associations to modules, question, etc. So, for example:&lt;br /&gt;
&lt;br /&gt;
* Outcomes would plug into activities in order to backup outcome associations and attempts.&lt;br /&gt;
* Outcomes would plug into questions in order to backup outcome associations and attempts.&lt;br /&gt;
* Grading forms would have to manually outcome associations and attempts. Will strive to make code re-usable.&lt;br /&gt;
&lt;br /&gt;
= Migration of old outcomes =&lt;br /&gt;
&lt;br /&gt;
Please first review [[Migration and Technical Issues]]. This still needs to be flushed out some more, but since the migration requires user interaction, we may need to create an admin tool to handle the migration. Until outcomes are migrated, it might make sense to continue to show the outcomes in the grade book, but remove the ability to do any editing of old outcomes.&lt;br /&gt;
&lt;br /&gt;
= Change History =&lt;br /&gt;
&lt;br /&gt;
* Schema changes --[[User:Mark Nielsen|Mark Nielsen]] 07:57, 4 May 2013 (WST)&lt;br /&gt;
** Removed outcome_sets.userid&lt;br /&gt;
** Removed outcome_areas.deleted&lt;br /&gt;
** Added outcome_attempts.itemid&lt;br /&gt;
** Added outcome_attempts.timemodified&lt;/div&gt;</summary>
		<author><name>Bushido</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=Outcomes_Technical_Specification&amp;diff=39512</id>
		<title>Outcomes Technical Specification</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=Outcomes_Technical_Specification&amp;diff=39512"/>
		<updated>2013-05-03T23:55:32Z</updated>

		<summary type="html">&lt;p&gt;Bushido: /* outcome_attempts */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
&lt;br /&gt;
Please be familiar with the function specification as outlined in the [[Outcomes Specification]]. The functional specification will provide details about the concepts and goals of this project. In particular, the following sections provide the overview of the system by user role:&lt;br /&gt;
&lt;br /&gt;
* [[Outcomes Administrator Specification]]&lt;br /&gt;
* [[Outcomes Instructor Specification]]&lt;br /&gt;
* [[Outcomes Student Specification]]&lt;br /&gt;
&lt;br /&gt;
In addition, some features and use cases are known but not yet being implemented. Please see [[Specifically Excluded Use Cases]]. Specifically, this initial version will not be attempting to map an existing outcome set to a new version of the outcome set on import.&lt;br /&gt;
&lt;br /&gt;
This document attempts to capture how the functional specification would be implemented in Moodle.&lt;br /&gt;
&lt;br /&gt;
= Backwards compatibility breaks =&lt;br /&gt;
&lt;br /&gt;
First and foremost, it is important to identify key differences between the current outcome system and this proposal as there are some philosophical shifts as well as breaking of existing code.&lt;br /&gt;
&lt;br /&gt;
# Outcomes will now only be created at the site level and then mapped to courses and content. Outcomes will no longer be created at the course level.&lt;br /&gt;
# Anything using the current outcome API or tables will have to be updated to use the new outcomes when appropriate.&lt;br /&gt;
# Outcomes will no longer appear in the grade book.&lt;br /&gt;
# Outcomes will no longer support scales. It is just a simple pass or fail.&lt;br /&gt;
&lt;br /&gt;
These changes will be documented in the relevant change log files.&lt;br /&gt;
&lt;br /&gt;
= Settings =&lt;br /&gt;
&lt;br /&gt;
== Site ==&lt;br /&gt;
&lt;br /&gt;
At the site level, there will be an area to do all of the configuration and setup of outcome sets. The proposed location is under Settings &amp;gt; Site Administration &amp;gt; Grades &amp;gt; Outcomes.&lt;br /&gt;
&lt;br /&gt;
In addition to managing outcomes, there will be site settings page for general outcome settings. For example, a setting to toggle if outcome idnumbers are editable or not.&lt;br /&gt;
&lt;br /&gt;
== Course ==&lt;br /&gt;
&lt;br /&gt;
When editing a course, there will be a section to associate multiple outcome sets to the course. The section will appear below the course General settings.&lt;br /&gt;
&lt;br /&gt;
This association is used to determine the relevant outcomes for the course for reporting and as a way to pre-filter outcome pickers when associating outcomes to content.&lt;br /&gt;
&lt;br /&gt;
== Activity ==&lt;br /&gt;
&lt;br /&gt;
When editing an activity, there will be a section to associate individual outcomes to the activity. This section will be provided by the moodleform_mod::standard_coursemodule_elements() callback so that all activities will be able to be associated to outcomes automatically.  In the flow of the activity&#039;s form, the outcome mapping options would appear below the grades section.  Do note though that if an activity does not support grades, it can still be mapped to outcomes.&lt;br /&gt;
&lt;br /&gt;
Graded activities will have to add additional integration points with outcomes in order to capture user attempts.&lt;br /&gt;
&lt;br /&gt;
== Advanced grading ==&lt;br /&gt;
&lt;br /&gt;
Rubrics and Marking guides will be able to associate an outcome for a criteria. API will be provided to support this, but each grading method will have to integrate with outcomes where it makes sense.&lt;br /&gt;
&lt;br /&gt;
== Questions ==&lt;br /&gt;
&lt;br /&gt;
When editing a question, there will be a section to associate individual outcomes to the question. The section can be added to question_edit_form::definition() before the Tags section.&lt;br /&gt;
&lt;br /&gt;
This association UI might behave a little differently based on the context in Moodle. If the question is being authored at the site level, then the outcome association is more free form, meaning one can select any outcome from any outcome set. If the question is being authored at the course level, then the outcome association defaults to those outcome sets that are associated to the course.&lt;br /&gt;
&lt;br /&gt;
= Data structure =&lt;br /&gt;
&lt;br /&gt;
This diagram provides an overview of how the tables relate to each other and to core tables.  Please see the below sections for details about each table.&lt;br /&gt;
&lt;br /&gt;
[[File:Outcome_ERD.jpg|frame|center|Outcomes ERD]]&lt;br /&gt;
&lt;br /&gt;
== outcome_sets ==&lt;br /&gt;
&lt;br /&gt;
Relations: none&lt;br /&gt;
&lt;br /&gt;
Purpose: An outcome set represents a collection of outcomes and perhaps some meta data regarding the revision or applicable region. Outcome sets are mapped to courses, which makes the outcomes within the set available to be mapped to course content. An example outcome set would be [http://asn.jesandco.org/resources/D2403043 Health Education Content Standards for California Public Schools, Kindergarten Through Grade Twelve].&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| idnumber&lt;br /&gt;
| varchar(255), unique index&lt;br /&gt;
| GUID that is auto-generated if missing. Generally on import, these are provided. This would be used to identify the outcome set during import or course restore.&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| varchar(255)&lt;br /&gt;
| The name of the outcome set&lt;br /&gt;
|-&lt;br /&gt;
| description&lt;br /&gt;
| text, default null, optional&lt;br /&gt;
| The plain text description of the outcome.&lt;br /&gt;
|-&lt;br /&gt;
| provider&lt;br /&gt;
| varchar(255), default null, optional&lt;br /&gt;
| Provider information regarding the outcome set. EG: Could be set to ASN.&lt;br /&gt;
|-&lt;br /&gt;
| revision&lt;br /&gt;
| varchar(255), default null, optional&lt;br /&gt;
| Version information regarding the outcome set. This will typically be a date or year, EG: 2011&lt;br /&gt;
|-&lt;br /&gt;
| region&lt;br /&gt;
| varchar(255), default null, optional&lt;br /&gt;
| Any region information. Example: In the US this could be a state name.&lt;br /&gt;
|-&lt;br /&gt;
| deleted&lt;br /&gt;
| int(1), default 0&lt;br /&gt;
| If the outcome set has been deleted.&lt;br /&gt;
|-&lt;br /&gt;
| timemodified&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time modified.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome_sets, outcome&lt;br /&gt;
&lt;br /&gt;
Purpose: Stores information regarding an individual outcome. Outcomes can be stored in a hierarchy, but the hierarchy is visual only. This means that if an outcome is earned, then only that outcome is earned, not it and all of its children. Also, if all child outcomes are earned, then parent outcomes are not also automatically earned. In addition, sometimes outcomes are not assessable, but are only there for extra context in the hierarchy. This identifies that the outcome cannot be mapped to content, nor can a student earn it.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomesetid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_sets table.&lt;br /&gt;
|-&lt;br /&gt;
| parentid&lt;br /&gt;
| int(10), indexed, default null&lt;br /&gt;
| Self referencing key. Identifies the parent outcome in the hierarchy.&lt;br /&gt;
|-&lt;br /&gt;
| idnumber&lt;br /&gt;
| varchar(255), unique index&lt;br /&gt;
| GUID that is auto-generated if missing. Generally on import, these are provided. This would be used to identify the outcome set during import or course restore.&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| varchar(255)&lt;br /&gt;
| The name of the outcome.&lt;br /&gt;
|-&lt;br /&gt;
| docnum&lt;br /&gt;
| varchar(255), default null, optional&lt;br /&gt;
| Field for tracking additional information on the outcome. EG: 2.3.A&lt;br /&gt;
|-&lt;br /&gt;
| description&lt;br /&gt;
| text, default null, optional&lt;br /&gt;
| The plain text description of the outcome.&lt;br /&gt;
|-&lt;br /&gt;
| assessable&lt;br /&gt;
| int(1)&lt;br /&gt;
| If set to 1, then the outcome is assessable and can be mapped to content. If set to 0, then the outcome is not assessable and cannot be mapped to content.&lt;br /&gt;
|-&lt;br /&gt;
| deleted&lt;br /&gt;
| int(1), default 0&lt;br /&gt;
| If the outcome has been deleted.&lt;br /&gt;
|-&lt;br /&gt;
| sortorder&lt;br /&gt;
| int(10)&lt;br /&gt;
| The sort order. This is 0-X for all outcomes that belong to the same outcome set.&lt;br /&gt;
|-&lt;br /&gt;
| timemodified&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time modified.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_metadata ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome&lt;br /&gt;
&lt;br /&gt;
Purpose: Represents additional meta information regarding outcomes. Only support for “Education Level” (K, 1, … 12, etc.) and “Subjects” (e.g. Math, English, etc.) will be available out of the box, but additional data points can be added later (which would need to be added to the UI). One outcome could have many meta values. For example: an outcome could be associated to many educational levels and subjects.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| varchar(255), indexed&lt;br /&gt;
| The name of the meta data.&lt;br /&gt;
|-&lt;br /&gt;
| value&lt;br /&gt;
| varchar(1333), indexed&lt;br /&gt;
| The value of the meta data.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_areas ==&lt;br /&gt;
&lt;br /&gt;
Relations: dynamic with core tables&lt;br /&gt;
&lt;br /&gt;
Purpose: This represents that a content item has been mapped to an outcome or to multiple outcomes. Check the outcome_area_outcomes table for the specific outcomes.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| component&lt;br /&gt;
| varchar(100), indexed&lt;br /&gt;
| The name of the component.&lt;br /&gt;
|-&lt;br /&gt;
| area&lt;br /&gt;
| varchar(50), default null, indexed, optional&lt;br /&gt;
| The name of the area. Used when a component has multiple items to associate to outcomes.&lt;br /&gt;
|-&lt;br /&gt;
| itemid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| The item ID.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_area_outcomes ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome, outcome_areas&lt;br /&gt;
&lt;br /&gt;
Purpose: This represents the one to many relationship of a single content item mapped to many outcomes.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomeareaid&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Foreign key to outcome_areas table.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_used_areas ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome_areas, course_modules&lt;br /&gt;
&lt;br /&gt;
Purpose: Associates an outcome content item with an activity. For example: a question is created in the site question bank and outcomes are associated to the question. Once that question is added to a Quiz then that association is stored in this table so the outcome system knows that the content item and its outcomes are in use.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| cmid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to course_modules table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomeareaid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_areas table.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_used_sets ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome_sets, course&lt;br /&gt;
&lt;br /&gt;
Purpose: Associates an outcome set with the course. Filtering of the outcome set is optionally allowed since outcome sets can span multiple educational levels and even subjects. Once an outcome set is mapped to the course, then the outcomes in the outcome set are available to be mapped to course content.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| courseid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to course table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomesetid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_sets table.&lt;br /&gt;
|-&lt;br /&gt;
| filter&lt;br /&gt;
| text, default null&lt;br /&gt;
| Some outcome sets span multiple education levels and subjects. So, when mapping an outcome set to a course, it may make sense to restrict the available outcomes to a specific education level(s) and/or subject(s). This information would be serialized into this field.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_attempts ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome_used_areas, user&lt;br /&gt;
&lt;br /&gt;
Purpose: Track a user attempt against a content item within a particular activity. The idea here is to aggregate attempt information so that the recommendation engines (detailed below) have an easily accessible data set to process. This does not mean however that recommendation engines are only limited to this data as one could mine for additional data where needed.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomeusedareaid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_used_areas table.&lt;br /&gt;
|-&lt;br /&gt;
| userid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table.&lt;br /&gt;
|-&lt;br /&gt;
| itemid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Used to identify the attempt for updates.  For example, might be a quiz attempt record ID.&lt;br /&gt;
|-&lt;br /&gt;
| percentgrade&lt;br /&gt;
| float(10,5)&lt;br /&gt;
| Percent grade earned on this attempt.&lt;br /&gt;
|-&lt;br /&gt;
| mingrade&lt;br /&gt;
| float(10,5)&lt;br /&gt;
| The minimum possible grade.&lt;br /&gt;
|-&lt;br /&gt;
| maxgrade&lt;br /&gt;
| float(10,5)&lt;br /&gt;
| The maximum possible grade.&lt;br /&gt;
|-&lt;br /&gt;
| rawgrade&lt;br /&gt;
| float(10,5)&lt;br /&gt;
| The points earned, should be between the minimum and maximum grades.&lt;br /&gt;
|-&lt;br /&gt;
| timemodified&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time modified.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_marks ==&lt;br /&gt;
&lt;br /&gt;
Relations: course, user, outcome&lt;br /&gt;
&lt;br /&gt;
Purpose: Graders will manually mark the student as having Met or Not Met an outcome. The recommendation engines will make a recommendation to the grader based on user attempts against content that has been mapped to the outcome.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| courseid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to course table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| userid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table. This is the user who is receiving the mark.&lt;br /&gt;
|-&lt;br /&gt;
| graderid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table. This is the user is doing the marking.&lt;br /&gt;
|-&lt;br /&gt;
| result&lt;br /&gt;
| int(2)&lt;br /&gt;
| 0 is not pass, 1 is pass, null is that no decision has been made yet.&lt;br /&gt;
|-&lt;br /&gt;
| timemodified&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time modified.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_marks_history ==&lt;br /&gt;
&lt;br /&gt;
Relations: course, user, outcome, outcome_marks&lt;br /&gt;
&lt;br /&gt;
Purpose: Keep track of past markings.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomemarkid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_marks table. Though the record could be missing from outcome_marks.&lt;br /&gt;
|-&lt;br /&gt;
| courseid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to course table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| userid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table. This is the user who is receiving the mark.&lt;br /&gt;
|-&lt;br /&gt;
| graderid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table. This is the user is doing the marking.&lt;br /&gt;
|-&lt;br /&gt;
| result&lt;br /&gt;
| int(2)&lt;br /&gt;
| 0 is not pass, 1 is pass, null is that no decision has been made yet.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_awards ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome, user&lt;br /&gt;
&lt;br /&gt;
Purpose: This preserves any outcomes earned by a student, regardless if the course is deleted or not.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| userid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Architecture =&lt;br /&gt;
&lt;br /&gt;
The outcome API, outcome administrative settings, outcome associations and other UIs that drives outcomes will be located inside of the top level outcome/ directory.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Models and repository mappers:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* outcome: Represents a single outcome&lt;br /&gt;
* outcome set: Represents a group of outcomes&lt;br /&gt;
* outcome content: An outcome association to content.&lt;br /&gt;
* outcome attempt: An attempt made against an outcome.&lt;br /&gt;
* outcome mark: A teacher marking an outcome against a user.&lt;br /&gt;
* outcome award: An awarded outcome at the site level.&lt;br /&gt;
&lt;br /&gt;
A repository mapper would include ways to store the model and ways to retrieve them in a re-usable and organized manner.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Collections:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
A group of models that you may take action on or filter. Example of a third party library that helps to manage collections: https://github.com/doctrine/collections&lt;br /&gt;
&lt;br /&gt;
Collections may or may not be used, but some possible collections would be the following:&lt;br /&gt;
&lt;br /&gt;
* outcomes&lt;br /&gt;
* outcome attempts&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;New mform elements:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
For most plugins, the process of associating an outcome would be done through a Moodle form. Proposing adding a new Moodle form element that can be added to a form to provide the necessary UI. An API for validating and saving the new mform element will be provided. In addition, the mform element will just be a wrapper around a well formed API that could be used on it’s own when other use cases present themselves.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;API for plugins&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Beyond the mform element, plugins may interact with outcomes in order to provide a richer integration. An API will be provided to assist with the following (not an exhaustive list):&lt;br /&gt;
&lt;br /&gt;
* A way to notify the outcome system that a content item is or is not being used within a course.&lt;br /&gt;
** Example: When a question is authored at the site level and then is actually used within a course, it must inform the outcome system that it is in use. This could potentially be done via events or just direct API calls at the appropriate times. Same goes for when a question is no longer used within a course.&lt;br /&gt;
* Record an attempt made against a content item.&lt;br /&gt;
** Examples: A question has been attempted or an assignment submission has been graded.&lt;br /&gt;
* A way to retrieve associated outcomes.&lt;br /&gt;
* A way to update, delete or otherwise modify the associated outcomes.&lt;br /&gt;
* A way to pick outcome associations (EG: what the mform element would do).&lt;br /&gt;
* A method of syncing up attempts against a content item. This would be used when associating an outcome on content that has already been graded/attempted.&lt;br /&gt;
* API to cleanup tables on course deletion.&lt;br /&gt;
&lt;br /&gt;
== Supported plugin type plugins ==&lt;br /&gt;
&lt;br /&gt;
This may sound a little odd, but basically the point of these plugins is to add support for a plugin type to the outcome system. These types would assist in interpreting outcome content associations. Examples:&lt;br /&gt;
&lt;br /&gt;
* Given an outcome association, please provide a link to the mapped content.&lt;br /&gt;
** For an activity, this would be a link to the module.&lt;br /&gt;
** For a grading form, a link to the grading instance.&lt;br /&gt;
** For a question, a link to the question instance in the question bank.&lt;br /&gt;
* What are all of the content items that have not been mapped?&lt;br /&gt;
** For activities, this would return instances that are not mapped.&lt;br /&gt;
** For grading form, this would return sub-plugin specific information, like criteria.&lt;br /&gt;
** For questions, this would return questions from the course question bank that are not mapped.&lt;br /&gt;
* May assist with automatic cleanup when the content is deleted.&lt;br /&gt;
* Also other meta data could be derived, like plugin type name.&lt;br /&gt;
&lt;br /&gt;
This plugin would live under outcome/support/ and would initially ship with support of the following plugin types:&lt;br /&gt;
&lt;br /&gt;
* mod&lt;br /&gt;
* qtype&lt;br /&gt;
* gradingform: note that this integration would be deeper in that each gradingform plugin would need to implement something in order to help interpret associations. The reason being is that outcomes are being associated to plugin specific content, instead of something generic like the grading instance.&lt;br /&gt;
&lt;br /&gt;
== Import and export plugins ==&lt;br /&gt;
&lt;br /&gt;
The outcome system would support the exporting of outcome sets. The first export plugin would be a very simple JSON export that is specific to Moodle itself. This would be used for moving custom outcomes from one Moodle site to another.&lt;br /&gt;
&lt;br /&gt;
The outcome system would support importing outcome sets. Initially, there would be support for importing outcomes from [http://asn.jesandco.org Achievement Standards Network (ASN)] ([http://standards.jesandco.org/wiki/ASN_Application_Profile Format Specification]) and importing the JSON export from above.&lt;br /&gt;
&lt;br /&gt;
Both of the outcomes import and export processes would be a plugin based, so other formats could be supported by creating new plugins. The import and export plugins would live under outcome/import/ and outcome/export/.&lt;br /&gt;
&lt;br /&gt;
== Recommendation engine plugins ==&lt;br /&gt;
&lt;br /&gt;
The outcome system would provide a way to recommend to a teacher whether a student should be marked as completing the outcome or not. These plugins should have full Moodle plugin support because they may need to listen to events, run crons, have DB tables, global settings, etc. These plugins would live under outcome/engine/. Recommendations would be generated on demand and stored in MUC.&lt;br /&gt;
&lt;br /&gt;
Initially, the only plugin would be a percentage based recommendation engine. It would be configurable for a specific threshold that would determine if an attempt against an outcome should be considered correct or incorrect. It would then process the outcome attempts to determine the recommendation.&lt;br /&gt;
&lt;br /&gt;
Recommendation engines should also be enabled or disabled at the site level. This would require a “Manage recommendation engines” section in the admin site settings.&lt;br /&gt;
&lt;br /&gt;
= Reporting =&lt;br /&gt;
&lt;br /&gt;
== Site ==&lt;br /&gt;
&lt;br /&gt;
The following reports:&lt;br /&gt;
&lt;br /&gt;
* Outcomes Coverage report - shows outcomes that have been mapped to content in the site.&lt;br /&gt;
* Outcomes Performance report - shows performance on outcomes at the site level. Optionally broken down by course.&lt;br /&gt;
&lt;br /&gt;
== Course ==&lt;br /&gt;
&lt;br /&gt;
The following reports:&lt;br /&gt;
&lt;br /&gt;
* Outcomes Coverage report - shows outcomes that have been mapped in this course.&lt;br /&gt;
* Outcomes: Unmapped Content report - shows content that is not mapped to an outcome.&lt;br /&gt;
* Outcomes Performance report - shows aggregated performance on outcomes in the course.&lt;br /&gt;
* Outcomes Student Performance report - shows student performance on outcomes in the course for the teacher.&lt;br /&gt;
* Outcomes Personal Performance report - shows student performance on outcomes in the course for the student.&lt;br /&gt;
&lt;br /&gt;
== User profile ==&lt;br /&gt;
&lt;br /&gt;
At the very least, there will be a user site report where the user can see earned outcomes.&lt;br /&gt;
&lt;br /&gt;
= Grading =&lt;br /&gt;
&lt;br /&gt;
Outcome Completion Marking is done by course graders and is the final check point for if a learner has earned an outcome or not. The proposed location is to use the Outcome tab that is currently in the grades section of the course. This would also highjack the Outcomes link under Grade administration and Course administration.&lt;br /&gt;
&lt;br /&gt;
= Logging =&lt;br /&gt;
&lt;br /&gt;
We want to audit most actions in the Moodle log. These actions include:&lt;br /&gt;
&lt;br /&gt;
* CRUD type actions.&lt;br /&gt;
* Any association editing. EG: associating an outcome with a course, content item, etc.&lt;br /&gt;
* Outcome marking.&lt;br /&gt;
* User attempts against outcomes.&lt;br /&gt;
&lt;br /&gt;
= Role capabilities =&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Description&lt;br /&gt;
! Capability&lt;br /&gt;
|-&lt;br /&gt;
| Map outcomes to content&lt;br /&gt;
| moodle/outcome:mapoutcomes&lt;br /&gt;
|-&lt;br /&gt;
| Map outcome sets to courses&lt;br /&gt;
| moodle/outcome:mapoutcomesets&lt;br /&gt;
|-&lt;br /&gt;
| Edit outcomes&lt;br /&gt;
| moodle/outcome:edit&lt;br /&gt;
|-&lt;br /&gt;
| Export outcomes&lt;br /&gt;
| moodle/outcome:export&lt;br /&gt;
|-&lt;br /&gt;
| Import outcomes&lt;br /&gt;
| moodle/outcome:import&lt;br /&gt;
|-&lt;br /&gt;
| Each report will have a capability to view them.&lt;br /&gt;
| report/REPORTNAME:view&lt;br /&gt;
|-&lt;br /&gt;
| Marking outcomes by graders&lt;br /&gt;
| moodle/grade:edit&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Backup and restore =&lt;br /&gt;
&lt;br /&gt;
The workflow for backup and restore may go like:&lt;br /&gt;
&lt;br /&gt;
* Same site, then just map to existing outcomes via the identifier.&lt;br /&gt;
* Not same site, then the assumption is that the outcome set should be imported first, then we can map to existing outcomes via the identifier like in our same site scenario.&lt;br /&gt;
&lt;br /&gt;
Outcomes would probably take advantage of the backup plugin API to backup outcome associations to modules, question, etc. So, for example:&lt;br /&gt;
&lt;br /&gt;
* Outcomes would plug into activities in order to backup outcome associations and attempts.&lt;br /&gt;
* Outcomes would plug into questions in order to backup outcome associations and attempts.&lt;br /&gt;
* Grading forms would have to manually outcome associations and attempts. Will strive to make code re-usable.&lt;br /&gt;
&lt;br /&gt;
= Migration of old outcomes =&lt;br /&gt;
&lt;br /&gt;
Please first review [[Migration and Technical Issues]]. This still needs to be flushed out some more, but since the migration requires user interaction, we may need to create an admin tool to handle the migration. Until outcomes are migrated, it might make sense to continue to show the outcomes in the grade book, but remove the ability to do any editing of old outcomes.&lt;br /&gt;
&lt;br /&gt;
= Change History =&lt;/div&gt;</summary>
		<author><name>Bushido</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=Outcomes_Technical_Specification&amp;diff=39511</id>
		<title>Outcomes Technical Specification</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=Outcomes_Technical_Specification&amp;diff=39511"/>
		<updated>2013-05-03T23:53:43Z</updated>

		<summary type="html">&lt;p&gt;Bushido: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
&lt;br /&gt;
Please be familiar with the function specification as outlined in the [[Outcomes Specification]]. The functional specification will provide details about the concepts and goals of this project. In particular, the following sections provide the overview of the system by user role:&lt;br /&gt;
&lt;br /&gt;
* [[Outcomes Administrator Specification]]&lt;br /&gt;
* [[Outcomes Instructor Specification]]&lt;br /&gt;
* [[Outcomes Student Specification]]&lt;br /&gt;
&lt;br /&gt;
In addition, some features and use cases are known but not yet being implemented. Please see [[Specifically Excluded Use Cases]]. Specifically, this initial version will not be attempting to map an existing outcome set to a new version of the outcome set on import.&lt;br /&gt;
&lt;br /&gt;
This document attempts to capture how the functional specification would be implemented in Moodle.&lt;br /&gt;
&lt;br /&gt;
= Backwards compatibility breaks =&lt;br /&gt;
&lt;br /&gt;
First and foremost, it is important to identify key differences between the current outcome system and this proposal as there are some philosophical shifts as well as breaking of existing code.&lt;br /&gt;
&lt;br /&gt;
# Outcomes will now only be created at the site level and then mapped to courses and content. Outcomes will no longer be created at the course level.&lt;br /&gt;
# Anything using the current outcome API or tables will have to be updated to use the new outcomes when appropriate.&lt;br /&gt;
# Outcomes will no longer appear in the grade book.&lt;br /&gt;
# Outcomes will no longer support scales. It is just a simple pass or fail.&lt;br /&gt;
&lt;br /&gt;
These changes will be documented in the relevant change log files.&lt;br /&gt;
&lt;br /&gt;
= Settings =&lt;br /&gt;
&lt;br /&gt;
== Site ==&lt;br /&gt;
&lt;br /&gt;
At the site level, there will be an area to do all of the configuration and setup of outcome sets. The proposed location is under Settings &amp;gt; Site Administration &amp;gt; Grades &amp;gt; Outcomes.&lt;br /&gt;
&lt;br /&gt;
In addition to managing outcomes, there will be site settings page for general outcome settings. For example, a setting to toggle if outcome idnumbers are editable or not.&lt;br /&gt;
&lt;br /&gt;
== Course ==&lt;br /&gt;
&lt;br /&gt;
When editing a course, there will be a section to associate multiple outcome sets to the course. The section will appear below the course General settings.&lt;br /&gt;
&lt;br /&gt;
This association is used to determine the relevant outcomes for the course for reporting and as a way to pre-filter outcome pickers when associating outcomes to content.&lt;br /&gt;
&lt;br /&gt;
== Activity ==&lt;br /&gt;
&lt;br /&gt;
When editing an activity, there will be a section to associate individual outcomes to the activity. This section will be provided by the moodleform_mod::standard_coursemodule_elements() callback so that all activities will be able to be associated to outcomes automatically.  In the flow of the activity&#039;s form, the outcome mapping options would appear below the grades section.  Do note though that if an activity does not support grades, it can still be mapped to outcomes.&lt;br /&gt;
&lt;br /&gt;
Graded activities will have to add additional integration points with outcomes in order to capture user attempts.&lt;br /&gt;
&lt;br /&gt;
== Advanced grading ==&lt;br /&gt;
&lt;br /&gt;
Rubrics and Marking guides will be able to associate an outcome for a criteria. API will be provided to support this, but each grading method will have to integrate with outcomes where it makes sense.&lt;br /&gt;
&lt;br /&gt;
== Questions ==&lt;br /&gt;
&lt;br /&gt;
When editing a question, there will be a section to associate individual outcomes to the question. The section can be added to question_edit_form::definition() before the Tags section.&lt;br /&gt;
&lt;br /&gt;
This association UI might behave a little differently based on the context in Moodle. If the question is being authored at the site level, then the outcome association is more free form, meaning one can select any outcome from any outcome set. If the question is being authored at the course level, then the outcome association defaults to those outcome sets that are associated to the course.&lt;br /&gt;
&lt;br /&gt;
= Data structure =&lt;br /&gt;
&lt;br /&gt;
This diagram provides an overview of how the tables relate to each other and to core tables.  Please see the below sections for details about each table.&lt;br /&gt;
&lt;br /&gt;
[[File:Outcome_ERD.jpg|frame|center|Outcomes ERD]]&lt;br /&gt;
&lt;br /&gt;
== outcome_sets ==&lt;br /&gt;
&lt;br /&gt;
Relations: none&lt;br /&gt;
&lt;br /&gt;
Purpose: An outcome set represents a collection of outcomes and perhaps some meta data regarding the revision or applicable region. Outcome sets are mapped to courses, which makes the outcomes within the set available to be mapped to course content. An example outcome set would be [http://asn.jesandco.org/resources/D2403043 Health Education Content Standards for California Public Schools, Kindergarten Through Grade Twelve].&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| idnumber&lt;br /&gt;
| varchar(255), unique index&lt;br /&gt;
| GUID that is auto-generated if missing. Generally on import, these are provided. This would be used to identify the outcome set during import or course restore.&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| varchar(255)&lt;br /&gt;
| The name of the outcome set&lt;br /&gt;
|-&lt;br /&gt;
| description&lt;br /&gt;
| text, default null, optional&lt;br /&gt;
| The plain text description of the outcome.&lt;br /&gt;
|-&lt;br /&gt;
| provider&lt;br /&gt;
| varchar(255), default null, optional&lt;br /&gt;
| Provider information regarding the outcome set. EG: Could be set to ASN.&lt;br /&gt;
|-&lt;br /&gt;
| revision&lt;br /&gt;
| varchar(255), default null, optional&lt;br /&gt;
| Version information regarding the outcome set. This will typically be a date or year, EG: 2011&lt;br /&gt;
|-&lt;br /&gt;
| region&lt;br /&gt;
| varchar(255), default null, optional&lt;br /&gt;
| Any region information. Example: In the US this could be a state name.&lt;br /&gt;
|-&lt;br /&gt;
| deleted&lt;br /&gt;
| int(1), default 0&lt;br /&gt;
| If the outcome set has been deleted.&lt;br /&gt;
|-&lt;br /&gt;
| timemodified&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time modified.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome_sets, outcome&lt;br /&gt;
&lt;br /&gt;
Purpose: Stores information regarding an individual outcome. Outcomes can be stored in a hierarchy, but the hierarchy is visual only. This means that if an outcome is earned, then only that outcome is earned, not it and all of its children. Also, if all child outcomes are earned, then parent outcomes are not also automatically earned. In addition, sometimes outcomes are not assessable, but are only there for extra context in the hierarchy. This identifies that the outcome cannot be mapped to content, nor can a student earn it.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomesetid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_sets table.&lt;br /&gt;
|-&lt;br /&gt;
| parentid&lt;br /&gt;
| int(10), indexed, default null&lt;br /&gt;
| Self referencing key. Identifies the parent outcome in the hierarchy.&lt;br /&gt;
|-&lt;br /&gt;
| idnumber&lt;br /&gt;
| varchar(255), unique index&lt;br /&gt;
| GUID that is auto-generated if missing. Generally on import, these are provided. This would be used to identify the outcome set during import or course restore.&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| varchar(255)&lt;br /&gt;
| The name of the outcome.&lt;br /&gt;
|-&lt;br /&gt;
| docnum&lt;br /&gt;
| varchar(255), default null, optional&lt;br /&gt;
| Field for tracking additional information on the outcome. EG: 2.3.A&lt;br /&gt;
|-&lt;br /&gt;
| description&lt;br /&gt;
| text, default null, optional&lt;br /&gt;
| The plain text description of the outcome.&lt;br /&gt;
|-&lt;br /&gt;
| assessable&lt;br /&gt;
| int(1)&lt;br /&gt;
| If set to 1, then the outcome is assessable and can be mapped to content. If set to 0, then the outcome is not assessable and cannot be mapped to content.&lt;br /&gt;
|-&lt;br /&gt;
| deleted&lt;br /&gt;
| int(1), default 0&lt;br /&gt;
| If the outcome has been deleted.&lt;br /&gt;
|-&lt;br /&gt;
| sortorder&lt;br /&gt;
| int(10)&lt;br /&gt;
| The sort order. This is 0-X for all outcomes that belong to the same outcome set.&lt;br /&gt;
|-&lt;br /&gt;
| timemodified&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time modified.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_metadata ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome&lt;br /&gt;
&lt;br /&gt;
Purpose: Represents additional meta information regarding outcomes. Only support for “Education Level” (K, 1, … 12, etc.) and “Subjects” (e.g. Math, English, etc.) will be available out of the box, but additional data points can be added later (which would need to be added to the UI). One outcome could have many meta values. For example: an outcome could be associated to many educational levels and subjects.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| varchar(255), indexed&lt;br /&gt;
| The name of the meta data.&lt;br /&gt;
|-&lt;br /&gt;
| value&lt;br /&gt;
| varchar(1333), indexed&lt;br /&gt;
| The value of the meta data.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_areas ==&lt;br /&gt;
&lt;br /&gt;
Relations: dynamic with core tables&lt;br /&gt;
&lt;br /&gt;
Purpose: This represents that a content item has been mapped to an outcome or to multiple outcomes. Check the outcome_area_outcomes table for the specific outcomes.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| component&lt;br /&gt;
| varchar(100), indexed&lt;br /&gt;
| The name of the component.&lt;br /&gt;
|-&lt;br /&gt;
| area&lt;br /&gt;
| varchar(50), default null, indexed, optional&lt;br /&gt;
| The name of the area. Used when a component has multiple items to associate to outcomes.&lt;br /&gt;
|-&lt;br /&gt;
| itemid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| The item ID.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_area_outcomes ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome, outcome_areas&lt;br /&gt;
&lt;br /&gt;
Purpose: This represents the one to many relationship of a single content item mapped to many outcomes.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomeareaid&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Foreign key to outcome_areas table.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_used_areas ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome_areas, course_modules&lt;br /&gt;
&lt;br /&gt;
Purpose: Associates an outcome content item with an activity. For example: a question is created in the site question bank and outcomes are associated to the question. Once that question is added to a Quiz then that association is stored in this table so the outcome system knows that the content item and its outcomes are in use.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| cmid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to course_modules table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomeareaid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_areas table.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_used_sets ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome_sets, course&lt;br /&gt;
&lt;br /&gt;
Purpose: Associates an outcome set with the course. Filtering of the outcome set is optionally allowed since outcome sets can span multiple educational levels and even subjects. Once an outcome set is mapped to the course, then the outcomes in the outcome set are available to be mapped to course content.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| courseid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to course table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomesetid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_sets table.&lt;br /&gt;
|-&lt;br /&gt;
| filter&lt;br /&gt;
| text, default null&lt;br /&gt;
| Some outcome sets span multiple education levels and subjects. So, when mapping an outcome set to a course, it may make sense to restrict the available outcomes to a specific education level(s) and/or subject(s). This information would be serialized into this field.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_attempts ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome_used_areas, user&lt;br /&gt;
&lt;br /&gt;
Purpose: Track a user attempt against a content item within a particular activity. The idea here is to aggregate attempt information so that the recommendation engines (detailed below) have an easily accessible data set to process. This does not mean however that recommendation engines are only limited to this data as one could mine for additional data where needed.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomeusedareaid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_used_areas table.&lt;br /&gt;
|-&lt;br /&gt;
| userid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table.&lt;br /&gt;
|-&lt;br /&gt;
| percentgrade&lt;br /&gt;
| float(10,5)&lt;br /&gt;
| Percent grade earned on this attempt.&lt;br /&gt;
|-&lt;br /&gt;
| mingrade&lt;br /&gt;
| float(10,5)&lt;br /&gt;
| The minimum possible grade.&lt;br /&gt;
|-&lt;br /&gt;
| maxgrade&lt;br /&gt;
| float(10,5)&lt;br /&gt;
| The maximum possible grade.&lt;br /&gt;
|-&lt;br /&gt;
| rawgrade&lt;br /&gt;
| float(10,5)&lt;br /&gt;
| The points earned, should be between the minimum and maximum grades.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_marks ==&lt;br /&gt;
&lt;br /&gt;
Relations: course, user, outcome&lt;br /&gt;
&lt;br /&gt;
Purpose: Graders will manually mark the student as having Met or Not Met an outcome. The recommendation engines will make a recommendation to the grader based on user attempts against content that has been mapped to the outcome.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| courseid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to course table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| userid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table. This is the user who is receiving the mark.&lt;br /&gt;
|-&lt;br /&gt;
| graderid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table. This is the user is doing the marking.&lt;br /&gt;
|-&lt;br /&gt;
| result&lt;br /&gt;
| int(2)&lt;br /&gt;
| 0 is not pass, 1 is pass, null is that no decision has been made yet.&lt;br /&gt;
|-&lt;br /&gt;
| timemodified&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time modified.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_marks_history ==&lt;br /&gt;
&lt;br /&gt;
Relations: course, user, outcome, outcome_marks&lt;br /&gt;
&lt;br /&gt;
Purpose: Keep track of past markings.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomemarkid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_marks table. Though the record could be missing from outcome_marks.&lt;br /&gt;
|-&lt;br /&gt;
| courseid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to course table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| userid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table. This is the user who is receiving the mark.&lt;br /&gt;
|-&lt;br /&gt;
| graderid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table. This is the user is doing the marking.&lt;br /&gt;
|-&lt;br /&gt;
| result&lt;br /&gt;
| int(2)&lt;br /&gt;
| 0 is not pass, 1 is pass, null is that no decision has been made yet.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_awards ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome, user&lt;br /&gt;
&lt;br /&gt;
Purpose: This preserves any outcomes earned by a student, regardless if the course is deleted or not.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| userid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Architecture =&lt;br /&gt;
&lt;br /&gt;
The outcome API, outcome administrative settings, outcome associations and other UIs that drives outcomes will be located inside of the top level outcome/ directory.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Models and repository mappers:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* outcome: Represents a single outcome&lt;br /&gt;
* outcome set: Represents a group of outcomes&lt;br /&gt;
* outcome content: An outcome association to content.&lt;br /&gt;
* outcome attempt: An attempt made against an outcome.&lt;br /&gt;
* outcome mark: A teacher marking an outcome against a user.&lt;br /&gt;
* outcome award: An awarded outcome at the site level.&lt;br /&gt;
&lt;br /&gt;
A repository mapper would include ways to store the model and ways to retrieve them in a re-usable and organized manner.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Collections:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
A group of models that you may take action on or filter. Example of a third party library that helps to manage collections: https://github.com/doctrine/collections&lt;br /&gt;
&lt;br /&gt;
Collections may or may not be used, but some possible collections would be the following:&lt;br /&gt;
&lt;br /&gt;
* outcomes&lt;br /&gt;
* outcome attempts&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;New mform elements:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
For most plugins, the process of associating an outcome would be done through a Moodle form. Proposing adding a new Moodle form element that can be added to a form to provide the necessary UI. An API for validating and saving the new mform element will be provided. In addition, the mform element will just be a wrapper around a well formed API that could be used on it’s own when other use cases present themselves.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;API for plugins&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Beyond the mform element, plugins may interact with outcomes in order to provide a richer integration. An API will be provided to assist with the following (not an exhaustive list):&lt;br /&gt;
&lt;br /&gt;
* A way to notify the outcome system that a content item is or is not being used within a course.&lt;br /&gt;
** Example: When a question is authored at the site level and then is actually used within a course, it must inform the outcome system that it is in use. This could potentially be done via events or just direct API calls at the appropriate times. Same goes for when a question is no longer used within a course.&lt;br /&gt;
* Record an attempt made against a content item.&lt;br /&gt;
** Examples: A question has been attempted or an assignment submission has been graded.&lt;br /&gt;
* A way to retrieve associated outcomes.&lt;br /&gt;
* A way to update, delete or otherwise modify the associated outcomes.&lt;br /&gt;
* A way to pick outcome associations (EG: what the mform element would do).&lt;br /&gt;
* A method of syncing up attempts against a content item. This would be used when associating an outcome on content that has already been graded/attempted.&lt;br /&gt;
* API to cleanup tables on course deletion.&lt;br /&gt;
&lt;br /&gt;
== Supported plugin type plugins ==&lt;br /&gt;
&lt;br /&gt;
This may sound a little odd, but basically the point of these plugins is to add support for a plugin type to the outcome system. These types would assist in interpreting outcome content associations. Examples:&lt;br /&gt;
&lt;br /&gt;
* Given an outcome association, please provide a link to the mapped content.&lt;br /&gt;
** For an activity, this would be a link to the module.&lt;br /&gt;
** For a grading form, a link to the grading instance.&lt;br /&gt;
** For a question, a link to the question instance in the question bank.&lt;br /&gt;
* What are all of the content items that have not been mapped?&lt;br /&gt;
** For activities, this would return instances that are not mapped.&lt;br /&gt;
** For grading form, this would return sub-plugin specific information, like criteria.&lt;br /&gt;
** For questions, this would return questions from the course question bank that are not mapped.&lt;br /&gt;
* May assist with automatic cleanup when the content is deleted.&lt;br /&gt;
* Also other meta data could be derived, like plugin type name.&lt;br /&gt;
&lt;br /&gt;
This plugin would live under outcome/support/ and would initially ship with support of the following plugin types:&lt;br /&gt;
&lt;br /&gt;
* mod&lt;br /&gt;
* qtype&lt;br /&gt;
* gradingform: note that this integration would be deeper in that each gradingform plugin would need to implement something in order to help interpret associations. The reason being is that outcomes are being associated to plugin specific content, instead of something generic like the grading instance.&lt;br /&gt;
&lt;br /&gt;
== Import and export plugins ==&lt;br /&gt;
&lt;br /&gt;
The outcome system would support the exporting of outcome sets. The first export plugin would be a very simple JSON export that is specific to Moodle itself. This would be used for moving custom outcomes from one Moodle site to another.&lt;br /&gt;
&lt;br /&gt;
The outcome system would support importing outcome sets. Initially, there would be support for importing outcomes from [http://asn.jesandco.org Achievement Standards Network (ASN)] ([http://standards.jesandco.org/wiki/ASN_Application_Profile Format Specification]) and importing the JSON export from above.&lt;br /&gt;
&lt;br /&gt;
Both of the outcomes import and export processes would be a plugin based, so other formats could be supported by creating new plugins. The import and export plugins would live under outcome/import/ and outcome/export/.&lt;br /&gt;
&lt;br /&gt;
== Recommendation engine plugins ==&lt;br /&gt;
&lt;br /&gt;
The outcome system would provide a way to recommend to a teacher whether a student should be marked as completing the outcome or not. These plugins should have full Moodle plugin support because they may need to listen to events, run crons, have DB tables, global settings, etc. These plugins would live under outcome/engine/. Recommendations would be generated on demand and stored in MUC.&lt;br /&gt;
&lt;br /&gt;
Initially, the only plugin would be a percentage based recommendation engine. It would be configurable for a specific threshold that would determine if an attempt against an outcome should be considered correct or incorrect. It would then process the outcome attempts to determine the recommendation.&lt;br /&gt;
&lt;br /&gt;
Recommendation engines should also be enabled or disabled at the site level. This would require a “Manage recommendation engines” section in the admin site settings.&lt;br /&gt;
&lt;br /&gt;
= Reporting =&lt;br /&gt;
&lt;br /&gt;
== Site ==&lt;br /&gt;
&lt;br /&gt;
The following reports:&lt;br /&gt;
&lt;br /&gt;
* Outcomes Coverage report - shows outcomes that have been mapped to content in the site.&lt;br /&gt;
* Outcomes Performance report - shows performance on outcomes at the site level. Optionally broken down by course.&lt;br /&gt;
&lt;br /&gt;
== Course ==&lt;br /&gt;
&lt;br /&gt;
The following reports:&lt;br /&gt;
&lt;br /&gt;
* Outcomes Coverage report - shows outcomes that have been mapped in this course.&lt;br /&gt;
* Outcomes: Unmapped Content report - shows content that is not mapped to an outcome.&lt;br /&gt;
* Outcomes Performance report - shows aggregated performance on outcomes in the course.&lt;br /&gt;
* Outcomes Student Performance report - shows student performance on outcomes in the course for the teacher.&lt;br /&gt;
* Outcomes Personal Performance report - shows student performance on outcomes in the course for the student.&lt;br /&gt;
&lt;br /&gt;
== User profile ==&lt;br /&gt;
&lt;br /&gt;
At the very least, there will be a user site report where the user can see earned outcomes.&lt;br /&gt;
&lt;br /&gt;
= Grading =&lt;br /&gt;
&lt;br /&gt;
Outcome Completion Marking is done by course graders and is the final check point for if a learner has earned an outcome or not. The proposed location is to use the Outcome tab that is currently in the grades section of the course. This would also highjack the Outcomes link under Grade administration and Course administration.&lt;br /&gt;
&lt;br /&gt;
= Logging =&lt;br /&gt;
&lt;br /&gt;
We want to audit most actions in the Moodle log. These actions include:&lt;br /&gt;
&lt;br /&gt;
* CRUD type actions.&lt;br /&gt;
* Any association editing. EG: associating an outcome with a course, content item, etc.&lt;br /&gt;
* Outcome marking.&lt;br /&gt;
* User attempts against outcomes.&lt;br /&gt;
&lt;br /&gt;
= Role capabilities =&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Description&lt;br /&gt;
! Capability&lt;br /&gt;
|-&lt;br /&gt;
| Map outcomes to content&lt;br /&gt;
| moodle/outcome:mapoutcomes&lt;br /&gt;
|-&lt;br /&gt;
| Map outcome sets to courses&lt;br /&gt;
| moodle/outcome:mapoutcomesets&lt;br /&gt;
|-&lt;br /&gt;
| Edit outcomes&lt;br /&gt;
| moodle/outcome:edit&lt;br /&gt;
|-&lt;br /&gt;
| Export outcomes&lt;br /&gt;
| moodle/outcome:export&lt;br /&gt;
|-&lt;br /&gt;
| Import outcomes&lt;br /&gt;
| moodle/outcome:import&lt;br /&gt;
|-&lt;br /&gt;
| Each report will have a capability to view them.&lt;br /&gt;
| report/REPORTNAME:view&lt;br /&gt;
|-&lt;br /&gt;
| Marking outcomes by graders&lt;br /&gt;
| moodle/grade:edit&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Backup and restore =&lt;br /&gt;
&lt;br /&gt;
The workflow for backup and restore may go like:&lt;br /&gt;
&lt;br /&gt;
* Same site, then just map to existing outcomes via the identifier.&lt;br /&gt;
* Not same site, then the assumption is that the outcome set should be imported first, then we can map to existing outcomes via the identifier like in our same site scenario.&lt;br /&gt;
&lt;br /&gt;
Outcomes would probably take advantage of the backup plugin API to backup outcome associations to modules, question, etc. So, for example:&lt;br /&gt;
&lt;br /&gt;
* Outcomes would plug into activities in order to backup outcome associations and attempts.&lt;br /&gt;
* Outcomes would plug into questions in order to backup outcome associations and attempts.&lt;br /&gt;
* Grading forms would have to manually outcome associations and attempts. Will strive to make code re-usable.&lt;br /&gt;
&lt;br /&gt;
= Migration of old outcomes =&lt;br /&gt;
&lt;br /&gt;
Please first review [[Migration and Technical Issues]]. This still needs to be flushed out some more, but since the migration requires user interaction, we may need to create an admin tool to handle the migration. Until outcomes are migrated, it might make sense to continue to show the outcomes in the grade book, but remove the ability to do any editing of old outcomes.&lt;br /&gt;
&lt;br /&gt;
= Change History =&lt;/div&gt;</summary>
		<author><name>Bushido</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=File:Outcome_ERD.jpg&amp;diff=39510</id>
		<title>File:Outcome ERD.jpg</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=File:Outcome_ERD.jpg&amp;diff=39510"/>
		<updated>2013-05-03T23:52:34Z</updated>

		<summary type="html">&lt;p&gt;Bushido: uploaded a new version of &amp;amp;quot;File:Outcome ERD.jpg&amp;amp;quot;: Sigh...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Outcomes ERD&lt;/div&gt;</summary>
		<author><name>Bushido</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=File:Outcome_ERD.jpg&amp;diff=39509</id>
		<title>File:Outcome ERD.jpg</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=File:Outcome_ERD.jpg&amp;diff=39509"/>
		<updated>2013-05-03T23:42:56Z</updated>

		<summary type="html">&lt;p&gt;Bushido: uploaded a new version of &amp;amp;quot;File:Outcome ERD.jpg&amp;amp;quot;: Smaller image (hopefully)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Outcomes ERD&lt;/div&gt;</summary>
		<author><name>Bushido</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=File:Outcome_ERD.jpg&amp;diff=39508</id>
		<title>File:Outcome ERD.jpg</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=File:Outcome_ERD.jpg&amp;diff=39508"/>
		<updated>2013-05-03T23:36:30Z</updated>

		<summary type="html">&lt;p&gt;Bushido: uploaded a new version of &amp;amp;quot;File:Outcome ERD.jpg&amp;amp;quot;: Removed outcome_sets.userid
Removed outcome_areas.deleted
Added outcome_attempts.itemid
Added outcome_attempts.timemodified&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Outcomes ERD&lt;/div&gt;</summary>
		<author><name>Bushido</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=Outcomes_Technical_Specification&amp;diff=38692</id>
		<title>Outcomes Technical Specification</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=Outcomes_Technical_Specification&amp;diff=38692"/>
		<updated>2013-04-03T23:43:35Z</updated>

		<summary type="html">&lt;p&gt;Bushido: /* outcome_area_outcomes */ Removed deleted field, doesn&amp;#039;t make sense - just re-link the outcome and there will be no data loss&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
&lt;br /&gt;
Please be familiar with the function specification as outlined in the [[Outcomes Specification]]. The functional specification will provide details about the concepts and goals of this project. In particular, the following sections provide the overview of the system by user role:&lt;br /&gt;
&lt;br /&gt;
* [[Outcomes Administrator Specification]]&lt;br /&gt;
* [[Outcomes Instructor Specification]]&lt;br /&gt;
* [[Outcomes Student Specification]]&lt;br /&gt;
&lt;br /&gt;
In addition, some features and use cases are known but not yet being implemented. Please see [[Specifically Excluded Use Cases]]. Specifically, this initial version will not be attempting to map an existing outcome set to a new version of the outcome set on import.&lt;br /&gt;
&lt;br /&gt;
This document attempts to capture how the functional specification would be implemented in Moodle.&lt;br /&gt;
&lt;br /&gt;
= Backwards compatibility breaks =&lt;br /&gt;
&lt;br /&gt;
First and foremost, it is important to identify key differences between the current outcome system and this proposal as there are some philosophical shifts as well as breaking of existing code.&lt;br /&gt;
&lt;br /&gt;
# Outcomes will now only be created at the site level and then mapped to courses and content. Outcomes will no longer be created at the course level.&lt;br /&gt;
# Anything using the current outcome API or tables will have to be updated to use the new outcomes when appropriate.&lt;br /&gt;
# Outcomes will no longer appear in the grade book.&lt;br /&gt;
# Outcomes will no longer support scales. It is just a simple pass or fail.&lt;br /&gt;
&lt;br /&gt;
These changes will be documented in the relevant change log files.&lt;br /&gt;
&lt;br /&gt;
= Settings =&lt;br /&gt;
&lt;br /&gt;
== Site ==&lt;br /&gt;
&lt;br /&gt;
At the site level, there will be an area to do all of the configuration and setup of outcome sets. The proposed location is under Settings &amp;gt; Site Administration &amp;gt; Grades &amp;gt; Outcomes.&lt;br /&gt;
&lt;br /&gt;
In addition to managing outcomes, there will be site settings page for general outcome settings. For example, a setting to toggle if outcome idnumbers are editable or not.&lt;br /&gt;
&lt;br /&gt;
== Course ==&lt;br /&gt;
&lt;br /&gt;
When editing a course, there will be a section to associate multiple outcome sets to the course. The section will appear below the course General settings.&lt;br /&gt;
&lt;br /&gt;
This association is used to determine the relevant outcomes for the course for reporting and as a way to pre-filter outcome pickers when associating outcomes to content.&lt;br /&gt;
&lt;br /&gt;
== Activity ==&lt;br /&gt;
&lt;br /&gt;
When editing an activity, there will be a section to associate individual outcomes to the activity. This section will be provided by the moodleform_mod::standard_coursemodule_elements() callback so that all activities will be able to be associated to outcomes automatically.  In the flow of the activity&#039;s form, the outcome mapping options would appear below the grades section.  Do note though that if an activity does not support grades, it can still be mapped to outcomes.&lt;br /&gt;
&lt;br /&gt;
Graded activities will have to add additional integration points with outcomes in order to capture user attempts.&lt;br /&gt;
&lt;br /&gt;
== Advanced grading ==&lt;br /&gt;
&lt;br /&gt;
Rubrics and Marking guides will be able to associate an outcome for a criteria. API will be provided to support this, but each grading method will have to integrate with outcomes where it makes sense.&lt;br /&gt;
&lt;br /&gt;
== Questions ==&lt;br /&gt;
&lt;br /&gt;
When editing a question, there will be a section to associate individual outcomes to the question. The section can be added to question_edit_form::definition() before the Tags section.&lt;br /&gt;
&lt;br /&gt;
This association UI might behave a little differently based on the context in Moodle. If the question is being authored at the site level, then the outcome association is more free form, meaning one can select any outcome from any outcome set. If the question is being authored at the course level, then the outcome association defaults to those outcome sets that are associated to the course.&lt;br /&gt;
&lt;br /&gt;
= Data structure =&lt;br /&gt;
&lt;br /&gt;
This diagram provides an overview of how the tables relate to each other and to core tables.  Please see the below sections for details about each table.&lt;br /&gt;
&lt;br /&gt;
[[File:Outcome_ERD.jpg|frame|center|Outcomes ERD]]&lt;br /&gt;
&lt;br /&gt;
== outcome_sets ==&lt;br /&gt;
&lt;br /&gt;
Relations: none&lt;br /&gt;
&lt;br /&gt;
Purpose: An outcome set represents a collection of outcomes and perhaps some meta data regarding the revision or applicable region. Outcome sets are mapped to courses, which makes the outcomes within the set available to be mapped to course content. An example outcome set would be [http://asn.jesandco.org/resources/D2403043 Health Education Content Standards for California Public Schools, Kindergarten Through Grade Twelve].&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| idnumber&lt;br /&gt;
| varchar(255), unique index&lt;br /&gt;
| GUID that is auto-generated if missing. Generally on import, these are provided. This would be used to identify the outcome set during import or course restore.&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| varchar(255)&lt;br /&gt;
| The name of the outcome set&lt;br /&gt;
|-&lt;br /&gt;
| description&lt;br /&gt;
| text, default null, optional&lt;br /&gt;
| The plain text description of the outcome.&lt;br /&gt;
|-&lt;br /&gt;
| provider&lt;br /&gt;
| varchar(255), default null, optional&lt;br /&gt;
| Provider information regarding the outcome set. EG: Could be set to ASN.&lt;br /&gt;
|-&lt;br /&gt;
| revision&lt;br /&gt;
| varchar(255), default null, optional&lt;br /&gt;
| Version information regarding the outcome set. This will typically be a date or year, EG: 2011&lt;br /&gt;
|-&lt;br /&gt;
| region&lt;br /&gt;
| varchar(255), default null, optional&lt;br /&gt;
| Any region information. Example: In the US this could be a state name.&lt;br /&gt;
|-&lt;br /&gt;
| deleted&lt;br /&gt;
| int(1), default 0&lt;br /&gt;
| If the outcome set has been deleted.&lt;br /&gt;
|-&lt;br /&gt;
| timemodified&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time modified.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome_sets, outcome&lt;br /&gt;
&lt;br /&gt;
Purpose: Stores information regarding an individual outcome. Outcomes can be stored in a hierarchy, but the hierarchy is visual only. This means that if an outcome is earned, then only that outcome is earned, not it and all of its children. Also, if all child outcomes are earned, then parent outcomes are not also automatically earned. In addition, sometimes outcomes are not assessable, but are only there for extra context in the hierarchy. This identifies that the outcome cannot be mapped to content, nor can a student earn it.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomesetid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_sets table.&lt;br /&gt;
|-&lt;br /&gt;
| parentid&lt;br /&gt;
| int(10), indexed, default null&lt;br /&gt;
| Self referencing key. Identifies the parent outcome in the hierarchy.&lt;br /&gt;
|-&lt;br /&gt;
| idnumber&lt;br /&gt;
| varchar(255), unique index&lt;br /&gt;
| GUID that is auto-generated if missing. Generally on import, these are provided. This would be used to identify the outcome set during import or course restore.&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| varchar(255)&lt;br /&gt;
| The name of the outcome.&lt;br /&gt;
|-&lt;br /&gt;
| docnum&lt;br /&gt;
| varchar(255), default null, optional&lt;br /&gt;
| Field for tracking additional information on the outcome. EG: 2.3.A&lt;br /&gt;
|-&lt;br /&gt;
| description&lt;br /&gt;
| text, default null, optional&lt;br /&gt;
| The plain text description of the outcome.&lt;br /&gt;
|-&lt;br /&gt;
| assessable&lt;br /&gt;
| int(1)&lt;br /&gt;
| If set to 1, then the outcome is assessable and can be mapped to content. If set to 0, then the outcome is not assessable and cannot be mapped to content.&lt;br /&gt;
|-&lt;br /&gt;
| deleted&lt;br /&gt;
| int(1), default 0&lt;br /&gt;
| If the outcome has been deleted.&lt;br /&gt;
|-&lt;br /&gt;
| sortorder&lt;br /&gt;
| int(10)&lt;br /&gt;
| The sort order. This is 0-X for all outcomes that belong to the same outcome set.&lt;br /&gt;
|-&lt;br /&gt;
| timemodified&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time modified.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_metadata ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome&lt;br /&gt;
&lt;br /&gt;
Purpose: Represents additional meta information regarding outcomes. Only support for “Education Level” (K, 1, … 12, etc.) and “Subjects” (e.g. Math, English, etc.) will be available out of the box, but additional data points can be added later (which would need to be added to the UI). One outcome could have many meta values. For example: an outcome could be associated to many educational levels and subjects.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| varchar(255), indexed&lt;br /&gt;
| The name of the meta data.&lt;br /&gt;
|-&lt;br /&gt;
| value&lt;br /&gt;
| varchar(1333), indexed&lt;br /&gt;
| The value of the meta data.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_areas ==&lt;br /&gt;
&lt;br /&gt;
Relations: dynamic with core tables&lt;br /&gt;
&lt;br /&gt;
Purpose: This represents that a content item has been mapped to an outcome or to multiple outcomes. Check the outcome_area_outcomes table for the specific outcomes.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| component&lt;br /&gt;
| varchar(100), indexed&lt;br /&gt;
| The name of the component.&lt;br /&gt;
|-&lt;br /&gt;
| area&lt;br /&gt;
| varchar(50), default null, indexed, optional&lt;br /&gt;
| The name of the area. Used when a component has multiple items to associate to outcomes.&lt;br /&gt;
|-&lt;br /&gt;
| itemid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| The item ID.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_area_outcomes ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome, outcome_areas&lt;br /&gt;
&lt;br /&gt;
Purpose: This represents the one to many relationship of a single content item mapped to many outcomes.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomeareaid&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Foreign key to outcome_areas table.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_used_areas ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome_areas, course_modules&lt;br /&gt;
&lt;br /&gt;
Purpose: Associates an outcome content item with an activity. For example: a question is created in the site question bank and outcomes are associated to the question. Once that question is added to a Quiz then that association is stored in this table so the outcome system knows that the content item and its outcomes are in use.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| cmid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to course_modules table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomeareaid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_areas table.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_used_sets ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome_sets, course&lt;br /&gt;
&lt;br /&gt;
Purpose: Associates an outcome set with the course. Filtering of the outcome set is optionally allowed since outcome sets can span multiple educational levels and even subjects. Once an outcome set is mapped to the course, then the outcomes in the outcome set are available to be mapped to course content.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| courseid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to course table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomesetid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_sets table.&lt;br /&gt;
|-&lt;br /&gt;
| filter&lt;br /&gt;
| text, default null&lt;br /&gt;
| Some outcome sets span multiple education levels and subjects. So, when mapping an outcome set to a course, it may make sense to restrict the available outcomes to a specific education level(s) and/or subject(s). This information would be serialized into this field.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_attempts ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome_used_areas, user&lt;br /&gt;
&lt;br /&gt;
Purpose: Track a user attempt against a content item within a particular activity. The idea here is to aggregate attempt information so that the recommendation engines (detailed below) have an easily accessible data set to process. This does not mean however that recommendation engines are only limited to this data as one could mine for additional data where needed.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomeusedareaid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_used_areas table.&lt;br /&gt;
|-&lt;br /&gt;
| userid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table.&lt;br /&gt;
|-&lt;br /&gt;
| percentgrade&lt;br /&gt;
| float(10,5)&lt;br /&gt;
| Percent grade earned on this attempt.&lt;br /&gt;
|-&lt;br /&gt;
| mingrade&lt;br /&gt;
| float(10,5)&lt;br /&gt;
| The minimum possible grade.&lt;br /&gt;
|-&lt;br /&gt;
| maxgrade&lt;br /&gt;
| float(10,5)&lt;br /&gt;
| The maximum possible grade.&lt;br /&gt;
|-&lt;br /&gt;
| rawgrade&lt;br /&gt;
| float(10,5)&lt;br /&gt;
| The points earned, should be between the minimum and maximum grades.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_marks ==&lt;br /&gt;
&lt;br /&gt;
Relations: course, user, outcome&lt;br /&gt;
&lt;br /&gt;
Purpose: Graders will manually mark the student as having Met or Not Met an outcome. The recommendation engines will make a recommendation to the grader based on user attempts against content that has been mapped to the outcome.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| courseid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to course table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| userid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table. This is the user who is receiving the mark.&lt;br /&gt;
|-&lt;br /&gt;
| graderid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table. This is the user is doing the marking.&lt;br /&gt;
|-&lt;br /&gt;
| result&lt;br /&gt;
| int(2)&lt;br /&gt;
| 0 is not pass, 1 is pass, null is that no decision has been made yet.&lt;br /&gt;
|-&lt;br /&gt;
| timemodified&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time modified.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_marks_history ==&lt;br /&gt;
&lt;br /&gt;
Relations: course, user, outcome, outcome_marks&lt;br /&gt;
&lt;br /&gt;
Purpose: Keep track of past markings.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomemarkid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_marks table. Though the record could be missing from outcome_marks.&lt;br /&gt;
|-&lt;br /&gt;
| courseid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to course table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| userid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table. This is the user who is receiving the mark.&lt;br /&gt;
|-&lt;br /&gt;
| graderid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table. This is the user is doing the marking.&lt;br /&gt;
|-&lt;br /&gt;
| result&lt;br /&gt;
| int(2)&lt;br /&gt;
| 0 is not pass, 1 is pass, null is that no decision has been made yet.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_awards ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome, user&lt;br /&gt;
&lt;br /&gt;
Purpose: This preserves any outcomes earned by a student, regardless if the course is deleted or not.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| userid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Architecture =&lt;br /&gt;
&lt;br /&gt;
The outcome API, outcome administrative settings, outcome associations and other UIs that drives outcomes will be located inside of the top level outcome/ directory.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Models and repository mappers:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* outcome: Represents a single outcome&lt;br /&gt;
* outcome set: Represents a group of outcomes&lt;br /&gt;
* outcome content: An outcome association to content.&lt;br /&gt;
* outcome attempt: An attempt made against an outcome.&lt;br /&gt;
* outcome mark: A teacher marking an outcome against a user.&lt;br /&gt;
* outcome award: An awarded outcome at the site level.&lt;br /&gt;
&lt;br /&gt;
A repository mapper would include ways to store the model and ways to retrieve them in a re-usable and organized manner.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Collections:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
A group of models that you may take action on or filter. Example of a third party library that helps to manage collections: https://github.com/doctrine/collections&lt;br /&gt;
&lt;br /&gt;
Collections may or may not be used, but some possible collections would be the following:&lt;br /&gt;
&lt;br /&gt;
* outcomes&lt;br /&gt;
* outcome attempts&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;New mform elements:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
For most plugins, the process of associating an outcome would be done through a Moodle form. Proposing adding a new Moodle form element that can be added to a form to provide the necessary UI. An API for validating and saving the new mform element will be provided. In addition, the mform element will just be a wrapper around a well formed API that could be used on it’s own when other use cases present themselves.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;API for plugins&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Beyond the mform element, plugins may interact with outcomes in order to provide a richer integration. An API will be provided to assist with the following (not an exhaustive list):&lt;br /&gt;
&lt;br /&gt;
* A way to notify the outcome system that a content item is or is not being used within a course.&lt;br /&gt;
** Example: When a question is authored at the site level and then is actually used within a course, it must inform the outcome system that it is in use. This could potentially be done via events or just direct API calls at the appropriate times. Same goes for when a question is no longer used within a course.&lt;br /&gt;
* Record an attempt made against a content item.&lt;br /&gt;
** Examples: A question has been attempted or an assignment submission has been graded.&lt;br /&gt;
* A way to retrieve associated outcomes.&lt;br /&gt;
* A way to update, delete or otherwise modify the associated outcomes.&lt;br /&gt;
* A way to pick outcome associations (EG: what the mform element would do).&lt;br /&gt;
* A method of syncing up attempts against a content item. This would be used when associating an outcome on content that has already been graded/attempted.&lt;br /&gt;
* API to cleanup tables on course deletion.&lt;br /&gt;
&lt;br /&gt;
== Supported plugin type plugins ==&lt;br /&gt;
&lt;br /&gt;
This may sound a little odd, but basically the point of these plugins is to add support for a plugin type to the outcome system. These types would assist in interpreting outcome content associations. Examples:&lt;br /&gt;
&lt;br /&gt;
* Given an outcome association, please provide a link to the mapped content.&lt;br /&gt;
** For an activity, this would be a link to the module.&lt;br /&gt;
** For a grading form, a link to the grading instance.&lt;br /&gt;
** For a question, a link to the question instance in the question bank.&lt;br /&gt;
* What are all of the content items that have not been mapped?&lt;br /&gt;
** For activities, this would return instances that are not mapped.&lt;br /&gt;
** For grading form, this would return sub-plugin specific information, like criteria.&lt;br /&gt;
** For questions, this would return questions from the course question bank that are not mapped.&lt;br /&gt;
* May assist with automatic cleanup when the content is deleted.&lt;br /&gt;
* Also other meta data could be derived, like plugin type name.&lt;br /&gt;
&lt;br /&gt;
This plugin would live under outcome/support/ and would initially ship with support of the following plugin types:&lt;br /&gt;
&lt;br /&gt;
* mod&lt;br /&gt;
* qtype&lt;br /&gt;
* gradingform: note that this integration would be deeper in that each gradingform plugin would need to implement something in order to help interpret associations. The reason being is that outcomes are being associated to plugin specific content, instead of something generic like the grading instance.&lt;br /&gt;
&lt;br /&gt;
== Import and export plugins ==&lt;br /&gt;
&lt;br /&gt;
The outcome system would support the exporting of outcome sets. The first export plugin would be a very simple JSON export that is specific to Moodle itself. This would be used for moving custom outcomes from one Moodle site to another.&lt;br /&gt;
&lt;br /&gt;
The outcome system would support importing outcome sets. Initially, there would be support for importing outcomes from [http://asn.jesandco.org Achievement Standards Network (ASN)] ([http://standards.jesandco.org/wiki/ASN_Application_Profile Format Specification]) and importing the JSON export from above.&lt;br /&gt;
&lt;br /&gt;
Both of the outcomes import and export processes would be a plugin based, so other formats could be supported by creating new plugins. The import and export plugins would live under outcome/import/ and outcome/export/.&lt;br /&gt;
&lt;br /&gt;
== Recommendation engine plugins ==&lt;br /&gt;
&lt;br /&gt;
The outcome system would provide a way to recommend to a teacher whether a student should be marked as completing the outcome or not. These plugins should have full Moodle plugin support because they may need to listen to events, run crons, have DB tables, global settings, etc. These plugins would live under outcome/engine/. Recommendations would be generated on demand and stored in MUC.&lt;br /&gt;
&lt;br /&gt;
Initially, the only plugin would be a percentage based recommendation engine. It would be configurable for a specific threshold that would determine if an attempt against an outcome should be considered correct or incorrect. It would then process the outcome attempts to determine the recommendation.&lt;br /&gt;
&lt;br /&gt;
Recommendation engines should also be enabled or disabled at the site level. This would require a “Manage recommendation engines” section in the admin site settings.&lt;br /&gt;
&lt;br /&gt;
= Reporting =&lt;br /&gt;
&lt;br /&gt;
== Site ==&lt;br /&gt;
&lt;br /&gt;
The following reports:&lt;br /&gt;
&lt;br /&gt;
* Outcomes Coverage report - shows outcomes that have been mapped to content in the site.&lt;br /&gt;
* Outcomes Performance report - shows performance on outcomes at the site level. Optionally broken down by course.&lt;br /&gt;
&lt;br /&gt;
== Course ==&lt;br /&gt;
&lt;br /&gt;
The following reports:&lt;br /&gt;
&lt;br /&gt;
* Outcomes Coverage report - shows outcomes that have been mapped in this course.&lt;br /&gt;
* Outcomes: Unmapped Content report - shows content that is not mapped to an outcome.&lt;br /&gt;
* Outcomes Performance report - shows aggregated performance on outcomes in the course.&lt;br /&gt;
* Outcomes Student Performance report - shows student performance on outcomes in the course for the teacher.&lt;br /&gt;
* Outcomes Personal Performance report - shows student performance on outcomes in the course for the student.&lt;br /&gt;
&lt;br /&gt;
== User profile ==&lt;br /&gt;
&lt;br /&gt;
At the very least, there will be a user site report where the user can see earned outcomes.&lt;br /&gt;
&lt;br /&gt;
= Grading =&lt;br /&gt;
&lt;br /&gt;
Outcome Completion Marking is done by course graders and is the final check point for if a learner has earned an outcome or not. The proposed location is to use the Outcome tab that is currently in the grades section of the course. This would also highjack the Outcomes link under Grade administration and Course administration.&lt;br /&gt;
&lt;br /&gt;
= Logging =&lt;br /&gt;
&lt;br /&gt;
We want to audit most actions in the Moodle log. These actions include:&lt;br /&gt;
&lt;br /&gt;
* CRUD type actions.&lt;br /&gt;
* Any association editing. EG: associating an outcome with a course, content item, etc.&lt;br /&gt;
* Outcome marking.&lt;br /&gt;
* User attempts against outcomes.&lt;br /&gt;
&lt;br /&gt;
= Role capabilities =&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Description&lt;br /&gt;
! Capability&lt;br /&gt;
|-&lt;br /&gt;
| Map outcomes to content&lt;br /&gt;
| moodle/outcome:mapoutcomes&lt;br /&gt;
|-&lt;br /&gt;
| Map outcome sets to courses&lt;br /&gt;
| moodle/outcome:mapoutcomesets&lt;br /&gt;
|-&lt;br /&gt;
| Edit outcomes&lt;br /&gt;
| moodle/outcome:edit&lt;br /&gt;
|-&lt;br /&gt;
| Export outcomes&lt;br /&gt;
| moodle/outcome:export&lt;br /&gt;
|-&lt;br /&gt;
| Import outcomes&lt;br /&gt;
| moodle/outcome:import&lt;br /&gt;
|-&lt;br /&gt;
| Each report will have a capability to view them.&lt;br /&gt;
| report/REPORTNAME:view&lt;br /&gt;
|-&lt;br /&gt;
| Marking outcomes by graders&lt;br /&gt;
| moodle/grade:edit&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Backup and restore =&lt;br /&gt;
&lt;br /&gt;
The workflow for backup and restore may go like:&lt;br /&gt;
&lt;br /&gt;
* Same site, then just map to existing outcomes via the identifier.&lt;br /&gt;
* Not same site, then the assumption is that the outcome set should be imported first, then we can map to existing outcomes via the identifier like in our same site scenario.&lt;br /&gt;
&lt;br /&gt;
Outcomes would probably take advantage of the backup plugin API to backup outcome associations to modules, question, etc. So, for example:&lt;br /&gt;
&lt;br /&gt;
* Outcomes would plug into activities in order to backup outcome associations and attempts.&lt;br /&gt;
* Outcomes would plug into questions in order to backup outcome associations and attempts.&lt;br /&gt;
* Grading forms would have to manually outcome associations and attempts. Will strive to make code re-usable.&lt;br /&gt;
&lt;br /&gt;
= Migration of old outcomes =&lt;br /&gt;
&lt;br /&gt;
Please first review [[Migration and Technical Issues]]. This still needs to be flushed out some more, but since the migration requires user interaction, we may need to create an admin tool to handle the migration. Until outcomes are migrated, it might make sense to continue to show the outcomes in the grade book, but remove the ability to do any editing of old outcomes.&lt;/div&gt;</summary>
		<author><name>Bushido</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=File:Outcome_ERD.jpg&amp;diff=38689</id>
		<title>File:Outcome ERD.jpg</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=File:Outcome_ERD.jpg&amp;diff=38689"/>
		<updated>2013-04-03T23:38:46Z</updated>

		<summary type="html">&lt;p&gt;Bushido: uploaded a new version of &amp;amp;quot;File:Outcome ERD.jpg&amp;amp;quot;: Reverted to version as of 22:28, 8 March 2013&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Outcomes ERD&lt;/div&gt;</summary>
		<author><name>Bushido</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=Outcomes_Technical_Specification&amp;diff=38688</id>
		<title>Outcomes Technical Specification</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=Outcomes_Technical_Specification&amp;diff=38688"/>
		<updated>2013-04-03T23:38:23Z</updated>

		<summary type="html">&lt;p&gt;Bushido: /* outcome_sets */ Undo personal outcome sets&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
&lt;br /&gt;
Please be familiar with the function specification as outlined in the [[Outcomes Specification]]. The functional specification will provide details about the concepts and goals of this project. In particular, the following sections provide the overview of the system by user role:&lt;br /&gt;
&lt;br /&gt;
* [[Outcomes Administrator Specification]]&lt;br /&gt;
* [[Outcomes Instructor Specification]]&lt;br /&gt;
* [[Outcomes Student Specification]]&lt;br /&gt;
&lt;br /&gt;
In addition, some features and use cases are known but not yet being implemented. Please see [[Specifically Excluded Use Cases]]. Specifically, this initial version will not be attempting to map an existing outcome set to a new version of the outcome set on import.&lt;br /&gt;
&lt;br /&gt;
This document attempts to capture how the functional specification would be implemented in Moodle.&lt;br /&gt;
&lt;br /&gt;
= Backwards compatibility breaks =&lt;br /&gt;
&lt;br /&gt;
First and foremost, it is important to identify key differences between the current outcome system and this proposal as there are some philosophical shifts as well as breaking of existing code.&lt;br /&gt;
&lt;br /&gt;
# Outcomes will now only be created at the site level and then mapped to courses and content. Outcomes will no longer be created at the course level.&lt;br /&gt;
# Anything using the current outcome API or tables will have to be updated to use the new outcomes when appropriate.&lt;br /&gt;
# Outcomes will no longer appear in the grade book.&lt;br /&gt;
# Outcomes will no longer support scales. It is just a simple pass or fail.&lt;br /&gt;
&lt;br /&gt;
These changes will be documented in the relevant change log files.&lt;br /&gt;
&lt;br /&gt;
= Settings =&lt;br /&gt;
&lt;br /&gt;
== Site ==&lt;br /&gt;
&lt;br /&gt;
At the site level, there will be an area to do all of the configuration and setup of outcome sets. The proposed location is under Settings &amp;gt; Site Administration &amp;gt; Grades &amp;gt; Outcomes.&lt;br /&gt;
&lt;br /&gt;
In addition to managing outcomes, there will be site settings page for general outcome settings. For example, a setting to toggle if outcome idnumbers are editable or not.&lt;br /&gt;
&lt;br /&gt;
== Course ==&lt;br /&gt;
&lt;br /&gt;
When editing a course, there will be a section to associate multiple outcome sets to the course. The section will appear below the course General settings.&lt;br /&gt;
&lt;br /&gt;
This association is used to determine the relevant outcomes for the course for reporting and as a way to pre-filter outcome pickers when associating outcomes to content.&lt;br /&gt;
&lt;br /&gt;
== Activity ==&lt;br /&gt;
&lt;br /&gt;
When editing an activity, there will be a section to associate individual outcomes to the activity. This section will be provided by the moodleform_mod::standard_coursemodule_elements() callback so that all activities will be able to be associated to outcomes automatically.  In the flow of the activity&#039;s form, the outcome mapping options would appear below the grades section.  Do note though that if an activity does not support grades, it can still be mapped to outcomes.&lt;br /&gt;
&lt;br /&gt;
Graded activities will have to add additional integration points with outcomes in order to capture user attempts.&lt;br /&gt;
&lt;br /&gt;
== Advanced grading ==&lt;br /&gt;
&lt;br /&gt;
Rubrics and Marking guides will be able to associate an outcome for a criteria. API will be provided to support this, but each grading method will have to integrate with outcomes where it makes sense.&lt;br /&gt;
&lt;br /&gt;
== Questions ==&lt;br /&gt;
&lt;br /&gt;
When editing a question, there will be a section to associate individual outcomes to the question. The section can be added to question_edit_form::definition() before the Tags section.&lt;br /&gt;
&lt;br /&gt;
This association UI might behave a little differently based on the context in Moodle. If the question is being authored at the site level, then the outcome association is more free form, meaning one can select any outcome from any outcome set. If the question is being authored at the course level, then the outcome association defaults to those outcome sets that are associated to the course.&lt;br /&gt;
&lt;br /&gt;
= Data structure =&lt;br /&gt;
&lt;br /&gt;
This diagram provides an overview of how the tables relate to each other and to core tables.  Please see the below sections for details about each table.&lt;br /&gt;
&lt;br /&gt;
[[File:Outcome_ERD.jpg|frame|center|Outcomes ERD]]&lt;br /&gt;
&lt;br /&gt;
== outcome_sets ==&lt;br /&gt;
&lt;br /&gt;
Relations: none&lt;br /&gt;
&lt;br /&gt;
Purpose: An outcome set represents a collection of outcomes and perhaps some meta data regarding the revision or applicable region. Outcome sets are mapped to courses, which makes the outcomes within the set available to be mapped to course content. An example outcome set would be [http://asn.jesandco.org/resources/D2403043 Health Education Content Standards for California Public Schools, Kindergarten Through Grade Twelve].&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| idnumber&lt;br /&gt;
| varchar(255), unique index&lt;br /&gt;
| GUID that is auto-generated if missing. Generally on import, these are provided. This would be used to identify the outcome set during import or course restore.&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| varchar(255)&lt;br /&gt;
| The name of the outcome set&lt;br /&gt;
|-&lt;br /&gt;
| description&lt;br /&gt;
| text, default null, optional&lt;br /&gt;
| The plain text description of the outcome.&lt;br /&gt;
|-&lt;br /&gt;
| provider&lt;br /&gt;
| varchar(255), default null, optional&lt;br /&gt;
| Provider information regarding the outcome set. EG: Could be set to ASN.&lt;br /&gt;
|-&lt;br /&gt;
| revision&lt;br /&gt;
| varchar(255), default null, optional&lt;br /&gt;
| Version information regarding the outcome set. This will typically be a date or year, EG: 2011&lt;br /&gt;
|-&lt;br /&gt;
| region&lt;br /&gt;
| varchar(255), default null, optional&lt;br /&gt;
| Any region information. Example: In the US this could be a state name.&lt;br /&gt;
|-&lt;br /&gt;
| deleted&lt;br /&gt;
| int(1), default 0&lt;br /&gt;
| If the outcome set has been deleted.&lt;br /&gt;
|-&lt;br /&gt;
| timemodified&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time modified.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome_sets, outcome&lt;br /&gt;
&lt;br /&gt;
Purpose: Stores information regarding an individual outcome. Outcomes can be stored in a hierarchy, but the hierarchy is visual only. This means that if an outcome is earned, then only that outcome is earned, not it and all of its children. Also, if all child outcomes are earned, then parent outcomes are not also automatically earned. In addition, sometimes outcomes are not assessable, but are only there for extra context in the hierarchy. This identifies that the outcome cannot be mapped to content, nor can a student earn it.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomesetid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_sets table.&lt;br /&gt;
|-&lt;br /&gt;
| parentid&lt;br /&gt;
| int(10), indexed, default null&lt;br /&gt;
| Self referencing key. Identifies the parent outcome in the hierarchy.&lt;br /&gt;
|-&lt;br /&gt;
| idnumber&lt;br /&gt;
| varchar(255), unique index&lt;br /&gt;
| GUID that is auto-generated if missing. Generally on import, these are provided. This would be used to identify the outcome set during import or course restore.&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| varchar(255)&lt;br /&gt;
| The name of the outcome.&lt;br /&gt;
|-&lt;br /&gt;
| docnum&lt;br /&gt;
| varchar(255), default null, optional&lt;br /&gt;
| Field for tracking additional information on the outcome. EG: 2.3.A&lt;br /&gt;
|-&lt;br /&gt;
| description&lt;br /&gt;
| text, default null, optional&lt;br /&gt;
| The plain text description of the outcome.&lt;br /&gt;
|-&lt;br /&gt;
| assessable&lt;br /&gt;
| int(1)&lt;br /&gt;
| If set to 1, then the outcome is assessable and can be mapped to content. If set to 0, then the outcome is not assessable and cannot be mapped to content.&lt;br /&gt;
|-&lt;br /&gt;
| deleted&lt;br /&gt;
| int(1), default 0&lt;br /&gt;
| If the outcome has been deleted.&lt;br /&gt;
|-&lt;br /&gt;
| sortorder&lt;br /&gt;
| int(10)&lt;br /&gt;
| The sort order. This is 0-X for all outcomes that belong to the same outcome set.&lt;br /&gt;
|-&lt;br /&gt;
| timemodified&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time modified.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_metadata ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome&lt;br /&gt;
&lt;br /&gt;
Purpose: Represents additional meta information regarding outcomes. Only support for “Education Level” (K, 1, … 12, etc.) and “Subjects” (e.g. Math, English, etc.) will be available out of the box, but additional data points can be added later (which would need to be added to the UI). One outcome could have many meta values. For example: an outcome could be associated to many educational levels and subjects.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| varchar(255), indexed&lt;br /&gt;
| The name of the meta data.&lt;br /&gt;
|-&lt;br /&gt;
| value&lt;br /&gt;
| varchar(1333), indexed&lt;br /&gt;
| The value of the meta data.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_areas ==&lt;br /&gt;
&lt;br /&gt;
Relations: dynamic with core tables&lt;br /&gt;
&lt;br /&gt;
Purpose: This represents that a content item has been mapped to an outcome or to multiple outcomes. Check the outcome_area_outcomes table for the specific outcomes.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| component&lt;br /&gt;
| varchar(100), indexed&lt;br /&gt;
| The name of the component.&lt;br /&gt;
|-&lt;br /&gt;
| area&lt;br /&gt;
| varchar(50), default null, indexed, optional&lt;br /&gt;
| The name of the area. Used when a component has multiple items to associate to outcomes.&lt;br /&gt;
|-&lt;br /&gt;
| itemid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| The item ID.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_area_outcomes ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome, outcome_areas&lt;br /&gt;
&lt;br /&gt;
Purpose: This represents the one to many relationship of a single content item mapped to many outcomes.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomeareaid&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Foreign key to outcome_areas table.&lt;br /&gt;
|-&lt;br /&gt;
| deleted&lt;br /&gt;
| int(1), default 0&lt;br /&gt;
| Soft delete if the outcome was disassociated from the content. Note, if the content is actually deleted, then this association will be deleted.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_used_areas ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome_areas, course_modules&lt;br /&gt;
&lt;br /&gt;
Purpose: Associates an outcome content item with an activity. For example: a question is created in the site question bank and outcomes are associated to the question. Once that question is added to a Quiz then that association is stored in this table so the outcome system knows that the content item and its outcomes are in use.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| cmid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to course_modules table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomeareaid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_areas table.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_used_sets ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome_sets, course&lt;br /&gt;
&lt;br /&gt;
Purpose: Associates an outcome set with the course. Filtering of the outcome set is optionally allowed since outcome sets can span multiple educational levels and even subjects. Once an outcome set is mapped to the course, then the outcomes in the outcome set are available to be mapped to course content.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| courseid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to course table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomesetid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_sets table.&lt;br /&gt;
|-&lt;br /&gt;
| filter&lt;br /&gt;
| text, default null&lt;br /&gt;
| Some outcome sets span multiple education levels and subjects. So, when mapping an outcome set to a course, it may make sense to restrict the available outcomes to a specific education level(s) and/or subject(s). This information would be serialized into this field.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_attempts ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome_used_areas, user&lt;br /&gt;
&lt;br /&gt;
Purpose: Track a user attempt against a content item within a particular activity. The idea here is to aggregate attempt information so that the recommendation engines (detailed below) have an easily accessible data set to process. This does not mean however that recommendation engines are only limited to this data as one could mine for additional data where needed.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomeusedareaid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_used_areas table.&lt;br /&gt;
|-&lt;br /&gt;
| userid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table.&lt;br /&gt;
|-&lt;br /&gt;
| percentgrade&lt;br /&gt;
| float(10,5)&lt;br /&gt;
| Percent grade earned on this attempt.&lt;br /&gt;
|-&lt;br /&gt;
| mingrade&lt;br /&gt;
| float(10,5)&lt;br /&gt;
| The minimum possible grade.&lt;br /&gt;
|-&lt;br /&gt;
| maxgrade&lt;br /&gt;
| float(10,5)&lt;br /&gt;
| The maximum possible grade.&lt;br /&gt;
|-&lt;br /&gt;
| rawgrade&lt;br /&gt;
| float(10,5)&lt;br /&gt;
| The points earned, should be between the minimum and maximum grades.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_marks ==&lt;br /&gt;
&lt;br /&gt;
Relations: course, user, outcome&lt;br /&gt;
&lt;br /&gt;
Purpose: Graders will manually mark the student as having Met or Not Met an outcome. The recommendation engines will make a recommendation to the grader based on user attempts against content that has been mapped to the outcome.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| courseid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to course table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| userid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table. This is the user who is receiving the mark.&lt;br /&gt;
|-&lt;br /&gt;
| graderid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table. This is the user is doing the marking.&lt;br /&gt;
|-&lt;br /&gt;
| result&lt;br /&gt;
| int(2)&lt;br /&gt;
| 0 is not pass, 1 is pass, null is that no decision has been made yet.&lt;br /&gt;
|-&lt;br /&gt;
| timemodified&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time modified.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_marks_history ==&lt;br /&gt;
&lt;br /&gt;
Relations: course, user, outcome, outcome_marks&lt;br /&gt;
&lt;br /&gt;
Purpose: Keep track of past markings.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomemarkid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_marks table. Though the record could be missing from outcome_marks.&lt;br /&gt;
|-&lt;br /&gt;
| courseid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to course table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| userid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table. This is the user who is receiving the mark.&lt;br /&gt;
|-&lt;br /&gt;
| graderid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table. This is the user is doing the marking.&lt;br /&gt;
|-&lt;br /&gt;
| result&lt;br /&gt;
| int(2)&lt;br /&gt;
| 0 is not pass, 1 is pass, null is that no decision has been made yet.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_awards ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome, user&lt;br /&gt;
&lt;br /&gt;
Purpose: This preserves any outcomes earned by a student, regardless if the course is deleted or not.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| userid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Architecture =&lt;br /&gt;
&lt;br /&gt;
The outcome API, outcome administrative settings, outcome associations and other UIs that drives outcomes will be located inside of the top level outcome/ directory.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Models and repository mappers:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* outcome: Represents a single outcome&lt;br /&gt;
* outcome set: Represents a group of outcomes&lt;br /&gt;
* outcome content: An outcome association to content.&lt;br /&gt;
* outcome attempt: An attempt made against an outcome.&lt;br /&gt;
* outcome mark: A teacher marking an outcome against a user.&lt;br /&gt;
* outcome award: An awarded outcome at the site level.&lt;br /&gt;
&lt;br /&gt;
A repository mapper would include ways to store the model and ways to retrieve them in a re-usable and organized manner.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Collections:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
A group of models that you may take action on or filter. Example of a third party library that helps to manage collections: https://github.com/doctrine/collections&lt;br /&gt;
&lt;br /&gt;
Collections may or may not be used, but some possible collections would be the following:&lt;br /&gt;
&lt;br /&gt;
* outcomes&lt;br /&gt;
* outcome attempts&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;New mform elements:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
For most plugins, the process of associating an outcome would be done through a Moodle form. Proposing adding a new Moodle form element that can be added to a form to provide the necessary UI. An API for validating and saving the new mform element will be provided. In addition, the mform element will just be a wrapper around a well formed API that could be used on it’s own when other use cases present themselves.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;API for plugins&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Beyond the mform element, plugins may interact with outcomes in order to provide a richer integration. An API will be provided to assist with the following (not an exhaustive list):&lt;br /&gt;
&lt;br /&gt;
* A way to notify the outcome system that a content item is or is not being used within a course.&lt;br /&gt;
** Example: When a question is authored at the site level and then is actually used within a course, it must inform the outcome system that it is in use. This could potentially be done via events or just direct API calls at the appropriate times. Same goes for when a question is no longer used within a course.&lt;br /&gt;
* Record an attempt made against a content item.&lt;br /&gt;
** Examples: A question has been attempted or an assignment submission has been graded.&lt;br /&gt;
* A way to retrieve associated outcomes.&lt;br /&gt;
* A way to update, delete or otherwise modify the associated outcomes.&lt;br /&gt;
* A way to pick outcome associations (EG: what the mform element would do).&lt;br /&gt;
* A method of syncing up attempts against a content item. This would be used when associating an outcome on content that has already been graded/attempted.&lt;br /&gt;
* API to cleanup tables on course deletion.&lt;br /&gt;
&lt;br /&gt;
== Supported plugin type plugins ==&lt;br /&gt;
&lt;br /&gt;
This may sound a little odd, but basically the point of these plugins is to add support for a plugin type to the outcome system. These types would assist in interpreting outcome content associations. Examples:&lt;br /&gt;
&lt;br /&gt;
* Given an outcome association, please provide a link to the mapped content.&lt;br /&gt;
** For an activity, this would be a link to the module.&lt;br /&gt;
** For a grading form, a link to the grading instance.&lt;br /&gt;
** For a question, a link to the question instance in the question bank.&lt;br /&gt;
* What are all of the content items that have not been mapped?&lt;br /&gt;
** For activities, this would return instances that are not mapped.&lt;br /&gt;
** For grading form, this would return sub-plugin specific information, like criteria.&lt;br /&gt;
** For questions, this would return questions from the course question bank that are not mapped.&lt;br /&gt;
* May assist with automatic cleanup when the content is deleted.&lt;br /&gt;
* Also other meta data could be derived, like plugin type name.&lt;br /&gt;
&lt;br /&gt;
This plugin would live under outcome/support/ and would initially ship with support of the following plugin types:&lt;br /&gt;
&lt;br /&gt;
* mod&lt;br /&gt;
* qtype&lt;br /&gt;
* gradingform: note that this integration would be deeper in that each gradingform plugin would need to implement something in order to help interpret associations. The reason being is that outcomes are being associated to plugin specific content, instead of something generic like the grading instance.&lt;br /&gt;
&lt;br /&gt;
== Import and export plugins ==&lt;br /&gt;
&lt;br /&gt;
The outcome system would support the exporting of outcome sets. The first export plugin would be a very simple JSON export that is specific to Moodle itself. This would be used for moving custom outcomes from one Moodle site to another.&lt;br /&gt;
&lt;br /&gt;
The outcome system would support importing outcome sets. Initially, there would be support for importing outcomes from [http://asn.jesandco.org Achievement Standards Network (ASN)] ([http://standards.jesandco.org/wiki/ASN_Application_Profile Format Specification]) and importing the JSON export from above.&lt;br /&gt;
&lt;br /&gt;
Both of the outcomes import and export processes would be a plugin based, so other formats could be supported by creating new plugins. The import and export plugins would live under outcome/import/ and outcome/export/.&lt;br /&gt;
&lt;br /&gt;
== Recommendation engine plugins ==&lt;br /&gt;
&lt;br /&gt;
The outcome system would provide a way to recommend to a teacher whether a student should be marked as completing the outcome or not. These plugins should have full Moodle plugin support because they may need to listen to events, run crons, have DB tables, global settings, etc. These plugins would live under outcome/engine/. Recommendations would be generated on demand and stored in MUC.&lt;br /&gt;
&lt;br /&gt;
Initially, the only plugin would be a percentage based recommendation engine. It would be configurable for a specific threshold that would determine if an attempt against an outcome should be considered correct or incorrect. It would then process the outcome attempts to determine the recommendation.&lt;br /&gt;
&lt;br /&gt;
Recommendation engines should also be enabled or disabled at the site level. This would require a “Manage recommendation engines” section in the admin site settings.&lt;br /&gt;
&lt;br /&gt;
= Reporting =&lt;br /&gt;
&lt;br /&gt;
== Site ==&lt;br /&gt;
&lt;br /&gt;
The following reports:&lt;br /&gt;
&lt;br /&gt;
* Outcomes Coverage report - shows outcomes that have been mapped to content in the site.&lt;br /&gt;
* Outcomes Performance report - shows performance on outcomes at the site level. Optionally broken down by course.&lt;br /&gt;
&lt;br /&gt;
== Course ==&lt;br /&gt;
&lt;br /&gt;
The following reports:&lt;br /&gt;
&lt;br /&gt;
* Outcomes Coverage report - shows outcomes that have been mapped in this course.&lt;br /&gt;
* Outcomes: Unmapped Content report - shows content that is not mapped to an outcome.&lt;br /&gt;
* Outcomes Performance report - shows aggregated performance on outcomes in the course.&lt;br /&gt;
* Outcomes Student Performance report - shows student performance on outcomes in the course for the teacher.&lt;br /&gt;
* Outcomes Personal Performance report - shows student performance on outcomes in the course for the student.&lt;br /&gt;
&lt;br /&gt;
== User profile ==&lt;br /&gt;
&lt;br /&gt;
At the very least, there will be a user site report where the user can see earned outcomes.&lt;br /&gt;
&lt;br /&gt;
= Grading =&lt;br /&gt;
&lt;br /&gt;
Outcome Completion Marking is done by course graders and is the final check point for if a learner has earned an outcome or not. The proposed location is to use the Outcome tab that is currently in the grades section of the course. This would also highjack the Outcomes link under Grade administration and Course administration.&lt;br /&gt;
&lt;br /&gt;
= Logging =&lt;br /&gt;
&lt;br /&gt;
We want to audit most actions in the Moodle log. These actions include:&lt;br /&gt;
&lt;br /&gt;
* CRUD type actions.&lt;br /&gt;
* Any association editing. EG: associating an outcome with a course, content item, etc.&lt;br /&gt;
* Outcome marking.&lt;br /&gt;
* User attempts against outcomes.&lt;br /&gt;
&lt;br /&gt;
= Role capabilities =&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Description&lt;br /&gt;
! Capability&lt;br /&gt;
|-&lt;br /&gt;
| Map outcomes to content&lt;br /&gt;
| moodle/outcome:mapoutcomes&lt;br /&gt;
|-&lt;br /&gt;
| Map outcome sets to courses&lt;br /&gt;
| moodle/outcome:mapoutcomesets&lt;br /&gt;
|-&lt;br /&gt;
| Edit outcomes&lt;br /&gt;
| moodle/outcome:edit&lt;br /&gt;
|-&lt;br /&gt;
| Export outcomes&lt;br /&gt;
| moodle/outcome:export&lt;br /&gt;
|-&lt;br /&gt;
| Import outcomes&lt;br /&gt;
| moodle/outcome:import&lt;br /&gt;
|-&lt;br /&gt;
| Each report will have a capability to view them.&lt;br /&gt;
| report/REPORTNAME:view&lt;br /&gt;
|-&lt;br /&gt;
| Marking outcomes by graders&lt;br /&gt;
| moodle/grade:edit&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Backup and restore =&lt;br /&gt;
&lt;br /&gt;
The workflow for backup and restore may go like:&lt;br /&gt;
&lt;br /&gt;
* Same site, then just map to existing outcomes via the identifier.&lt;br /&gt;
* Not same site, then the assumption is that the outcome set should be imported first, then we can map to existing outcomes via the identifier like in our same site scenario.&lt;br /&gt;
&lt;br /&gt;
Outcomes would probably take advantage of the backup plugin API to backup outcome associations to modules, question, etc. So, for example:&lt;br /&gt;
&lt;br /&gt;
* Outcomes would plug into activities in order to backup outcome associations and attempts.&lt;br /&gt;
* Outcomes would plug into questions in order to backup outcome associations and attempts.&lt;br /&gt;
* Grading forms would have to manually outcome associations and attempts. Will strive to make code re-usable.&lt;br /&gt;
&lt;br /&gt;
= Migration of old outcomes =&lt;br /&gt;
&lt;br /&gt;
Please first review [[Migration and Technical Issues]]. This still needs to be flushed out some more, but since the migration requires user interaction, we may need to create an admin tool to handle the migration. Until outcomes are migrated, it might make sense to continue to show the outcomes in the grade book, but remove the ability to do any editing of old outcomes.&lt;/div&gt;</summary>
		<author><name>Bushido</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=Outcomes_Technical_Specification&amp;diff=38687</id>
		<title>Outcomes Technical Specification</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=Outcomes_Technical_Specification&amp;diff=38687"/>
		<updated>2013-04-03T23:35:47Z</updated>

		<summary type="html">&lt;p&gt;Bushido: /* Role capabilities */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
&lt;br /&gt;
Please be familiar with the function specification as outlined in the [[Outcomes Specification]]. The functional specification will provide details about the concepts and goals of this project. In particular, the following sections provide the overview of the system by user role:&lt;br /&gt;
&lt;br /&gt;
* [[Outcomes Administrator Specification]]&lt;br /&gt;
* [[Outcomes Instructor Specification]]&lt;br /&gt;
* [[Outcomes Student Specification]]&lt;br /&gt;
&lt;br /&gt;
In addition, some features and use cases are known but not yet being implemented. Please see [[Specifically Excluded Use Cases]]. Specifically, this initial version will not be attempting to map an existing outcome set to a new version of the outcome set on import.&lt;br /&gt;
&lt;br /&gt;
This document attempts to capture how the functional specification would be implemented in Moodle.&lt;br /&gt;
&lt;br /&gt;
= Backwards compatibility breaks =&lt;br /&gt;
&lt;br /&gt;
First and foremost, it is important to identify key differences between the current outcome system and this proposal as there are some philosophical shifts as well as breaking of existing code.&lt;br /&gt;
&lt;br /&gt;
# Outcomes will now only be created at the site level and then mapped to courses and content. Outcomes will no longer be created at the course level.&lt;br /&gt;
# Anything using the current outcome API or tables will have to be updated to use the new outcomes when appropriate.&lt;br /&gt;
# Outcomes will no longer appear in the grade book.&lt;br /&gt;
# Outcomes will no longer support scales. It is just a simple pass or fail.&lt;br /&gt;
&lt;br /&gt;
These changes will be documented in the relevant change log files.&lt;br /&gt;
&lt;br /&gt;
= Settings =&lt;br /&gt;
&lt;br /&gt;
== Site ==&lt;br /&gt;
&lt;br /&gt;
At the site level, there will be an area to do all of the configuration and setup of outcome sets. The proposed location is under Settings &amp;gt; Site Administration &amp;gt; Grades &amp;gt; Outcomes.&lt;br /&gt;
&lt;br /&gt;
In addition to managing outcomes, there will be site settings page for general outcome settings. For example, a setting to toggle if outcome idnumbers are editable or not.&lt;br /&gt;
&lt;br /&gt;
== Course ==&lt;br /&gt;
&lt;br /&gt;
When editing a course, there will be a section to associate multiple outcome sets to the course. The section will appear below the course General settings.&lt;br /&gt;
&lt;br /&gt;
This association is used to determine the relevant outcomes for the course for reporting and as a way to pre-filter outcome pickers when associating outcomes to content.&lt;br /&gt;
&lt;br /&gt;
== Activity ==&lt;br /&gt;
&lt;br /&gt;
When editing an activity, there will be a section to associate individual outcomes to the activity. This section will be provided by the moodleform_mod::standard_coursemodule_elements() callback so that all activities will be able to be associated to outcomes automatically.  In the flow of the activity&#039;s form, the outcome mapping options would appear below the grades section.  Do note though that if an activity does not support grades, it can still be mapped to outcomes.&lt;br /&gt;
&lt;br /&gt;
Graded activities will have to add additional integration points with outcomes in order to capture user attempts.&lt;br /&gt;
&lt;br /&gt;
== Advanced grading ==&lt;br /&gt;
&lt;br /&gt;
Rubrics and Marking guides will be able to associate an outcome for a criteria. API will be provided to support this, but each grading method will have to integrate with outcomes where it makes sense.&lt;br /&gt;
&lt;br /&gt;
== Questions ==&lt;br /&gt;
&lt;br /&gt;
When editing a question, there will be a section to associate individual outcomes to the question. The section can be added to question_edit_form::definition() before the Tags section.&lt;br /&gt;
&lt;br /&gt;
This association UI might behave a little differently based on the context in Moodle. If the question is being authored at the site level, then the outcome association is more free form, meaning one can select any outcome from any outcome set. If the question is being authored at the course level, then the outcome association defaults to those outcome sets that are associated to the course.&lt;br /&gt;
&lt;br /&gt;
= Data structure =&lt;br /&gt;
&lt;br /&gt;
This diagram provides an overview of how the tables relate to each other and to core tables.  Please see the below sections for details about each table.&lt;br /&gt;
&lt;br /&gt;
[[File:Outcome_ERD.jpg|frame|center|Outcomes ERD]]&lt;br /&gt;
&lt;br /&gt;
== outcome_sets ==&lt;br /&gt;
&lt;br /&gt;
Relations: user&lt;br /&gt;
&lt;br /&gt;
Purpose: An outcome set represents a collection of outcomes and perhaps some meta data regarding the revision or applicable region. Outcome sets are mapped to courses, which makes the outcomes within the set available to be mapped to course content. An example outcome set would be [http://asn.jesandco.org/resources/D2403043 Health Education Content Standards for California Public Schools, Kindergarten Through Grade Twelve].  Instructors can create personal outcome sets that can be used in their courses.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| userid&lt;br /&gt;
| int(10), indexed, default null&lt;br /&gt;
| Foreign key to user table.  If set to a user&#039;s ID, then that user owns the outcome set and no one else can use or edit it besides admins.  This allows for instructors to create their own outcome sets for their courses.&lt;br /&gt;
|-&lt;br /&gt;
| idnumber&lt;br /&gt;
| varchar(255), unique index&lt;br /&gt;
| GUID that is auto-generated if missing. Generally on import, these are provided. This would be used to identify the outcome set during import or course restore.&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| varchar(255)&lt;br /&gt;
| The name of the outcome set&lt;br /&gt;
|-&lt;br /&gt;
| description&lt;br /&gt;
| text, default null, optional&lt;br /&gt;
| The plain text description of the outcome.&lt;br /&gt;
|-&lt;br /&gt;
| provider&lt;br /&gt;
| varchar(255), default null, optional&lt;br /&gt;
| Provider information regarding the outcome set. EG: Could be set to ASN.&lt;br /&gt;
|-&lt;br /&gt;
| revision&lt;br /&gt;
| varchar(255), default null, optional&lt;br /&gt;
| Version information regarding the outcome set. This will typically be a date or year, EG: 2011&lt;br /&gt;
|-&lt;br /&gt;
| region&lt;br /&gt;
| varchar(255), default null, optional&lt;br /&gt;
| Any region information. Example: In the US this could be a state name.&lt;br /&gt;
|-&lt;br /&gt;
| deleted&lt;br /&gt;
| int(1), default 0&lt;br /&gt;
| If the outcome set has been deleted.&lt;br /&gt;
|-&lt;br /&gt;
| timemodified&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time modified.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome_sets, outcome&lt;br /&gt;
&lt;br /&gt;
Purpose: Stores information regarding an individual outcome. Outcomes can be stored in a hierarchy, but the hierarchy is visual only. This means that if an outcome is earned, then only that outcome is earned, not it and all of its children. Also, if all child outcomes are earned, then parent outcomes are not also automatically earned. In addition, sometimes outcomes are not assessable, but are only there for extra context in the hierarchy. This identifies that the outcome cannot be mapped to content, nor can a student earn it.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomesetid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_sets table.&lt;br /&gt;
|-&lt;br /&gt;
| parentid&lt;br /&gt;
| int(10), indexed, default null&lt;br /&gt;
| Self referencing key. Identifies the parent outcome in the hierarchy.&lt;br /&gt;
|-&lt;br /&gt;
| idnumber&lt;br /&gt;
| varchar(255), unique index&lt;br /&gt;
| GUID that is auto-generated if missing. Generally on import, these are provided. This would be used to identify the outcome set during import or course restore.&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| varchar(255)&lt;br /&gt;
| The name of the outcome.&lt;br /&gt;
|-&lt;br /&gt;
| docnum&lt;br /&gt;
| varchar(255), default null, optional&lt;br /&gt;
| Field for tracking additional information on the outcome. EG: 2.3.A&lt;br /&gt;
|-&lt;br /&gt;
| description&lt;br /&gt;
| text, default null, optional&lt;br /&gt;
| The plain text description of the outcome.&lt;br /&gt;
|-&lt;br /&gt;
| assessable&lt;br /&gt;
| int(1)&lt;br /&gt;
| If set to 1, then the outcome is assessable and can be mapped to content. If set to 0, then the outcome is not assessable and cannot be mapped to content.&lt;br /&gt;
|-&lt;br /&gt;
| deleted&lt;br /&gt;
| int(1), default 0&lt;br /&gt;
| If the outcome has been deleted.&lt;br /&gt;
|-&lt;br /&gt;
| sortorder&lt;br /&gt;
| int(10)&lt;br /&gt;
| The sort order. This is 0-X for all outcomes that belong to the same outcome set.&lt;br /&gt;
|-&lt;br /&gt;
| timemodified&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time modified.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_metadata ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome&lt;br /&gt;
&lt;br /&gt;
Purpose: Represents additional meta information regarding outcomes. Only support for “Education Level” (K, 1, … 12, etc.) and “Subjects” (e.g. Math, English, etc.) will be available out of the box, but additional data points can be added later (which would need to be added to the UI). One outcome could have many meta values. For example: an outcome could be associated to many educational levels and subjects.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| varchar(255), indexed&lt;br /&gt;
| The name of the meta data.&lt;br /&gt;
|-&lt;br /&gt;
| value&lt;br /&gt;
| varchar(1333), indexed&lt;br /&gt;
| The value of the meta data.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_areas ==&lt;br /&gt;
&lt;br /&gt;
Relations: dynamic with core tables&lt;br /&gt;
&lt;br /&gt;
Purpose: This represents that a content item has been mapped to an outcome or to multiple outcomes. Check the outcome_area_outcomes table for the specific outcomes.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| component&lt;br /&gt;
| varchar(100), indexed&lt;br /&gt;
| The name of the component.&lt;br /&gt;
|-&lt;br /&gt;
| area&lt;br /&gt;
| varchar(50), default null, indexed, optional&lt;br /&gt;
| The name of the area. Used when a component has multiple items to associate to outcomes.&lt;br /&gt;
|-&lt;br /&gt;
| itemid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| The item ID.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_area_outcomes ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome, outcome_areas&lt;br /&gt;
&lt;br /&gt;
Purpose: This represents the one to many relationship of a single content item mapped to many outcomes.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomeareaid&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Foreign key to outcome_areas table.&lt;br /&gt;
|-&lt;br /&gt;
| deleted&lt;br /&gt;
| int(1), default 0&lt;br /&gt;
| Soft delete if the outcome was disassociated from the content. Note, if the content is actually deleted, then this association will be deleted.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_used_areas ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome_areas, course_modules&lt;br /&gt;
&lt;br /&gt;
Purpose: Associates an outcome content item with an activity. For example: a question is created in the site question bank and outcomes are associated to the question. Once that question is added to a Quiz then that association is stored in this table so the outcome system knows that the content item and its outcomes are in use.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| cmid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to course_modules table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomeareaid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_areas table.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_used_sets ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome_sets, course&lt;br /&gt;
&lt;br /&gt;
Purpose: Associates an outcome set with the course. Filtering of the outcome set is optionally allowed since outcome sets can span multiple educational levels and even subjects. Once an outcome set is mapped to the course, then the outcomes in the outcome set are available to be mapped to course content.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| courseid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to course table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomesetid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_sets table.&lt;br /&gt;
|-&lt;br /&gt;
| filter&lt;br /&gt;
| text, default null&lt;br /&gt;
| Some outcome sets span multiple education levels and subjects. So, when mapping an outcome set to a course, it may make sense to restrict the available outcomes to a specific education level(s) and/or subject(s). This information would be serialized into this field.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_attempts ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome_used_areas, user&lt;br /&gt;
&lt;br /&gt;
Purpose: Track a user attempt against a content item within a particular activity. The idea here is to aggregate attempt information so that the recommendation engines (detailed below) have an easily accessible data set to process. This does not mean however that recommendation engines are only limited to this data as one could mine for additional data where needed.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomeusedareaid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_used_areas table.&lt;br /&gt;
|-&lt;br /&gt;
| userid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table.&lt;br /&gt;
|-&lt;br /&gt;
| percentgrade&lt;br /&gt;
| float(10,5)&lt;br /&gt;
| Percent grade earned on this attempt.&lt;br /&gt;
|-&lt;br /&gt;
| mingrade&lt;br /&gt;
| float(10,5)&lt;br /&gt;
| The minimum possible grade.&lt;br /&gt;
|-&lt;br /&gt;
| maxgrade&lt;br /&gt;
| float(10,5)&lt;br /&gt;
| The maximum possible grade.&lt;br /&gt;
|-&lt;br /&gt;
| rawgrade&lt;br /&gt;
| float(10,5)&lt;br /&gt;
| The points earned, should be between the minimum and maximum grades.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_marks ==&lt;br /&gt;
&lt;br /&gt;
Relations: course, user, outcome&lt;br /&gt;
&lt;br /&gt;
Purpose: Graders will manually mark the student as having Met or Not Met an outcome. The recommendation engines will make a recommendation to the grader based on user attempts against content that has been mapped to the outcome.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| courseid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to course table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| userid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table. This is the user who is receiving the mark.&lt;br /&gt;
|-&lt;br /&gt;
| graderid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table. This is the user is doing the marking.&lt;br /&gt;
|-&lt;br /&gt;
| result&lt;br /&gt;
| int(2)&lt;br /&gt;
| 0 is not pass, 1 is pass, null is that no decision has been made yet.&lt;br /&gt;
|-&lt;br /&gt;
| timemodified&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time modified.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_marks_history ==&lt;br /&gt;
&lt;br /&gt;
Relations: course, user, outcome, outcome_marks&lt;br /&gt;
&lt;br /&gt;
Purpose: Keep track of past markings.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomemarkid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_marks table. Though the record could be missing from outcome_marks.&lt;br /&gt;
|-&lt;br /&gt;
| courseid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to course table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| userid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table. This is the user who is receiving the mark.&lt;br /&gt;
|-&lt;br /&gt;
| graderid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table. This is the user is doing the marking.&lt;br /&gt;
|-&lt;br /&gt;
| result&lt;br /&gt;
| int(2)&lt;br /&gt;
| 0 is not pass, 1 is pass, null is that no decision has been made yet.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_awards ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome, user&lt;br /&gt;
&lt;br /&gt;
Purpose: This preserves any outcomes earned by a student, regardless if the course is deleted or not.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| userid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Architecture =&lt;br /&gt;
&lt;br /&gt;
The outcome API, outcome administrative settings, outcome associations and other UIs that drives outcomes will be located inside of the top level outcome/ directory.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Models and repository mappers:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* outcome: Represents a single outcome&lt;br /&gt;
* outcome set: Represents a group of outcomes&lt;br /&gt;
* outcome content: An outcome association to content.&lt;br /&gt;
* outcome attempt: An attempt made against an outcome.&lt;br /&gt;
* outcome mark: A teacher marking an outcome against a user.&lt;br /&gt;
* outcome award: An awarded outcome at the site level.&lt;br /&gt;
&lt;br /&gt;
A repository mapper would include ways to store the model and ways to retrieve them in a re-usable and organized manner.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Collections:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
A group of models that you may take action on or filter. Example of a third party library that helps to manage collections: https://github.com/doctrine/collections&lt;br /&gt;
&lt;br /&gt;
Collections may or may not be used, but some possible collections would be the following:&lt;br /&gt;
&lt;br /&gt;
* outcomes&lt;br /&gt;
* outcome attempts&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;New mform elements:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
For most plugins, the process of associating an outcome would be done through a Moodle form. Proposing adding a new Moodle form element that can be added to a form to provide the necessary UI. An API for validating and saving the new mform element will be provided. In addition, the mform element will just be a wrapper around a well formed API that could be used on it’s own when other use cases present themselves.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;API for plugins&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Beyond the mform element, plugins may interact with outcomes in order to provide a richer integration. An API will be provided to assist with the following (not an exhaustive list):&lt;br /&gt;
&lt;br /&gt;
* A way to notify the outcome system that a content item is or is not being used within a course.&lt;br /&gt;
** Example: When a question is authored at the site level and then is actually used within a course, it must inform the outcome system that it is in use. This could potentially be done via events or just direct API calls at the appropriate times. Same goes for when a question is no longer used within a course.&lt;br /&gt;
* Record an attempt made against a content item.&lt;br /&gt;
** Examples: A question has been attempted or an assignment submission has been graded.&lt;br /&gt;
* A way to retrieve associated outcomes.&lt;br /&gt;
* A way to update, delete or otherwise modify the associated outcomes.&lt;br /&gt;
* A way to pick outcome associations (EG: what the mform element would do).&lt;br /&gt;
* A method of syncing up attempts against a content item. This would be used when associating an outcome on content that has already been graded/attempted.&lt;br /&gt;
* API to cleanup tables on course deletion.&lt;br /&gt;
&lt;br /&gt;
== Supported plugin type plugins ==&lt;br /&gt;
&lt;br /&gt;
This may sound a little odd, but basically the point of these plugins is to add support for a plugin type to the outcome system. These types would assist in interpreting outcome content associations. Examples:&lt;br /&gt;
&lt;br /&gt;
* Given an outcome association, please provide a link to the mapped content.&lt;br /&gt;
** For an activity, this would be a link to the module.&lt;br /&gt;
** For a grading form, a link to the grading instance.&lt;br /&gt;
** For a question, a link to the question instance in the question bank.&lt;br /&gt;
* What are all of the content items that have not been mapped?&lt;br /&gt;
** For activities, this would return instances that are not mapped.&lt;br /&gt;
** For grading form, this would return sub-plugin specific information, like criteria.&lt;br /&gt;
** For questions, this would return questions from the course question bank that are not mapped.&lt;br /&gt;
* May assist with automatic cleanup when the content is deleted.&lt;br /&gt;
* Also other meta data could be derived, like plugin type name.&lt;br /&gt;
&lt;br /&gt;
This plugin would live under outcome/support/ and would initially ship with support of the following plugin types:&lt;br /&gt;
&lt;br /&gt;
* mod&lt;br /&gt;
* qtype&lt;br /&gt;
* gradingform: note that this integration would be deeper in that each gradingform plugin would need to implement something in order to help interpret associations. The reason being is that outcomes are being associated to plugin specific content, instead of something generic like the grading instance.&lt;br /&gt;
&lt;br /&gt;
== Import and export plugins ==&lt;br /&gt;
&lt;br /&gt;
The outcome system would support the exporting of outcome sets. The first export plugin would be a very simple JSON export that is specific to Moodle itself. This would be used for moving custom outcomes from one Moodle site to another.&lt;br /&gt;
&lt;br /&gt;
The outcome system would support importing outcome sets. Initially, there would be support for importing outcomes from [http://asn.jesandco.org Achievement Standards Network (ASN)] ([http://standards.jesandco.org/wiki/ASN_Application_Profile Format Specification]) and importing the JSON export from above.&lt;br /&gt;
&lt;br /&gt;
Both of the outcomes import and export processes would be a plugin based, so other formats could be supported by creating new plugins. The import and export plugins would live under outcome/import/ and outcome/export/.&lt;br /&gt;
&lt;br /&gt;
== Recommendation engine plugins ==&lt;br /&gt;
&lt;br /&gt;
The outcome system would provide a way to recommend to a teacher whether a student should be marked as completing the outcome or not. These plugins should have full Moodle plugin support because they may need to listen to events, run crons, have DB tables, global settings, etc. These plugins would live under outcome/engine/. Recommendations would be generated on demand and stored in MUC.&lt;br /&gt;
&lt;br /&gt;
Initially, the only plugin would be a percentage based recommendation engine. It would be configurable for a specific threshold that would determine if an attempt against an outcome should be considered correct or incorrect. It would then process the outcome attempts to determine the recommendation.&lt;br /&gt;
&lt;br /&gt;
Recommendation engines should also be enabled or disabled at the site level. This would require a “Manage recommendation engines” section in the admin site settings.&lt;br /&gt;
&lt;br /&gt;
= Reporting =&lt;br /&gt;
&lt;br /&gt;
== Site ==&lt;br /&gt;
&lt;br /&gt;
The following reports:&lt;br /&gt;
&lt;br /&gt;
* Outcomes Coverage report - shows outcomes that have been mapped to content in the site.&lt;br /&gt;
* Outcomes Performance report - shows performance on outcomes at the site level. Optionally broken down by course.&lt;br /&gt;
&lt;br /&gt;
== Course ==&lt;br /&gt;
&lt;br /&gt;
The following reports:&lt;br /&gt;
&lt;br /&gt;
* Outcomes Coverage report - shows outcomes that have been mapped in this course.&lt;br /&gt;
* Outcomes: Unmapped Content report - shows content that is not mapped to an outcome.&lt;br /&gt;
* Outcomes Performance report - shows aggregated performance on outcomes in the course.&lt;br /&gt;
* Outcomes Student Performance report - shows student performance on outcomes in the course for the teacher.&lt;br /&gt;
* Outcomes Personal Performance report - shows student performance on outcomes in the course for the student.&lt;br /&gt;
&lt;br /&gt;
== User profile ==&lt;br /&gt;
&lt;br /&gt;
At the very least, there will be a user site report where the user can see earned outcomes.&lt;br /&gt;
&lt;br /&gt;
= Grading =&lt;br /&gt;
&lt;br /&gt;
Outcome Completion Marking is done by course graders and is the final check point for if a learner has earned an outcome or not. The proposed location is to use the Outcome tab that is currently in the grades section of the course. This would also highjack the Outcomes link under Grade administration and Course administration.&lt;br /&gt;
&lt;br /&gt;
= Logging =&lt;br /&gt;
&lt;br /&gt;
We want to audit most actions in the Moodle log. These actions include:&lt;br /&gt;
&lt;br /&gt;
* CRUD type actions.&lt;br /&gt;
* Any association editing. EG: associating an outcome with a course, content item, etc.&lt;br /&gt;
* Outcome marking.&lt;br /&gt;
* User attempts against outcomes.&lt;br /&gt;
&lt;br /&gt;
= Role capabilities =&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Description&lt;br /&gt;
! Capability&lt;br /&gt;
|-&lt;br /&gt;
| Map outcomes to content&lt;br /&gt;
| moodle/outcome:mapoutcomes&lt;br /&gt;
|-&lt;br /&gt;
| Map outcome sets to courses&lt;br /&gt;
| moodle/outcome:mapoutcomesets&lt;br /&gt;
|-&lt;br /&gt;
| Edit outcomes&lt;br /&gt;
| moodle/outcome:edit&lt;br /&gt;
|-&lt;br /&gt;
| Export outcomes&lt;br /&gt;
| moodle/outcome:export&lt;br /&gt;
|-&lt;br /&gt;
| Import outcomes&lt;br /&gt;
| moodle/outcome:import&lt;br /&gt;
|-&lt;br /&gt;
| Each report will have a capability to view them.&lt;br /&gt;
| report/REPORTNAME:view&lt;br /&gt;
|-&lt;br /&gt;
| Marking outcomes by graders&lt;br /&gt;
| moodle/grade:edit&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Backup and restore =&lt;br /&gt;
&lt;br /&gt;
The workflow for backup and restore may go like:&lt;br /&gt;
&lt;br /&gt;
* Same site, then just map to existing outcomes via the identifier.&lt;br /&gt;
* Not same site, then the assumption is that the outcome set should be imported first, then we can map to existing outcomes via the identifier like in our same site scenario.&lt;br /&gt;
&lt;br /&gt;
Outcomes would probably take advantage of the backup plugin API to backup outcome associations to modules, question, etc. So, for example:&lt;br /&gt;
&lt;br /&gt;
* Outcomes would plug into activities in order to backup outcome associations and attempts.&lt;br /&gt;
* Outcomes would plug into questions in order to backup outcome associations and attempts.&lt;br /&gt;
* Grading forms would have to manually outcome associations and attempts. Will strive to make code re-usable.&lt;br /&gt;
&lt;br /&gt;
= Migration of old outcomes =&lt;br /&gt;
&lt;br /&gt;
Please first review [[Migration and Technical Issues]]. This still needs to be flushed out some more, but since the migration requires user interaction, we may need to create an admin tool to handle the migration. Until outcomes are migrated, it might make sense to continue to show the outcomes in the grade book, but remove the ability to do any editing of old outcomes.&lt;/div&gt;</summary>
		<author><name>Bushido</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=Outcomes_Technical_Specification&amp;diff=38407</id>
		<title>Outcomes Technical Specification</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=Outcomes_Technical_Specification&amp;diff=38407"/>
		<updated>2013-03-19T17:14:13Z</updated>

		<summary type="html">&lt;p&gt;Bushido: /* Role capabilities */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
&lt;br /&gt;
Please be familiar with the function specification as outlined in the [[Outcomes Specification]]. The functional specification will provide details about the concepts and goals of this project. In particular, the following sections provide the overview of the system by user role:&lt;br /&gt;
&lt;br /&gt;
* [[Outcomes Administrator Specification]]&lt;br /&gt;
* [[Outcomes Instructor Specification]]&lt;br /&gt;
* [[Outcomes Student Specification]]&lt;br /&gt;
&lt;br /&gt;
In addition, some features and use cases are known but not yet being implemented. Please see [[Specifically Excluded Use Cases]]. Specifically, this initial version will not be attempting to map an existing outcome set to a new version of the outcome set on import.&lt;br /&gt;
&lt;br /&gt;
This document attempts to capture how the functional specification would be implemented in Moodle.&lt;br /&gt;
&lt;br /&gt;
= Backwards compatibility breaks =&lt;br /&gt;
&lt;br /&gt;
First and foremost, it is important to identify key differences between the current outcome system and this proposal as there are some philosophical shifts as well as breaking of existing code.&lt;br /&gt;
&lt;br /&gt;
# Outcomes will now only be created at the site level and then mapped to courses and content. Outcomes will no longer be created at the course level.&lt;br /&gt;
# Anything using the current outcome API or tables will have to be updated to use the new outcomes when appropriate.&lt;br /&gt;
# Outcomes will no longer appear in the grade book.&lt;br /&gt;
# Outcomes will no longer support scales. It is just a simple pass or fail.&lt;br /&gt;
&lt;br /&gt;
These changes will be documented in the relevant change log files.&lt;br /&gt;
&lt;br /&gt;
= Settings =&lt;br /&gt;
&lt;br /&gt;
== Site ==&lt;br /&gt;
&lt;br /&gt;
At the site level, there will be an area to do all of the configuration and setup of outcome sets. The proposed location is under Settings &amp;gt; Site Administration &amp;gt; Grades &amp;gt; Outcomes.&lt;br /&gt;
&lt;br /&gt;
In addition to managing outcomes, there will be site settings page for general outcome settings. For example, a setting to toggle if outcome idnumbers are editable or not.&lt;br /&gt;
&lt;br /&gt;
== Course ==&lt;br /&gt;
&lt;br /&gt;
When editing a course, there will be a section to associate multiple outcome sets to the course. The section will appear below the course General settings.&lt;br /&gt;
&lt;br /&gt;
This association is used to determine the relevant outcomes for the course for reporting and as a way to pre-filter outcome pickers when associating outcomes to content.&lt;br /&gt;
&lt;br /&gt;
== Activity ==&lt;br /&gt;
&lt;br /&gt;
When editing an activity, there will be a section to associate individual outcomes to the activity. This section will be provided by the moodleform_mod::standard_coursemodule_elements() callback so that all activities will be able to be associated to outcomes automatically.  In the flow of the activity&#039;s form, the outcome mapping options would appear below the grades section.  Do note though that if an activity does not support grades, it can still be mapped to outcomes.&lt;br /&gt;
&lt;br /&gt;
Graded activities will have to add additional integration points with outcomes in order to capture user attempts.&lt;br /&gt;
&lt;br /&gt;
== Advanced grading ==&lt;br /&gt;
&lt;br /&gt;
Rubrics and Marking guides will be able to associate an outcome for a criteria. API will be provided to support this, but each grading method will have to integrate with outcomes where it makes sense.&lt;br /&gt;
&lt;br /&gt;
== Questions ==&lt;br /&gt;
&lt;br /&gt;
When editing a question, there will be a section to associate individual outcomes to the question. The section can be added to question_edit_form::definition() before the Tags section.&lt;br /&gt;
&lt;br /&gt;
This association UI might behave a little differently based on the context in Moodle. If the question is being authored at the site level, then the outcome association is more free form, meaning one can select any outcome from any outcome set. If the question is being authored at the course level, then the outcome association defaults to those outcome sets that are associated to the course.&lt;br /&gt;
&lt;br /&gt;
= Data structure =&lt;br /&gt;
&lt;br /&gt;
This diagram provides an overview of how the tables relate to each other and to core tables.  Please see the below sections for details about each table.&lt;br /&gt;
&lt;br /&gt;
[[File:Outcome_ERD.jpg|frame|center|Outcomes ERD]]&lt;br /&gt;
&lt;br /&gt;
== outcome_sets ==&lt;br /&gt;
&lt;br /&gt;
Relations: user&lt;br /&gt;
&lt;br /&gt;
Purpose: An outcome set represents a collection of outcomes and perhaps some meta data regarding the revision or applicable region. Outcome sets are mapped to courses, which makes the outcomes within the set available to be mapped to course content. An example outcome set would be [http://asn.jesandco.org/resources/D2403043 Health Education Content Standards for California Public Schools, Kindergarten Through Grade Twelve].  Instructors can create personal outcome sets that can be used in their courses.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| userid&lt;br /&gt;
| int(10), indexed, default null&lt;br /&gt;
| Foreign key to user table.  If set to a user&#039;s ID, then that user owns the outcome set and no one else can use or edit it besides admins.  This allows for instructors to create their own outcome sets for their courses.&lt;br /&gt;
|-&lt;br /&gt;
| idnumber&lt;br /&gt;
| varchar(255), unique index&lt;br /&gt;
| GUID that is auto-generated if missing. Generally on import, these are provided. This would be used to identify the outcome set during import or course restore.&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| varchar(255)&lt;br /&gt;
| The name of the outcome set&lt;br /&gt;
|-&lt;br /&gt;
| description&lt;br /&gt;
| text, default null, optional&lt;br /&gt;
| The plain text description of the outcome.&lt;br /&gt;
|-&lt;br /&gt;
| provider&lt;br /&gt;
| varchar(255), default null, optional&lt;br /&gt;
| Provider information regarding the outcome set. EG: Could be set to ASN.&lt;br /&gt;
|-&lt;br /&gt;
| revision&lt;br /&gt;
| varchar(255), default null, optional&lt;br /&gt;
| Version information regarding the outcome set. This will typically be a date or year, EG: 2011&lt;br /&gt;
|-&lt;br /&gt;
| region&lt;br /&gt;
| varchar(255), default null, optional&lt;br /&gt;
| Any region information. Example: In the US this could be a state name.&lt;br /&gt;
|-&lt;br /&gt;
| deleted&lt;br /&gt;
| int(1), default 0&lt;br /&gt;
| If the outcome set has been deleted.&lt;br /&gt;
|-&lt;br /&gt;
| timemodified&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time modified.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome_sets, outcome&lt;br /&gt;
&lt;br /&gt;
Purpose: Stores information regarding an individual outcome. Outcomes can be stored in a hierarchy, but the hierarchy is visual only. This means that if an outcome is earned, then only that outcome is earned, not it and all of its children. Also, if all child outcomes are earned, then parent outcomes are not also automatically earned. In addition, sometimes outcomes are not assessable, but are only there for extra context in the hierarchy. This identifies that the outcome cannot be mapped to content, nor can a student earn it.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomesetid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_sets table.&lt;br /&gt;
|-&lt;br /&gt;
| parentid&lt;br /&gt;
| int(10), indexed, default null&lt;br /&gt;
| Self referencing key. Identifies the parent outcome in the hierarchy.&lt;br /&gt;
|-&lt;br /&gt;
| idnumber&lt;br /&gt;
| varchar(255), unique index&lt;br /&gt;
| GUID that is auto-generated if missing. Generally on import, these are provided. This would be used to identify the outcome set during import or course restore.&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| varchar(255)&lt;br /&gt;
| The name of the outcome.&lt;br /&gt;
|-&lt;br /&gt;
| docnum&lt;br /&gt;
| varchar(255), default null, optional&lt;br /&gt;
| Field for tracking additional information on the outcome. EG: 2.3.A&lt;br /&gt;
|-&lt;br /&gt;
| description&lt;br /&gt;
| text, default null, optional&lt;br /&gt;
| The plain text description of the outcome.&lt;br /&gt;
|-&lt;br /&gt;
| assessable&lt;br /&gt;
| int(1)&lt;br /&gt;
| If set to 1, then the outcome is assessable and can be mapped to content. If set to 0, then the outcome is not assessable and cannot be mapped to content.&lt;br /&gt;
|-&lt;br /&gt;
| deleted&lt;br /&gt;
| int(1), default 0&lt;br /&gt;
| If the outcome has been deleted.&lt;br /&gt;
|-&lt;br /&gt;
| sortorder&lt;br /&gt;
| int(10)&lt;br /&gt;
| The sort order. This is 0-X for all outcomes that belong to the same outcome set.&lt;br /&gt;
|-&lt;br /&gt;
| timemodified&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time modified.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_metadata ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome&lt;br /&gt;
&lt;br /&gt;
Purpose: Represents additional meta information regarding outcomes. Only support for “Education Level” (K, 1, … 12, etc.) and “Subjects” (e.g. Math, English, etc.) will be available out of the box, but additional data points can be added later (which would need to be added to the UI). One outcome could have many meta values. For example: an outcome could be associated to many educational levels and subjects.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| varchar(255), indexed&lt;br /&gt;
| The name of the meta data.&lt;br /&gt;
|-&lt;br /&gt;
| value&lt;br /&gt;
| varchar(1333), indexed&lt;br /&gt;
| The value of the meta data.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_areas ==&lt;br /&gt;
&lt;br /&gt;
Relations: dynamic with core tables&lt;br /&gt;
&lt;br /&gt;
Purpose: This represents that a content item has been mapped to an outcome or to multiple outcomes. Check the outcome_area_outcomes table for the specific outcomes.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| component&lt;br /&gt;
| varchar(100), indexed&lt;br /&gt;
| The name of the component.&lt;br /&gt;
|-&lt;br /&gt;
| area&lt;br /&gt;
| varchar(50), default null, indexed, optional&lt;br /&gt;
| The name of the area. Used when a component has multiple items to associate to outcomes.&lt;br /&gt;
|-&lt;br /&gt;
| itemid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| The item ID.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_area_outcomes ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome, outcome_areas&lt;br /&gt;
&lt;br /&gt;
Purpose: This represents the one to many relationship of a single content item mapped to many outcomes.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomeareaid&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Foreign key to outcome_areas table.&lt;br /&gt;
|-&lt;br /&gt;
| deleted&lt;br /&gt;
| int(1), default 0&lt;br /&gt;
| Soft delete if the outcome was disassociated from the content. Note, if the content is actually deleted, then this association will be deleted.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_used_areas ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome_areas, course_modules&lt;br /&gt;
&lt;br /&gt;
Purpose: Associates an outcome content item with an activity. For example: a question is created in the site question bank and outcomes are associated to the question. Once that question is added to a Quiz then that association is stored in this table so the outcome system knows that the content item and its outcomes are in use.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| cmid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to course_modules table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomeareaid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_areas table.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_used_sets ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome_sets, course&lt;br /&gt;
&lt;br /&gt;
Purpose: Associates an outcome set with the course. Filtering of the outcome set is optionally allowed since outcome sets can span multiple educational levels and even subjects. Once an outcome set is mapped to the course, then the outcomes in the outcome set are available to be mapped to course content.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| courseid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to course table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomesetid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_sets table.&lt;br /&gt;
|-&lt;br /&gt;
| filter&lt;br /&gt;
| text, default null&lt;br /&gt;
| Some outcome sets span multiple education levels and subjects. So, when mapping an outcome set to a course, it may make sense to restrict the available outcomes to a specific education level(s) and/or subject(s). This information would be serialized into this field.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_attempts ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome_used_areas, user&lt;br /&gt;
&lt;br /&gt;
Purpose: Track a user attempt against a content item within a particular activity. The idea here is to aggregate attempt information so that the recommendation engines (detailed below) have an easily accessible data set to process. This does not mean however that recommendation engines are only limited to this data as one could mine for additional data where needed.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomeusedareaid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_used_areas table.&lt;br /&gt;
|-&lt;br /&gt;
| userid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table.&lt;br /&gt;
|-&lt;br /&gt;
| percentgrade&lt;br /&gt;
| float(10,5)&lt;br /&gt;
| Percent grade earned on this attempt.&lt;br /&gt;
|-&lt;br /&gt;
| mingrade&lt;br /&gt;
| float(10,5)&lt;br /&gt;
| The minimum possible grade.&lt;br /&gt;
|-&lt;br /&gt;
| maxgrade&lt;br /&gt;
| float(10,5)&lt;br /&gt;
| The maximum possible grade.&lt;br /&gt;
|-&lt;br /&gt;
| rawgrade&lt;br /&gt;
| float(10,5)&lt;br /&gt;
| The points earned, should be between the minimum and maximum grades.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_marks ==&lt;br /&gt;
&lt;br /&gt;
Relations: course, user, outcome&lt;br /&gt;
&lt;br /&gt;
Purpose: Graders will manually mark the student as having Met or Not Met an outcome. The recommendation engines will make a recommendation to the grader based on user attempts against content that has been mapped to the outcome.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| courseid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to course table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| userid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table. This is the user who is receiving the mark.&lt;br /&gt;
|-&lt;br /&gt;
| graderid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table. This is the user is doing the marking.&lt;br /&gt;
|-&lt;br /&gt;
| result&lt;br /&gt;
| int(2)&lt;br /&gt;
| 0 is not pass, 1 is pass, null is that no decision has been made yet.&lt;br /&gt;
|-&lt;br /&gt;
| timemodified&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time modified.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_marks_history ==&lt;br /&gt;
&lt;br /&gt;
Relations: course, user, outcome, outcome_marks&lt;br /&gt;
&lt;br /&gt;
Purpose: Keep track of past markings.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomemarkid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_marks table. Though the record could be missing from outcome_marks.&lt;br /&gt;
|-&lt;br /&gt;
| courseid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to course table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| userid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table. This is the user who is receiving the mark.&lt;br /&gt;
|-&lt;br /&gt;
| graderid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table. This is the user is doing the marking.&lt;br /&gt;
|-&lt;br /&gt;
| result&lt;br /&gt;
| int(2)&lt;br /&gt;
| 0 is not pass, 1 is pass, null is that no decision has been made yet.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_awards ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome, user&lt;br /&gt;
&lt;br /&gt;
Purpose: This preserves any outcomes earned by a student, regardless if the course is deleted or not.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| userid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Architecture =&lt;br /&gt;
&lt;br /&gt;
The outcome API, outcome administrative settings, outcome associations and other UIs that drives outcomes will be located inside of the top level outcome/ directory.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Models and repository mappers:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* outcome: Represents a single outcome&lt;br /&gt;
* outcome set: Represents a group of outcomes&lt;br /&gt;
* outcome content: An outcome association to content.&lt;br /&gt;
* outcome attempt: An attempt made against an outcome.&lt;br /&gt;
* outcome mark: A teacher marking an outcome against a user.&lt;br /&gt;
* outcome award: An awarded outcome at the site level.&lt;br /&gt;
&lt;br /&gt;
A repository mapper would include ways to store the model and ways to retrieve them in a re-usable and organized manner.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Collections:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
A group of models that you may take action on or filter. Example of a third party library that helps to manage collections: https://github.com/doctrine/collections&lt;br /&gt;
&lt;br /&gt;
Collections may or may not be used, but some possible collections would be the following:&lt;br /&gt;
&lt;br /&gt;
* outcomes&lt;br /&gt;
* outcome attempts&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;New mform elements:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
For most plugins, the process of associating an outcome would be done through a Moodle form. Proposing adding a new Moodle form element that can be added to a form to provide the necessary UI. An API for validating and saving the new mform element will be provided. In addition, the mform element will just be a wrapper around a well formed API that could be used on it’s own when other use cases present themselves.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;API for plugins&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Beyond the mform element, plugins may interact with outcomes in order to provide a richer integration. An API will be provided to assist with the following (not an exhaustive list):&lt;br /&gt;
&lt;br /&gt;
* A way to notify the outcome system that a content item is or is not being used within a course.&lt;br /&gt;
** Example: When a question is authored at the site level and then is actually used within a course, it must inform the outcome system that it is in use. This could potentially be done via events or just direct API calls at the appropriate times. Same goes for when a question is no longer used within a course.&lt;br /&gt;
* Record an attempt made against a content item.&lt;br /&gt;
** Examples: A question has been attempted or an assignment submission has been graded.&lt;br /&gt;
* A way to retrieve associated outcomes.&lt;br /&gt;
* A way to update, delete or otherwise modify the associated outcomes.&lt;br /&gt;
* A way to pick outcome associations (EG: what the mform element would do).&lt;br /&gt;
* A method of syncing up attempts against a content item. This would be used when associating an outcome on content that has already been graded/attempted.&lt;br /&gt;
* API to cleanup tables on course deletion.&lt;br /&gt;
&lt;br /&gt;
== Supported plugin type plugins ==&lt;br /&gt;
&lt;br /&gt;
This may sound a little odd, but basically the point of these plugins is to add support for a plugin type to the outcome system. These types would assist in interpreting outcome content associations. Examples:&lt;br /&gt;
&lt;br /&gt;
* Given an outcome association, please provide a link to the mapped content.&lt;br /&gt;
** For an activity, this would be a link to the module.&lt;br /&gt;
** For a grading form, a link to the grading instance.&lt;br /&gt;
** For a question, a link to the question instance in the question bank.&lt;br /&gt;
* What are all of the content items that have not been mapped?&lt;br /&gt;
** For activities, this would return instances that are not mapped.&lt;br /&gt;
** For grading form, this would return sub-plugin specific information, like criteria.&lt;br /&gt;
** For questions, this would return questions from the course question bank that are not mapped.&lt;br /&gt;
* May assist with automatic cleanup when the content is deleted.&lt;br /&gt;
* Also other meta data could be derived, like plugin type name.&lt;br /&gt;
&lt;br /&gt;
This plugin would live under outcome/support/ and would initially ship with support of the following plugin types:&lt;br /&gt;
&lt;br /&gt;
* mod&lt;br /&gt;
* qtype&lt;br /&gt;
* gradingform: note that this integration would be deeper in that each gradingform plugin would need to implement something in order to help interpret associations. The reason being is that outcomes are being associated to plugin specific content, instead of something generic like the grading instance.&lt;br /&gt;
&lt;br /&gt;
== Import and export plugins ==&lt;br /&gt;
&lt;br /&gt;
The outcome system would support the exporting of outcome sets. The first export plugin would be a very simple JSON export that is specific to Moodle itself. This would be used for moving custom outcomes from one Moodle site to another.&lt;br /&gt;
&lt;br /&gt;
The outcome system would support importing outcome sets. Initially, there would be support for importing outcomes from [http://asn.jesandco.org Achievement Standards Network (ASN)] ([http://standards.jesandco.org/wiki/ASN_Application_Profile Format Specification]) and importing the JSON export from above.&lt;br /&gt;
&lt;br /&gt;
Both of the outcomes import and export processes would be a plugin based, so other formats could be supported by creating new plugins. The import and export plugins would live under outcome/import/ and outcome/export/.&lt;br /&gt;
&lt;br /&gt;
== Recommendation engine plugins ==&lt;br /&gt;
&lt;br /&gt;
The outcome system would provide a way to recommend to a teacher whether a student should be marked as completing the outcome or not. These plugins should have full Moodle plugin support because they may need to listen to events, run crons, have DB tables, global settings, etc. These plugins would live under outcome/engine/. Recommendations would be generated on demand and stored in MUC.&lt;br /&gt;
&lt;br /&gt;
Initially, the only plugin would be a percentage based recommendation engine. It would be configurable for a specific threshold that would determine if an attempt against an outcome should be considered correct or incorrect. It would then process the outcome attempts to determine the recommendation.&lt;br /&gt;
&lt;br /&gt;
Recommendation engines should also be enabled or disabled at the site level. This would require a “Manage recommendation engines” section in the admin site settings.&lt;br /&gt;
&lt;br /&gt;
= Reporting =&lt;br /&gt;
&lt;br /&gt;
== Site ==&lt;br /&gt;
&lt;br /&gt;
The following reports:&lt;br /&gt;
&lt;br /&gt;
* Outcomes Coverage report - shows outcomes that have been mapped to content in the site.&lt;br /&gt;
* Outcomes Performance report - shows performance on outcomes at the site level. Optionally broken down by course.&lt;br /&gt;
&lt;br /&gt;
== Course ==&lt;br /&gt;
&lt;br /&gt;
The following reports:&lt;br /&gt;
&lt;br /&gt;
* Outcomes Coverage report - shows outcomes that have been mapped in this course.&lt;br /&gt;
* Outcomes: Unmapped Content report - shows content that is not mapped to an outcome.&lt;br /&gt;
* Outcomes Performance report - shows aggregated performance on outcomes in the course.&lt;br /&gt;
* Outcomes Student Performance report - shows student performance on outcomes in the course for the teacher.&lt;br /&gt;
* Outcomes Personal Performance report - shows student performance on outcomes in the course for the student.&lt;br /&gt;
&lt;br /&gt;
== User profile ==&lt;br /&gt;
&lt;br /&gt;
At the very least, there will be a user site report where the user can see earned outcomes.&lt;br /&gt;
&lt;br /&gt;
= Grading =&lt;br /&gt;
&lt;br /&gt;
Outcome Completion Marking is done by course graders and is the final check point for if a learner has earned an outcome or not. The proposed location is to use the Outcome tab that is currently in the grades section of the course. This would also highjack the Outcomes link under Grade administration and Course administration.&lt;br /&gt;
&lt;br /&gt;
= Logging =&lt;br /&gt;
&lt;br /&gt;
We want to audit most actions in the Moodle log. These actions include:&lt;br /&gt;
&lt;br /&gt;
* CRUD type actions.&lt;br /&gt;
* Any association editing. EG: associating an outcome with a course, content item, etc.&lt;br /&gt;
* Outcome marking.&lt;br /&gt;
* User attempts against outcomes.&lt;br /&gt;
&lt;br /&gt;
= Role capabilities =&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Description&lt;br /&gt;
! Capability&lt;br /&gt;
|-&lt;br /&gt;
| Map outcomes to content&lt;br /&gt;
| moodle/outcome:mapcontent&lt;br /&gt;
|-&lt;br /&gt;
| Map outcome sets to courses&lt;br /&gt;
| moodle/outcome:mapcourse&lt;br /&gt;
|-&lt;br /&gt;
| Edit outcomes&lt;br /&gt;
| moodle/outcome:edit&lt;br /&gt;
|-&lt;br /&gt;
| Export outcomes&lt;br /&gt;
| moodle/outcome:export&lt;br /&gt;
|-&lt;br /&gt;
| Import outcomes&lt;br /&gt;
| moodle/outcome:import&lt;br /&gt;
|-&lt;br /&gt;
| Each report will have a capability to view them.&lt;br /&gt;
| report/REPORTNAME:view&lt;br /&gt;
|-&lt;br /&gt;
| Marking outcomes by graders&lt;br /&gt;
| moodle/grade:edit&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Backup and restore =&lt;br /&gt;
&lt;br /&gt;
The workflow for backup and restore may go like:&lt;br /&gt;
&lt;br /&gt;
* Same site, then just map to existing outcomes via the identifier.&lt;br /&gt;
* Not same site, then the assumption is that the outcome set should be imported first, then we can map to existing outcomes via the identifier like in our same site scenario.&lt;br /&gt;
&lt;br /&gt;
Outcomes would probably take advantage of the backup plugin API to backup outcome associations to modules, question, etc. So, for example:&lt;br /&gt;
&lt;br /&gt;
* Outcomes would plug into activities in order to backup outcome associations and attempts.&lt;br /&gt;
* Outcomes would plug into questions in order to backup outcome associations and attempts.&lt;br /&gt;
* Grading forms would have to manually outcome associations and attempts. Will strive to make code re-usable.&lt;br /&gt;
&lt;br /&gt;
= Migration of old outcomes =&lt;br /&gt;
&lt;br /&gt;
Please first review [[Migration and Technical Issues]]. This still needs to be flushed out some more, but since the migration requires user interaction, we may need to create an admin tool to handle the migration. Until outcomes are migrated, it might make sense to continue to show the outcomes in the grade book, but remove the ability to do any editing of old outcomes.&lt;/div&gt;</summary>
		<author><name>Bushido</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=Outcomes_Technical_Specification&amp;diff=38406</id>
		<title>Outcomes Technical Specification</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=Outcomes_Technical_Specification&amp;diff=38406"/>
		<updated>2013-03-19T17:13:54Z</updated>

		<summary type="html">&lt;p&gt;Bushido: /* Role capabilities */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
&lt;br /&gt;
Please be familiar with the function specification as outlined in the [[Outcomes Specification]]. The functional specification will provide details about the concepts and goals of this project. In particular, the following sections provide the overview of the system by user role:&lt;br /&gt;
&lt;br /&gt;
* [[Outcomes Administrator Specification]]&lt;br /&gt;
* [[Outcomes Instructor Specification]]&lt;br /&gt;
* [[Outcomes Student Specification]]&lt;br /&gt;
&lt;br /&gt;
In addition, some features and use cases are known but not yet being implemented. Please see [[Specifically Excluded Use Cases]]. Specifically, this initial version will not be attempting to map an existing outcome set to a new version of the outcome set on import.&lt;br /&gt;
&lt;br /&gt;
This document attempts to capture how the functional specification would be implemented in Moodle.&lt;br /&gt;
&lt;br /&gt;
= Backwards compatibility breaks =&lt;br /&gt;
&lt;br /&gt;
First and foremost, it is important to identify key differences between the current outcome system and this proposal as there are some philosophical shifts as well as breaking of existing code.&lt;br /&gt;
&lt;br /&gt;
# Outcomes will now only be created at the site level and then mapped to courses and content. Outcomes will no longer be created at the course level.&lt;br /&gt;
# Anything using the current outcome API or tables will have to be updated to use the new outcomes when appropriate.&lt;br /&gt;
# Outcomes will no longer appear in the grade book.&lt;br /&gt;
# Outcomes will no longer support scales. It is just a simple pass or fail.&lt;br /&gt;
&lt;br /&gt;
These changes will be documented in the relevant change log files.&lt;br /&gt;
&lt;br /&gt;
= Settings =&lt;br /&gt;
&lt;br /&gt;
== Site ==&lt;br /&gt;
&lt;br /&gt;
At the site level, there will be an area to do all of the configuration and setup of outcome sets. The proposed location is under Settings &amp;gt; Site Administration &amp;gt; Grades &amp;gt; Outcomes.&lt;br /&gt;
&lt;br /&gt;
In addition to managing outcomes, there will be site settings page for general outcome settings. For example, a setting to toggle if outcome idnumbers are editable or not.&lt;br /&gt;
&lt;br /&gt;
== Course ==&lt;br /&gt;
&lt;br /&gt;
When editing a course, there will be a section to associate multiple outcome sets to the course. The section will appear below the course General settings.&lt;br /&gt;
&lt;br /&gt;
This association is used to determine the relevant outcomes for the course for reporting and as a way to pre-filter outcome pickers when associating outcomes to content.&lt;br /&gt;
&lt;br /&gt;
== Activity ==&lt;br /&gt;
&lt;br /&gt;
When editing an activity, there will be a section to associate individual outcomes to the activity. This section will be provided by the moodleform_mod::standard_coursemodule_elements() callback so that all activities will be able to be associated to outcomes automatically.  In the flow of the activity&#039;s form, the outcome mapping options would appear below the grades section.  Do note though that if an activity does not support grades, it can still be mapped to outcomes.&lt;br /&gt;
&lt;br /&gt;
Graded activities will have to add additional integration points with outcomes in order to capture user attempts.&lt;br /&gt;
&lt;br /&gt;
== Advanced grading ==&lt;br /&gt;
&lt;br /&gt;
Rubrics and Marking guides will be able to associate an outcome for a criteria. API will be provided to support this, but each grading method will have to integrate with outcomes where it makes sense.&lt;br /&gt;
&lt;br /&gt;
== Questions ==&lt;br /&gt;
&lt;br /&gt;
When editing a question, there will be a section to associate individual outcomes to the question. The section can be added to question_edit_form::definition() before the Tags section.&lt;br /&gt;
&lt;br /&gt;
This association UI might behave a little differently based on the context in Moodle. If the question is being authored at the site level, then the outcome association is more free form, meaning one can select any outcome from any outcome set. If the question is being authored at the course level, then the outcome association defaults to those outcome sets that are associated to the course.&lt;br /&gt;
&lt;br /&gt;
= Data structure =&lt;br /&gt;
&lt;br /&gt;
This diagram provides an overview of how the tables relate to each other and to core tables.  Please see the below sections for details about each table.&lt;br /&gt;
&lt;br /&gt;
[[File:Outcome_ERD.jpg|frame|center|Outcomes ERD]]&lt;br /&gt;
&lt;br /&gt;
== outcome_sets ==&lt;br /&gt;
&lt;br /&gt;
Relations: user&lt;br /&gt;
&lt;br /&gt;
Purpose: An outcome set represents a collection of outcomes and perhaps some meta data regarding the revision or applicable region. Outcome sets are mapped to courses, which makes the outcomes within the set available to be mapped to course content. An example outcome set would be [http://asn.jesandco.org/resources/D2403043 Health Education Content Standards for California Public Schools, Kindergarten Through Grade Twelve].  Instructors can create personal outcome sets that can be used in their courses.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| userid&lt;br /&gt;
| int(10), indexed, default null&lt;br /&gt;
| Foreign key to user table.  If set to a user&#039;s ID, then that user owns the outcome set and no one else can use or edit it besides admins.  This allows for instructors to create their own outcome sets for their courses.&lt;br /&gt;
|-&lt;br /&gt;
| idnumber&lt;br /&gt;
| varchar(255), unique index&lt;br /&gt;
| GUID that is auto-generated if missing. Generally on import, these are provided. This would be used to identify the outcome set during import or course restore.&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| varchar(255)&lt;br /&gt;
| The name of the outcome set&lt;br /&gt;
|-&lt;br /&gt;
| description&lt;br /&gt;
| text, default null, optional&lt;br /&gt;
| The plain text description of the outcome.&lt;br /&gt;
|-&lt;br /&gt;
| provider&lt;br /&gt;
| varchar(255), default null, optional&lt;br /&gt;
| Provider information regarding the outcome set. EG: Could be set to ASN.&lt;br /&gt;
|-&lt;br /&gt;
| revision&lt;br /&gt;
| varchar(255), default null, optional&lt;br /&gt;
| Version information regarding the outcome set. This will typically be a date or year, EG: 2011&lt;br /&gt;
|-&lt;br /&gt;
| region&lt;br /&gt;
| varchar(255), default null, optional&lt;br /&gt;
| Any region information. Example: In the US this could be a state name.&lt;br /&gt;
|-&lt;br /&gt;
| deleted&lt;br /&gt;
| int(1), default 0&lt;br /&gt;
| If the outcome set has been deleted.&lt;br /&gt;
|-&lt;br /&gt;
| timemodified&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time modified.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome_sets, outcome&lt;br /&gt;
&lt;br /&gt;
Purpose: Stores information regarding an individual outcome. Outcomes can be stored in a hierarchy, but the hierarchy is visual only. This means that if an outcome is earned, then only that outcome is earned, not it and all of its children. Also, if all child outcomes are earned, then parent outcomes are not also automatically earned. In addition, sometimes outcomes are not assessable, but are only there for extra context in the hierarchy. This identifies that the outcome cannot be mapped to content, nor can a student earn it.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomesetid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_sets table.&lt;br /&gt;
|-&lt;br /&gt;
| parentid&lt;br /&gt;
| int(10), indexed, default null&lt;br /&gt;
| Self referencing key. Identifies the parent outcome in the hierarchy.&lt;br /&gt;
|-&lt;br /&gt;
| idnumber&lt;br /&gt;
| varchar(255), unique index&lt;br /&gt;
| GUID that is auto-generated if missing. Generally on import, these are provided. This would be used to identify the outcome set during import or course restore.&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| varchar(255)&lt;br /&gt;
| The name of the outcome.&lt;br /&gt;
|-&lt;br /&gt;
| docnum&lt;br /&gt;
| varchar(255), default null, optional&lt;br /&gt;
| Field for tracking additional information on the outcome. EG: 2.3.A&lt;br /&gt;
|-&lt;br /&gt;
| description&lt;br /&gt;
| text, default null, optional&lt;br /&gt;
| The plain text description of the outcome.&lt;br /&gt;
|-&lt;br /&gt;
| assessable&lt;br /&gt;
| int(1)&lt;br /&gt;
| If set to 1, then the outcome is assessable and can be mapped to content. If set to 0, then the outcome is not assessable and cannot be mapped to content.&lt;br /&gt;
|-&lt;br /&gt;
| deleted&lt;br /&gt;
| int(1), default 0&lt;br /&gt;
| If the outcome has been deleted.&lt;br /&gt;
|-&lt;br /&gt;
| sortorder&lt;br /&gt;
| int(10)&lt;br /&gt;
| The sort order. This is 0-X for all outcomes that belong to the same outcome set.&lt;br /&gt;
|-&lt;br /&gt;
| timemodified&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time modified.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_metadata ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome&lt;br /&gt;
&lt;br /&gt;
Purpose: Represents additional meta information regarding outcomes. Only support for “Education Level” (K, 1, … 12, etc.) and “Subjects” (e.g. Math, English, etc.) will be available out of the box, but additional data points can be added later (which would need to be added to the UI). One outcome could have many meta values. For example: an outcome could be associated to many educational levels and subjects.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| varchar(255), indexed&lt;br /&gt;
| The name of the meta data.&lt;br /&gt;
|-&lt;br /&gt;
| value&lt;br /&gt;
| varchar(1333), indexed&lt;br /&gt;
| The value of the meta data.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_areas ==&lt;br /&gt;
&lt;br /&gt;
Relations: dynamic with core tables&lt;br /&gt;
&lt;br /&gt;
Purpose: This represents that a content item has been mapped to an outcome or to multiple outcomes. Check the outcome_area_outcomes table for the specific outcomes.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| component&lt;br /&gt;
| varchar(100), indexed&lt;br /&gt;
| The name of the component.&lt;br /&gt;
|-&lt;br /&gt;
| area&lt;br /&gt;
| varchar(50), default null, indexed, optional&lt;br /&gt;
| The name of the area. Used when a component has multiple items to associate to outcomes.&lt;br /&gt;
|-&lt;br /&gt;
| itemid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| The item ID.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_area_outcomes ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome, outcome_areas&lt;br /&gt;
&lt;br /&gt;
Purpose: This represents the one to many relationship of a single content item mapped to many outcomes.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomeareaid&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Foreign key to outcome_areas table.&lt;br /&gt;
|-&lt;br /&gt;
| deleted&lt;br /&gt;
| int(1), default 0&lt;br /&gt;
| Soft delete if the outcome was disassociated from the content. Note, if the content is actually deleted, then this association will be deleted.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_used_areas ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome_areas, course_modules&lt;br /&gt;
&lt;br /&gt;
Purpose: Associates an outcome content item with an activity. For example: a question is created in the site question bank and outcomes are associated to the question. Once that question is added to a Quiz then that association is stored in this table so the outcome system knows that the content item and its outcomes are in use.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| cmid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to course_modules table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomeareaid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_areas table.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_used_sets ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome_sets, course&lt;br /&gt;
&lt;br /&gt;
Purpose: Associates an outcome set with the course. Filtering of the outcome set is optionally allowed since outcome sets can span multiple educational levels and even subjects. Once an outcome set is mapped to the course, then the outcomes in the outcome set are available to be mapped to course content.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| courseid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to course table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomesetid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_sets table.&lt;br /&gt;
|-&lt;br /&gt;
| filter&lt;br /&gt;
| text, default null&lt;br /&gt;
| Some outcome sets span multiple education levels and subjects. So, when mapping an outcome set to a course, it may make sense to restrict the available outcomes to a specific education level(s) and/or subject(s). This information would be serialized into this field.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_attempts ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome_used_areas, user&lt;br /&gt;
&lt;br /&gt;
Purpose: Track a user attempt against a content item within a particular activity. The idea here is to aggregate attempt information so that the recommendation engines (detailed below) have an easily accessible data set to process. This does not mean however that recommendation engines are only limited to this data as one could mine for additional data where needed.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomeusedareaid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_used_areas table.&lt;br /&gt;
|-&lt;br /&gt;
| userid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table.&lt;br /&gt;
|-&lt;br /&gt;
| percentgrade&lt;br /&gt;
| float(10,5)&lt;br /&gt;
| Percent grade earned on this attempt.&lt;br /&gt;
|-&lt;br /&gt;
| mingrade&lt;br /&gt;
| float(10,5)&lt;br /&gt;
| The minimum possible grade.&lt;br /&gt;
|-&lt;br /&gt;
| maxgrade&lt;br /&gt;
| float(10,5)&lt;br /&gt;
| The maximum possible grade.&lt;br /&gt;
|-&lt;br /&gt;
| rawgrade&lt;br /&gt;
| float(10,5)&lt;br /&gt;
| The points earned, should be between the minimum and maximum grades.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_marks ==&lt;br /&gt;
&lt;br /&gt;
Relations: course, user, outcome&lt;br /&gt;
&lt;br /&gt;
Purpose: Graders will manually mark the student as having Met or Not Met an outcome. The recommendation engines will make a recommendation to the grader based on user attempts against content that has been mapped to the outcome.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| courseid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to course table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| userid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table. This is the user who is receiving the mark.&lt;br /&gt;
|-&lt;br /&gt;
| graderid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table. This is the user is doing the marking.&lt;br /&gt;
|-&lt;br /&gt;
| result&lt;br /&gt;
| int(2)&lt;br /&gt;
| 0 is not pass, 1 is pass, null is that no decision has been made yet.&lt;br /&gt;
|-&lt;br /&gt;
| timemodified&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time modified.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_marks_history ==&lt;br /&gt;
&lt;br /&gt;
Relations: course, user, outcome, outcome_marks&lt;br /&gt;
&lt;br /&gt;
Purpose: Keep track of past markings.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomemarkid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_marks table. Though the record could be missing from outcome_marks.&lt;br /&gt;
|-&lt;br /&gt;
| courseid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to course table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| userid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table. This is the user who is receiving the mark.&lt;br /&gt;
|-&lt;br /&gt;
| graderid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table. This is the user is doing the marking.&lt;br /&gt;
|-&lt;br /&gt;
| result&lt;br /&gt;
| int(2)&lt;br /&gt;
| 0 is not pass, 1 is pass, null is that no decision has been made yet.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_awards ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome, user&lt;br /&gt;
&lt;br /&gt;
Purpose: This preserves any outcomes earned by a student, regardless if the course is deleted or not.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| userid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Architecture =&lt;br /&gt;
&lt;br /&gt;
The outcome API, outcome administrative settings, outcome associations and other UIs that drives outcomes will be located inside of the top level outcome/ directory.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Models and repository mappers:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* outcome: Represents a single outcome&lt;br /&gt;
* outcome set: Represents a group of outcomes&lt;br /&gt;
* outcome content: An outcome association to content.&lt;br /&gt;
* outcome attempt: An attempt made against an outcome.&lt;br /&gt;
* outcome mark: A teacher marking an outcome against a user.&lt;br /&gt;
* outcome award: An awarded outcome at the site level.&lt;br /&gt;
&lt;br /&gt;
A repository mapper would include ways to store the model and ways to retrieve them in a re-usable and organized manner.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Collections:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
A group of models that you may take action on or filter. Example of a third party library that helps to manage collections: https://github.com/doctrine/collections&lt;br /&gt;
&lt;br /&gt;
Collections may or may not be used, but some possible collections would be the following:&lt;br /&gt;
&lt;br /&gt;
* outcomes&lt;br /&gt;
* outcome attempts&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;New mform elements:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
For most plugins, the process of associating an outcome would be done through a Moodle form. Proposing adding a new Moodle form element that can be added to a form to provide the necessary UI. An API for validating and saving the new mform element will be provided. In addition, the mform element will just be a wrapper around a well formed API that could be used on it’s own when other use cases present themselves.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;API for plugins&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Beyond the mform element, plugins may interact with outcomes in order to provide a richer integration. An API will be provided to assist with the following (not an exhaustive list):&lt;br /&gt;
&lt;br /&gt;
* A way to notify the outcome system that a content item is or is not being used within a course.&lt;br /&gt;
** Example: When a question is authored at the site level and then is actually used within a course, it must inform the outcome system that it is in use. This could potentially be done via events or just direct API calls at the appropriate times. Same goes for when a question is no longer used within a course.&lt;br /&gt;
* Record an attempt made against a content item.&lt;br /&gt;
** Examples: A question has been attempted or an assignment submission has been graded.&lt;br /&gt;
* A way to retrieve associated outcomes.&lt;br /&gt;
* A way to update, delete or otherwise modify the associated outcomes.&lt;br /&gt;
* A way to pick outcome associations (EG: what the mform element would do).&lt;br /&gt;
* A method of syncing up attempts against a content item. This would be used when associating an outcome on content that has already been graded/attempted.&lt;br /&gt;
* API to cleanup tables on course deletion.&lt;br /&gt;
&lt;br /&gt;
== Supported plugin type plugins ==&lt;br /&gt;
&lt;br /&gt;
This may sound a little odd, but basically the point of these plugins is to add support for a plugin type to the outcome system. These types would assist in interpreting outcome content associations. Examples:&lt;br /&gt;
&lt;br /&gt;
* Given an outcome association, please provide a link to the mapped content.&lt;br /&gt;
** For an activity, this would be a link to the module.&lt;br /&gt;
** For a grading form, a link to the grading instance.&lt;br /&gt;
** For a question, a link to the question instance in the question bank.&lt;br /&gt;
* What are all of the content items that have not been mapped?&lt;br /&gt;
** For activities, this would return instances that are not mapped.&lt;br /&gt;
** For grading form, this would return sub-plugin specific information, like criteria.&lt;br /&gt;
** For questions, this would return questions from the course question bank that are not mapped.&lt;br /&gt;
* May assist with automatic cleanup when the content is deleted.&lt;br /&gt;
* Also other meta data could be derived, like plugin type name.&lt;br /&gt;
&lt;br /&gt;
This plugin would live under outcome/support/ and would initially ship with support of the following plugin types:&lt;br /&gt;
&lt;br /&gt;
* mod&lt;br /&gt;
* qtype&lt;br /&gt;
* gradingform: note that this integration would be deeper in that each gradingform plugin would need to implement something in order to help interpret associations. The reason being is that outcomes are being associated to plugin specific content, instead of something generic like the grading instance.&lt;br /&gt;
&lt;br /&gt;
== Import and export plugins ==&lt;br /&gt;
&lt;br /&gt;
The outcome system would support the exporting of outcome sets. The first export plugin would be a very simple JSON export that is specific to Moodle itself. This would be used for moving custom outcomes from one Moodle site to another.&lt;br /&gt;
&lt;br /&gt;
The outcome system would support importing outcome sets. Initially, there would be support for importing outcomes from [http://asn.jesandco.org Achievement Standards Network (ASN)] ([http://standards.jesandco.org/wiki/ASN_Application_Profile Format Specification]) and importing the JSON export from above.&lt;br /&gt;
&lt;br /&gt;
Both of the outcomes import and export processes would be a plugin based, so other formats could be supported by creating new plugins. The import and export plugins would live under outcome/import/ and outcome/export/.&lt;br /&gt;
&lt;br /&gt;
== Recommendation engine plugins ==&lt;br /&gt;
&lt;br /&gt;
The outcome system would provide a way to recommend to a teacher whether a student should be marked as completing the outcome or not. These plugins should have full Moodle plugin support because they may need to listen to events, run crons, have DB tables, global settings, etc. These plugins would live under outcome/engine/. Recommendations would be generated on demand and stored in MUC.&lt;br /&gt;
&lt;br /&gt;
Initially, the only plugin would be a percentage based recommendation engine. It would be configurable for a specific threshold that would determine if an attempt against an outcome should be considered correct or incorrect. It would then process the outcome attempts to determine the recommendation.&lt;br /&gt;
&lt;br /&gt;
Recommendation engines should also be enabled or disabled at the site level. This would require a “Manage recommendation engines” section in the admin site settings.&lt;br /&gt;
&lt;br /&gt;
= Reporting =&lt;br /&gt;
&lt;br /&gt;
== Site ==&lt;br /&gt;
&lt;br /&gt;
The following reports:&lt;br /&gt;
&lt;br /&gt;
* Outcomes Coverage report - shows outcomes that have been mapped to content in the site.&lt;br /&gt;
* Outcomes Performance report - shows performance on outcomes at the site level. Optionally broken down by course.&lt;br /&gt;
&lt;br /&gt;
== Course ==&lt;br /&gt;
&lt;br /&gt;
The following reports:&lt;br /&gt;
&lt;br /&gt;
* Outcomes Coverage report - shows outcomes that have been mapped in this course.&lt;br /&gt;
* Outcomes: Unmapped Content report - shows content that is not mapped to an outcome.&lt;br /&gt;
* Outcomes Performance report - shows aggregated performance on outcomes in the course.&lt;br /&gt;
* Outcomes Student Performance report - shows student performance on outcomes in the course for the teacher.&lt;br /&gt;
* Outcomes Personal Performance report - shows student performance on outcomes in the course for the student.&lt;br /&gt;
&lt;br /&gt;
== User profile ==&lt;br /&gt;
&lt;br /&gt;
At the very least, there will be a user site report where the user can see earned outcomes.&lt;br /&gt;
&lt;br /&gt;
= Grading =&lt;br /&gt;
&lt;br /&gt;
Outcome Completion Marking is done by course graders and is the final check point for if a learner has earned an outcome or not. The proposed location is to use the Outcome tab that is currently in the grades section of the course. This would also highjack the Outcomes link under Grade administration and Course administration.&lt;br /&gt;
&lt;br /&gt;
= Logging =&lt;br /&gt;
&lt;br /&gt;
We want to audit most actions in the Moodle log. These actions include:&lt;br /&gt;
&lt;br /&gt;
* CRUD type actions.&lt;br /&gt;
* Any association editing. EG: associating an outcome with a course, content item, etc.&lt;br /&gt;
* Outcome marking.&lt;br /&gt;
* User attempts against outcomes.&lt;br /&gt;
&lt;br /&gt;
= Role capabilities =&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Description&lt;br /&gt;
! Capability&lt;br /&gt;
|-&lt;br /&gt;
| Map outcomes to content&lt;br /&gt;
| moodle/outcome:mapcontent&lt;br /&gt;
|-&lt;br /&gt;
| Map outcome sets to courses&lt;br /&gt;
| moodle/outcome:mapcourse&lt;br /&gt;
|-&lt;br /&gt;
| Editing of outcomes&lt;br /&gt;
| moodle/outcome:edit&lt;br /&gt;
|-&lt;br /&gt;
| Export outcomes&lt;br /&gt;
| moodle/outcome:export&lt;br /&gt;
|-&lt;br /&gt;
| Import outcomes&lt;br /&gt;
| moodle/outcome:import&lt;br /&gt;
|-&lt;br /&gt;
| Each report will have a capability to view them.&lt;br /&gt;
| report/REPORTNAME:view&lt;br /&gt;
|-&lt;br /&gt;
| Marking outcomes by graders&lt;br /&gt;
| moodle/grade:edit&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Backup and restore =&lt;br /&gt;
&lt;br /&gt;
The workflow for backup and restore may go like:&lt;br /&gt;
&lt;br /&gt;
* Same site, then just map to existing outcomes via the identifier.&lt;br /&gt;
* Not same site, then the assumption is that the outcome set should be imported first, then we can map to existing outcomes via the identifier like in our same site scenario.&lt;br /&gt;
&lt;br /&gt;
Outcomes would probably take advantage of the backup plugin API to backup outcome associations to modules, question, etc. So, for example:&lt;br /&gt;
&lt;br /&gt;
* Outcomes would plug into activities in order to backup outcome associations and attempts.&lt;br /&gt;
* Outcomes would plug into questions in order to backup outcome associations and attempts.&lt;br /&gt;
* Grading forms would have to manually outcome associations and attempts. Will strive to make code re-usable.&lt;br /&gt;
&lt;br /&gt;
= Migration of old outcomes =&lt;br /&gt;
&lt;br /&gt;
Please first review [[Migration and Technical Issues]]. This still needs to be flushed out some more, but since the migration requires user interaction, we may need to create an admin tool to handle the migration. Until outcomes are migrated, it might make sense to continue to show the outcomes in the grade book, but remove the ability to do any editing of old outcomes.&lt;/div&gt;</summary>
		<author><name>Bushido</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=Outcomes_Specification_Change_Log&amp;diff=38405</id>
		<title>Outcomes Specification Change Log</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=Outcomes_Specification_Change_Log&amp;diff=38405"/>
		<updated>2013-03-19T17:13:21Z</updated>

		<summary type="html">&lt;p&gt;Bushido: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Issue&lt;br /&gt;
! Status&lt;br /&gt;
! Resolution/Description&lt;br /&gt;
! Date&lt;br /&gt;
|-&lt;br /&gt;
| Exporting Outcomes&lt;br /&gt;
| Closed&lt;br /&gt;
| Added use case.  Updated Administrator spec to have export link. &lt;br /&gt;
| 2/16/13&lt;br /&gt;
|-&lt;br /&gt;
| Levels of Outcomes&lt;br /&gt;
| Closed&lt;br /&gt;
| Outcome Sets will be flat, Outcomes will be nested.  Each Outcome can be configured as “assessable”, which determines whether the Outcome can be assigned to content and marked as achieved. &lt;br /&gt;
| 2/23/13&lt;br /&gt;
|-&lt;br /&gt;
| Should Outcome Text Allow HTML&lt;br /&gt;
| Closed&lt;br /&gt;
| Answer: No  (They get displayed in too many places where HTML might not be good)&lt;br /&gt;
| 2/15/13&lt;br /&gt;
|-&lt;br /&gt;
| Restrict Outcomes by Category or Cohort&lt;br /&gt;
| Closed&lt;br /&gt;
| Answer: No.&lt;br /&gt;
| 2/15/13&lt;br /&gt;
|-&lt;br /&gt;
| Should outcome marking allow feedback?&lt;br /&gt;
| Closed&lt;br /&gt;
| Answer: No.   (Potentially in future versions, but we have too many commenting places now as it is).  &lt;br /&gt;
| 2/15/13&lt;br /&gt;
|-&lt;br /&gt;
| Should we allow tagging of outcomes/outcome sets for reporting?&lt;br /&gt;
| Closed&lt;br /&gt;
| Answer: No.  (It would be nice, but we are cutting for scope.  We should not design to where this could not be added in the future)&lt;br /&gt;
| 2/15/13&lt;br /&gt;
|-&lt;br /&gt;
| Review Academic Benchmarks XML&lt;br /&gt;
| Closed&lt;br /&gt;
| Sample format file received.  &lt;br /&gt;
| 2/15/13&lt;br /&gt;
|-&lt;br /&gt;
| Migration of outcomes to a single outcome set.&lt;br /&gt;
| Closed&lt;br /&gt;
| Instead of migrating old outcomes to a single &amp;quot;Upgraded Outcomes&amp;quot; set, we migrate all site wide outcomes to &amp;quot;Upgraded Site Outcomes&amp;quot; and all course specific outcomes are migrated to a &amp;quot;Upgraded SHORTNAME Outcomes&amp;quot; where SHORTNAME is course shortname.&lt;br /&gt;
| 2/20/13&lt;br /&gt;
|-&lt;br /&gt;
| Add Use Case for Instructor adding Course Outcomes&lt;br /&gt;
| Closed&lt;br /&gt;
| Added a use case to the Instructor Use Cases section&lt;br /&gt;
| 2/24/13&lt;br /&gt;
|-&lt;br /&gt;
| Determine if we want to display outcomes to students ala feedback on quizzes.&lt;br /&gt;
| Open&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| Change the reports to be based off of “Completion” rather than “Resource Views”&lt;br /&gt;
| Closed&lt;br /&gt;
| Updated all reporting interfaces to be based on completion, rather than resource views.  &lt;br /&gt;
| 2/24/13&lt;br /&gt;
|-&lt;br /&gt;
| Remove Outcome Set ShortName field as it is duplicative&lt;br /&gt;
| Closed&lt;br /&gt;
| Removed&lt;br /&gt;
| 3/14/13&lt;br /&gt;
|-&lt;br /&gt;
| On Outcome Creation, add Educational Level and Subject&lt;br /&gt;
| Closed&lt;br /&gt;
| Added&lt;br /&gt;
| 3/14/13&lt;br /&gt;
|-&lt;br /&gt;
| Collapse Outcome Sets, Outcomes, and Folders and allow them to be mapped, add a flag called assessable.&lt;br /&gt;
| Closed&lt;br /&gt;
| Collapsed these down and handled the multi level outcomes&lt;br /&gt;
| 3/14/13&lt;br /&gt;
|-&lt;br /&gt;
| Rename Outcome ID to Id Number, user editable, maps to Doc Num in AB and to Statement Notation in ASN&lt;br /&gt;
| Closed&lt;br /&gt;
| An alphanumeric notation or ID code as defined by the promulgating body to identify the statement.&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| Redo select Outcome Sets to make it flat, with optional filters for educational level and subject&lt;br /&gt;
| Open&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| Does Outcomes live in the Settings block?  Gradebook or on their own? &lt;br /&gt;
| Open&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| How do we handle scale based items?&lt;br /&gt;
| Closed&lt;br /&gt;
| Added Scale Based Items to the Performance reports and a call out for scale based items.  &lt;br /&gt;
| 3/14/13&lt;br /&gt;
|-&lt;br /&gt;
| Update Reports to show questions and rubric items under an assignment and quiz&lt;br /&gt;
| Closed&lt;br /&gt;
| Added&lt;br /&gt;
| 3/14&lt;br /&gt;
|-&lt;br /&gt;
| Update roles and capabilities: remove course creator from all capabilities except for mapping outcome sets to courses.  Update capabilities to be editing teacher instead of teacher.  Introduce new capabilities for import/export.&lt;br /&gt;
| Closed&lt;br /&gt;
| Added/Updated&lt;br /&gt;
| 3/19&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Bushido</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=Outcomes_Capabilities_and_Roles&amp;diff=38404</id>
		<title>Outcomes Capabilities and Roles</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=Outcomes_Capabilities_and_Roles&amp;diff=38404"/>
		<updated>2013-03-19T17:08:38Z</updated>

		<summary type="html">&lt;p&gt;Bushido: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The following will be capabilities and the roles which should have these capabilities selected by default: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Capability &lt;br /&gt;
! Description&lt;br /&gt;
! Roles with Capability Enabled by Default&lt;br /&gt;
|-&lt;br /&gt;
| Outcomes: Administration - Manage Outcomes&lt;br /&gt;
| Controls the ability to Add, Delete, Upload and Edit Outcomes from the Administration Screen&lt;br /&gt;
| System Administrator&lt;br /&gt;
|-&lt;br /&gt;
| Outcomes: Administration - Outcomes Reporting&lt;br /&gt;
| Controls the ability to view the Outcomes Reports in the Outcomes Administration Area&lt;br /&gt;
| System Administrator&lt;br /&gt;
|-&lt;br /&gt;
| Outcomes: Administration - Achievement Configuration&lt;br /&gt;
| Ability to configure how students are marked as having achieved an outcome and the recommendation engines. &lt;br /&gt;
| System Administrator&lt;br /&gt;
|-&lt;br /&gt;
| Outcomes: Course Mapping&lt;br /&gt;
| Controls the ability to map a course against an outcome set&lt;br /&gt;
| System Administrator, Manager, Course Creator, Editing Teacher&lt;br /&gt;
|-&lt;br /&gt;
| Outcomes: Activity and Resource Mapping&lt;br /&gt;
| Controls the ability to map an activity, resource, or item against an outcome&lt;br /&gt;
| System Administrator, Manager, Editing Teacher&lt;br /&gt;
|-&lt;br /&gt;
| Outcomes: Course Reporting&lt;br /&gt;
| Controls the ability to view the coverage and performance reports for mapped outcomes.&lt;br /&gt;
| System Administrator, Manager, Editing Teacher&lt;br /&gt;
|- &lt;br /&gt;
| Outcomes: Add Course Outcomes&lt;br /&gt;
| Grants the ability to add outcomes at the course level that will be tied directly to that course/user.&lt;br /&gt;
| System Administrator, Manager, Editing Teacher&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
* [[Outcomes Specification]]&lt;br /&gt;
* [[Outcomes Administrator Specification]]&lt;/div&gt;</summary>
		<author><name>Bushido</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=Outcomes_Technical_Specification&amp;diff=38400</id>
		<title>Outcomes Technical Specification</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=Outcomes_Technical_Specification&amp;diff=38400"/>
		<updated>2013-03-19T16:45:01Z</updated>

		<summary type="html">&lt;p&gt;Bushido: /* Role capabilities */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
&lt;br /&gt;
Please be familiar with the function specification as outlined in the [[Outcomes Specification]]. The functional specification will provide details about the concepts and goals of this project. In particular, the following sections provide the overview of the system by user role:&lt;br /&gt;
&lt;br /&gt;
* [[Outcomes Administrator Specification]]&lt;br /&gt;
* [[Outcomes Instructor Specification]]&lt;br /&gt;
* [[Outcomes Student Specification]]&lt;br /&gt;
&lt;br /&gt;
In addition, some features and use cases are known but not yet being implemented. Please see [[Specifically Excluded Use Cases]]. Specifically, this initial version will not be attempting to map an existing outcome set to a new version of the outcome set on import.&lt;br /&gt;
&lt;br /&gt;
This document attempts to capture how the functional specification would be implemented in Moodle.&lt;br /&gt;
&lt;br /&gt;
= Backwards compatibility breaks =&lt;br /&gt;
&lt;br /&gt;
First and foremost, it is important to identify key differences between the current outcome system and this proposal as there are some philosophical shifts as well as breaking of existing code.&lt;br /&gt;
&lt;br /&gt;
# Outcomes will now only be created at the site level and then mapped to courses and content. Outcomes will no longer be created at the course level.&lt;br /&gt;
# Anything using the current outcome API or tables will have to be updated to use the new outcomes when appropriate.&lt;br /&gt;
# Outcomes will no longer appear in the grade book.&lt;br /&gt;
# Outcomes will no longer support scales. It is just a simple pass or fail.&lt;br /&gt;
&lt;br /&gt;
These changes will be documented in the relevant change log files.&lt;br /&gt;
&lt;br /&gt;
= Settings =&lt;br /&gt;
&lt;br /&gt;
== Site ==&lt;br /&gt;
&lt;br /&gt;
At the site level, there will be an area to do all of the configuration and setup of outcome sets. The proposed location is under Settings &amp;gt; Site Administration &amp;gt; Grades &amp;gt; Outcomes.&lt;br /&gt;
&lt;br /&gt;
In addition to managing outcomes, there will be site settings page for general outcome settings. For example, a setting to toggle if outcome idnumbers are editable or not.&lt;br /&gt;
&lt;br /&gt;
== Course ==&lt;br /&gt;
&lt;br /&gt;
When editing a course, there will be a section to associate multiple outcome sets to the course. The section will appear below the course General settings.&lt;br /&gt;
&lt;br /&gt;
This association is used to determine the relevant outcomes for the course for reporting and as a way to pre-filter outcome pickers when associating outcomes to content.&lt;br /&gt;
&lt;br /&gt;
== Activity ==&lt;br /&gt;
&lt;br /&gt;
When editing an activity, there will be a section to associate individual outcomes to the activity. This section will be provided by the moodleform_mod::standard_coursemodule_elements() callback so that all activities will be able to be associated to outcomes automatically.  In the flow of the activity&#039;s form, the outcome mapping options would appear below the grades section.  Do note though that if an activity does not support grades, it can still be mapped to outcomes.&lt;br /&gt;
&lt;br /&gt;
Graded activities will have to add additional integration points with outcomes in order to capture user attempts.&lt;br /&gt;
&lt;br /&gt;
== Advanced grading ==&lt;br /&gt;
&lt;br /&gt;
Rubrics and Marking guides will be able to associate an outcome for a criteria. API will be provided to support this, but each grading method will have to integrate with outcomes where it makes sense.&lt;br /&gt;
&lt;br /&gt;
== Questions ==&lt;br /&gt;
&lt;br /&gt;
When editing a question, there will be a section to associate individual outcomes to the question. The section can be added to question_edit_form::definition() before the Tags section.&lt;br /&gt;
&lt;br /&gt;
This association UI might behave a little differently based on the context in Moodle. If the question is being authored at the site level, then the outcome association is more free form, meaning one can select any outcome from any outcome set. If the question is being authored at the course level, then the outcome association defaults to those outcome sets that are associated to the course.&lt;br /&gt;
&lt;br /&gt;
= Data structure =&lt;br /&gt;
&lt;br /&gt;
This diagram provides an overview of how the tables relate to each other and to core tables.  Please see the below sections for details about each table.&lt;br /&gt;
&lt;br /&gt;
[[File:Outcome_ERD.jpg|frame|center|Outcomes ERD]]&lt;br /&gt;
&lt;br /&gt;
== outcome_sets ==&lt;br /&gt;
&lt;br /&gt;
Relations: user&lt;br /&gt;
&lt;br /&gt;
Purpose: An outcome set represents a collection of outcomes and perhaps some meta data regarding the revision or applicable region. Outcome sets are mapped to courses, which makes the outcomes within the set available to be mapped to course content. An example outcome set would be [http://asn.jesandco.org/resources/D2403043 Health Education Content Standards for California Public Schools, Kindergarten Through Grade Twelve].  Instructors can create personal outcome sets that can be used in their courses.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| userid&lt;br /&gt;
| int(10), indexed, default null&lt;br /&gt;
| Foreign key to user table.  If set to a user&#039;s ID, then that user owns the outcome set and no one else can use or edit it besides admins.  This allows for instructors to create their own outcome sets for their courses.&lt;br /&gt;
|-&lt;br /&gt;
| idnumber&lt;br /&gt;
| varchar(255), unique index&lt;br /&gt;
| GUID that is auto-generated if missing. Generally on import, these are provided. This would be used to identify the outcome set during import or course restore.&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| varchar(255)&lt;br /&gt;
| The name of the outcome set&lt;br /&gt;
|-&lt;br /&gt;
| description&lt;br /&gt;
| text, default null, optional&lt;br /&gt;
| The plain text description of the outcome.&lt;br /&gt;
|-&lt;br /&gt;
| provider&lt;br /&gt;
| varchar(255), default null, optional&lt;br /&gt;
| Provider information regarding the outcome set. EG: Could be set to ASN.&lt;br /&gt;
|-&lt;br /&gt;
| revision&lt;br /&gt;
| varchar(255), default null, optional&lt;br /&gt;
| Version information regarding the outcome set. This will typically be a date or year, EG: 2011&lt;br /&gt;
|-&lt;br /&gt;
| region&lt;br /&gt;
| varchar(255), default null, optional&lt;br /&gt;
| Any region information. Example: In the US this could be a state name.&lt;br /&gt;
|-&lt;br /&gt;
| deleted&lt;br /&gt;
| int(1), default 0&lt;br /&gt;
| If the outcome set has been deleted.&lt;br /&gt;
|-&lt;br /&gt;
| timemodified&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time modified.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome_sets, outcome&lt;br /&gt;
&lt;br /&gt;
Purpose: Stores information regarding an individual outcome. Outcomes can be stored in a hierarchy, but the hierarchy is visual only. This means that if an outcome is earned, then only that outcome is earned, not it and all of its children. Also, if all child outcomes are earned, then parent outcomes are not also automatically earned. In addition, sometimes outcomes are not assessable, but are only there for extra context in the hierarchy. This identifies that the outcome cannot be mapped to content, nor can a student earn it.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomesetid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_sets table.&lt;br /&gt;
|-&lt;br /&gt;
| parentid&lt;br /&gt;
| int(10), indexed, default null&lt;br /&gt;
| Self referencing key. Identifies the parent outcome in the hierarchy.&lt;br /&gt;
|-&lt;br /&gt;
| idnumber&lt;br /&gt;
| varchar(255), unique index&lt;br /&gt;
| GUID that is auto-generated if missing. Generally on import, these are provided. This would be used to identify the outcome set during import or course restore.&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| varchar(255)&lt;br /&gt;
| The name of the outcome.&lt;br /&gt;
|-&lt;br /&gt;
| docnum&lt;br /&gt;
| varchar(255), default null, optional&lt;br /&gt;
| Field for tracking additional information on the outcome. EG: 2.3.A&lt;br /&gt;
|-&lt;br /&gt;
| description&lt;br /&gt;
| text, default null, optional&lt;br /&gt;
| The plain text description of the outcome.&lt;br /&gt;
|-&lt;br /&gt;
| assessable&lt;br /&gt;
| int(1)&lt;br /&gt;
| If set to 1, then the outcome is assessable and can be mapped to content. If set to 0, then the outcome is not assessable and cannot be mapped to content.&lt;br /&gt;
|-&lt;br /&gt;
| deleted&lt;br /&gt;
| int(1), default 0&lt;br /&gt;
| If the outcome has been deleted.&lt;br /&gt;
|-&lt;br /&gt;
| sortorder&lt;br /&gt;
| int(10)&lt;br /&gt;
| The sort order. This is 0-X for all outcomes that belong to the same outcome set.&lt;br /&gt;
|-&lt;br /&gt;
| timemodified&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time modified.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_metadata ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome&lt;br /&gt;
&lt;br /&gt;
Purpose: Represents additional meta information regarding outcomes. Only support for “Education Level” (K, 1, … 12, etc.) and “Subjects” (e.g. Math, English, etc.) will be available out of the box, but additional data points can be added later (which would need to be added to the UI). One outcome could have many meta values. For example: an outcome could be associated to many educational levels and subjects.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| varchar(255), indexed&lt;br /&gt;
| The name of the meta data.&lt;br /&gt;
|-&lt;br /&gt;
| value&lt;br /&gt;
| varchar(1333), indexed&lt;br /&gt;
| The value of the meta data.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_areas ==&lt;br /&gt;
&lt;br /&gt;
Relations: dynamic with core tables&lt;br /&gt;
&lt;br /&gt;
Purpose: This represents that a content item has been mapped to an outcome or to multiple outcomes. Check the outcome_area_outcomes table for the specific outcomes.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| component&lt;br /&gt;
| varchar(100), indexed&lt;br /&gt;
| The name of the component.&lt;br /&gt;
|-&lt;br /&gt;
| area&lt;br /&gt;
| varchar(50), default null, indexed, optional&lt;br /&gt;
| The name of the area. Used when a component has multiple items to associate to outcomes.&lt;br /&gt;
|-&lt;br /&gt;
| itemid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| The item ID.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_area_outcomes ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome, outcome_areas&lt;br /&gt;
&lt;br /&gt;
Purpose: This represents the one to many relationship of a single content item mapped to many outcomes.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomeareaid&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Foreign key to outcome_areas table.&lt;br /&gt;
|-&lt;br /&gt;
| deleted&lt;br /&gt;
| int(1), default 0&lt;br /&gt;
| Soft delete if the outcome was disassociated from the content. Note, if the content is actually deleted, then this association will be deleted.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_used_areas ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome_areas, course_modules&lt;br /&gt;
&lt;br /&gt;
Purpose: Associates an outcome content item with an activity. For example: a question is created in the site question bank and outcomes are associated to the question. Once that question is added to a Quiz then that association is stored in this table so the outcome system knows that the content item and its outcomes are in use.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| cmid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to course_modules table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomeareaid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_areas table.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_used_sets ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome_sets, course&lt;br /&gt;
&lt;br /&gt;
Purpose: Associates an outcome set with the course. Filtering of the outcome set is optionally allowed since outcome sets can span multiple educational levels and even subjects. Once an outcome set is mapped to the course, then the outcomes in the outcome set are available to be mapped to course content.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| courseid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to course table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomesetid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_sets table.&lt;br /&gt;
|-&lt;br /&gt;
| filter&lt;br /&gt;
| text, default null&lt;br /&gt;
| Some outcome sets span multiple education levels and subjects. So, when mapping an outcome set to a course, it may make sense to restrict the available outcomes to a specific education level(s) and/or subject(s). This information would be serialized into this field.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_attempts ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome_used_areas, user&lt;br /&gt;
&lt;br /&gt;
Purpose: Track a user attempt against a content item within a particular activity. The idea here is to aggregate attempt information so that the recommendation engines (detailed below) have an easily accessible data set to process. This does not mean however that recommendation engines are only limited to this data as one could mine for additional data where needed.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomeusedareaid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_used_areas table.&lt;br /&gt;
|-&lt;br /&gt;
| userid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table.&lt;br /&gt;
|-&lt;br /&gt;
| percentgrade&lt;br /&gt;
| float(10,5)&lt;br /&gt;
| Percent grade earned on this attempt.&lt;br /&gt;
|-&lt;br /&gt;
| mingrade&lt;br /&gt;
| float(10,5)&lt;br /&gt;
| The minimum possible grade.&lt;br /&gt;
|-&lt;br /&gt;
| maxgrade&lt;br /&gt;
| float(10,5)&lt;br /&gt;
| The maximum possible grade.&lt;br /&gt;
|-&lt;br /&gt;
| rawgrade&lt;br /&gt;
| float(10,5)&lt;br /&gt;
| The points earned, should be between the minimum and maximum grades.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_marks ==&lt;br /&gt;
&lt;br /&gt;
Relations: course, user, outcome&lt;br /&gt;
&lt;br /&gt;
Purpose: Graders will manually mark the student as having Met or Not Met an outcome. The recommendation engines will make a recommendation to the grader based on user attempts against content that has been mapped to the outcome.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| courseid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to course table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| userid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table. This is the user who is receiving the mark.&lt;br /&gt;
|-&lt;br /&gt;
| graderid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table. This is the user is doing the marking.&lt;br /&gt;
|-&lt;br /&gt;
| result&lt;br /&gt;
| int(2)&lt;br /&gt;
| 0 is not pass, 1 is pass, null is that no decision has been made yet.&lt;br /&gt;
|-&lt;br /&gt;
| timemodified&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time modified.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_marks_history ==&lt;br /&gt;
&lt;br /&gt;
Relations: course, user, outcome, outcome_marks&lt;br /&gt;
&lt;br /&gt;
Purpose: Keep track of past markings.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomemarkid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_marks table. Though the record could be missing from outcome_marks.&lt;br /&gt;
|-&lt;br /&gt;
| courseid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to course table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| userid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table. This is the user who is receiving the mark.&lt;br /&gt;
|-&lt;br /&gt;
| graderid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table. This is the user is doing the marking.&lt;br /&gt;
|-&lt;br /&gt;
| result&lt;br /&gt;
| int(2)&lt;br /&gt;
| 0 is not pass, 1 is pass, null is that no decision has been made yet.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_awards ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome, user&lt;br /&gt;
&lt;br /&gt;
Purpose: This preserves any outcomes earned by a student, regardless if the course is deleted or not.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| userid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Architecture =&lt;br /&gt;
&lt;br /&gt;
The outcome API, outcome administrative settings, outcome associations and other UIs that drives outcomes will be located inside of the top level outcome/ directory.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Models and repository mappers:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* outcome: Represents a single outcome&lt;br /&gt;
* outcome set: Represents a group of outcomes&lt;br /&gt;
* outcome content: An outcome association to content.&lt;br /&gt;
* outcome attempt: An attempt made against an outcome.&lt;br /&gt;
* outcome mark: A teacher marking an outcome against a user.&lt;br /&gt;
* outcome award: An awarded outcome at the site level.&lt;br /&gt;
&lt;br /&gt;
A repository mapper would include ways to store the model and ways to retrieve them in a re-usable and organized manner.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Collections:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
A group of models that you may take action on or filter. Example of a third party library that helps to manage collections: https://github.com/doctrine/collections&lt;br /&gt;
&lt;br /&gt;
Collections may or may not be used, but some possible collections would be the following:&lt;br /&gt;
&lt;br /&gt;
* outcomes&lt;br /&gt;
* outcome attempts&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;New mform elements:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
For most plugins, the process of associating an outcome would be done through a Moodle form. Proposing adding a new Moodle form element that can be added to a form to provide the necessary UI. An API for validating and saving the new mform element will be provided. In addition, the mform element will just be a wrapper around a well formed API that could be used on it’s own when other use cases present themselves.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;API for plugins&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Beyond the mform element, plugins may interact with outcomes in order to provide a richer integration. An API will be provided to assist with the following (not an exhaustive list):&lt;br /&gt;
&lt;br /&gt;
* A way to notify the outcome system that a content item is or is not being used within a course.&lt;br /&gt;
** Example: When a question is authored at the site level and then is actually used within a course, it must inform the outcome system that it is in use. This could potentially be done via events or just direct API calls at the appropriate times. Same goes for when a question is no longer used within a course.&lt;br /&gt;
* Record an attempt made against a content item.&lt;br /&gt;
** Examples: A question has been attempted or an assignment submission has been graded.&lt;br /&gt;
* A way to retrieve associated outcomes.&lt;br /&gt;
* A way to update, delete or otherwise modify the associated outcomes.&lt;br /&gt;
* A way to pick outcome associations (EG: what the mform element would do).&lt;br /&gt;
* A method of syncing up attempts against a content item. This would be used when associating an outcome on content that has already been graded/attempted.&lt;br /&gt;
* API to cleanup tables on course deletion.&lt;br /&gt;
&lt;br /&gt;
== Supported plugin type plugins ==&lt;br /&gt;
&lt;br /&gt;
This may sound a little odd, but basically the point of these plugins is to add support for a plugin type to the outcome system. These types would assist in interpreting outcome content associations. Examples:&lt;br /&gt;
&lt;br /&gt;
* Given an outcome association, please provide a link to the mapped content.&lt;br /&gt;
** For an activity, this would be a link to the module.&lt;br /&gt;
** For a grading form, a link to the grading instance.&lt;br /&gt;
** For a question, a link to the question instance in the question bank.&lt;br /&gt;
* What are all of the content items that have not been mapped?&lt;br /&gt;
** For activities, this would return instances that are not mapped.&lt;br /&gt;
** For grading form, this would return sub-plugin specific information, like criteria.&lt;br /&gt;
** For questions, this would return questions from the course question bank that are not mapped.&lt;br /&gt;
* May assist with automatic cleanup when the content is deleted.&lt;br /&gt;
* Also other meta data could be derived, like plugin type name.&lt;br /&gt;
&lt;br /&gt;
This plugin would live under outcome/support/ and would initially ship with support of the following plugin types:&lt;br /&gt;
&lt;br /&gt;
* mod&lt;br /&gt;
* qtype&lt;br /&gt;
* gradingform: note that this integration would be deeper in that each gradingform plugin would need to implement something in order to help interpret associations. The reason being is that outcomes are being associated to plugin specific content, instead of something generic like the grading instance.&lt;br /&gt;
&lt;br /&gt;
== Import and export plugins ==&lt;br /&gt;
&lt;br /&gt;
The outcome system would support the exporting of outcome sets. The first export plugin would be a very simple JSON export that is specific to Moodle itself. This would be used for moving custom outcomes from one Moodle site to another.&lt;br /&gt;
&lt;br /&gt;
The outcome system would support importing outcome sets. Initially, there would be support for importing outcomes from [http://asn.jesandco.org Achievement Standards Network (ASN)] ([http://standards.jesandco.org/wiki/ASN_Application_Profile Format Specification]) and importing the JSON export from above.&lt;br /&gt;
&lt;br /&gt;
Both of the outcomes import and export processes would be a plugin based, so other formats could be supported by creating new plugins. The import and export plugins would live under outcome/import/ and outcome/export/.&lt;br /&gt;
&lt;br /&gt;
== Recommendation engine plugins ==&lt;br /&gt;
&lt;br /&gt;
The outcome system would provide a way to recommend to a teacher whether a student should be marked as completing the outcome or not. These plugins should have full Moodle plugin support because they may need to listen to events, run crons, have DB tables, global settings, etc. These plugins would live under outcome/engine/. Recommendations would be generated on demand and stored in MUC.&lt;br /&gt;
&lt;br /&gt;
Initially, the only plugin would be a percentage based recommendation engine. It would be configurable for a specific threshold that would determine if an attempt against an outcome should be considered correct or incorrect. It would then process the outcome attempts to determine the recommendation.&lt;br /&gt;
&lt;br /&gt;
Recommendation engines should also be enabled or disabled at the site level. This would require a “Manage recommendation engines” section in the admin site settings.&lt;br /&gt;
&lt;br /&gt;
= Reporting =&lt;br /&gt;
&lt;br /&gt;
== Site ==&lt;br /&gt;
&lt;br /&gt;
The following reports:&lt;br /&gt;
&lt;br /&gt;
* Outcomes Coverage report - shows outcomes that have been mapped to content in the site.&lt;br /&gt;
* Outcomes Performance report - shows performance on outcomes at the site level. Optionally broken down by course.&lt;br /&gt;
&lt;br /&gt;
== Course ==&lt;br /&gt;
&lt;br /&gt;
The following reports:&lt;br /&gt;
&lt;br /&gt;
* Outcomes Coverage report - shows outcomes that have been mapped in this course.&lt;br /&gt;
* Outcomes: Unmapped Content report - shows content that is not mapped to an outcome.&lt;br /&gt;
* Outcomes Performance report - shows aggregated performance on outcomes in the course.&lt;br /&gt;
* Outcomes Student Performance report - shows student performance on outcomes in the course for the teacher.&lt;br /&gt;
* Outcomes Personal Performance report - shows student performance on outcomes in the course for the student.&lt;br /&gt;
&lt;br /&gt;
== User profile ==&lt;br /&gt;
&lt;br /&gt;
At the very least, there will be a user site report where the user can see earned outcomes.&lt;br /&gt;
&lt;br /&gt;
= Grading =&lt;br /&gt;
&lt;br /&gt;
Outcome Completion Marking is done by course graders and is the final check point for if a learner has earned an outcome or not. The proposed location is to use the Outcome tab that is currently in the grades section of the course. This would also highjack the Outcomes link under Grade administration and Course administration.&lt;br /&gt;
&lt;br /&gt;
= Logging =&lt;br /&gt;
&lt;br /&gt;
We want to audit most actions in the Moodle log. These actions include:&lt;br /&gt;
&lt;br /&gt;
* CRUD type actions.&lt;br /&gt;
* Any association editing. EG: associating an outcome with a course, content item, etc.&lt;br /&gt;
* Outcome marking.&lt;br /&gt;
* User attempts against outcomes.&lt;br /&gt;
&lt;br /&gt;
= Role capabilities =&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Description&lt;br /&gt;
! Capability&lt;br /&gt;
|-&lt;br /&gt;
| Map outcomes to content&lt;br /&gt;
| moodle/outcome:mapcontent&lt;br /&gt;
|-&lt;br /&gt;
| Map outcome sets to courses&lt;br /&gt;
| moodle/outcome:mapcourse&lt;br /&gt;
|-&lt;br /&gt;
| Administering outcomes (Editing site outcomes, etc)&lt;br /&gt;
| moodle/outcome:admin&lt;br /&gt;
|-&lt;br /&gt;
| Export outcomes&lt;br /&gt;
| moodle/outcome:export&lt;br /&gt;
|-&lt;br /&gt;
| Import outcomes&lt;br /&gt;
| moodle/outcome:import&lt;br /&gt;
|-&lt;br /&gt;
| Each report will have a capability to view them.&lt;br /&gt;
| report/REPORTNAME:view&lt;br /&gt;
|-&lt;br /&gt;
| Marking outcomes by graders&lt;br /&gt;
| moodle/grade:edit&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Backup and restore =&lt;br /&gt;
&lt;br /&gt;
The workflow for backup and restore may go like:&lt;br /&gt;
&lt;br /&gt;
* Same site, then just map to existing outcomes via the identifier.&lt;br /&gt;
* Not same site, then the assumption is that the outcome set should be imported first, then we can map to existing outcomes via the identifier like in our same site scenario.&lt;br /&gt;
&lt;br /&gt;
Outcomes would probably take advantage of the backup plugin API to backup outcome associations to modules, question, etc. So, for example:&lt;br /&gt;
&lt;br /&gt;
* Outcomes would plug into activities in order to backup outcome associations and attempts.&lt;br /&gt;
* Outcomes would plug into questions in order to backup outcome associations and attempts.&lt;br /&gt;
* Grading forms would have to manually outcome associations and attempts. Will strive to make code re-usable.&lt;br /&gt;
&lt;br /&gt;
= Migration of old outcomes =&lt;br /&gt;
&lt;br /&gt;
Please first review [[Migration and Technical Issues]]. This still needs to be flushed out some more, but since the migration requires user interaction, we may need to create an admin tool to handle the migration. Until outcomes are migrated, it might make sense to continue to show the outcomes in the grade book, but remove the ability to do any editing of old outcomes.&lt;/div&gt;</summary>
		<author><name>Bushido</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=Outcomes_Technical_Specification&amp;diff=38399</id>
		<title>Outcomes Technical Specification</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=Outcomes_Technical_Specification&amp;diff=38399"/>
		<updated>2013-03-19T16:35:20Z</updated>

		<summary type="html">&lt;p&gt;Bushido: /* Role capabilities */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
&lt;br /&gt;
Please be familiar with the function specification as outlined in the [[Outcomes Specification]]. The functional specification will provide details about the concepts and goals of this project. In particular, the following sections provide the overview of the system by user role:&lt;br /&gt;
&lt;br /&gt;
* [[Outcomes Administrator Specification]]&lt;br /&gt;
* [[Outcomes Instructor Specification]]&lt;br /&gt;
* [[Outcomes Student Specification]]&lt;br /&gt;
&lt;br /&gt;
In addition, some features and use cases are known but not yet being implemented. Please see [[Specifically Excluded Use Cases]]. Specifically, this initial version will not be attempting to map an existing outcome set to a new version of the outcome set on import.&lt;br /&gt;
&lt;br /&gt;
This document attempts to capture how the functional specification would be implemented in Moodle.&lt;br /&gt;
&lt;br /&gt;
= Backwards compatibility breaks =&lt;br /&gt;
&lt;br /&gt;
First and foremost, it is important to identify key differences between the current outcome system and this proposal as there are some philosophical shifts as well as breaking of existing code.&lt;br /&gt;
&lt;br /&gt;
# Outcomes will now only be created at the site level and then mapped to courses and content. Outcomes will no longer be created at the course level.&lt;br /&gt;
# Anything using the current outcome API or tables will have to be updated to use the new outcomes when appropriate.&lt;br /&gt;
# Outcomes will no longer appear in the grade book.&lt;br /&gt;
# Outcomes will no longer support scales. It is just a simple pass or fail.&lt;br /&gt;
&lt;br /&gt;
These changes will be documented in the relevant change log files.&lt;br /&gt;
&lt;br /&gt;
= Settings =&lt;br /&gt;
&lt;br /&gt;
== Site ==&lt;br /&gt;
&lt;br /&gt;
At the site level, there will be an area to do all of the configuration and setup of outcome sets. The proposed location is under Settings &amp;gt; Site Administration &amp;gt; Grades &amp;gt; Outcomes.&lt;br /&gt;
&lt;br /&gt;
In addition to managing outcomes, there will be site settings page for general outcome settings. For example, a setting to toggle if outcome idnumbers are editable or not.&lt;br /&gt;
&lt;br /&gt;
== Course ==&lt;br /&gt;
&lt;br /&gt;
When editing a course, there will be a section to associate multiple outcome sets to the course. The section will appear below the course General settings.&lt;br /&gt;
&lt;br /&gt;
This association is used to determine the relevant outcomes for the course for reporting and as a way to pre-filter outcome pickers when associating outcomes to content.&lt;br /&gt;
&lt;br /&gt;
== Activity ==&lt;br /&gt;
&lt;br /&gt;
When editing an activity, there will be a section to associate individual outcomes to the activity. This section will be provided by the moodleform_mod::standard_coursemodule_elements() callback so that all activities will be able to be associated to outcomes automatically.  In the flow of the activity&#039;s form, the outcome mapping options would appear below the grades section.  Do note though that if an activity does not support grades, it can still be mapped to outcomes.&lt;br /&gt;
&lt;br /&gt;
Graded activities will have to add additional integration points with outcomes in order to capture user attempts.&lt;br /&gt;
&lt;br /&gt;
== Advanced grading ==&lt;br /&gt;
&lt;br /&gt;
Rubrics and Marking guides will be able to associate an outcome for a criteria. API will be provided to support this, but each grading method will have to integrate with outcomes where it makes sense.&lt;br /&gt;
&lt;br /&gt;
== Questions ==&lt;br /&gt;
&lt;br /&gt;
When editing a question, there will be a section to associate individual outcomes to the question. The section can be added to question_edit_form::definition() before the Tags section.&lt;br /&gt;
&lt;br /&gt;
This association UI might behave a little differently based on the context in Moodle. If the question is being authored at the site level, then the outcome association is more free form, meaning one can select any outcome from any outcome set. If the question is being authored at the course level, then the outcome association defaults to those outcome sets that are associated to the course.&lt;br /&gt;
&lt;br /&gt;
= Data structure =&lt;br /&gt;
&lt;br /&gt;
This diagram provides an overview of how the tables relate to each other and to core tables.  Please see the below sections for details about each table.&lt;br /&gt;
&lt;br /&gt;
[[File:Outcome_ERD.jpg|frame|center|Outcomes ERD]]&lt;br /&gt;
&lt;br /&gt;
== outcome_sets ==&lt;br /&gt;
&lt;br /&gt;
Relations: user&lt;br /&gt;
&lt;br /&gt;
Purpose: An outcome set represents a collection of outcomes and perhaps some meta data regarding the revision or applicable region. Outcome sets are mapped to courses, which makes the outcomes within the set available to be mapped to course content. An example outcome set would be [http://asn.jesandco.org/resources/D2403043 Health Education Content Standards for California Public Schools, Kindergarten Through Grade Twelve].  Instructors can create personal outcome sets that can be used in their courses.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| userid&lt;br /&gt;
| int(10), indexed, default null&lt;br /&gt;
| Foreign key to user table.  If set to a user&#039;s ID, then that user owns the outcome set and no one else can use or edit it besides admins.  This allows for instructors to create their own outcome sets for their courses.&lt;br /&gt;
|-&lt;br /&gt;
| idnumber&lt;br /&gt;
| varchar(255), unique index&lt;br /&gt;
| GUID that is auto-generated if missing. Generally on import, these are provided. This would be used to identify the outcome set during import or course restore.&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| varchar(255)&lt;br /&gt;
| The name of the outcome set&lt;br /&gt;
|-&lt;br /&gt;
| description&lt;br /&gt;
| text, default null, optional&lt;br /&gt;
| The plain text description of the outcome.&lt;br /&gt;
|-&lt;br /&gt;
| provider&lt;br /&gt;
| varchar(255), default null, optional&lt;br /&gt;
| Provider information regarding the outcome set. EG: Could be set to ASN.&lt;br /&gt;
|-&lt;br /&gt;
| revision&lt;br /&gt;
| varchar(255), default null, optional&lt;br /&gt;
| Version information regarding the outcome set. This will typically be a date or year, EG: 2011&lt;br /&gt;
|-&lt;br /&gt;
| region&lt;br /&gt;
| varchar(255), default null, optional&lt;br /&gt;
| Any region information. Example: In the US this could be a state name.&lt;br /&gt;
|-&lt;br /&gt;
| deleted&lt;br /&gt;
| int(1), default 0&lt;br /&gt;
| If the outcome set has been deleted.&lt;br /&gt;
|-&lt;br /&gt;
| timemodified&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time modified.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome_sets, outcome&lt;br /&gt;
&lt;br /&gt;
Purpose: Stores information regarding an individual outcome. Outcomes can be stored in a hierarchy, but the hierarchy is visual only. This means that if an outcome is earned, then only that outcome is earned, not it and all of its children. Also, if all child outcomes are earned, then parent outcomes are not also automatically earned. In addition, sometimes outcomes are not assessable, but are only there for extra context in the hierarchy. This identifies that the outcome cannot be mapped to content, nor can a student earn it.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomesetid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_sets table.&lt;br /&gt;
|-&lt;br /&gt;
| parentid&lt;br /&gt;
| int(10), indexed, default null&lt;br /&gt;
| Self referencing key. Identifies the parent outcome in the hierarchy.&lt;br /&gt;
|-&lt;br /&gt;
| idnumber&lt;br /&gt;
| varchar(255), unique index&lt;br /&gt;
| GUID that is auto-generated if missing. Generally on import, these are provided. This would be used to identify the outcome set during import or course restore.&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| varchar(255)&lt;br /&gt;
| The name of the outcome.&lt;br /&gt;
|-&lt;br /&gt;
| docnum&lt;br /&gt;
| varchar(255), default null, optional&lt;br /&gt;
| Field for tracking additional information on the outcome. EG: 2.3.A&lt;br /&gt;
|-&lt;br /&gt;
| description&lt;br /&gt;
| text, default null, optional&lt;br /&gt;
| The plain text description of the outcome.&lt;br /&gt;
|-&lt;br /&gt;
| assessable&lt;br /&gt;
| int(1)&lt;br /&gt;
| If set to 1, then the outcome is assessable and can be mapped to content. If set to 0, then the outcome is not assessable and cannot be mapped to content.&lt;br /&gt;
|-&lt;br /&gt;
| deleted&lt;br /&gt;
| int(1), default 0&lt;br /&gt;
| If the outcome has been deleted.&lt;br /&gt;
|-&lt;br /&gt;
| sortorder&lt;br /&gt;
| int(10)&lt;br /&gt;
| The sort order. This is 0-X for all outcomes that belong to the same outcome set.&lt;br /&gt;
|-&lt;br /&gt;
| timemodified&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time modified.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_metadata ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome&lt;br /&gt;
&lt;br /&gt;
Purpose: Represents additional meta information regarding outcomes. Only support for “Education Level” (K, 1, … 12, etc.) and “Subjects” (e.g. Math, English, etc.) will be available out of the box, but additional data points can be added later (which would need to be added to the UI). One outcome could have many meta values. For example: an outcome could be associated to many educational levels and subjects.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| varchar(255), indexed&lt;br /&gt;
| The name of the meta data.&lt;br /&gt;
|-&lt;br /&gt;
| value&lt;br /&gt;
| varchar(1333), indexed&lt;br /&gt;
| The value of the meta data.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_areas ==&lt;br /&gt;
&lt;br /&gt;
Relations: dynamic with core tables&lt;br /&gt;
&lt;br /&gt;
Purpose: This represents that a content item has been mapped to an outcome or to multiple outcomes. Check the outcome_area_outcomes table for the specific outcomes.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| component&lt;br /&gt;
| varchar(100), indexed&lt;br /&gt;
| The name of the component.&lt;br /&gt;
|-&lt;br /&gt;
| area&lt;br /&gt;
| varchar(50), default null, indexed, optional&lt;br /&gt;
| The name of the area. Used when a component has multiple items to associate to outcomes.&lt;br /&gt;
|-&lt;br /&gt;
| itemid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| The item ID.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_area_outcomes ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome, outcome_areas&lt;br /&gt;
&lt;br /&gt;
Purpose: This represents the one to many relationship of a single content item mapped to many outcomes.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomeareaid&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Foreign key to outcome_areas table.&lt;br /&gt;
|-&lt;br /&gt;
| deleted&lt;br /&gt;
| int(1), default 0&lt;br /&gt;
| Soft delete if the outcome was disassociated from the content. Note, if the content is actually deleted, then this association will be deleted.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_used_areas ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome_areas, course_modules&lt;br /&gt;
&lt;br /&gt;
Purpose: Associates an outcome content item with an activity. For example: a question is created in the site question bank and outcomes are associated to the question. Once that question is added to a Quiz then that association is stored in this table so the outcome system knows that the content item and its outcomes are in use.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| cmid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to course_modules table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomeareaid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_areas table.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_used_sets ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome_sets, course&lt;br /&gt;
&lt;br /&gt;
Purpose: Associates an outcome set with the course. Filtering of the outcome set is optionally allowed since outcome sets can span multiple educational levels and even subjects. Once an outcome set is mapped to the course, then the outcomes in the outcome set are available to be mapped to course content.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| courseid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to course table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomesetid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_sets table.&lt;br /&gt;
|-&lt;br /&gt;
| filter&lt;br /&gt;
| text, default null&lt;br /&gt;
| Some outcome sets span multiple education levels and subjects. So, when mapping an outcome set to a course, it may make sense to restrict the available outcomes to a specific education level(s) and/or subject(s). This information would be serialized into this field.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_attempts ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome_used_areas, user&lt;br /&gt;
&lt;br /&gt;
Purpose: Track a user attempt against a content item within a particular activity. The idea here is to aggregate attempt information so that the recommendation engines (detailed below) have an easily accessible data set to process. This does not mean however that recommendation engines are only limited to this data as one could mine for additional data where needed.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomeusedareaid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_used_areas table.&lt;br /&gt;
|-&lt;br /&gt;
| userid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table.&lt;br /&gt;
|-&lt;br /&gt;
| percentgrade&lt;br /&gt;
| float(10,5)&lt;br /&gt;
| Percent grade earned on this attempt.&lt;br /&gt;
|-&lt;br /&gt;
| mingrade&lt;br /&gt;
| float(10,5)&lt;br /&gt;
| The minimum possible grade.&lt;br /&gt;
|-&lt;br /&gt;
| maxgrade&lt;br /&gt;
| float(10,5)&lt;br /&gt;
| The maximum possible grade.&lt;br /&gt;
|-&lt;br /&gt;
| rawgrade&lt;br /&gt;
| float(10,5)&lt;br /&gt;
| The points earned, should be between the minimum and maximum grades.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_marks ==&lt;br /&gt;
&lt;br /&gt;
Relations: course, user, outcome&lt;br /&gt;
&lt;br /&gt;
Purpose: Graders will manually mark the student as having Met or Not Met an outcome. The recommendation engines will make a recommendation to the grader based on user attempts against content that has been mapped to the outcome.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| courseid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to course table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| userid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table. This is the user who is receiving the mark.&lt;br /&gt;
|-&lt;br /&gt;
| graderid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table. This is the user is doing the marking.&lt;br /&gt;
|-&lt;br /&gt;
| result&lt;br /&gt;
| int(2)&lt;br /&gt;
| 0 is not pass, 1 is pass, null is that no decision has been made yet.&lt;br /&gt;
|-&lt;br /&gt;
| timemodified&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time modified.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_marks_history ==&lt;br /&gt;
&lt;br /&gt;
Relations: course, user, outcome, outcome_marks&lt;br /&gt;
&lt;br /&gt;
Purpose: Keep track of past markings.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomemarkid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_marks table. Though the record could be missing from outcome_marks.&lt;br /&gt;
|-&lt;br /&gt;
| courseid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to course table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| userid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table. This is the user who is receiving the mark.&lt;br /&gt;
|-&lt;br /&gt;
| graderid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table. This is the user is doing the marking.&lt;br /&gt;
|-&lt;br /&gt;
| result&lt;br /&gt;
| int(2)&lt;br /&gt;
| 0 is not pass, 1 is pass, null is that no decision has been made yet.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_awards ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome, user&lt;br /&gt;
&lt;br /&gt;
Purpose: This preserves any outcomes earned by a student, regardless if the course is deleted or not.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| userid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Architecture =&lt;br /&gt;
&lt;br /&gt;
The outcome API, outcome administrative settings, outcome associations and other UIs that drives outcomes will be located inside of the top level outcome/ directory.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Models and repository mappers:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* outcome: Represents a single outcome&lt;br /&gt;
* outcome set: Represents a group of outcomes&lt;br /&gt;
* outcome content: An outcome association to content.&lt;br /&gt;
* outcome attempt: An attempt made against an outcome.&lt;br /&gt;
* outcome mark: A teacher marking an outcome against a user.&lt;br /&gt;
* outcome award: An awarded outcome at the site level.&lt;br /&gt;
&lt;br /&gt;
A repository mapper would include ways to store the model and ways to retrieve them in a re-usable and organized manner.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Collections:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
A group of models that you may take action on or filter. Example of a third party library that helps to manage collections: https://github.com/doctrine/collections&lt;br /&gt;
&lt;br /&gt;
Collections may or may not be used, but some possible collections would be the following:&lt;br /&gt;
&lt;br /&gt;
* outcomes&lt;br /&gt;
* outcome attempts&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;New mform elements:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
For most plugins, the process of associating an outcome would be done through a Moodle form. Proposing adding a new Moodle form element that can be added to a form to provide the necessary UI. An API for validating and saving the new mform element will be provided. In addition, the mform element will just be a wrapper around a well formed API that could be used on it’s own when other use cases present themselves.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;API for plugins&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Beyond the mform element, plugins may interact with outcomes in order to provide a richer integration. An API will be provided to assist with the following (not an exhaustive list):&lt;br /&gt;
&lt;br /&gt;
* A way to notify the outcome system that a content item is or is not being used within a course.&lt;br /&gt;
** Example: When a question is authored at the site level and then is actually used within a course, it must inform the outcome system that it is in use. This could potentially be done via events or just direct API calls at the appropriate times. Same goes for when a question is no longer used within a course.&lt;br /&gt;
* Record an attempt made against a content item.&lt;br /&gt;
** Examples: A question has been attempted or an assignment submission has been graded.&lt;br /&gt;
* A way to retrieve associated outcomes.&lt;br /&gt;
* A way to update, delete or otherwise modify the associated outcomes.&lt;br /&gt;
* A way to pick outcome associations (EG: what the mform element would do).&lt;br /&gt;
* A method of syncing up attempts against a content item. This would be used when associating an outcome on content that has already been graded/attempted.&lt;br /&gt;
* API to cleanup tables on course deletion.&lt;br /&gt;
&lt;br /&gt;
== Supported plugin type plugins ==&lt;br /&gt;
&lt;br /&gt;
This may sound a little odd, but basically the point of these plugins is to add support for a plugin type to the outcome system. These types would assist in interpreting outcome content associations. Examples:&lt;br /&gt;
&lt;br /&gt;
* Given an outcome association, please provide a link to the mapped content.&lt;br /&gt;
** For an activity, this would be a link to the module.&lt;br /&gt;
** For a grading form, a link to the grading instance.&lt;br /&gt;
** For a question, a link to the question instance in the question bank.&lt;br /&gt;
* What are all of the content items that have not been mapped?&lt;br /&gt;
** For activities, this would return instances that are not mapped.&lt;br /&gt;
** For grading form, this would return sub-plugin specific information, like criteria.&lt;br /&gt;
** For questions, this would return questions from the course question bank that are not mapped.&lt;br /&gt;
* May assist with automatic cleanup when the content is deleted.&lt;br /&gt;
* Also other meta data could be derived, like plugin type name.&lt;br /&gt;
&lt;br /&gt;
This plugin would live under outcome/support/ and would initially ship with support of the following plugin types:&lt;br /&gt;
&lt;br /&gt;
* mod&lt;br /&gt;
* qtype&lt;br /&gt;
* gradingform: note that this integration would be deeper in that each gradingform plugin would need to implement something in order to help interpret associations. The reason being is that outcomes are being associated to plugin specific content, instead of something generic like the grading instance.&lt;br /&gt;
&lt;br /&gt;
== Import and export plugins ==&lt;br /&gt;
&lt;br /&gt;
The outcome system would support the exporting of outcome sets. The first export plugin would be a very simple JSON export that is specific to Moodle itself. This would be used for moving custom outcomes from one Moodle site to another.&lt;br /&gt;
&lt;br /&gt;
The outcome system would support importing outcome sets. Initially, there would be support for importing outcomes from [http://asn.jesandco.org Achievement Standards Network (ASN)] ([http://standards.jesandco.org/wiki/ASN_Application_Profile Format Specification]) and importing the JSON export from above.&lt;br /&gt;
&lt;br /&gt;
Both of the outcomes import and export processes would be a plugin based, so other formats could be supported by creating new plugins. The import and export plugins would live under outcome/import/ and outcome/export/.&lt;br /&gt;
&lt;br /&gt;
== Recommendation engine plugins ==&lt;br /&gt;
&lt;br /&gt;
The outcome system would provide a way to recommend to a teacher whether a student should be marked as completing the outcome or not. These plugins should have full Moodle plugin support because they may need to listen to events, run crons, have DB tables, global settings, etc. These plugins would live under outcome/engine/. Recommendations would be generated on demand and stored in MUC.&lt;br /&gt;
&lt;br /&gt;
Initially, the only plugin would be a percentage based recommendation engine. It would be configurable for a specific threshold that would determine if an attempt against an outcome should be considered correct or incorrect. It would then process the outcome attempts to determine the recommendation.&lt;br /&gt;
&lt;br /&gt;
Recommendation engines should also be enabled or disabled at the site level. This would require a “Manage recommendation engines” section in the admin site settings.&lt;br /&gt;
&lt;br /&gt;
= Reporting =&lt;br /&gt;
&lt;br /&gt;
== Site ==&lt;br /&gt;
&lt;br /&gt;
The following reports:&lt;br /&gt;
&lt;br /&gt;
* Outcomes Coverage report - shows outcomes that have been mapped to content in the site.&lt;br /&gt;
* Outcomes Performance report - shows performance on outcomes at the site level. Optionally broken down by course.&lt;br /&gt;
&lt;br /&gt;
== Course ==&lt;br /&gt;
&lt;br /&gt;
The following reports:&lt;br /&gt;
&lt;br /&gt;
* Outcomes Coverage report - shows outcomes that have been mapped in this course.&lt;br /&gt;
* Outcomes: Unmapped Content report - shows content that is not mapped to an outcome.&lt;br /&gt;
* Outcomes Performance report - shows aggregated performance on outcomes in the course.&lt;br /&gt;
* Outcomes Student Performance report - shows student performance on outcomes in the course for the teacher.&lt;br /&gt;
* Outcomes Personal Performance report - shows student performance on outcomes in the course for the student.&lt;br /&gt;
&lt;br /&gt;
== User profile ==&lt;br /&gt;
&lt;br /&gt;
At the very least, there will be a user site report where the user can see earned outcomes.&lt;br /&gt;
&lt;br /&gt;
= Grading =&lt;br /&gt;
&lt;br /&gt;
Outcome Completion Marking is done by course graders and is the final check point for if a learner has earned an outcome or not. The proposed location is to use the Outcome tab that is currently in the grades section of the course. This would also highjack the Outcomes link under Grade administration and Course administration.&lt;br /&gt;
&lt;br /&gt;
= Logging =&lt;br /&gt;
&lt;br /&gt;
We want to audit most actions in the Moodle log. These actions include:&lt;br /&gt;
&lt;br /&gt;
* CRUD type actions.&lt;br /&gt;
* Any association editing. EG: associating an outcome with a course, content item, etc.&lt;br /&gt;
* Outcome marking.&lt;br /&gt;
* User attempts against outcomes.&lt;br /&gt;
&lt;br /&gt;
= Role capabilities =&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Description&lt;br /&gt;
! Capability&lt;br /&gt;
|-&lt;br /&gt;
| Map outcomes to content&lt;br /&gt;
| moodle/outcome:mapcontent&lt;br /&gt;
|-&lt;br /&gt;
| Map outcome sets to courses&lt;br /&gt;
| moodle/outcome:mapcourse&lt;br /&gt;
|-&lt;br /&gt;
| Administering outcomes (Editing site outcomes, etc)&lt;br /&gt;
| moodle/outcome:admin&lt;br /&gt;
|-&lt;br /&gt;
| Manage personal outcomes&lt;br /&gt;
| moodle/outcome:my&lt;br /&gt;
|-&lt;br /&gt;
| Export outcomes&lt;br /&gt;
| moodle/outcome:export&lt;br /&gt;
|-&lt;br /&gt;
| Import outcomes&lt;br /&gt;
| moodle/outcome:import&lt;br /&gt;
|-&lt;br /&gt;
| Each report will have a capability to view them.&lt;br /&gt;
| report/REPORTNAME:view&lt;br /&gt;
|-&lt;br /&gt;
| Marking outcomes by graders&lt;br /&gt;
| moodle/grade:edit&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Backup and restore =&lt;br /&gt;
&lt;br /&gt;
The workflow for backup and restore may go like:&lt;br /&gt;
&lt;br /&gt;
* Same site, then just map to existing outcomes via the identifier.&lt;br /&gt;
* Not same site, then the assumption is that the outcome set should be imported first, then we can map to existing outcomes via the identifier like in our same site scenario.&lt;br /&gt;
&lt;br /&gt;
Outcomes would probably take advantage of the backup plugin API to backup outcome associations to modules, question, etc. So, for example:&lt;br /&gt;
&lt;br /&gt;
* Outcomes would plug into activities in order to backup outcome associations and attempts.&lt;br /&gt;
* Outcomes would plug into questions in order to backup outcome associations and attempts.&lt;br /&gt;
* Grading forms would have to manually outcome associations and attempts. Will strive to make code re-usable.&lt;br /&gt;
&lt;br /&gt;
= Migration of old outcomes =&lt;br /&gt;
&lt;br /&gt;
Please first review [[Migration and Technical Issues]]. This still needs to be flushed out some more, but since the migration requires user interaction, we may need to create an admin tool to handle the migration. Until outcomes are migrated, it might make sense to continue to show the outcomes in the grade book, but remove the ability to do any editing of old outcomes.&lt;/div&gt;</summary>
		<author><name>Bushido</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=Outcomes_Technical_Specification&amp;diff=38380</id>
		<title>Outcomes Technical Specification</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=Outcomes_Technical_Specification&amp;diff=38380"/>
		<updated>2013-03-18T21:21:02Z</updated>

		<summary type="html">&lt;p&gt;Bushido: /* outcome_areas */ Reduced field size so an unique index on component, area and itemid could be created&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
&lt;br /&gt;
Please be familiar with the function specification as outlined in the [[Outcomes Specification]]. The functional specification will provide details about the concepts and goals of this project. In particular, the following sections provide the overview of the system by user role:&lt;br /&gt;
&lt;br /&gt;
* [[Outcomes Administrator Specification]]&lt;br /&gt;
* [[Outcomes Instructor Specification]]&lt;br /&gt;
* [[Outcomes Student Specification]]&lt;br /&gt;
&lt;br /&gt;
In addition, some features and use cases are known but not yet being implemented. Please see [[Specifically Excluded Use Cases]]. Specifically, this initial version will not be attempting to map an existing outcome set to a new version of the outcome set on import.&lt;br /&gt;
&lt;br /&gt;
This document attempts to capture how the functional specification would be implemented in Moodle.&lt;br /&gt;
&lt;br /&gt;
= Backwards compatibility breaks =&lt;br /&gt;
&lt;br /&gt;
First and foremost, it is important to identify key differences between the current outcome system and this proposal as there are some philosophical shifts as well as breaking of existing code.&lt;br /&gt;
&lt;br /&gt;
# Outcomes will now only be created at the site level and then mapped to courses and content. Outcomes will no longer be created at the course level.&lt;br /&gt;
# Anything using the current outcome API or tables will have to be updated to use the new outcomes when appropriate.&lt;br /&gt;
# Outcomes will no longer appear in the grade book.&lt;br /&gt;
# Outcomes will no longer support scales. It is just a simple pass or fail.&lt;br /&gt;
&lt;br /&gt;
These changes will be documented in the relevant change log files.&lt;br /&gt;
&lt;br /&gt;
= Settings =&lt;br /&gt;
&lt;br /&gt;
== Site ==&lt;br /&gt;
&lt;br /&gt;
At the site level, there will be an area to do all of the configuration and setup of outcome sets. The proposed location is under Settings &amp;gt; Site Administration &amp;gt; Grades &amp;gt; Outcomes.&lt;br /&gt;
&lt;br /&gt;
In addition to managing outcomes, there will be site settings page for general outcome settings. For example, a setting to toggle if outcome idnumbers are editable or not.&lt;br /&gt;
&lt;br /&gt;
== Course ==&lt;br /&gt;
&lt;br /&gt;
When editing a course, there will be a section to associate multiple outcome sets to the course. The section will appear below the course General settings.&lt;br /&gt;
&lt;br /&gt;
This association is used to determine the relevant outcomes for the course for reporting and as a way to pre-filter outcome pickers when associating outcomes to content.&lt;br /&gt;
&lt;br /&gt;
== Activity ==&lt;br /&gt;
&lt;br /&gt;
When editing an activity, there will be a section to associate individual outcomes to the activity. This section will be provided by the moodleform_mod::standard_coursemodule_elements() callback so that all activities will be able to be associated to outcomes automatically.  In the flow of the activity&#039;s form, the outcome mapping options would appear below the grades section.  Do note though that if an activity does not support grades, it can still be mapped to outcomes.&lt;br /&gt;
&lt;br /&gt;
Graded activities will have to add additional integration points with outcomes in order to capture user attempts.&lt;br /&gt;
&lt;br /&gt;
== Advanced grading ==&lt;br /&gt;
&lt;br /&gt;
Rubrics and Marking guides will be able to associate an outcome for a criteria. API will be provided to support this, but each grading method will have to integrate with outcomes where it makes sense.&lt;br /&gt;
&lt;br /&gt;
== Questions ==&lt;br /&gt;
&lt;br /&gt;
When editing a question, there will be a section to associate individual outcomes to the question. The section can be added to question_edit_form::definition() before the Tags section.&lt;br /&gt;
&lt;br /&gt;
This association UI might behave a little differently based on the context in Moodle. If the question is being authored at the site level, then the outcome association is more free form, meaning one can select any outcome from any outcome set. If the question is being authored at the course level, then the outcome association defaults to those outcome sets that are associated to the course.&lt;br /&gt;
&lt;br /&gt;
= Data structure =&lt;br /&gt;
&lt;br /&gt;
This diagram provides an overview of how the tables relate to each other and to core tables.  Please see the below sections for details about each table.&lt;br /&gt;
&lt;br /&gt;
[[File:Outcome_ERD.jpg|frame|center|Outcomes ERD]]&lt;br /&gt;
&lt;br /&gt;
== outcome_sets ==&lt;br /&gt;
&lt;br /&gt;
Relations: user&lt;br /&gt;
&lt;br /&gt;
Purpose: An outcome set represents a collection of outcomes and perhaps some meta data regarding the revision or applicable region. Outcome sets are mapped to courses, which makes the outcomes within the set available to be mapped to course content. An example outcome set would be [http://asn.jesandco.org/resources/D2403043 Health Education Content Standards for California Public Schools, Kindergarten Through Grade Twelve].  Instructors can create personal outcome sets that can be used in their courses.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| userid&lt;br /&gt;
| int(10), indexed, default null&lt;br /&gt;
| Foreign key to user table.  If set to a user&#039;s ID, then that user owns the outcome set and no one else can use or edit it besides admins.  This allows for instructors to create their own outcome sets for their courses.&lt;br /&gt;
|-&lt;br /&gt;
| idnumber&lt;br /&gt;
| varchar(255), unique index&lt;br /&gt;
| GUID that is auto-generated if missing. Generally on import, these are provided. This would be used to identify the outcome set during import or course restore.&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| varchar(255)&lt;br /&gt;
| The name of the outcome set&lt;br /&gt;
|-&lt;br /&gt;
| description&lt;br /&gt;
| text, default null, optional&lt;br /&gt;
| The plain text description of the outcome.&lt;br /&gt;
|-&lt;br /&gt;
| provider&lt;br /&gt;
| varchar(255), default null, optional&lt;br /&gt;
| Provider information regarding the outcome set. EG: Could be set to ASN.&lt;br /&gt;
|-&lt;br /&gt;
| revision&lt;br /&gt;
| varchar(255), default null, optional&lt;br /&gt;
| Version information regarding the outcome set. This will typically be a date or year, EG: 2011&lt;br /&gt;
|-&lt;br /&gt;
| region&lt;br /&gt;
| varchar(255), default null, optional&lt;br /&gt;
| Any region information. Example: In the US this could be a state name.&lt;br /&gt;
|-&lt;br /&gt;
| deleted&lt;br /&gt;
| int(1), default 0&lt;br /&gt;
| If the outcome set has been deleted.&lt;br /&gt;
|-&lt;br /&gt;
| timemodified&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time modified.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome_sets, outcome&lt;br /&gt;
&lt;br /&gt;
Purpose: Stores information regarding an individual outcome. Outcomes can be stored in a hierarchy, but the hierarchy is visual only. This means that if an outcome is earned, then only that outcome is earned, not it and all of its children. Also, if all child outcomes are earned, then parent outcomes are not also automatically earned. In addition, sometimes outcomes are not assessable, but are only there for extra context in the hierarchy. This identifies that the outcome cannot be mapped to content, nor can a student earn it.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomesetid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_sets table.&lt;br /&gt;
|-&lt;br /&gt;
| parentid&lt;br /&gt;
| int(10), indexed, default null&lt;br /&gt;
| Self referencing key. Identifies the parent outcome in the hierarchy.&lt;br /&gt;
|-&lt;br /&gt;
| idnumber&lt;br /&gt;
| varchar(255), unique index&lt;br /&gt;
| GUID that is auto-generated if missing. Generally on import, these are provided. This would be used to identify the outcome set during import or course restore.&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| varchar(255)&lt;br /&gt;
| The name of the outcome.&lt;br /&gt;
|-&lt;br /&gt;
| docnum&lt;br /&gt;
| varchar(255), default null, optional&lt;br /&gt;
| Field for tracking additional information on the outcome. EG: 2.3.A&lt;br /&gt;
|-&lt;br /&gt;
| description&lt;br /&gt;
| text, default null, optional&lt;br /&gt;
| The plain text description of the outcome.&lt;br /&gt;
|-&lt;br /&gt;
| assessable&lt;br /&gt;
| int(1)&lt;br /&gt;
| If set to 1, then the outcome is assessable and can be mapped to content. If set to 0, then the outcome is not assessable and cannot be mapped to content.&lt;br /&gt;
|-&lt;br /&gt;
| deleted&lt;br /&gt;
| int(1), default 0&lt;br /&gt;
| If the outcome has been deleted.&lt;br /&gt;
|-&lt;br /&gt;
| sortorder&lt;br /&gt;
| int(10)&lt;br /&gt;
| The sort order. This is 0-X for all outcomes that belong to the same outcome set.&lt;br /&gt;
|-&lt;br /&gt;
| timemodified&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time modified.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_metadata ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome&lt;br /&gt;
&lt;br /&gt;
Purpose: Represents additional meta information regarding outcomes. Only support for “Education Level” (K, 1, … 12, etc.) and “Subjects” (e.g. Math, English, etc.) will be available out of the box, but additional data points can be added later (which would need to be added to the UI). One outcome could have many meta values. For example: an outcome could be associated to many educational levels and subjects.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| varchar(255), indexed&lt;br /&gt;
| The name of the meta data.&lt;br /&gt;
|-&lt;br /&gt;
| value&lt;br /&gt;
| varchar(1333), indexed&lt;br /&gt;
| The value of the meta data.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_areas ==&lt;br /&gt;
&lt;br /&gt;
Relations: dynamic with core tables&lt;br /&gt;
&lt;br /&gt;
Purpose: This represents that a content item has been mapped to an outcome or to multiple outcomes. Check the outcome_area_outcomes table for the specific outcomes.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| component&lt;br /&gt;
| varchar(100), indexed&lt;br /&gt;
| The name of the component.&lt;br /&gt;
|-&lt;br /&gt;
| area&lt;br /&gt;
| varchar(50), default null, indexed, optional&lt;br /&gt;
| The name of the area. Used when a component has multiple items to associate to outcomes.&lt;br /&gt;
|-&lt;br /&gt;
| itemid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| The item ID.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_area_outcomes ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome, outcome_areas&lt;br /&gt;
&lt;br /&gt;
Purpose: This represents the one to many relationship of a single content item mapped to many outcomes.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomeareaid&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Foreign key to outcome_areas table.&lt;br /&gt;
|-&lt;br /&gt;
| deleted&lt;br /&gt;
| int(1), default 0&lt;br /&gt;
| Soft delete if the outcome was disassociated from the content. Note, if the content is actually deleted, then this association will be deleted.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_used_areas ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome_areas, course_modules&lt;br /&gt;
&lt;br /&gt;
Purpose: Associates an outcome content item with an activity. For example: a question is created in the site question bank and outcomes are associated to the question. Once that question is added to a Quiz then that association is stored in this table so the outcome system knows that the content item and its outcomes are in use.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| cmid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to course_modules table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomeareaid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_areas table.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_used_sets ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome_sets, course&lt;br /&gt;
&lt;br /&gt;
Purpose: Associates an outcome set with the course. Filtering of the outcome set is optionally allowed since outcome sets can span multiple educational levels and even subjects. Once an outcome set is mapped to the course, then the outcomes in the outcome set are available to be mapped to course content.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| courseid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to course table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomesetid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_sets table.&lt;br /&gt;
|-&lt;br /&gt;
| filter&lt;br /&gt;
| text, default null&lt;br /&gt;
| Some outcome sets span multiple education levels and subjects. So, when mapping an outcome set to a course, it may make sense to restrict the available outcomes to a specific education level(s) and/or subject(s). This information would be serialized into this field.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_attempts ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome_used_areas, user&lt;br /&gt;
&lt;br /&gt;
Purpose: Track a user attempt against a content item within a particular activity. The idea here is to aggregate attempt information so that the recommendation engines (detailed below) have an easily accessible data set to process. This does not mean however that recommendation engines are only limited to this data as one could mine for additional data where needed.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomeusedareaid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_used_areas table.&lt;br /&gt;
|-&lt;br /&gt;
| userid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table.&lt;br /&gt;
|-&lt;br /&gt;
| percentgrade&lt;br /&gt;
| float(10,5)&lt;br /&gt;
| Percent grade earned on this attempt.&lt;br /&gt;
|-&lt;br /&gt;
| mingrade&lt;br /&gt;
| float(10,5)&lt;br /&gt;
| The minimum possible grade.&lt;br /&gt;
|-&lt;br /&gt;
| maxgrade&lt;br /&gt;
| float(10,5)&lt;br /&gt;
| The maximum possible grade.&lt;br /&gt;
|-&lt;br /&gt;
| rawgrade&lt;br /&gt;
| float(10,5)&lt;br /&gt;
| The points earned, should be between the minimum and maximum grades.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_marks ==&lt;br /&gt;
&lt;br /&gt;
Relations: course, user, outcome&lt;br /&gt;
&lt;br /&gt;
Purpose: Graders will manually mark the student as having Met or Not Met an outcome. The recommendation engines will make a recommendation to the grader based on user attempts against content that has been mapped to the outcome.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| courseid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to course table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| userid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table. This is the user who is receiving the mark.&lt;br /&gt;
|-&lt;br /&gt;
| graderid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table. This is the user is doing the marking.&lt;br /&gt;
|-&lt;br /&gt;
| result&lt;br /&gt;
| int(2)&lt;br /&gt;
| 0 is not pass, 1 is pass, null is that no decision has been made yet.&lt;br /&gt;
|-&lt;br /&gt;
| timemodified&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time modified.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_marks_history ==&lt;br /&gt;
&lt;br /&gt;
Relations: course, user, outcome, outcome_marks&lt;br /&gt;
&lt;br /&gt;
Purpose: Keep track of past markings.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomemarkid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_marks table. Though the record could be missing from outcome_marks.&lt;br /&gt;
|-&lt;br /&gt;
| courseid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to course table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| userid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table. This is the user who is receiving the mark.&lt;br /&gt;
|-&lt;br /&gt;
| graderid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table. This is the user is doing the marking.&lt;br /&gt;
|-&lt;br /&gt;
| result&lt;br /&gt;
| int(2)&lt;br /&gt;
| 0 is not pass, 1 is pass, null is that no decision has been made yet.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_awards ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome, user&lt;br /&gt;
&lt;br /&gt;
Purpose: This preserves any outcomes earned by a student, regardless if the course is deleted or not.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| userid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Architecture =&lt;br /&gt;
&lt;br /&gt;
The outcome API, outcome administrative settings, outcome associations and other UIs that drives outcomes will be located inside of the top level outcome/ directory.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Models and repository mappers:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* outcome: Represents a single outcome&lt;br /&gt;
* outcome set: Represents a group of outcomes&lt;br /&gt;
* outcome content: An outcome association to content.&lt;br /&gt;
* outcome attempt: An attempt made against an outcome.&lt;br /&gt;
* outcome mark: A teacher marking an outcome against a user.&lt;br /&gt;
* outcome award: An awarded outcome at the site level.&lt;br /&gt;
&lt;br /&gt;
A repository mapper would include ways to store the model and ways to retrieve them in a re-usable and organized manner.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Collections:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
A group of models that you may take action on or filter. Example of a third party library that helps to manage collections: https://github.com/doctrine/collections&lt;br /&gt;
&lt;br /&gt;
Collections may or may not be used, but some possible collections would be the following:&lt;br /&gt;
&lt;br /&gt;
* outcomes&lt;br /&gt;
* outcome attempts&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;New mform elements:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
For most plugins, the process of associating an outcome would be done through a Moodle form. Proposing adding a new Moodle form element that can be added to a form to provide the necessary UI. An API for validating and saving the new mform element will be provided. In addition, the mform element will just be a wrapper around a well formed API that could be used on it’s own when other use cases present themselves.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;API for plugins&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Beyond the mform element, plugins may interact with outcomes in order to provide a richer integration. An API will be provided to assist with the following (not an exhaustive list):&lt;br /&gt;
&lt;br /&gt;
* A way to notify the outcome system that a content item is or is not being used within a course.&lt;br /&gt;
** Example: When a question is authored at the site level and then is actually used within a course, it must inform the outcome system that it is in use. This could potentially be done via events or just direct API calls at the appropriate times. Same goes for when a question is no longer used within a course.&lt;br /&gt;
* Record an attempt made against a content item.&lt;br /&gt;
** Examples: A question has been attempted or an assignment submission has been graded.&lt;br /&gt;
* A way to retrieve associated outcomes.&lt;br /&gt;
* A way to update, delete or otherwise modify the associated outcomes.&lt;br /&gt;
* A way to pick outcome associations (EG: what the mform element would do).&lt;br /&gt;
* A method of syncing up attempts against a content item. This would be used when associating an outcome on content that has already been graded/attempted.&lt;br /&gt;
* API to cleanup tables on course deletion.&lt;br /&gt;
&lt;br /&gt;
== Supported plugin type plugins ==&lt;br /&gt;
&lt;br /&gt;
This may sound a little odd, but basically the point of these plugins is to add support for a plugin type to the outcome system. These types would assist in interpreting outcome content associations. Examples:&lt;br /&gt;
&lt;br /&gt;
* Given an outcome association, please provide a link to the mapped content.&lt;br /&gt;
** For an activity, this would be a link to the module.&lt;br /&gt;
** For a grading form, a link to the grading instance.&lt;br /&gt;
** For a question, a link to the question instance in the question bank.&lt;br /&gt;
* What are all of the content items that have not been mapped?&lt;br /&gt;
** For activities, this would return instances that are not mapped.&lt;br /&gt;
** For grading form, this would return sub-plugin specific information, like criteria.&lt;br /&gt;
** For questions, this would return questions from the course question bank that are not mapped.&lt;br /&gt;
* May assist with automatic cleanup when the content is deleted.&lt;br /&gt;
* Also other meta data could be derived, like plugin type name.&lt;br /&gt;
&lt;br /&gt;
This plugin would live under outcome/support/ and would initially ship with support of the following plugin types:&lt;br /&gt;
&lt;br /&gt;
* mod&lt;br /&gt;
* qtype&lt;br /&gt;
* gradingform: note that this integration would be deeper in that each gradingform plugin would need to implement something in order to help interpret associations. The reason being is that outcomes are being associated to plugin specific content, instead of something generic like the grading instance.&lt;br /&gt;
&lt;br /&gt;
== Import and export plugins ==&lt;br /&gt;
&lt;br /&gt;
The outcome system would support the exporting of outcome sets. The first export plugin would be a very simple JSON export that is specific to Moodle itself. This would be used for moving custom outcomes from one Moodle site to another.&lt;br /&gt;
&lt;br /&gt;
The outcome system would support importing outcome sets. Initially, there would be support for importing outcomes from [http://asn.jesandco.org Achievement Standards Network (ASN)] ([http://standards.jesandco.org/wiki/ASN_Application_Profile Format Specification]) and importing the JSON export from above.&lt;br /&gt;
&lt;br /&gt;
Both of the outcomes import and export processes would be a plugin based, so other formats could be supported by creating new plugins. The import and export plugins would live under outcome/import/ and outcome/export/.&lt;br /&gt;
&lt;br /&gt;
== Recommendation engine plugins ==&lt;br /&gt;
&lt;br /&gt;
The outcome system would provide a way to recommend to a teacher whether a student should be marked as completing the outcome or not. These plugins should have full Moodle plugin support because they may need to listen to events, run crons, have DB tables, global settings, etc. These plugins would live under outcome/engine/. Recommendations would be generated on demand and stored in MUC.&lt;br /&gt;
&lt;br /&gt;
Initially, the only plugin would be a percentage based recommendation engine. It would be configurable for a specific threshold that would determine if an attempt against an outcome should be considered correct or incorrect. It would then process the outcome attempts to determine the recommendation.&lt;br /&gt;
&lt;br /&gt;
Recommendation engines should also be enabled or disabled at the site level. This would require a “Manage recommendation engines” section in the admin site settings.&lt;br /&gt;
&lt;br /&gt;
= Reporting =&lt;br /&gt;
&lt;br /&gt;
== Site ==&lt;br /&gt;
&lt;br /&gt;
The following reports:&lt;br /&gt;
&lt;br /&gt;
* Outcomes Coverage report - shows outcomes that have been mapped to content in the site.&lt;br /&gt;
* Outcomes Performance report - shows performance on outcomes at the site level. Optionally broken down by course.&lt;br /&gt;
&lt;br /&gt;
== Course ==&lt;br /&gt;
&lt;br /&gt;
The following reports:&lt;br /&gt;
&lt;br /&gt;
* Outcomes Coverage report - shows outcomes that have been mapped in this course.&lt;br /&gt;
* Outcomes: Unmapped Content report - shows content that is not mapped to an outcome.&lt;br /&gt;
* Outcomes Performance report - shows aggregated performance on outcomes in the course.&lt;br /&gt;
* Outcomes Student Performance report - shows student performance on outcomes in the course for the teacher.&lt;br /&gt;
* Outcomes Personal Performance report - shows student performance on outcomes in the course for the student.&lt;br /&gt;
&lt;br /&gt;
== User profile ==&lt;br /&gt;
&lt;br /&gt;
At the very least, there will be a user site report where the user can see earned outcomes.&lt;br /&gt;
&lt;br /&gt;
= Grading =&lt;br /&gt;
&lt;br /&gt;
Outcome Completion Marking is done by course graders and is the final check point for if a learner has earned an outcome or not. The proposed location is to use the Outcome tab that is currently in the grades section of the course. This would also highjack the Outcomes link under Grade administration and Course administration.&lt;br /&gt;
&lt;br /&gt;
= Logging =&lt;br /&gt;
&lt;br /&gt;
We want to audit most actions in the Moodle log. These actions include:&lt;br /&gt;
&lt;br /&gt;
* CRUD type actions.&lt;br /&gt;
* Any association editing. EG: associating an outcome with a course, content item, etc.&lt;br /&gt;
* Outcome marking.&lt;br /&gt;
* User attempts against outcomes.&lt;br /&gt;
&lt;br /&gt;
= Role capabilities =&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Description&lt;br /&gt;
! Capability&lt;br /&gt;
|-&lt;br /&gt;
| Map outcomes to content&lt;br /&gt;
| moodle/outcome:contentmap&lt;br /&gt;
|-&lt;br /&gt;
| Map outcome sets to courses&lt;br /&gt;
| moodle/outcome:coursemap&lt;br /&gt;
|-&lt;br /&gt;
| Administering outcomes (Editing, importing, etc)&lt;br /&gt;
| moodle/outcome:edit&lt;br /&gt;
|-&lt;br /&gt;
| Each report will have a capability to view them.&lt;br /&gt;
| report/REPORTNAME:view&lt;br /&gt;
|-&lt;br /&gt;
| Marking outcomes by graders&lt;br /&gt;
| moodle/grade:edit&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Backup and restore =&lt;br /&gt;
&lt;br /&gt;
The workflow for backup and restore may go like:&lt;br /&gt;
&lt;br /&gt;
* Same site, then just map to existing outcomes via the identifier.&lt;br /&gt;
* Not same site, then the assumption is that the outcome set should be imported first, then we can map to existing outcomes via the identifier like in our same site scenario.&lt;br /&gt;
&lt;br /&gt;
Outcomes would probably take advantage of the backup plugin API to backup outcome associations to modules, question, etc. So, for example:&lt;br /&gt;
&lt;br /&gt;
* Outcomes would plug into activities in order to backup outcome associations and attempts.&lt;br /&gt;
* Outcomes would plug into questions in order to backup outcome associations and attempts.&lt;br /&gt;
* Grading forms would have to manually outcome associations and attempts. Will strive to make code re-usable.&lt;br /&gt;
&lt;br /&gt;
= Migration of old outcomes =&lt;br /&gt;
&lt;br /&gt;
Please first review [[Migration and Technical Issues]]. This still needs to be flushed out some more, but since the migration requires user interaction, we may need to create an admin tool to handle the migration. Until outcomes are migrated, it might make sense to continue to show the outcomes in the grade book, but remove the ability to do any editing of old outcomes.&lt;/div&gt;</summary>
		<author><name>Bushido</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=Outcomes_Technical_Specification&amp;diff=38377</id>
		<title>Outcomes Technical Specification</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=Outcomes_Technical_Specification&amp;diff=38377"/>
		<updated>2013-03-18T18:26:43Z</updated>

		<summary type="html">&lt;p&gt;Bushido: /* Data structure */ Moving outcome_areas.deleted to outcome_area_outcomes&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
&lt;br /&gt;
Please be familiar with the function specification as outlined in the [[Outcomes Specification]]. The functional specification will provide details about the concepts and goals of this project. In particular, the following sections provide the overview of the system by user role:&lt;br /&gt;
&lt;br /&gt;
* [[Outcomes Administrator Specification]]&lt;br /&gt;
* [[Outcomes Instructor Specification]]&lt;br /&gt;
* [[Outcomes Student Specification]]&lt;br /&gt;
&lt;br /&gt;
In addition, some features and use cases are known but not yet being implemented. Please see [[Specifically Excluded Use Cases]]. Specifically, this initial version will not be attempting to map an existing outcome set to a new version of the outcome set on import.&lt;br /&gt;
&lt;br /&gt;
This document attempts to capture how the functional specification would be implemented in Moodle.&lt;br /&gt;
&lt;br /&gt;
= Backwards compatibility breaks =&lt;br /&gt;
&lt;br /&gt;
First and foremost, it is important to identify key differences between the current outcome system and this proposal as there are some philosophical shifts as well as breaking of existing code.&lt;br /&gt;
&lt;br /&gt;
# Outcomes will now only be created at the site level and then mapped to courses and content. Outcomes will no longer be created at the course level.&lt;br /&gt;
# Anything using the current outcome API or tables will have to be updated to use the new outcomes when appropriate.&lt;br /&gt;
# Outcomes will no longer appear in the grade book.&lt;br /&gt;
# Outcomes will no longer support scales. It is just a simple pass or fail.&lt;br /&gt;
&lt;br /&gt;
These changes will be documented in the relevant change log files.&lt;br /&gt;
&lt;br /&gt;
= Settings =&lt;br /&gt;
&lt;br /&gt;
== Site ==&lt;br /&gt;
&lt;br /&gt;
At the site level, there will be an area to do all of the configuration and setup of outcome sets. The proposed location is under Settings &amp;gt; Site Administration &amp;gt; Grades &amp;gt; Outcomes.&lt;br /&gt;
&lt;br /&gt;
In addition to managing outcomes, there will be site settings page for general outcome settings. For example, a setting to toggle if outcome idnumbers are editable or not.&lt;br /&gt;
&lt;br /&gt;
== Course ==&lt;br /&gt;
&lt;br /&gt;
When editing a course, there will be a section to associate multiple outcome sets to the course. The section will appear below the course General settings.&lt;br /&gt;
&lt;br /&gt;
This association is used to determine the relevant outcomes for the course for reporting and as a way to pre-filter outcome pickers when associating outcomes to content.&lt;br /&gt;
&lt;br /&gt;
== Activity ==&lt;br /&gt;
&lt;br /&gt;
When editing an activity, there will be a section to associate individual outcomes to the activity. This section will be provided by the moodleform_mod::standard_coursemodule_elements() callback so that all activities will be able to be associated to outcomes automatically.  In the flow of the activity&#039;s form, the outcome mapping options would appear below the grades section.  Do note though that if an activity does not support grades, it can still be mapped to outcomes.&lt;br /&gt;
&lt;br /&gt;
Graded activities will have to add additional integration points with outcomes in order to capture user attempts.&lt;br /&gt;
&lt;br /&gt;
== Advanced grading ==&lt;br /&gt;
&lt;br /&gt;
Rubrics and Marking guides will be able to associate an outcome for a criteria. API will be provided to support this, but each grading method will have to integrate with outcomes where it makes sense.&lt;br /&gt;
&lt;br /&gt;
== Questions ==&lt;br /&gt;
&lt;br /&gt;
When editing a question, there will be a section to associate individual outcomes to the question. The section can be added to question_edit_form::definition() before the Tags section.&lt;br /&gt;
&lt;br /&gt;
This association UI might behave a little differently based on the context in Moodle. If the question is being authored at the site level, then the outcome association is more free form, meaning one can select any outcome from any outcome set. If the question is being authored at the course level, then the outcome association defaults to those outcome sets that are associated to the course.&lt;br /&gt;
&lt;br /&gt;
= Data structure =&lt;br /&gt;
&lt;br /&gt;
This diagram provides an overview of how the tables relate to each other and to core tables.  Please see the below sections for details about each table.&lt;br /&gt;
&lt;br /&gt;
[[File:Outcome_ERD.jpg|frame|center|Outcomes ERD]]&lt;br /&gt;
&lt;br /&gt;
== outcome_sets ==&lt;br /&gt;
&lt;br /&gt;
Relations: user&lt;br /&gt;
&lt;br /&gt;
Purpose: An outcome set represents a collection of outcomes and perhaps some meta data regarding the revision or applicable region. Outcome sets are mapped to courses, which makes the outcomes within the set available to be mapped to course content. An example outcome set would be [http://asn.jesandco.org/resources/D2403043 Health Education Content Standards for California Public Schools, Kindergarten Through Grade Twelve].  Instructors can create personal outcome sets that can be used in their courses.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| userid&lt;br /&gt;
| int(10), indexed, default null&lt;br /&gt;
| Foreign key to user table.  If set to a user&#039;s ID, then that user owns the outcome set and no one else can use or edit it besides admins.  This allows for instructors to create their own outcome sets for their courses.&lt;br /&gt;
|-&lt;br /&gt;
| idnumber&lt;br /&gt;
| varchar(255), unique index&lt;br /&gt;
| GUID that is auto-generated if missing. Generally on import, these are provided. This would be used to identify the outcome set during import or course restore.&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| varchar(255)&lt;br /&gt;
| The name of the outcome set&lt;br /&gt;
|-&lt;br /&gt;
| description&lt;br /&gt;
| text, default null, optional&lt;br /&gt;
| The plain text description of the outcome.&lt;br /&gt;
|-&lt;br /&gt;
| provider&lt;br /&gt;
| varchar(255), default null, optional&lt;br /&gt;
| Provider information regarding the outcome set. EG: Could be set to ASN.&lt;br /&gt;
|-&lt;br /&gt;
| revision&lt;br /&gt;
| varchar(255), default null, optional&lt;br /&gt;
| Version information regarding the outcome set. This will typically be a date or year, EG: 2011&lt;br /&gt;
|-&lt;br /&gt;
| region&lt;br /&gt;
| varchar(255), default null, optional&lt;br /&gt;
| Any region information. Example: In the US this could be a state name.&lt;br /&gt;
|-&lt;br /&gt;
| deleted&lt;br /&gt;
| int(1), default 0&lt;br /&gt;
| If the outcome set has been deleted.&lt;br /&gt;
|-&lt;br /&gt;
| timemodified&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time modified.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome_sets, outcome&lt;br /&gt;
&lt;br /&gt;
Purpose: Stores information regarding an individual outcome. Outcomes can be stored in a hierarchy, but the hierarchy is visual only. This means that if an outcome is earned, then only that outcome is earned, not it and all of its children. Also, if all child outcomes are earned, then parent outcomes are not also automatically earned. In addition, sometimes outcomes are not assessable, but are only there for extra context in the hierarchy. This identifies that the outcome cannot be mapped to content, nor can a student earn it.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomesetid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_sets table.&lt;br /&gt;
|-&lt;br /&gt;
| parentid&lt;br /&gt;
| int(10), indexed, default null&lt;br /&gt;
| Self referencing key. Identifies the parent outcome in the hierarchy.&lt;br /&gt;
|-&lt;br /&gt;
| idnumber&lt;br /&gt;
| varchar(255), unique index&lt;br /&gt;
| GUID that is auto-generated if missing. Generally on import, these are provided. This would be used to identify the outcome set during import or course restore.&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| varchar(255)&lt;br /&gt;
| The name of the outcome.&lt;br /&gt;
|-&lt;br /&gt;
| docnum&lt;br /&gt;
| varchar(255), default null, optional&lt;br /&gt;
| Field for tracking additional information on the outcome. EG: 2.3.A&lt;br /&gt;
|-&lt;br /&gt;
| description&lt;br /&gt;
| text, default null, optional&lt;br /&gt;
| The plain text description of the outcome.&lt;br /&gt;
|-&lt;br /&gt;
| assessable&lt;br /&gt;
| int(1)&lt;br /&gt;
| If set to 1, then the outcome is assessable and can be mapped to content. If set to 0, then the outcome is not assessable and cannot be mapped to content.&lt;br /&gt;
|-&lt;br /&gt;
| deleted&lt;br /&gt;
| int(1), default 0&lt;br /&gt;
| If the outcome has been deleted.&lt;br /&gt;
|-&lt;br /&gt;
| sortorder&lt;br /&gt;
| int(10)&lt;br /&gt;
| The sort order. This is 0-X for all outcomes that belong to the same outcome set.&lt;br /&gt;
|-&lt;br /&gt;
| timemodified&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time modified.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_metadata ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome&lt;br /&gt;
&lt;br /&gt;
Purpose: Represents additional meta information regarding outcomes. Only support for “Education Level” (K, 1, … 12, etc.) and “Subjects” (e.g. Math, English, etc.) will be available out of the box, but additional data points can be added later (which would need to be added to the UI). One outcome could have many meta values. For example: an outcome could be associated to many educational levels and subjects.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| varchar(255), indexed&lt;br /&gt;
| The name of the meta data.&lt;br /&gt;
|-&lt;br /&gt;
| value&lt;br /&gt;
| varchar(1333), indexed&lt;br /&gt;
| The value of the meta data.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_areas ==&lt;br /&gt;
&lt;br /&gt;
Relations: dynamic with core tables&lt;br /&gt;
&lt;br /&gt;
Purpose: This represents that a content item has been mapped to an outcome or to multiple outcomes. Check the outcome_area_outcomes table for the specific outcomes.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| component&lt;br /&gt;
| varchar(255), indexed&lt;br /&gt;
| The name of the component.&lt;br /&gt;
|-&lt;br /&gt;
| area&lt;br /&gt;
| varchar(255), default null, indexed, optional&lt;br /&gt;
| The name of the area. Used when a component has multiple items to associate to outcomes.&lt;br /&gt;
|-&lt;br /&gt;
| itemid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| The item ID.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_area_outcomes ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome, outcome_areas&lt;br /&gt;
&lt;br /&gt;
Purpose: This represents the one to many relationship of a single content item mapped to many outcomes.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomeareaid&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Foreign key to outcome_areas table.&lt;br /&gt;
|-&lt;br /&gt;
| deleted&lt;br /&gt;
| int(1), default 0&lt;br /&gt;
| Soft delete if the outcome was disassociated from the content. Note, if the content is actually deleted, then this association will be deleted.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_used_areas ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome_areas, course_modules&lt;br /&gt;
&lt;br /&gt;
Purpose: Associates an outcome content item with an activity. For example: a question is created in the site question bank and outcomes are associated to the question. Once that question is added to a Quiz then that association is stored in this table so the outcome system knows that the content item and its outcomes are in use.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| cmid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to course_modules table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomeareaid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_areas table.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_used_sets ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome_sets, course&lt;br /&gt;
&lt;br /&gt;
Purpose: Associates an outcome set with the course. Filtering of the outcome set is optionally allowed since outcome sets can span multiple educational levels and even subjects. Once an outcome set is mapped to the course, then the outcomes in the outcome set are available to be mapped to course content.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| courseid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to course table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomesetid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_sets table.&lt;br /&gt;
|-&lt;br /&gt;
| filter&lt;br /&gt;
| text, default null&lt;br /&gt;
| Some outcome sets span multiple education levels and subjects. So, when mapping an outcome set to a course, it may make sense to restrict the available outcomes to a specific education level(s) and/or subject(s). This information would be serialized into this field.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_attempts ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome_used_areas, user&lt;br /&gt;
&lt;br /&gt;
Purpose: Track a user attempt against a content item within a particular activity. The idea here is to aggregate attempt information so that the recommendation engines (detailed below) have an easily accessible data set to process. This does not mean however that recommendation engines are only limited to this data as one could mine for additional data where needed.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomeusedareaid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_used_areas table.&lt;br /&gt;
|-&lt;br /&gt;
| userid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table.&lt;br /&gt;
|-&lt;br /&gt;
| percentgrade&lt;br /&gt;
| float(10,5)&lt;br /&gt;
| Percent grade earned on this attempt.&lt;br /&gt;
|-&lt;br /&gt;
| mingrade&lt;br /&gt;
| float(10,5)&lt;br /&gt;
| The minimum possible grade.&lt;br /&gt;
|-&lt;br /&gt;
| maxgrade&lt;br /&gt;
| float(10,5)&lt;br /&gt;
| The maximum possible grade.&lt;br /&gt;
|-&lt;br /&gt;
| rawgrade&lt;br /&gt;
| float(10,5)&lt;br /&gt;
| The points earned, should be between the minimum and maximum grades.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_marks ==&lt;br /&gt;
&lt;br /&gt;
Relations: course, user, outcome&lt;br /&gt;
&lt;br /&gt;
Purpose: Graders will manually mark the student as having Met or Not Met an outcome. The recommendation engines will make a recommendation to the grader based on user attempts against content that has been mapped to the outcome.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| courseid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to course table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| userid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table. This is the user who is receiving the mark.&lt;br /&gt;
|-&lt;br /&gt;
| graderid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table. This is the user is doing the marking.&lt;br /&gt;
|-&lt;br /&gt;
| result&lt;br /&gt;
| int(2)&lt;br /&gt;
| 0 is not pass, 1 is pass, null is that no decision has been made yet.&lt;br /&gt;
|-&lt;br /&gt;
| timemodified&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time modified.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_marks_history ==&lt;br /&gt;
&lt;br /&gt;
Relations: course, user, outcome, outcome_marks&lt;br /&gt;
&lt;br /&gt;
Purpose: Keep track of past markings.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomemarkid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_marks table. Though the record could be missing from outcome_marks.&lt;br /&gt;
|-&lt;br /&gt;
| courseid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to course table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| userid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table. This is the user who is receiving the mark.&lt;br /&gt;
|-&lt;br /&gt;
| graderid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table. This is the user is doing the marking.&lt;br /&gt;
|-&lt;br /&gt;
| result&lt;br /&gt;
| int(2)&lt;br /&gt;
| 0 is not pass, 1 is pass, null is that no decision has been made yet.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_awards ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome, user&lt;br /&gt;
&lt;br /&gt;
Purpose: This preserves any outcomes earned by a student, regardless if the course is deleted or not.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| userid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Architecture =&lt;br /&gt;
&lt;br /&gt;
The outcome API, outcome administrative settings, outcome associations and other UIs that drives outcomes will be located inside of the top level outcome/ directory.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Models and repository mappers:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* outcome: Represents a single outcome&lt;br /&gt;
* outcome set: Represents a group of outcomes&lt;br /&gt;
* outcome content: An outcome association to content.&lt;br /&gt;
* outcome attempt: An attempt made against an outcome.&lt;br /&gt;
* outcome mark: A teacher marking an outcome against a user.&lt;br /&gt;
* outcome award: An awarded outcome at the site level.&lt;br /&gt;
&lt;br /&gt;
A repository mapper would include ways to store the model and ways to retrieve them in a re-usable and organized manner.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Collections:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
A group of models that you may take action on or filter. Example of a third party library that helps to manage collections: https://github.com/doctrine/collections&lt;br /&gt;
&lt;br /&gt;
Collections may or may not be used, but some possible collections would be the following:&lt;br /&gt;
&lt;br /&gt;
* outcomes&lt;br /&gt;
* outcome attempts&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;New mform elements:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
For most plugins, the process of associating an outcome would be done through a Moodle form. Proposing adding a new Moodle form element that can be added to a form to provide the necessary UI. An API for validating and saving the new mform element will be provided. In addition, the mform element will just be a wrapper around a well formed API that could be used on it’s own when other use cases present themselves.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;API for plugins&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Beyond the mform element, plugins may interact with outcomes in order to provide a richer integration. An API will be provided to assist with the following (not an exhaustive list):&lt;br /&gt;
&lt;br /&gt;
* A way to notify the outcome system that a content item is or is not being used within a course.&lt;br /&gt;
** Example: When a question is authored at the site level and then is actually used within a course, it must inform the outcome system that it is in use. This could potentially be done via events or just direct API calls at the appropriate times. Same goes for when a question is no longer used within a course.&lt;br /&gt;
* Record an attempt made against a content item.&lt;br /&gt;
** Examples: A question has been attempted or an assignment submission has been graded.&lt;br /&gt;
* A way to retrieve associated outcomes.&lt;br /&gt;
* A way to update, delete or otherwise modify the associated outcomes.&lt;br /&gt;
* A way to pick outcome associations (EG: what the mform element would do).&lt;br /&gt;
* A method of syncing up attempts against a content item. This would be used when associating an outcome on content that has already been graded/attempted.&lt;br /&gt;
* API to cleanup tables on course deletion.&lt;br /&gt;
&lt;br /&gt;
== Supported plugin type plugins ==&lt;br /&gt;
&lt;br /&gt;
This may sound a little odd, but basically the point of these plugins is to add support for a plugin type to the outcome system. These types would assist in interpreting outcome content associations. Examples:&lt;br /&gt;
&lt;br /&gt;
* Given an outcome association, please provide a link to the mapped content.&lt;br /&gt;
** For an activity, this would be a link to the module.&lt;br /&gt;
** For a grading form, a link to the grading instance.&lt;br /&gt;
** For a question, a link to the question instance in the question bank.&lt;br /&gt;
* What are all of the content items that have not been mapped?&lt;br /&gt;
** For activities, this would return instances that are not mapped.&lt;br /&gt;
** For grading form, this would return sub-plugin specific information, like criteria.&lt;br /&gt;
** For questions, this would return questions from the course question bank that are not mapped.&lt;br /&gt;
* May assist with automatic cleanup when the content is deleted.&lt;br /&gt;
* Also other meta data could be derived, like plugin type name.&lt;br /&gt;
&lt;br /&gt;
This plugin would live under outcome/support/ and would initially ship with support of the following plugin types:&lt;br /&gt;
&lt;br /&gt;
* mod&lt;br /&gt;
* qtype&lt;br /&gt;
* gradingform: note that this integration would be deeper in that each gradingform plugin would need to implement something in order to help interpret associations. The reason being is that outcomes are being associated to plugin specific content, instead of something generic like the grading instance.&lt;br /&gt;
&lt;br /&gt;
== Import and export plugins ==&lt;br /&gt;
&lt;br /&gt;
The outcome system would support the exporting of outcome sets. The first export plugin would be a very simple JSON export that is specific to Moodle itself. This would be used for moving custom outcomes from one Moodle site to another.&lt;br /&gt;
&lt;br /&gt;
The outcome system would support importing outcome sets. Initially, there would be support for importing outcomes from [http://asn.jesandco.org Achievement Standards Network (ASN)] ([http://standards.jesandco.org/wiki/ASN_Application_Profile Format Specification]) and importing the JSON export from above.&lt;br /&gt;
&lt;br /&gt;
Both of the outcomes import and export processes would be a plugin based, so other formats could be supported by creating new plugins. The import and export plugins would live under outcome/import/ and outcome/export/.&lt;br /&gt;
&lt;br /&gt;
== Recommendation engine plugins ==&lt;br /&gt;
&lt;br /&gt;
The outcome system would provide a way to recommend to a teacher whether a student should be marked as completing the outcome or not. These plugins should have full Moodle plugin support because they may need to listen to events, run crons, have DB tables, global settings, etc. These plugins would live under outcome/engine/. Recommendations would be generated on demand and stored in MUC.&lt;br /&gt;
&lt;br /&gt;
Initially, the only plugin would be a percentage based recommendation engine. It would be configurable for a specific threshold that would determine if an attempt against an outcome should be considered correct or incorrect. It would then process the outcome attempts to determine the recommendation.&lt;br /&gt;
&lt;br /&gt;
Recommendation engines should also be enabled or disabled at the site level. This would require a “Manage recommendation engines” section in the admin site settings.&lt;br /&gt;
&lt;br /&gt;
= Reporting =&lt;br /&gt;
&lt;br /&gt;
== Site ==&lt;br /&gt;
&lt;br /&gt;
The following reports:&lt;br /&gt;
&lt;br /&gt;
* Outcomes Coverage report - shows outcomes that have been mapped to content in the site.&lt;br /&gt;
* Outcomes Performance report - shows performance on outcomes at the site level. Optionally broken down by course.&lt;br /&gt;
&lt;br /&gt;
== Course ==&lt;br /&gt;
&lt;br /&gt;
The following reports:&lt;br /&gt;
&lt;br /&gt;
* Outcomes Coverage report - shows outcomes that have been mapped in this course.&lt;br /&gt;
* Outcomes: Unmapped Content report - shows content that is not mapped to an outcome.&lt;br /&gt;
* Outcomes Performance report - shows aggregated performance on outcomes in the course.&lt;br /&gt;
* Outcomes Student Performance report - shows student performance on outcomes in the course for the teacher.&lt;br /&gt;
* Outcomes Personal Performance report - shows student performance on outcomes in the course for the student.&lt;br /&gt;
&lt;br /&gt;
== User profile ==&lt;br /&gt;
&lt;br /&gt;
At the very least, there will be a user site report where the user can see earned outcomes.&lt;br /&gt;
&lt;br /&gt;
= Grading =&lt;br /&gt;
&lt;br /&gt;
Outcome Completion Marking is done by course graders and is the final check point for if a learner has earned an outcome or not. The proposed location is to use the Outcome tab that is currently in the grades section of the course. This would also highjack the Outcomes link under Grade administration and Course administration.&lt;br /&gt;
&lt;br /&gt;
= Logging =&lt;br /&gt;
&lt;br /&gt;
We want to audit most actions in the Moodle log. These actions include:&lt;br /&gt;
&lt;br /&gt;
* CRUD type actions.&lt;br /&gt;
* Any association editing. EG: associating an outcome with a course, content item, etc.&lt;br /&gt;
* Outcome marking.&lt;br /&gt;
* User attempts against outcomes.&lt;br /&gt;
&lt;br /&gt;
= Role capabilities =&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Description&lt;br /&gt;
! Capability&lt;br /&gt;
|-&lt;br /&gt;
| Map outcomes to content&lt;br /&gt;
| moodle/outcome:contentmap&lt;br /&gt;
|-&lt;br /&gt;
| Map outcome sets to courses&lt;br /&gt;
| moodle/outcome:coursemap&lt;br /&gt;
|-&lt;br /&gt;
| Administering outcomes (Editing, importing, etc)&lt;br /&gt;
| moodle/outcome:edit&lt;br /&gt;
|-&lt;br /&gt;
| Each report will have a capability to view them.&lt;br /&gt;
| report/REPORTNAME:view&lt;br /&gt;
|-&lt;br /&gt;
| Marking outcomes by graders&lt;br /&gt;
| moodle/grade:edit&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Backup and restore =&lt;br /&gt;
&lt;br /&gt;
The workflow for backup and restore may go like:&lt;br /&gt;
&lt;br /&gt;
* Same site, then just map to existing outcomes via the identifier.&lt;br /&gt;
* Not same site, then the assumption is that the outcome set should be imported first, then we can map to existing outcomes via the identifier like in our same site scenario.&lt;br /&gt;
&lt;br /&gt;
Outcomes would probably take advantage of the backup plugin API to backup outcome associations to modules, question, etc. So, for example:&lt;br /&gt;
&lt;br /&gt;
* Outcomes would plug into activities in order to backup outcome associations and attempts.&lt;br /&gt;
* Outcomes would plug into questions in order to backup outcome associations and attempts.&lt;br /&gt;
* Grading forms would have to manually outcome associations and attempts. Will strive to make code re-usable.&lt;br /&gt;
&lt;br /&gt;
= Migration of old outcomes =&lt;br /&gt;
&lt;br /&gt;
Please first review [[Migration and Technical Issues]]. This still needs to be flushed out some more, but since the migration requires user interaction, we may need to create an admin tool to handle the migration. Until outcomes are migrated, it might make sense to continue to show the outcomes in the grade book, but remove the ability to do any editing of old outcomes.&lt;/div&gt;</summary>
		<author><name>Bushido</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=Outcomes_Technical_Specification&amp;diff=38375</id>
		<title>Outcomes Technical Specification</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=Outcomes_Technical_Specification&amp;diff=38375"/>
		<updated>2013-03-18T16:47:17Z</updated>

		<summary type="html">&lt;p&gt;Bushido: /* Backwards compatibility breaks */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
&lt;br /&gt;
Please be familiar with the function specification as outlined in the [[Outcomes Specification]]. The functional specification will provide details about the concepts and goals of this project. In particular, the following sections provide the overview of the system by user role:&lt;br /&gt;
&lt;br /&gt;
* [[Outcomes Administrator Specification]]&lt;br /&gt;
* [[Outcomes Instructor Specification]]&lt;br /&gt;
* [[Outcomes Student Specification]]&lt;br /&gt;
&lt;br /&gt;
In addition, some features and use cases are known but not yet being implemented. Please see [[Specifically Excluded Use Cases]]. Specifically, this initial version will not be attempting to map an existing outcome set to a new version of the outcome set on import.&lt;br /&gt;
&lt;br /&gt;
This document attempts to capture how the functional specification would be implemented in Moodle.&lt;br /&gt;
&lt;br /&gt;
= Backwards compatibility breaks =&lt;br /&gt;
&lt;br /&gt;
First and foremost, it is important to identify key differences between the current outcome system and this proposal as there are some philosophical shifts as well as breaking of existing code.&lt;br /&gt;
&lt;br /&gt;
# Outcomes will now only be created at the site level and then mapped to courses and content. Outcomes will no longer be created at the course level.&lt;br /&gt;
# Anything using the current outcome API or tables will have to be updated to use the new outcomes when appropriate.&lt;br /&gt;
# Outcomes will no longer appear in the grade book.&lt;br /&gt;
# Outcomes will no longer support scales. It is just a simple pass or fail.&lt;br /&gt;
&lt;br /&gt;
These changes will be documented in the relevant change log files.&lt;br /&gt;
&lt;br /&gt;
= Settings =&lt;br /&gt;
&lt;br /&gt;
== Site ==&lt;br /&gt;
&lt;br /&gt;
At the site level, there will be an area to do all of the configuration and setup of outcome sets. The proposed location is under Settings &amp;gt; Site Administration &amp;gt; Grades &amp;gt; Outcomes.&lt;br /&gt;
&lt;br /&gt;
In addition to managing outcomes, there will be site settings page for general outcome settings. For example, a setting to toggle if outcome idnumbers are editable or not.&lt;br /&gt;
&lt;br /&gt;
== Course ==&lt;br /&gt;
&lt;br /&gt;
When editing a course, there will be a section to associate multiple outcome sets to the course. The section will appear below the course General settings.&lt;br /&gt;
&lt;br /&gt;
This association is used to determine the relevant outcomes for the course for reporting and as a way to pre-filter outcome pickers when associating outcomes to content.&lt;br /&gt;
&lt;br /&gt;
== Activity ==&lt;br /&gt;
&lt;br /&gt;
When editing an activity, there will be a section to associate individual outcomes to the activity. This section will be provided by the moodleform_mod::standard_coursemodule_elements() callback so that all activities will be able to be associated to outcomes automatically.  In the flow of the activity&#039;s form, the outcome mapping options would appear below the grades section.  Do note though that if an activity does not support grades, it can still be mapped to outcomes.&lt;br /&gt;
&lt;br /&gt;
Graded activities will have to add additional integration points with outcomes in order to capture user attempts.&lt;br /&gt;
&lt;br /&gt;
== Advanced grading ==&lt;br /&gt;
&lt;br /&gt;
Rubrics and Marking guides will be able to associate an outcome for a criteria. API will be provided to support this, but each grading method will have to integrate with outcomes where it makes sense.&lt;br /&gt;
&lt;br /&gt;
== Questions ==&lt;br /&gt;
&lt;br /&gt;
When editing a question, there will be a section to associate individual outcomes to the question. The section can be added to question_edit_form::definition() before the Tags section.&lt;br /&gt;
&lt;br /&gt;
This association UI might behave a little differently based on the context in Moodle. If the question is being authored at the site level, then the outcome association is more free form, meaning one can select any outcome from any outcome set. If the question is being authored at the course level, then the outcome association defaults to those outcome sets that are associated to the course.&lt;br /&gt;
&lt;br /&gt;
= Data structure =&lt;br /&gt;
&lt;br /&gt;
This diagram provides an overview of how the tables relate to each other and to core tables.  Please see the below sections for details about each table.&lt;br /&gt;
&lt;br /&gt;
[[File:Outcome_ERD.jpg|frame|center|Outcomes ERD]]&lt;br /&gt;
&lt;br /&gt;
== outcome_sets ==&lt;br /&gt;
&lt;br /&gt;
Relations: user&lt;br /&gt;
&lt;br /&gt;
Purpose: An outcome set represents a collection of outcomes and perhaps some meta data regarding the revision or applicable region. Outcome sets are mapped to courses, which makes the outcomes within the set available to be mapped to course content. An example outcome set would be [http://asn.jesandco.org/resources/D2403043 Health Education Content Standards for California Public Schools, Kindergarten Through Grade Twelve].  Instructors can create personal outcome sets that can be used in their courses.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| userid&lt;br /&gt;
| int(10), indexed, default null&lt;br /&gt;
| Foreign key to user table.  If set to a user&#039;s ID, then that user owns the outcome set and no one else can use or edit it besides admins.  This allows for instructors to create their own outcome sets for their courses.&lt;br /&gt;
|-&lt;br /&gt;
| idnumber&lt;br /&gt;
| varchar(255), unique index&lt;br /&gt;
| GUID that is auto-generated if missing. Generally on import, these are provided. This would be used to identify the outcome set during import or course restore.&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| varchar(255)&lt;br /&gt;
| The name of the outcome set&lt;br /&gt;
|-&lt;br /&gt;
| description&lt;br /&gt;
| text, default null, optional&lt;br /&gt;
| The plain text description of the outcome.&lt;br /&gt;
|-&lt;br /&gt;
| provider&lt;br /&gt;
| varchar(255), default null, optional&lt;br /&gt;
| Provider information regarding the outcome set. EG: Could be set to ASN.&lt;br /&gt;
|-&lt;br /&gt;
| revision&lt;br /&gt;
| varchar(255), default null, optional&lt;br /&gt;
| Version information regarding the outcome set. This will typically be a date or year, EG: 2011&lt;br /&gt;
|-&lt;br /&gt;
| region&lt;br /&gt;
| varchar(255), default null, optional&lt;br /&gt;
| Any region information. Example: In the US this could be a state name.&lt;br /&gt;
|-&lt;br /&gt;
| deleted&lt;br /&gt;
| int(1), default 0&lt;br /&gt;
| If the outcome set has been deleted.&lt;br /&gt;
|-&lt;br /&gt;
| timemodified&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time modified.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome_sets, outcome&lt;br /&gt;
&lt;br /&gt;
Purpose: Stores information regarding an individual outcome. Outcomes can be stored in a hierarchy, but the hierarchy is visual only. This means that if an outcome is earned, then only that outcome is earned, not it and all of its children. Also, if all child outcomes are earned, then parent outcomes are not also automatically earned. In addition, sometimes outcomes are not assessable, but are only there for extra context in the hierarchy. This identifies that the outcome cannot be mapped to content, nor can a student earn it.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomesetid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_sets table.&lt;br /&gt;
|-&lt;br /&gt;
| parentid&lt;br /&gt;
| int(10), indexed, default null&lt;br /&gt;
| Self referencing key. Identifies the parent outcome in the hierarchy.&lt;br /&gt;
|-&lt;br /&gt;
| idnumber&lt;br /&gt;
| varchar(255), unique index&lt;br /&gt;
| GUID that is auto-generated if missing. Generally on import, these are provided. This would be used to identify the outcome set during import or course restore.&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| varchar(255)&lt;br /&gt;
| The name of the outcome.&lt;br /&gt;
|-&lt;br /&gt;
| docnum&lt;br /&gt;
| varchar(255), default null, optional&lt;br /&gt;
| Field for tracking additional information on the outcome. EG: 2.3.A&lt;br /&gt;
|-&lt;br /&gt;
| description&lt;br /&gt;
| text, default null, optional&lt;br /&gt;
| The plain text description of the outcome.&lt;br /&gt;
|-&lt;br /&gt;
| assessable&lt;br /&gt;
| int(1)&lt;br /&gt;
| If set to 1, then the outcome is assessable and can be mapped to content. If set to 0, then the outcome is not assessable and cannot be mapped to content.&lt;br /&gt;
|-&lt;br /&gt;
| deleted&lt;br /&gt;
| int(1), default 0&lt;br /&gt;
| If the outcome has been deleted.&lt;br /&gt;
|-&lt;br /&gt;
| sortorder&lt;br /&gt;
| int(10)&lt;br /&gt;
| The sort order. This is 0-X for all outcomes that belong to the same outcome set.&lt;br /&gt;
|-&lt;br /&gt;
| timemodified&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time modified.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_metadata ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome&lt;br /&gt;
&lt;br /&gt;
Purpose: Represents additional meta information regarding outcomes. Only support for “Education Level” (K, 1, … 12, etc.) and “Subjects” (e.g. Math, English, etc.) will be available out of the box, but additional data points can be added later (which would need to be added to the UI). One outcome could have many meta values. For example: an outcome could be associated to many educational levels and subjects.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| varchar(255), indexed&lt;br /&gt;
| The name of the meta data.&lt;br /&gt;
|-&lt;br /&gt;
| value&lt;br /&gt;
| varchar(1333), indexed&lt;br /&gt;
| The value of the meta data.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_areas ==&lt;br /&gt;
&lt;br /&gt;
Relations: dynamic with core tables&lt;br /&gt;
&lt;br /&gt;
Purpose: This represents that a content item has been mapped to an outcome or to multiple outcomes. Check the outcome_area_outcomes table for the specific outcomes.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| component&lt;br /&gt;
| varchar(255), indexed&lt;br /&gt;
| The name of the component.&lt;br /&gt;
|-&lt;br /&gt;
| area&lt;br /&gt;
| varchar(255), default null, indexed, optional&lt;br /&gt;
| The name of the area. Used when a component has multiple items to associate to outcomes.&lt;br /&gt;
|-&lt;br /&gt;
| itemid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| The item ID.&lt;br /&gt;
|-&lt;br /&gt;
| deleted&lt;br /&gt;
| int(1), default 0&lt;br /&gt;
| Soft delete if the outcome was disassociated from the content. Note, if the content is actually deleted, then this association will be deleted.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_area_outcomes ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome, outcome_areas&lt;br /&gt;
&lt;br /&gt;
Purpose: This represents the one to many relationship of a single content item mapped to many outcomes.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomeareaid&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Foreign key to outcome_areas table.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_used_areas ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome_areas, course_modules&lt;br /&gt;
&lt;br /&gt;
Purpose: Associates an outcome content item with an activity. For example: a question is created in the site question bank and outcomes are associated to the question. Once that question is added to a Quiz then that association is stored in this table so the outcome system knows that the content item and its outcomes are in use.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| cmid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to course_modules table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomeareaid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_areas table.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_used_sets ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome_sets, course&lt;br /&gt;
&lt;br /&gt;
Purpose: Associates an outcome set with the course. Filtering of the outcome set is optionally allowed since outcome sets can span multiple educational levels and even subjects. Once an outcome set is mapped to the course, then the outcomes in the outcome set are available to be mapped to course content.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| courseid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to course table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomesetid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_sets table.&lt;br /&gt;
|-&lt;br /&gt;
| filter&lt;br /&gt;
| text, default null&lt;br /&gt;
| Some outcome sets span multiple education levels and subjects. So, when mapping an outcome set to a course, it may make sense to restrict the available outcomes to a specific education level(s) and/or subject(s). This information would be serialized into this field.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_attempts ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome_used_areas, user&lt;br /&gt;
&lt;br /&gt;
Purpose: Track a user attempt against a content item within a particular activity. The idea here is to aggregate attempt information so that the recommendation engines (detailed below) have an easily accessible data set to process. This does not mean however that recommendation engines are only limited to this data as one could mine for additional data where needed.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomeusedareaid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_used_areas table.&lt;br /&gt;
|-&lt;br /&gt;
| userid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table.&lt;br /&gt;
|-&lt;br /&gt;
| percentgrade&lt;br /&gt;
| float(10,5)&lt;br /&gt;
| Percent grade earned on this attempt.&lt;br /&gt;
|-&lt;br /&gt;
| mingrade&lt;br /&gt;
| float(10,5)&lt;br /&gt;
| The minimum possible grade.&lt;br /&gt;
|-&lt;br /&gt;
| maxgrade&lt;br /&gt;
| float(10,5)&lt;br /&gt;
| The maximum possible grade.&lt;br /&gt;
|-&lt;br /&gt;
| rawgrade&lt;br /&gt;
| float(10,5)&lt;br /&gt;
| The points earned, should be between the minimum and maximum grades.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_marks ==&lt;br /&gt;
&lt;br /&gt;
Relations: course, user, outcome&lt;br /&gt;
&lt;br /&gt;
Purpose: Graders will manually mark the student as having Met or Not Met an outcome. The recommendation engines will make a recommendation to the grader based on user attempts against content that has been mapped to the outcome.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| courseid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to course table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| userid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table. This is the user who is receiving the mark.&lt;br /&gt;
|-&lt;br /&gt;
| graderid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table. This is the user is doing the marking.&lt;br /&gt;
|-&lt;br /&gt;
| result&lt;br /&gt;
| int(2)&lt;br /&gt;
| 0 is not pass, 1 is pass, null is that no decision has been made yet.&lt;br /&gt;
|-&lt;br /&gt;
| timemodified&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time modified.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_marks_history ==&lt;br /&gt;
&lt;br /&gt;
Relations: course, user, outcome, outcome_marks&lt;br /&gt;
&lt;br /&gt;
Purpose: Keep track of past markings.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomemarkid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_marks table. Though the record could be missing from outcome_marks.&lt;br /&gt;
|-&lt;br /&gt;
| courseid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to course table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| userid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table. This is the user who is receiving the mark.&lt;br /&gt;
|-&lt;br /&gt;
| graderid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table. This is the user is doing the marking.&lt;br /&gt;
|-&lt;br /&gt;
| result&lt;br /&gt;
| int(2)&lt;br /&gt;
| 0 is not pass, 1 is pass, null is that no decision has been made yet.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_awards ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome, user&lt;br /&gt;
&lt;br /&gt;
Purpose: This preserves any outcomes earned by a student, regardless if the course is deleted or not.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| userid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Architecture =&lt;br /&gt;
&lt;br /&gt;
The outcome API, outcome administrative settings, outcome associations and other UIs that drives outcomes will be located inside of the top level outcome/ directory.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Models and repository mappers:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* outcome: Represents a single outcome&lt;br /&gt;
* outcome set: Represents a group of outcomes&lt;br /&gt;
* outcome content: An outcome association to content.&lt;br /&gt;
* outcome attempt: An attempt made against an outcome.&lt;br /&gt;
* outcome mark: A teacher marking an outcome against a user.&lt;br /&gt;
* outcome award: An awarded outcome at the site level.&lt;br /&gt;
&lt;br /&gt;
A repository mapper would include ways to store the model and ways to retrieve them in a re-usable and organized manner.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Collections:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
A group of models that you may take action on or filter. Example of a third party library that helps to manage collections: https://github.com/doctrine/collections&lt;br /&gt;
&lt;br /&gt;
Collections may or may not be used, but some possible collections would be the following:&lt;br /&gt;
&lt;br /&gt;
* outcomes&lt;br /&gt;
* outcome attempts&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;New mform elements:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
For most plugins, the process of associating an outcome would be done through a Moodle form. Proposing adding a new Moodle form element that can be added to a form to provide the necessary UI. An API for validating and saving the new mform element will be provided. In addition, the mform element will just be a wrapper around a well formed API that could be used on it’s own when other use cases present themselves.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;API for plugins&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Beyond the mform element, plugins may interact with outcomes in order to provide a richer integration. An API will be provided to assist with the following (not an exhaustive list):&lt;br /&gt;
&lt;br /&gt;
* A way to notify the outcome system that a content item is or is not being used within a course.&lt;br /&gt;
** Example: When a question is authored at the site level and then is actually used within a course, it must inform the outcome system that it is in use. This could potentially be done via events or just direct API calls at the appropriate times. Same goes for when a question is no longer used within a course.&lt;br /&gt;
* Record an attempt made against a content item.&lt;br /&gt;
** Examples: A question has been attempted or an assignment submission has been graded.&lt;br /&gt;
* A way to retrieve associated outcomes.&lt;br /&gt;
* A way to update, delete or otherwise modify the associated outcomes.&lt;br /&gt;
* A way to pick outcome associations (EG: what the mform element would do).&lt;br /&gt;
* A method of syncing up attempts against a content item. This would be used when associating an outcome on content that has already been graded/attempted.&lt;br /&gt;
* API to cleanup tables on course deletion.&lt;br /&gt;
&lt;br /&gt;
== Supported plugin type plugins ==&lt;br /&gt;
&lt;br /&gt;
This may sound a little odd, but basically the point of these plugins is to add support for a plugin type to the outcome system. These types would assist in interpreting outcome content associations. Examples:&lt;br /&gt;
&lt;br /&gt;
* Given an outcome association, please provide a link to the mapped content.&lt;br /&gt;
** For an activity, this would be a link to the module.&lt;br /&gt;
** For a grading form, a link to the grading instance.&lt;br /&gt;
** For a question, a link to the question instance in the question bank.&lt;br /&gt;
* What are all of the content items that have not been mapped?&lt;br /&gt;
** For activities, this would return instances that are not mapped.&lt;br /&gt;
** For grading form, this would return sub-plugin specific information, like criteria.&lt;br /&gt;
** For questions, this would return questions from the course question bank that are not mapped.&lt;br /&gt;
* May assist with automatic cleanup when the content is deleted.&lt;br /&gt;
* Also other meta data could be derived, like plugin type name.&lt;br /&gt;
&lt;br /&gt;
This plugin would live under outcome/support/ and would initially ship with support of the following plugin types:&lt;br /&gt;
&lt;br /&gt;
* mod&lt;br /&gt;
* qtype&lt;br /&gt;
* gradingform: note that this integration would be deeper in that each gradingform plugin would need to implement something in order to help interpret associations. The reason being is that outcomes are being associated to plugin specific content, instead of something generic like the grading instance.&lt;br /&gt;
&lt;br /&gt;
== Import and export plugins ==&lt;br /&gt;
&lt;br /&gt;
The outcome system would support the exporting of outcome sets. The first export plugin would be a very simple JSON export that is specific to Moodle itself. This would be used for moving custom outcomes from one Moodle site to another.&lt;br /&gt;
&lt;br /&gt;
The outcome system would support importing outcome sets. Initially, there would be support for importing outcomes from [http://asn.jesandco.org Achievement Standards Network (ASN)] ([http://standards.jesandco.org/wiki/ASN_Application_Profile Format Specification]) and importing the JSON export from above.&lt;br /&gt;
&lt;br /&gt;
Both of the outcomes import and export processes would be a plugin based, so other formats could be supported by creating new plugins. The import and export plugins would live under outcome/import/ and outcome/export/.&lt;br /&gt;
&lt;br /&gt;
== Recommendation engine plugins ==&lt;br /&gt;
&lt;br /&gt;
The outcome system would provide a way to recommend to a teacher whether a student should be marked as completing the outcome or not. These plugins should have full Moodle plugin support because they may need to listen to events, run crons, have DB tables, global settings, etc. These plugins would live under outcome/engine/. Recommendations would be generated on demand and stored in MUC.&lt;br /&gt;
&lt;br /&gt;
Initially, the only plugin would be a percentage based recommendation engine. It would be configurable for a specific threshold that would determine if an attempt against an outcome should be considered correct or incorrect. It would then process the outcome attempts to determine the recommendation.&lt;br /&gt;
&lt;br /&gt;
Recommendation engines should also be enabled or disabled at the site level. This would require a “Manage recommendation engines” section in the admin site settings.&lt;br /&gt;
&lt;br /&gt;
= Reporting =&lt;br /&gt;
&lt;br /&gt;
== Site ==&lt;br /&gt;
&lt;br /&gt;
The following reports:&lt;br /&gt;
&lt;br /&gt;
* Outcomes Coverage report - shows outcomes that have been mapped to content in the site.&lt;br /&gt;
* Outcomes Performance report - shows performance on outcomes at the site level. Optionally broken down by course.&lt;br /&gt;
&lt;br /&gt;
== Course ==&lt;br /&gt;
&lt;br /&gt;
The following reports:&lt;br /&gt;
&lt;br /&gt;
* Outcomes Coverage report - shows outcomes that have been mapped in this course.&lt;br /&gt;
* Outcomes: Unmapped Content report - shows content that is not mapped to an outcome.&lt;br /&gt;
* Outcomes Performance report - shows aggregated performance on outcomes in the course.&lt;br /&gt;
* Outcomes Student Performance report - shows student performance on outcomes in the course for the teacher.&lt;br /&gt;
* Outcomes Personal Performance report - shows student performance on outcomes in the course for the student.&lt;br /&gt;
&lt;br /&gt;
== User profile ==&lt;br /&gt;
&lt;br /&gt;
At the very least, there will be a user site report where the user can see earned outcomes.&lt;br /&gt;
&lt;br /&gt;
= Grading =&lt;br /&gt;
&lt;br /&gt;
Outcome Completion Marking is done by course graders and is the final check point for if a learner has earned an outcome or not. The proposed location is to use the Outcome tab that is currently in the grades section of the course. This would also highjack the Outcomes link under Grade administration and Course administration.&lt;br /&gt;
&lt;br /&gt;
= Logging =&lt;br /&gt;
&lt;br /&gt;
We want to audit most actions in the Moodle log. These actions include:&lt;br /&gt;
&lt;br /&gt;
* CRUD type actions.&lt;br /&gt;
* Any association editing. EG: associating an outcome with a course, content item, etc.&lt;br /&gt;
* Outcome marking.&lt;br /&gt;
* User attempts against outcomes.&lt;br /&gt;
&lt;br /&gt;
= Role capabilities =&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Description&lt;br /&gt;
! Capability&lt;br /&gt;
|-&lt;br /&gt;
| Map outcomes to content&lt;br /&gt;
| moodle/outcome:contentmap&lt;br /&gt;
|-&lt;br /&gt;
| Map outcome sets to courses&lt;br /&gt;
| moodle/outcome:coursemap&lt;br /&gt;
|-&lt;br /&gt;
| Administering outcomes (Editing, importing, etc)&lt;br /&gt;
| moodle/outcome:edit&lt;br /&gt;
|-&lt;br /&gt;
| Each report will have a capability to view them.&lt;br /&gt;
| report/REPORTNAME:view&lt;br /&gt;
|-&lt;br /&gt;
| Marking outcomes by graders&lt;br /&gt;
| moodle/grade:edit&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Backup and restore =&lt;br /&gt;
&lt;br /&gt;
The workflow for backup and restore may go like:&lt;br /&gt;
&lt;br /&gt;
* Same site, then just map to existing outcomes via the identifier.&lt;br /&gt;
* Not same site, then the assumption is that the outcome set should be imported first, then we can map to existing outcomes via the identifier like in our same site scenario.&lt;br /&gt;
&lt;br /&gt;
Outcomes would probably take advantage of the backup plugin API to backup outcome associations to modules, question, etc. So, for example:&lt;br /&gt;
&lt;br /&gt;
* Outcomes would plug into activities in order to backup outcome associations and attempts.&lt;br /&gt;
* Outcomes would plug into questions in order to backup outcome associations and attempts.&lt;br /&gt;
* Grading forms would have to manually outcome associations and attempts. Will strive to make code re-usable.&lt;br /&gt;
&lt;br /&gt;
= Migration of old outcomes =&lt;br /&gt;
&lt;br /&gt;
Please first review [[Migration and Technical Issues]]. This still needs to be flushed out some more, but since the migration requires user interaction, we may need to create an admin tool to handle the migration. Until outcomes are migrated, it might make sense to continue to show the outcomes in the grade book, but remove the ability to do any editing of old outcomes.&lt;/div&gt;</summary>
		<author><name>Bushido</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=Outcomes_Technical_Specification&amp;diff=38374</id>
		<title>Outcomes Technical Specification</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=Outcomes_Technical_Specification&amp;diff=38374"/>
		<updated>2013-03-18T16:38:58Z</updated>

		<summary type="html">&lt;p&gt;Bushido: /* Data structure */ Fixing default on foreign key fields&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
&lt;br /&gt;
Please be familiar with the function specification as outlined in the [[Outcomes Specification]]. The functional specification will provide details about the concepts and goals of this project. In particular, the following sections provide the overview of the system by user role:&lt;br /&gt;
&lt;br /&gt;
* [[Outcomes Administrator Specification]]&lt;br /&gt;
* [[Outcomes Instructor Specification]]&lt;br /&gt;
* [[Outcomes Student Specification]]&lt;br /&gt;
&lt;br /&gt;
In addition, some features and use cases are known but not yet being implemented. Please see [[Specifically Excluded Use Cases]]. Specifically, this initial version will not be attempting to map an existing outcome set to a new version of the outcome set on import.&lt;br /&gt;
&lt;br /&gt;
This document attempts to capture how the functional specification would be implemented in Moodle.&lt;br /&gt;
&lt;br /&gt;
= Backwards compatibility breaks =&lt;br /&gt;
&lt;br /&gt;
First and foremost, it is important to identify key differences between the current outcome system and this proposal as there are some philosophical shifts as well as breaking of existing code.&lt;br /&gt;
&lt;br /&gt;
# Outcomes will now only be created at the site level and then mapped to courses and content. Outcomes will no longer be created at the course level.&lt;br /&gt;
# Anything using the current outcome API or tables will have to be updated to use the new outcomes when appropriate.&lt;br /&gt;
# Outcomes will no longer appear in the grade book.&lt;br /&gt;
# Outcomes will no longer support scales. It is just a simple pass or fail.&lt;br /&gt;
&lt;br /&gt;
= Settings =&lt;br /&gt;
&lt;br /&gt;
== Site ==&lt;br /&gt;
&lt;br /&gt;
At the site level, there will be an area to do all of the configuration and setup of outcome sets. The proposed location is under Settings &amp;gt; Site Administration &amp;gt; Grades &amp;gt; Outcomes.&lt;br /&gt;
&lt;br /&gt;
In addition to managing outcomes, there will be site settings page for general outcome settings. For example, a setting to toggle if outcome idnumbers are editable or not.&lt;br /&gt;
&lt;br /&gt;
== Course ==&lt;br /&gt;
&lt;br /&gt;
When editing a course, there will be a section to associate multiple outcome sets to the course. The section will appear below the course General settings.&lt;br /&gt;
&lt;br /&gt;
This association is used to determine the relevant outcomes for the course for reporting and as a way to pre-filter outcome pickers when associating outcomes to content.&lt;br /&gt;
&lt;br /&gt;
== Activity ==&lt;br /&gt;
&lt;br /&gt;
When editing an activity, there will be a section to associate individual outcomes to the activity. This section will be provided by the moodleform_mod::standard_coursemodule_elements() callback so that all activities will be able to be associated to outcomes automatically.  In the flow of the activity&#039;s form, the outcome mapping options would appear below the grades section.  Do note though that if an activity does not support grades, it can still be mapped to outcomes.&lt;br /&gt;
&lt;br /&gt;
Graded activities will have to add additional integration points with outcomes in order to capture user attempts.&lt;br /&gt;
&lt;br /&gt;
== Advanced grading ==&lt;br /&gt;
&lt;br /&gt;
Rubrics and Marking guides will be able to associate an outcome for a criteria. API will be provided to support this, but each grading method will have to integrate with outcomes where it makes sense.&lt;br /&gt;
&lt;br /&gt;
== Questions ==&lt;br /&gt;
&lt;br /&gt;
When editing a question, there will be a section to associate individual outcomes to the question. The section can be added to question_edit_form::definition() before the Tags section.&lt;br /&gt;
&lt;br /&gt;
This association UI might behave a little differently based on the context in Moodle. If the question is being authored at the site level, then the outcome association is more free form, meaning one can select any outcome from any outcome set. If the question is being authored at the course level, then the outcome association defaults to those outcome sets that are associated to the course.&lt;br /&gt;
&lt;br /&gt;
= Data structure =&lt;br /&gt;
&lt;br /&gt;
This diagram provides an overview of how the tables relate to each other and to core tables.  Please see the below sections for details about each table.&lt;br /&gt;
&lt;br /&gt;
[[File:Outcome_ERD.jpg|frame|center|Outcomes ERD]]&lt;br /&gt;
&lt;br /&gt;
== outcome_sets ==&lt;br /&gt;
&lt;br /&gt;
Relations: user&lt;br /&gt;
&lt;br /&gt;
Purpose: An outcome set represents a collection of outcomes and perhaps some meta data regarding the revision or applicable region. Outcome sets are mapped to courses, which makes the outcomes within the set available to be mapped to course content. An example outcome set would be [http://asn.jesandco.org/resources/D2403043 Health Education Content Standards for California Public Schools, Kindergarten Through Grade Twelve].  Instructors can create personal outcome sets that can be used in their courses.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| userid&lt;br /&gt;
| int(10), indexed, default null&lt;br /&gt;
| Foreign key to user table.  If set to a user&#039;s ID, then that user owns the outcome set and no one else can use or edit it besides admins.  This allows for instructors to create their own outcome sets for their courses.&lt;br /&gt;
|-&lt;br /&gt;
| idnumber&lt;br /&gt;
| varchar(255), unique index&lt;br /&gt;
| GUID that is auto-generated if missing. Generally on import, these are provided. This would be used to identify the outcome set during import or course restore.&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| varchar(255)&lt;br /&gt;
| The name of the outcome set&lt;br /&gt;
|-&lt;br /&gt;
| description&lt;br /&gt;
| text, default null, optional&lt;br /&gt;
| The plain text description of the outcome.&lt;br /&gt;
|-&lt;br /&gt;
| provider&lt;br /&gt;
| varchar(255), default null, optional&lt;br /&gt;
| Provider information regarding the outcome set. EG: Could be set to ASN.&lt;br /&gt;
|-&lt;br /&gt;
| revision&lt;br /&gt;
| varchar(255), default null, optional&lt;br /&gt;
| Version information regarding the outcome set. This will typically be a date or year, EG: 2011&lt;br /&gt;
|-&lt;br /&gt;
| region&lt;br /&gt;
| varchar(255), default null, optional&lt;br /&gt;
| Any region information. Example: In the US this could be a state name.&lt;br /&gt;
|-&lt;br /&gt;
| deleted&lt;br /&gt;
| int(1), default 0&lt;br /&gt;
| If the outcome set has been deleted.&lt;br /&gt;
|-&lt;br /&gt;
| timemodified&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time modified.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome_sets, outcome&lt;br /&gt;
&lt;br /&gt;
Purpose: Stores information regarding an individual outcome. Outcomes can be stored in a hierarchy, but the hierarchy is visual only. This means that if an outcome is earned, then only that outcome is earned, not it and all of its children. Also, if all child outcomes are earned, then parent outcomes are not also automatically earned. In addition, sometimes outcomes are not assessable, but are only there for extra context in the hierarchy. This identifies that the outcome cannot be mapped to content, nor can a student earn it.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomesetid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_sets table.&lt;br /&gt;
|-&lt;br /&gt;
| parentid&lt;br /&gt;
| int(10), indexed, default null&lt;br /&gt;
| Self referencing key. Identifies the parent outcome in the hierarchy.&lt;br /&gt;
|-&lt;br /&gt;
| idnumber&lt;br /&gt;
| varchar(255), unique index&lt;br /&gt;
| GUID that is auto-generated if missing. Generally on import, these are provided. This would be used to identify the outcome set during import or course restore.&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| varchar(255)&lt;br /&gt;
| The name of the outcome.&lt;br /&gt;
|-&lt;br /&gt;
| docnum&lt;br /&gt;
| varchar(255), default null, optional&lt;br /&gt;
| Field for tracking additional information on the outcome. EG: 2.3.A&lt;br /&gt;
|-&lt;br /&gt;
| description&lt;br /&gt;
| text, default null, optional&lt;br /&gt;
| The plain text description of the outcome.&lt;br /&gt;
|-&lt;br /&gt;
| assessable&lt;br /&gt;
| int(1)&lt;br /&gt;
| If set to 1, then the outcome is assessable and can be mapped to content. If set to 0, then the outcome is not assessable and cannot be mapped to content.&lt;br /&gt;
|-&lt;br /&gt;
| deleted&lt;br /&gt;
| int(1), default 0&lt;br /&gt;
| If the outcome has been deleted.&lt;br /&gt;
|-&lt;br /&gt;
| sortorder&lt;br /&gt;
| int(10)&lt;br /&gt;
| The sort order. This is 0-X for all outcomes that belong to the same outcome set.&lt;br /&gt;
|-&lt;br /&gt;
| timemodified&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time modified.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_metadata ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome&lt;br /&gt;
&lt;br /&gt;
Purpose: Represents additional meta information regarding outcomes. Only support for “Education Level” (K, 1, … 12, etc.) and “Subjects” (e.g. Math, English, etc.) will be available out of the box, but additional data points can be added later (which would need to be added to the UI). One outcome could have many meta values. For example: an outcome could be associated to many educational levels and subjects.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| varchar(255), indexed&lt;br /&gt;
| The name of the meta data.&lt;br /&gt;
|-&lt;br /&gt;
| value&lt;br /&gt;
| varchar(1333), indexed&lt;br /&gt;
| The value of the meta data.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_areas ==&lt;br /&gt;
&lt;br /&gt;
Relations: dynamic with core tables&lt;br /&gt;
&lt;br /&gt;
Purpose: This represents that a content item has been mapped to an outcome or to multiple outcomes. Check the outcome_area_outcomes table for the specific outcomes.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| component&lt;br /&gt;
| varchar(255), indexed&lt;br /&gt;
| The name of the component.&lt;br /&gt;
|-&lt;br /&gt;
| area&lt;br /&gt;
| varchar(255), default null, indexed, optional&lt;br /&gt;
| The name of the area. Used when a component has multiple items to associate to outcomes.&lt;br /&gt;
|-&lt;br /&gt;
| itemid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| The item ID.&lt;br /&gt;
|-&lt;br /&gt;
| deleted&lt;br /&gt;
| int(1), default 0&lt;br /&gt;
| Soft delete if the outcome was disassociated from the content. Note, if the content is actually deleted, then this association will be deleted.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_area_outcomes ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome, outcome_areas&lt;br /&gt;
&lt;br /&gt;
Purpose: This represents the one to many relationship of a single content item mapped to many outcomes.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomeareaid&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Foreign key to outcome_areas table.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_used_areas ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome_areas, course_modules&lt;br /&gt;
&lt;br /&gt;
Purpose: Associates an outcome content item with an activity. For example: a question is created in the site question bank and outcomes are associated to the question. Once that question is added to a Quiz then that association is stored in this table so the outcome system knows that the content item and its outcomes are in use.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| cmid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to course_modules table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomeareaid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_areas table.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_used_sets ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome_sets, course&lt;br /&gt;
&lt;br /&gt;
Purpose: Associates an outcome set with the course. Filtering of the outcome set is optionally allowed since outcome sets can span multiple educational levels and even subjects. Once an outcome set is mapped to the course, then the outcomes in the outcome set are available to be mapped to course content.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| courseid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to course table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomesetid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_sets table.&lt;br /&gt;
|-&lt;br /&gt;
| filter&lt;br /&gt;
| text, default null&lt;br /&gt;
| Some outcome sets span multiple education levels and subjects. So, when mapping an outcome set to a course, it may make sense to restrict the available outcomes to a specific education level(s) and/or subject(s). This information would be serialized into this field.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_attempts ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome_used_areas, user&lt;br /&gt;
&lt;br /&gt;
Purpose: Track a user attempt against a content item within a particular activity. The idea here is to aggregate attempt information so that the recommendation engines (detailed below) have an easily accessible data set to process. This does not mean however that recommendation engines are only limited to this data as one could mine for additional data where needed.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomeusedareaid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_used_areas table.&lt;br /&gt;
|-&lt;br /&gt;
| userid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table.&lt;br /&gt;
|-&lt;br /&gt;
| percentgrade&lt;br /&gt;
| float(10,5)&lt;br /&gt;
| Percent grade earned on this attempt.&lt;br /&gt;
|-&lt;br /&gt;
| mingrade&lt;br /&gt;
| float(10,5)&lt;br /&gt;
| The minimum possible grade.&lt;br /&gt;
|-&lt;br /&gt;
| maxgrade&lt;br /&gt;
| float(10,5)&lt;br /&gt;
| The maximum possible grade.&lt;br /&gt;
|-&lt;br /&gt;
| rawgrade&lt;br /&gt;
| float(10,5)&lt;br /&gt;
| The points earned, should be between the minimum and maximum grades.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_marks ==&lt;br /&gt;
&lt;br /&gt;
Relations: course, user, outcome&lt;br /&gt;
&lt;br /&gt;
Purpose: Graders will manually mark the student as having Met or Not Met an outcome. The recommendation engines will make a recommendation to the grader based on user attempts against content that has been mapped to the outcome.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| courseid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to course table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| userid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table. This is the user who is receiving the mark.&lt;br /&gt;
|-&lt;br /&gt;
| graderid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table. This is the user is doing the marking.&lt;br /&gt;
|-&lt;br /&gt;
| result&lt;br /&gt;
| int(2)&lt;br /&gt;
| 0 is not pass, 1 is pass, null is that no decision has been made yet.&lt;br /&gt;
|-&lt;br /&gt;
| timemodified&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time modified.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_marks_history ==&lt;br /&gt;
&lt;br /&gt;
Relations: course, user, outcome, outcome_marks&lt;br /&gt;
&lt;br /&gt;
Purpose: Keep track of past markings.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomemarkid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_marks table. Though the record could be missing from outcome_marks.&lt;br /&gt;
|-&lt;br /&gt;
| courseid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to course table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| userid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table. This is the user who is receiving the mark.&lt;br /&gt;
|-&lt;br /&gt;
| graderid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table. This is the user is doing the marking.&lt;br /&gt;
|-&lt;br /&gt;
| result&lt;br /&gt;
| int(2)&lt;br /&gt;
| 0 is not pass, 1 is pass, null is that no decision has been made yet.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_awards ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome, user&lt;br /&gt;
&lt;br /&gt;
Purpose: This preserves any outcomes earned by a student, regardless if the course is deleted or not.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| userid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Architecture =&lt;br /&gt;
&lt;br /&gt;
The outcome API, outcome administrative settings, outcome associations and other UIs that drives outcomes will be located inside of the top level outcome/ directory.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Models and repository mappers:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* outcome: Represents a single outcome&lt;br /&gt;
* outcome set: Represents a group of outcomes&lt;br /&gt;
* outcome content: An outcome association to content.&lt;br /&gt;
* outcome attempt: An attempt made against an outcome.&lt;br /&gt;
* outcome mark: A teacher marking an outcome against a user.&lt;br /&gt;
* outcome award: An awarded outcome at the site level.&lt;br /&gt;
&lt;br /&gt;
A repository mapper would include ways to store the model and ways to retrieve them in a re-usable and organized manner.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Collections:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
A group of models that you may take action on or filter. Example of a third party library that helps to manage collections: https://github.com/doctrine/collections&lt;br /&gt;
&lt;br /&gt;
Collections may or may not be used, but some possible collections would be the following:&lt;br /&gt;
&lt;br /&gt;
* outcomes&lt;br /&gt;
* outcome attempts&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;New mform elements:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
For most plugins, the process of associating an outcome would be done through a Moodle form. Proposing adding a new Moodle form element that can be added to a form to provide the necessary UI. An API for validating and saving the new mform element will be provided. In addition, the mform element will just be a wrapper around a well formed API that could be used on it’s own when other use cases present themselves.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;API for plugins&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Beyond the mform element, plugins may interact with outcomes in order to provide a richer integration. An API will be provided to assist with the following (not an exhaustive list):&lt;br /&gt;
&lt;br /&gt;
* A way to notify the outcome system that a content item is or is not being used within a course.&lt;br /&gt;
** Example: When a question is authored at the site level and then is actually used within a course, it must inform the outcome system that it is in use. This could potentially be done via events or just direct API calls at the appropriate times. Same goes for when a question is no longer used within a course.&lt;br /&gt;
* Record an attempt made against a content item.&lt;br /&gt;
** Examples: A question has been attempted or an assignment submission has been graded.&lt;br /&gt;
* A way to retrieve associated outcomes.&lt;br /&gt;
* A way to update, delete or otherwise modify the associated outcomes.&lt;br /&gt;
* A way to pick outcome associations (EG: what the mform element would do).&lt;br /&gt;
* A method of syncing up attempts against a content item. This would be used when associating an outcome on content that has already been graded/attempted.&lt;br /&gt;
* API to cleanup tables on course deletion.&lt;br /&gt;
&lt;br /&gt;
== Supported plugin type plugins ==&lt;br /&gt;
&lt;br /&gt;
This may sound a little odd, but basically the point of these plugins is to add support for a plugin type to the outcome system. These types would assist in interpreting outcome content associations. Examples:&lt;br /&gt;
&lt;br /&gt;
* Given an outcome association, please provide a link to the mapped content.&lt;br /&gt;
** For an activity, this would be a link to the module.&lt;br /&gt;
** For a grading form, a link to the grading instance.&lt;br /&gt;
** For a question, a link to the question instance in the question bank.&lt;br /&gt;
* What are all of the content items that have not been mapped?&lt;br /&gt;
** For activities, this would return instances that are not mapped.&lt;br /&gt;
** For grading form, this would return sub-plugin specific information, like criteria.&lt;br /&gt;
** For questions, this would return questions from the course question bank that are not mapped.&lt;br /&gt;
* May assist with automatic cleanup when the content is deleted.&lt;br /&gt;
* Also other meta data could be derived, like plugin type name.&lt;br /&gt;
&lt;br /&gt;
This plugin would live under outcome/support/ and would initially ship with support of the following plugin types:&lt;br /&gt;
&lt;br /&gt;
* mod&lt;br /&gt;
* qtype&lt;br /&gt;
* gradingform: note that this integration would be deeper in that each gradingform plugin would need to implement something in order to help interpret associations. The reason being is that outcomes are being associated to plugin specific content, instead of something generic like the grading instance.&lt;br /&gt;
&lt;br /&gt;
== Import and export plugins ==&lt;br /&gt;
&lt;br /&gt;
The outcome system would support the exporting of outcome sets. The first export plugin would be a very simple JSON export that is specific to Moodle itself. This would be used for moving custom outcomes from one Moodle site to another.&lt;br /&gt;
&lt;br /&gt;
The outcome system would support importing outcome sets. Initially, there would be support for importing outcomes from [http://asn.jesandco.org Achievement Standards Network (ASN)] ([http://standards.jesandco.org/wiki/ASN_Application_Profile Format Specification]) and importing the JSON export from above.&lt;br /&gt;
&lt;br /&gt;
Both of the outcomes import and export processes would be a plugin based, so other formats could be supported by creating new plugins. The import and export plugins would live under outcome/import/ and outcome/export/.&lt;br /&gt;
&lt;br /&gt;
== Recommendation engine plugins ==&lt;br /&gt;
&lt;br /&gt;
The outcome system would provide a way to recommend to a teacher whether a student should be marked as completing the outcome or not. These plugins should have full Moodle plugin support because they may need to listen to events, run crons, have DB tables, global settings, etc. These plugins would live under outcome/engine/. Recommendations would be generated on demand and stored in MUC.&lt;br /&gt;
&lt;br /&gt;
Initially, the only plugin would be a percentage based recommendation engine. It would be configurable for a specific threshold that would determine if an attempt against an outcome should be considered correct or incorrect. It would then process the outcome attempts to determine the recommendation.&lt;br /&gt;
&lt;br /&gt;
Recommendation engines should also be enabled or disabled at the site level. This would require a “Manage recommendation engines” section in the admin site settings.&lt;br /&gt;
&lt;br /&gt;
= Reporting =&lt;br /&gt;
&lt;br /&gt;
== Site ==&lt;br /&gt;
&lt;br /&gt;
The following reports:&lt;br /&gt;
&lt;br /&gt;
* Outcomes Coverage report - shows outcomes that have been mapped to content in the site.&lt;br /&gt;
* Outcomes Performance report - shows performance on outcomes at the site level. Optionally broken down by course.&lt;br /&gt;
&lt;br /&gt;
== Course ==&lt;br /&gt;
&lt;br /&gt;
The following reports:&lt;br /&gt;
&lt;br /&gt;
* Outcomes Coverage report - shows outcomes that have been mapped in this course.&lt;br /&gt;
* Outcomes: Unmapped Content report - shows content that is not mapped to an outcome.&lt;br /&gt;
* Outcomes Performance report - shows aggregated performance on outcomes in the course.&lt;br /&gt;
* Outcomes Student Performance report - shows student performance on outcomes in the course for the teacher.&lt;br /&gt;
* Outcomes Personal Performance report - shows student performance on outcomes in the course for the student.&lt;br /&gt;
&lt;br /&gt;
== User profile ==&lt;br /&gt;
&lt;br /&gt;
At the very least, there will be a user site report where the user can see earned outcomes.&lt;br /&gt;
&lt;br /&gt;
= Grading =&lt;br /&gt;
&lt;br /&gt;
Outcome Completion Marking is done by course graders and is the final check point for if a learner has earned an outcome or not. The proposed location is to use the Outcome tab that is currently in the grades section of the course. This would also highjack the Outcomes link under Grade administration and Course administration.&lt;br /&gt;
&lt;br /&gt;
= Logging =&lt;br /&gt;
&lt;br /&gt;
We want to audit most actions in the Moodle log. These actions include:&lt;br /&gt;
&lt;br /&gt;
* CRUD type actions.&lt;br /&gt;
* Any association editing. EG: associating an outcome with a course, content item, etc.&lt;br /&gt;
* Outcome marking.&lt;br /&gt;
* User attempts against outcomes.&lt;br /&gt;
&lt;br /&gt;
= Role capabilities =&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Description&lt;br /&gt;
! Capability&lt;br /&gt;
|-&lt;br /&gt;
| Map outcomes to content&lt;br /&gt;
| moodle/outcome:contentmap&lt;br /&gt;
|-&lt;br /&gt;
| Map outcome sets to courses&lt;br /&gt;
| moodle/outcome:coursemap&lt;br /&gt;
|-&lt;br /&gt;
| Administering outcomes (Editing, importing, etc)&lt;br /&gt;
| moodle/outcome:edit&lt;br /&gt;
|-&lt;br /&gt;
| Each report will have a capability to view them.&lt;br /&gt;
| report/REPORTNAME:view&lt;br /&gt;
|-&lt;br /&gt;
| Marking outcomes by graders&lt;br /&gt;
| moodle/grade:edit&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Backup and restore =&lt;br /&gt;
&lt;br /&gt;
The workflow for backup and restore may go like:&lt;br /&gt;
&lt;br /&gt;
* Same site, then just map to existing outcomes via the identifier.&lt;br /&gt;
* Not same site, then the assumption is that the outcome set should be imported first, then we can map to existing outcomes via the identifier like in our same site scenario.&lt;br /&gt;
&lt;br /&gt;
Outcomes would probably take advantage of the backup plugin API to backup outcome associations to modules, question, etc. So, for example:&lt;br /&gt;
&lt;br /&gt;
* Outcomes would plug into activities in order to backup outcome associations and attempts.&lt;br /&gt;
* Outcomes would plug into questions in order to backup outcome associations and attempts.&lt;br /&gt;
* Grading forms would have to manually outcome associations and attempts. Will strive to make code re-usable.&lt;br /&gt;
&lt;br /&gt;
= Migration of old outcomes =&lt;br /&gt;
&lt;br /&gt;
Please first review [[Migration and Technical Issues]]. This still needs to be flushed out some more, but since the migration requires user interaction, we may need to create an admin tool to handle the migration. Until outcomes are migrated, it might make sense to continue to show the outcomes in the grade book, but remove the ability to do any editing of old outcomes.&lt;/div&gt;</summary>
		<author><name>Bushido</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=File:Outcome_ERD.jpg&amp;diff=38310</id>
		<title>File:Outcome ERD.jpg</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=File:Outcome_ERD.jpg&amp;diff=38310"/>
		<updated>2013-03-13T17:33:44Z</updated>

		<summary type="html">&lt;p&gt;Bushido: uploaded a new version of &amp;amp;quot;File:Outcome ERD.jpg&amp;amp;quot;: Attempting to improve quality&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Outcomes ERD&lt;/div&gt;</summary>
		<author><name>Bushido</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=File:Outcome_ERD.jpg&amp;diff=38309</id>
		<title>File:Outcome ERD.jpg</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=File:Outcome_ERD.jpg&amp;diff=38309"/>
		<updated>2013-03-13T17:31:53Z</updated>

		<summary type="html">&lt;p&gt;Bushido: uploaded a new version of &amp;amp;quot;File:Outcome ERD.jpg&amp;amp;quot;: outcome_sets can now optionally link to a user record.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Outcomes ERD&lt;/div&gt;</summary>
		<author><name>Bushido</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=Outcomes_Technical_Specification&amp;diff=38308</id>
		<title>Outcomes Technical Specification</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=Outcomes_Technical_Specification&amp;diff=38308"/>
		<updated>2013-03-13T17:17:51Z</updated>

		<summary type="html">&lt;p&gt;Bushido: /* outcome_sets */ Personal outcome sets&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
&lt;br /&gt;
Please be familiar with the function specification as outlined in the [[Outcomes Specification]]. The functional specification will provide details about the concepts and goals of this project. In particular, the following sections provide the overview of the system by user role:&lt;br /&gt;
&lt;br /&gt;
* [[Outcomes Administrator Specification]]&lt;br /&gt;
* [[Outcomes Instructor Specification]]&lt;br /&gt;
* [[Outcomes Student Specification]]&lt;br /&gt;
&lt;br /&gt;
In addition, some features and use cases are known but not yet being implemented. Please see [[Specifically Excluded Use Cases]]. Specifically, this initial version will not be attempting to map an existing outcome set to a new version of the outcome set on import.&lt;br /&gt;
&lt;br /&gt;
This document attempts to capture how the functional specification would be implemented in Moodle.&lt;br /&gt;
&lt;br /&gt;
= Backwards compatibility breaks =&lt;br /&gt;
&lt;br /&gt;
First and foremost, it is important to identify key differences between the current outcome system and this proposal as there are some philosophical shifts as well as breaking of existing code.&lt;br /&gt;
&lt;br /&gt;
# Outcomes will now only be created at the site level and then mapped to courses and content. Outcomes will no longer be created at the course level.&lt;br /&gt;
# Anything using the current outcome API or tables will have to be updated to use the new outcomes when appropriate.&lt;br /&gt;
# Outcomes will no longer appear in the grade book.&lt;br /&gt;
# Outcomes will no longer support scales. It is just a simple pass or fail.&lt;br /&gt;
&lt;br /&gt;
= Settings =&lt;br /&gt;
&lt;br /&gt;
== Site ==&lt;br /&gt;
&lt;br /&gt;
At the site level, there will be an area to do all of the configuration and setup of outcome sets. The proposed location is under Settings &amp;gt; Site Administration &amp;gt; Grades &amp;gt; Outcomes.&lt;br /&gt;
&lt;br /&gt;
In addition to managing outcomes, there will be site settings page for general outcome settings. For example, a setting to toggle if outcome idnumbers are editable or not.&lt;br /&gt;
&lt;br /&gt;
== Course ==&lt;br /&gt;
&lt;br /&gt;
When editing a course, there will be a section to associate multiple outcome sets to the course. The section will appear below the course General settings.&lt;br /&gt;
&lt;br /&gt;
This association is used to determine the relevant outcomes for the course for reporting and as a way to pre-filter outcome pickers when associating outcomes to content.&lt;br /&gt;
&lt;br /&gt;
== Activity ==&lt;br /&gt;
&lt;br /&gt;
When editing an activity, there will be a section to associate individual outcomes to the activity. This section will be provided by the moodleform_mod::standard_coursemodule_elements() callback so that all activities will be able to be associated to outcomes automatically.  In the flow of the activity&#039;s form, the outcome mapping options would appear below the grades section.  Do note though that if an activity does not support grades, it can still be mapped to outcomes.&lt;br /&gt;
&lt;br /&gt;
Graded activities will have to add additional integration points with outcomes in order to capture user attempts.&lt;br /&gt;
&lt;br /&gt;
== Advanced grading ==&lt;br /&gt;
&lt;br /&gt;
Rubrics and Marking guides will be able to associate an outcome for a criteria. API will be provided to support this, but each grading method will have to integrate with outcomes where it makes sense.&lt;br /&gt;
&lt;br /&gt;
== Questions ==&lt;br /&gt;
&lt;br /&gt;
When editing a question, there will be a section to associate individual outcomes to the question. The section can be added to question_edit_form::definition() before the Tags section.&lt;br /&gt;
&lt;br /&gt;
This association UI might behave a little differently based on the context in Moodle. If the question is being authored at the site level, then the outcome association is more free form, meaning one can select any outcome from any outcome set. If the question is being authored at the course level, then the outcome association defaults to those outcome sets that are associated to the course.&lt;br /&gt;
&lt;br /&gt;
= Data structure =&lt;br /&gt;
&lt;br /&gt;
This diagram provides an overview of how the tables relate to each other and to core tables.  Please see the below sections for details about each table.&lt;br /&gt;
&lt;br /&gt;
[[File:Outcome_ERD.jpg|frame|center|Outcomes ERD]]&lt;br /&gt;
&lt;br /&gt;
== outcome_sets ==&lt;br /&gt;
&lt;br /&gt;
Relations: user&lt;br /&gt;
&lt;br /&gt;
Purpose: An outcome set represents a collection of outcomes and perhaps some meta data regarding the revision or applicable region. Outcome sets are mapped to courses, which makes the outcomes within the set available to be mapped to course content. An example outcome set would be [http://asn.jesandco.org/resources/D2403043 Health Education Content Standards for California Public Schools, Kindergarten Through Grade Twelve].  Instructors can create personal outcome sets that can be used in their courses.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| userid&lt;br /&gt;
| int(10), indexed, default 0&lt;br /&gt;
| Foreign key to user table.  If set to a user&#039;s ID, then that user owns the outcome set and no one else can use or edit it besides admins.  This allows for instructors to create their own outcome sets for their courses.&lt;br /&gt;
|-&lt;br /&gt;
| idnumber&lt;br /&gt;
| varchar(255), unique index&lt;br /&gt;
| GUID that is auto-generated if missing. Generally on import, these are provided. This would be used to identify the outcome set during import or course restore.&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| varchar(255)&lt;br /&gt;
| The name of the outcome set&lt;br /&gt;
|-&lt;br /&gt;
| description&lt;br /&gt;
| text, default null, optional&lt;br /&gt;
| The plain text description of the outcome.&lt;br /&gt;
|-&lt;br /&gt;
| provider&lt;br /&gt;
| varchar(255), default null, optional&lt;br /&gt;
| Provider information regarding the outcome set. EG: Could be set to ASN.&lt;br /&gt;
|-&lt;br /&gt;
| revision&lt;br /&gt;
| varchar(255), default null, optional&lt;br /&gt;
| Version information regarding the outcome set. This will typically be a date or year, EG: 2011&lt;br /&gt;
|-&lt;br /&gt;
| region&lt;br /&gt;
| varchar(255), default null, optional&lt;br /&gt;
| Any region information. Example: In the US this could be a state name.&lt;br /&gt;
|-&lt;br /&gt;
| deleted&lt;br /&gt;
| int(1), default 0&lt;br /&gt;
| If the outcome set has been deleted.&lt;br /&gt;
|-&lt;br /&gt;
| timemodified&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time modified.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome_sets&lt;br /&gt;
&lt;br /&gt;
Purpose: Stores information regarding an individual outcome. Outcomes can be stored in a hierarchy, but the hierarchy is visual only. This means that if an outcome is earned, then only that outcome is earned, not it and all of its children. Also, if all child outcomes are earned, then parent outcomes are not also automatically earned. In addition, sometimes outcomes are not assessable, but are only there for extra context in the hierarchy. This identifies that the outcome cannot be mapped to content, nor can a student earn it.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomesetid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_sets table.&lt;br /&gt;
|-&lt;br /&gt;
| parentid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Self referencing key. Identifies the parent outcome in the hierarchy.&lt;br /&gt;
|-&lt;br /&gt;
| idnumber&lt;br /&gt;
| varchar(255), unique index&lt;br /&gt;
| GUID that is auto-generated if missing. Generally on import, these are provided. This would be used to identify the outcome set during import or course restore.&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| varchar(255)&lt;br /&gt;
| The name of the outcome.&lt;br /&gt;
|-&lt;br /&gt;
| docnum&lt;br /&gt;
| varchar(255), default null, optional&lt;br /&gt;
| Field for tracking additional information on the outcome. EG: 2.3.A&lt;br /&gt;
|-&lt;br /&gt;
| description&lt;br /&gt;
| text, default null, optional&lt;br /&gt;
| The plain text description of the outcome.&lt;br /&gt;
|-&lt;br /&gt;
| assessable&lt;br /&gt;
| int(1)&lt;br /&gt;
| If set to 1, then the outcome is assessable and can be mapped to content. If set to 0, then the outcome is not assessable and cannot be mapped to content.&lt;br /&gt;
|-&lt;br /&gt;
| deleted&lt;br /&gt;
| int(1), default 0&lt;br /&gt;
| If the outcome has been deleted.&lt;br /&gt;
|-&lt;br /&gt;
| sortorder&lt;br /&gt;
| int(10)&lt;br /&gt;
| The sort order. This is 0-X for all outcomes that belong to the same outcome set.&lt;br /&gt;
|-&lt;br /&gt;
| timemodified&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time modified.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_metadata ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome&lt;br /&gt;
&lt;br /&gt;
Purpose: Represents additional meta information regarding outcomes. Only support for “Education Level” (K, 1, … 12, etc.) and “Subjects” (e.g. Math, English, etc.) will be available out of the box, but additional data points can be added later (which would need to be added to the UI). One outcome could have many meta values. For example: an outcome could be associated to many educational levels and subjects.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| varchar(255), indexed&lt;br /&gt;
| The name of the meta data.&lt;br /&gt;
|-&lt;br /&gt;
| value&lt;br /&gt;
| varchar(1333), indexed&lt;br /&gt;
| The value of the meta data.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_areas ==&lt;br /&gt;
&lt;br /&gt;
Relations: dynamic with core tables&lt;br /&gt;
&lt;br /&gt;
Purpose: This represents that a content item has been mapped to an outcome or to multiple outcomes. Check the outcome_area_outcomes table for the specific outcomes.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| component&lt;br /&gt;
| varchar(255), indexed&lt;br /&gt;
| The name of the component.&lt;br /&gt;
|-&lt;br /&gt;
| area&lt;br /&gt;
| varchar(255), default null, indexed, optional&lt;br /&gt;
| The name of the area. Used when a component has multiple items to associate to outcomes.&lt;br /&gt;
|-&lt;br /&gt;
| itemid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| The item ID.&lt;br /&gt;
|-&lt;br /&gt;
| deleted&lt;br /&gt;
| int(1), default 0&lt;br /&gt;
| Soft delete if the outcome was disassociated from the content. Note, if the content is actually deleted, then this association will be deleted.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_area_outcomes ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome, outcome_areas&lt;br /&gt;
&lt;br /&gt;
Purpose: This represents the one to many relationship of a single content item mapped to many outcomes.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomeareaid&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Foreign key to outcome_areas table.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_used_areas ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome_areas, course_modules&lt;br /&gt;
&lt;br /&gt;
Purpose: Associates an outcome content item with an activity. For example: a question is created in the site question bank and outcomes are associated to the question. Once that question is added to a Quiz then that association is stored in this table so the outcome system knows that the content item and its outcomes are in use.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| cmid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to course_modules table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomeareaid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_areas table.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_used_sets ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome_sets, course&lt;br /&gt;
&lt;br /&gt;
Purpose: Associates an outcome set with the course. Filtering of the outcome set is optionally allowed since outcome sets can span multiple educational levels and even subjects. Once an outcome set is mapped to the course, then the outcomes in the outcome set are available to be mapped to course content.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| courseid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to course table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomesetid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_sets table.&lt;br /&gt;
|-&lt;br /&gt;
| filter&lt;br /&gt;
| text, default null&lt;br /&gt;
| Some outcome sets span multiple education levels and subjects. So, when mapping an outcome set to a course, it may make sense to restrict the available outcomes to a specific education level(s) and/or subject(s). This information would be serialized into this field.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_attempts ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome_used_areas, user&lt;br /&gt;
&lt;br /&gt;
Purpose: Track a user attempt against a content item within a particular activity. The idea here is to aggregate attempt information so that the recommendation engines (detailed below) have an easily accessible data set to process. This does not mean however that recommendation engines are only limited to this data as one could mine for additional data where needed.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomeusedareaid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_used_areas table.&lt;br /&gt;
|-&lt;br /&gt;
| userid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table.&lt;br /&gt;
|-&lt;br /&gt;
| percentgrade&lt;br /&gt;
| float(10,5)&lt;br /&gt;
| Percent grade earned on this attempt.&lt;br /&gt;
|-&lt;br /&gt;
| mingrade&lt;br /&gt;
| float(10,5)&lt;br /&gt;
| The minimum possible grade.&lt;br /&gt;
|-&lt;br /&gt;
| maxgrade&lt;br /&gt;
| float(10,5)&lt;br /&gt;
| The maximum possible grade.&lt;br /&gt;
|-&lt;br /&gt;
| rawgrade&lt;br /&gt;
| float(10,5)&lt;br /&gt;
| The points earned, should be between the minimum and maximum grades.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_marks ==&lt;br /&gt;
&lt;br /&gt;
Relations: course, user, outcome&lt;br /&gt;
&lt;br /&gt;
Purpose: Graders will manually mark the student as having Met or Not Met an outcome. The recommendation engines will make a recommendation to the grader based on user attempts against content that has been mapped to the outcome.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| courseid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to course table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| userid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table. This is the user who is receiving the mark.&lt;br /&gt;
|-&lt;br /&gt;
| graderid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table. This is the user is doing the marking.&lt;br /&gt;
|-&lt;br /&gt;
| result&lt;br /&gt;
| int(2)&lt;br /&gt;
| 0 is not pass, 1 is pass, null is that no decision has been made yet.&lt;br /&gt;
|-&lt;br /&gt;
| timemodified&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time modified.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_marks_history ==&lt;br /&gt;
&lt;br /&gt;
Relations: course, user, outcome, outcome_marks&lt;br /&gt;
&lt;br /&gt;
Purpose: Keep track of past markings.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomemarkid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_marks table. Though the record could be missing from outcome_marks.&lt;br /&gt;
|-&lt;br /&gt;
| courseid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to course table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| userid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table. This is the user who is receiving the mark.&lt;br /&gt;
|-&lt;br /&gt;
| graderid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table. This is the user is doing the marking.&lt;br /&gt;
|-&lt;br /&gt;
| result&lt;br /&gt;
| int(2)&lt;br /&gt;
| 0 is not pass, 1 is pass, null is that no decision has been made yet.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_awards ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome, user&lt;br /&gt;
&lt;br /&gt;
Purpose: This preserves any outcomes earned by a student, regardless if the course is deleted or not.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| userid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Architecture =&lt;br /&gt;
&lt;br /&gt;
The outcome API, outcome administrative settings, outcome associations and other UIs that drives outcomes will be located inside of the top level outcome/ directory.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Models and repository mappers:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* outcome: Represents a single outcome&lt;br /&gt;
* outcome set: Represents a group of outcomes&lt;br /&gt;
* outcome content: An outcome association to content.&lt;br /&gt;
* outcome attempt: An attempt made against an outcome.&lt;br /&gt;
* outcome mark: A teacher marking an outcome against a user.&lt;br /&gt;
* outcome award: An awarded outcome at the site level.&lt;br /&gt;
&lt;br /&gt;
A repository mapper would include ways to store the model and ways to retrieve them in a re-usable and organized manner.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Collections:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
A group of models that you may take action on or filter. Example of a third party library that helps to manage collections: https://github.com/doctrine/collections&lt;br /&gt;
&lt;br /&gt;
Collections may or may not be used, but some possible collections would be the following:&lt;br /&gt;
&lt;br /&gt;
* outcomes&lt;br /&gt;
* outcome attempts&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;New mform elements:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
For most plugins, the process of associating an outcome would be done through a Moodle form. Proposing adding a new Moodle form element that can be added to a form to provide the necessary UI. An API for validating and saving the new mform element will be provided. In addition, the mform element will just be a wrapper around a well formed API that could be used on it’s own when other use cases present themselves.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;API for plugins&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Beyond the mform element, plugins may interact with outcomes in order to provide a richer integration. An API will be provided to assist with the following (not an exhaustive list):&lt;br /&gt;
&lt;br /&gt;
* A way to notify the outcome system that a content item is or is not being used within a course.&lt;br /&gt;
** Example: When a question is authored at the site level and then is actually used within a course, it must inform the outcome system that it is in use. This could potentially be done via events or just direct API calls at the appropriate times. Same goes for when a question is no longer used within a course.&lt;br /&gt;
* Record an attempt made against a content item.&lt;br /&gt;
** Examples: A question has been attempted or an assignment submission has been graded.&lt;br /&gt;
* A way to retrieve associated outcomes.&lt;br /&gt;
* A way to update, delete or otherwise modify the associated outcomes.&lt;br /&gt;
* A way to pick outcome associations (EG: what the mform element would do).&lt;br /&gt;
* A method of syncing up attempts against a content item. This would be used when associating an outcome on content that has already been graded/attempted.&lt;br /&gt;
* API to cleanup tables on course deletion.&lt;br /&gt;
&lt;br /&gt;
== Supported plugin type plugins ==&lt;br /&gt;
&lt;br /&gt;
This may sound a little odd, but basically the point of these plugins is to add support for a plugin type to the outcome system. These types would assist in interpreting outcome content associations. Examples:&lt;br /&gt;
&lt;br /&gt;
* Given an outcome association, please provide a link to the mapped content.&lt;br /&gt;
** For an activity, this would be a link to the module.&lt;br /&gt;
** For a grading form, a link to the grading instance.&lt;br /&gt;
** For a question, a link to the question instance in the question bank.&lt;br /&gt;
* What are all of the content items that have not been mapped?&lt;br /&gt;
** For activities, this would return instances that are not mapped.&lt;br /&gt;
** For grading form, this would return sub-plugin specific information, like criteria.&lt;br /&gt;
** For questions, this would return questions from the course question bank that are not mapped.&lt;br /&gt;
* May assist with automatic cleanup when the content is deleted.&lt;br /&gt;
* Also other meta data could be derived, like plugin type name.&lt;br /&gt;
&lt;br /&gt;
This plugin would live under outcome/support/ and would initially ship with support of the following plugin types:&lt;br /&gt;
&lt;br /&gt;
* mod&lt;br /&gt;
* qtype&lt;br /&gt;
* gradingform: note that this integration would be deeper in that each gradingform plugin would need to implement something in order to help interpret associations. The reason being is that outcomes are being associated to plugin specific content, instead of something generic like the grading instance.&lt;br /&gt;
&lt;br /&gt;
== Import and export plugins ==&lt;br /&gt;
&lt;br /&gt;
The outcome system would support the exporting of outcome sets. The first export plugin would be a very simple JSON export that is specific to Moodle itself. This would be used for moving custom outcomes from one Moodle site to another.&lt;br /&gt;
&lt;br /&gt;
The outcome system would support importing outcome sets. Initially, there would be support for importing outcomes from [http://asn.jesandco.org Achievement Standards Network (ASN)] ([http://standards.jesandco.org/wiki/ASN_Application_Profile Format Specification]) and importing the JSON export from above.&lt;br /&gt;
&lt;br /&gt;
Both of the outcomes import and export processes would be a plugin based, so other formats could be supported by creating new plugins. The import and export plugins would live under outcome/import/ and outcome/export/.&lt;br /&gt;
&lt;br /&gt;
== Recommendation engine plugins ==&lt;br /&gt;
&lt;br /&gt;
The outcome system would provide a way to recommend to a teacher whether a student should be marked as completing the outcome or not. These plugins should have full Moodle plugin support because they may need to listen to events, run crons, have DB tables, global settings, etc. These plugins would live under outcome/engine/. Recommendations would be generated on demand and stored in MUC.&lt;br /&gt;
&lt;br /&gt;
Initially, the only plugin would be a percentage based recommendation engine. It would be configurable for a specific threshold that would determine if an attempt against an outcome should be considered correct or incorrect. It would then process the outcome attempts to determine the recommendation.&lt;br /&gt;
&lt;br /&gt;
Recommendation engines should also be enabled or disabled at the site level. This would require a “Manage recommendation engines” section in the admin site settings.&lt;br /&gt;
&lt;br /&gt;
= Reporting =&lt;br /&gt;
&lt;br /&gt;
== Site ==&lt;br /&gt;
&lt;br /&gt;
The following reports:&lt;br /&gt;
&lt;br /&gt;
* Outcomes Coverage report - shows outcomes that have been mapped to content in the site.&lt;br /&gt;
* Outcomes Performance report - shows performance on outcomes at the site level. Optionally broken down by course.&lt;br /&gt;
&lt;br /&gt;
== Course ==&lt;br /&gt;
&lt;br /&gt;
The following reports:&lt;br /&gt;
&lt;br /&gt;
* Outcomes Coverage report - shows outcomes that have been mapped in this course.&lt;br /&gt;
* Outcomes: Unmapped Content report - shows content that is not mapped to an outcome.&lt;br /&gt;
* Outcomes Performance report - shows aggregated performance on outcomes in the course.&lt;br /&gt;
* Outcomes Student Performance report - shows student performance on outcomes in the course for the teacher.&lt;br /&gt;
* Outcomes Personal Performance report - shows student performance on outcomes in the course for the student.&lt;br /&gt;
&lt;br /&gt;
== User profile ==&lt;br /&gt;
&lt;br /&gt;
At the very least, there will be a user site report where the user can see earned outcomes.&lt;br /&gt;
&lt;br /&gt;
= Grading =&lt;br /&gt;
&lt;br /&gt;
Outcome Completion Marking is done by course graders and is the final check point for if a learner has earned an outcome or not. The proposed location is to use the Outcome tab that is currently in the grades section of the course. This would also highjack the Outcomes link under Grade administration and Course administration.&lt;br /&gt;
&lt;br /&gt;
= Logging =&lt;br /&gt;
&lt;br /&gt;
We want to audit most actions in the Moodle log. These actions include:&lt;br /&gt;
&lt;br /&gt;
* CRUD type actions.&lt;br /&gt;
* Any association editing. EG: associating an outcome with a course, content item, etc.&lt;br /&gt;
* Outcome marking.&lt;br /&gt;
* User attempts against outcomes.&lt;br /&gt;
&lt;br /&gt;
= Role capabilities =&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Description&lt;br /&gt;
! Capability&lt;br /&gt;
|-&lt;br /&gt;
| Map outcomes to content&lt;br /&gt;
| moodle/outcome:contentmap&lt;br /&gt;
|-&lt;br /&gt;
| Map outcome sets to courses&lt;br /&gt;
| moodle/outcome:coursemap&lt;br /&gt;
|-&lt;br /&gt;
| Administering outcomes (Editing, importing, etc)&lt;br /&gt;
| moodle/outcome:edit&lt;br /&gt;
|-&lt;br /&gt;
| Each report will have a capability to view them.&lt;br /&gt;
| report/REPORTNAME:view&lt;br /&gt;
|-&lt;br /&gt;
| Marking outcomes by graders&lt;br /&gt;
| moodle/grade:edit&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Backup and restore =&lt;br /&gt;
&lt;br /&gt;
The workflow for backup and restore may go like:&lt;br /&gt;
&lt;br /&gt;
* Same site, then just map to existing outcomes via the identifier.&lt;br /&gt;
* Not same site, then the assumption is that the outcome set should be imported first, then we can map to existing outcomes via the identifier like in our same site scenario.&lt;br /&gt;
&lt;br /&gt;
Outcomes would probably take advantage of the backup plugin API to backup outcome associations to modules, question, etc. So, for example:&lt;br /&gt;
&lt;br /&gt;
* Outcomes would plug into activities in order to backup outcome associations and attempts.&lt;br /&gt;
* Outcomes would plug into questions in order to backup outcome associations and attempts.&lt;br /&gt;
* Grading forms would have to manually outcome associations and attempts. Will strive to make code re-usable.&lt;br /&gt;
&lt;br /&gt;
= Migration of old outcomes =&lt;br /&gt;
&lt;br /&gt;
Please first review [[Migration and Technical Issues]]. This still needs to be flushed out some more, but since the migration requires user interaction, we may need to create an admin tool to handle the migration. Until outcomes are migrated, it might make sense to continue to show the outcomes in the grade book, but remove the ability to do any editing of old outcomes.&lt;/div&gt;</summary>
		<author><name>Bushido</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=Outcomes_Technical_Specification&amp;diff=38187</id>
		<title>Outcomes Technical Specification</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=Outcomes_Technical_Specification&amp;diff=38187"/>
		<updated>2013-03-08T22:29:58Z</updated>

		<summary type="html">&lt;p&gt;Bushido: /* Data structure */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
&lt;br /&gt;
Please be familiar with the function specification as outlined in the [[Outcomes Specification]]. The functional specification will provide details about the concepts and goals of this project. In particular, the following sections provide the overview of the system by user role:&lt;br /&gt;
&lt;br /&gt;
* [[Outcomes Administrator Specification]]&lt;br /&gt;
* [[Outcomes Instructor Specification]]&lt;br /&gt;
* [[Outcomes Student Specification]]&lt;br /&gt;
&lt;br /&gt;
In addition, some features and use cases are known but not yet being implemented. Please see [[Specifically Excluded Use Cases]]. Specifically, this initial version will not be attempting to map an existing outcome set to a new version of the outcome set on import.&lt;br /&gt;
&lt;br /&gt;
This document attempts to capture how the functional specification would be implemented in Moodle.&lt;br /&gt;
&lt;br /&gt;
= Backwards compatibility breaks =&lt;br /&gt;
&lt;br /&gt;
First and foremost, it is important to identify key differences between the current outcome system and this proposal as there are some philosophical shifts as well as breaking of existing code.&lt;br /&gt;
&lt;br /&gt;
# Outcomes will now only be created at the site level and then mapped to courses and content. Outcomes will no longer be created at the course level.&lt;br /&gt;
# Anything using the current outcome API or tables will have to be updated to use the new outcomes when appropriate.&lt;br /&gt;
# Outcomes will no longer appear in the grade book.&lt;br /&gt;
# Outcomes will no longer support scales. It is just a simple pass or fail.&lt;br /&gt;
&lt;br /&gt;
= Settings =&lt;br /&gt;
&lt;br /&gt;
== Site ==&lt;br /&gt;
&lt;br /&gt;
At the site level, there will be an area to do all of the configuration and setup of outcome sets. The proposed location is under Settings &amp;gt; Site Administration &amp;gt; Grades &amp;gt; Outcomes.&lt;br /&gt;
&lt;br /&gt;
In addition to managing outcomes, there will be site settings page for general outcome settings. For example, a setting to toggle if outcome idnumbers are editable or not.&lt;br /&gt;
&lt;br /&gt;
== Course ==&lt;br /&gt;
&lt;br /&gt;
When editing a course, there will be a section to associate multiple outcome sets to the course. The section will appear below the course General settings.&lt;br /&gt;
&lt;br /&gt;
This association is used to determine the relevant outcomes for the course for reporting and as a way to pre-filter outcome pickers when associating outcomes to content.&lt;br /&gt;
&lt;br /&gt;
== Activity ==&lt;br /&gt;
&lt;br /&gt;
When editing an activity, there will be a section to associate individual outcomes to the activity. This section will be provided by the moodleform_mod::standard_coursemodule_elements() callback so that all activities will be able to be associated to outcomes automatically.  In the flow of the activity&#039;s form, the outcome mapping options would appear below the grades section.  Do note though that if an activity does not support grades, it can still be mapped to outcomes.&lt;br /&gt;
&lt;br /&gt;
Graded activities will have to add additional integration points with outcomes in order to capture user attempts.&lt;br /&gt;
&lt;br /&gt;
== Advanced grading ==&lt;br /&gt;
&lt;br /&gt;
Rubrics and Marking guides will be able to associate an outcome for a criteria. API will be provided to support this, but each grading method will have to integrate with outcomes where it makes sense.&lt;br /&gt;
&lt;br /&gt;
== Questions ==&lt;br /&gt;
&lt;br /&gt;
When editing a question, there will be a section to associate individual outcomes to the question. The section can be added to question_edit_form::definition() before the Tags section.&lt;br /&gt;
&lt;br /&gt;
This association UI might behave a little differently based on the context in Moodle. If the question is being authored at the site level, then the outcome association is more free form, meaning one can select any outcome from any outcome set. If the question is being authored at the course level, then the outcome association defaults to those outcome sets that are associated to the course.&lt;br /&gt;
&lt;br /&gt;
= Data structure =&lt;br /&gt;
&lt;br /&gt;
This diagram provides an overview of how the tables relate to each other and to core tables.  Please see the below sections for details about each table.&lt;br /&gt;
&lt;br /&gt;
[[File:Outcome_ERD.jpg|frame|center|Outcomes ERD]]&lt;br /&gt;
&lt;br /&gt;
== outcome_sets ==&lt;br /&gt;
&lt;br /&gt;
Relations: none&lt;br /&gt;
&lt;br /&gt;
Purpose: An outcome set represents a collection of outcomes and perhaps some meta data regarding the revision or applicable region. Outcome sets are mapped to courses, which makes the outcomes within the set available to be mapped to course content. An example outcome set would be [http://asn.jesandco.org/resources/D2403043 Health Education Content Standards for California Public Schools, Kindergarten Through Grade Twelve].&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| idnumber&lt;br /&gt;
| varchar(255), unique index&lt;br /&gt;
| GUID that is auto-generated if missing. Generally on import, these are provided. This would be used to identify the outcome set during import or course restore.&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| varchar(255)&lt;br /&gt;
| The name of the outcome set&lt;br /&gt;
|-&lt;br /&gt;
| description&lt;br /&gt;
| text, default null, optional&lt;br /&gt;
| The plain text description of the outcome.&lt;br /&gt;
|-&lt;br /&gt;
| provider&lt;br /&gt;
| varchar(255), default null, optional&lt;br /&gt;
| Provider information regarding the outcome set. EG: Could be set to ASN.&lt;br /&gt;
|-&lt;br /&gt;
| revision&lt;br /&gt;
| varchar(255), default null, optional&lt;br /&gt;
| Version information regarding the outcome set. This will typically be a date or year, EG: 2011&lt;br /&gt;
|-&lt;br /&gt;
| region&lt;br /&gt;
| varchar(255), default null, optional&lt;br /&gt;
| Any region information. Example: In the US this could be a state name.&lt;br /&gt;
|-&lt;br /&gt;
| deleted&lt;br /&gt;
| int(1), default 0&lt;br /&gt;
| If the outcome set has been deleted.&lt;br /&gt;
|-&lt;br /&gt;
| timemodified&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time modified.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome_sets&lt;br /&gt;
&lt;br /&gt;
Purpose: Stores information regarding an individual outcome. Outcomes can be stored in a hierarchy, but the hierarchy is visual only. This means that if an outcome is earned, then only that outcome is earned, not it and all of its children. Also, if all child outcomes are earned, then parent outcomes are not also automatically earned. In addition, sometimes outcomes are not assessable, but are only there for extra context in the hierarchy. This identifies that the outcome cannot be mapped to content, nor can a student earn it.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomesetid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_sets table.&lt;br /&gt;
|-&lt;br /&gt;
| parentid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Self referencing key. Identifies the parent outcome in the hierarchy.&lt;br /&gt;
|-&lt;br /&gt;
| idnumber&lt;br /&gt;
| varchar(255), unique index&lt;br /&gt;
| GUID that is auto-generated if missing. Generally on import, these are provided. This would be used to identify the outcome set during import or course restore.&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| varchar(255)&lt;br /&gt;
| The name of the outcome.&lt;br /&gt;
|-&lt;br /&gt;
| docnum&lt;br /&gt;
| varchar(255), default null, optional&lt;br /&gt;
| Field for tracking additional information on the outcome. EG: 2.3.A&lt;br /&gt;
|-&lt;br /&gt;
| description&lt;br /&gt;
| text, default null, optional&lt;br /&gt;
| The plain text description of the outcome.&lt;br /&gt;
|-&lt;br /&gt;
| assessable&lt;br /&gt;
| int(1)&lt;br /&gt;
| If set to 1, then the outcome is assessable and can be mapped to content. If set to 0, then the outcome is not assessable and cannot be mapped to content.&lt;br /&gt;
|-&lt;br /&gt;
| deleted&lt;br /&gt;
| int(1), default 0&lt;br /&gt;
| If the outcome has been deleted.&lt;br /&gt;
|-&lt;br /&gt;
| sortorder&lt;br /&gt;
| int(10)&lt;br /&gt;
| The sort order. This is 0-X for all outcomes that belong to the same outcome set.&lt;br /&gt;
|-&lt;br /&gt;
| timemodified&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time modified.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_metadata ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome&lt;br /&gt;
&lt;br /&gt;
Purpose: Represents additional meta information regarding outcomes. Only support for “Education Level” (K, 1, … 12, etc.) and “Subjects” (e.g. Math, English, etc.) will be available out of the box, but additional data points can be added later (which would need to be added to the UI). One outcome could have many meta values. For example: an outcome could be associated to many educational levels and subjects.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| varchar(255), indexed&lt;br /&gt;
| The name of the meta data.&lt;br /&gt;
|-&lt;br /&gt;
| value&lt;br /&gt;
| varchar(1333), indexed&lt;br /&gt;
| The value of the meta data.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_areas ==&lt;br /&gt;
&lt;br /&gt;
Relations: dynamic with core tables&lt;br /&gt;
&lt;br /&gt;
Purpose: This represents that a content item has been mapped to an outcome or to multiple outcomes. Check the outcome_area_outcomes table for the specific outcomes.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| component&lt;br /&gt;
| varchar(255), indexed&lt;br /&gt;
| The name of the component.&lt;br /&gt;
|-&lt;br /&gt;
| area&lt;br /&gt;
| varchar(255), default null, indexed, optional&lt;br /&gt;
| The name of the area. Used when a component has multiple items to associate to outcomes.&lt;br /&gt;
|-&lt;br /&gt;
| itemid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| The item ID.&lt;br /&gt;
|-&lt;br /&gt;
| deleted&lt;br /&gt;
| int(1), default 0&lt;br /&gt;
| Soft delete if the outcome was disassociated from the content. Note, if the content is actually deleted, then this association will be deleted.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_area_outcomes ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome, outcome_areas&lt;br /&gt;
&lt;br /&gt;
Purpose: This represents the one to many relationship of a single content item mapped to many outcomes.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomeareaid&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Foreign key to outcome_areas table.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_used_areas ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome_areas, course_modules&lt;br /&gt;
&lt;br /&gt;
Purpose: Associates an outcome content item with an activity. For example: a question is created in the site question bank and outcomes are associated to the question. Once that question is added to a Quiz then that association is stored in this table so the outcome system knows that the content item and its outcomes are in use.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| cmid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to course_modules table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomeareaid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_areas table.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_used_sets ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome_sets, course&lt;br /&gt;
&lt;br /&gt;
Purpose: Associates an outcome set with the course. Filtering of the outcome set is optionally allowed since outcome sets can span multiple educational levels and even subjects. Once an outcome set is mapped to the course, then the outcomes in the outcome set are available to be mapped to course content.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| courseid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to course table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomesetid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_sets table.&lt;br /&gt;
|-&lt;br /&gt;
| filter&lt;br /&gt;
| text, default null&lt;br /&gt;
| Some outcome sets span multiple education levels and subjects. So, when mapping an outcome set to a course, it may make sense to restrict the available outcomes to a specific education level(s) and/or subject(s). This information would be serialized into this field.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_attempts ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome_used_areas, user&lt;br /&gt;
&lt;br /&gt;
Purpose: Track a user attempt against a content item within a particular activity. The idea here is to aggregate attempt information so that the recommendation engines (detailed below) have an easily accessible data set to process. This does not mean however that recommendation engines are only limited to this data as one could mine for additional data where needed.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomeusedareaid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_used_areas table.&lt;br /&gt;
|-&lt;br /&gt;
| userid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table.&lt;br /&gt;
|-&lt;br /&gt;
| percentgrade&lt;br /&gt;
| float(10,5)&lt;br /&gt;
| Percent grade earned on this attempt.&lt;br /&gt;
|-&lt;br /&gt;
| mingrade&lt;br /&gt;
| float(10,5)&lt;br /&gt;
| The minimum possible grade.&lt;br /&gt;
|-&lt;br /&gt;
| maxgrade&lt;br /&gt;
| float(10,5)&lt;br /&gt;
| The maximum possible grade.&lt;br /&gt;
|-&lt;br /&gt;
| rawgrade&lt;br /&gt;
| float(10,5)&lt;br /&gt;
| The points earned, should be between the minimum and maximum grades.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_marks ==&lt;br /&gt;
&lt;br /&gt;
Relations: course, user, outcome&lt;br /&gt;
&lt;br /&gt;
Purpose: Graders will manually mark the student as having Met or Not Met an outcome. The recommendation engines will make a recommendation to the grader based on user attempts against content that has been mapped to the outcome.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| courseid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to course table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| userid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table. This is the user who is receiving the mark.&lt;br /&gt;
|-&lt;br /&gt;
| graderid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table. This is the user is doing the marking.&lt;br /&gt;
|-&lt;br /&gt;
| result&lt;br /&gt;
| int(2)&lt;br /&gt;
| 0 is not pass, 1 is pass, null is that no decision has been made yet.&lt;br /&gt;
|-&lt;br /&gt;
| timemodified&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time modified.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_marks_history ==&lt;br /&gt;
&lt;br /&gt;
Relations: course, user, outcome, outcome_marks&lt;br /&gt;
&lt;br /&gt;
Purpose: Keep track of past markings.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomemarkid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_marks table. Though the record could be missing from outcome_marks.&lt;br /&gt;
|-&lt;br /&gt;
| courseid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to course table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| userid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table. This is the user who is receiving the mark.&lt;br /&gt;
|-&lt;br /&gt;
| graderid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table. This is the user is doing the marking.&lt;br /&gt;
|-&lt;br /&gt;
| result&lt;br /&gt;
| int(2)&lt;br /&gt;
| 0 is not pass, 1 is pass, null is that no decision has been made yet.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_awards ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome, user&lt;br /&gt;
&lt;br /&gt;
Purpose: This preserves any outcomes earned by a student, regardless if the course is deleted or not.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| userid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Architecture =&lt;br /&gt;
&lt;br /&gt;
The outcome API, outcome administrative settings, outcome associations and other UIs that drives outcomes will be located inside of the top level outcome/ directory.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Models and repository mappers:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* outcome: Represents a single outcome&lt;br /&gt;
* outcome set: Represents a group of outcomes&lt;br /&gt;
* outcome content: An outcome association to content.&lt;br /&gt;
* outcome attempt: An attempt made against an outcome.&lt;br /&gt;
* outcome mark: A teacher marking an outcome against a user.&lt;br /&gt;
* outcome award: An awarded outcome at the site level.&lt;br /&gt;
&lt;br /&gt;
A repository mapper would include ways to store the model and ways to retrieve them in a re-usable and organized manner.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Collections:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
A group of models that you may take action on or filter. Example of a third party library that helps to manage collections: https://github.com/doctrine/collections&lt;br /&gt;
&lt;br /&gt;
Collections may or may not be used, but some possible collections would be the following:&lt;br /&gt;
&lt;br /&gt;
* outcomes&lt;br /&gt;
* outcome attempts&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;New mform elements:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
For most plugins, the process of associating an outcome would be done through a Moodle form. Proposing adding a new Moodle form element that can be added to a form to provide the necessary UI. An API for validating and saving the new mform element will be provided. In addition, the mform element will just be a wrapper around a well formed API that could be used on it’s own when other use cases present themselves.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;API for plugins&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Beyond the mform element, plugins may interact with outcomes in order to provide a richer integration. An API will be provided to assist with the following (not an exhaustive list):&lt;br /&gt;
&lt;br /&gt;
* A way to notify the outcome system that a content item is or is not being used within a course.&lt;br /&gt;
** Example: When a question is authored at the site level and then is actually used within a course, it must inform the outcome system that it is in use. This could potentially be done via events or just direct API calls at the appropriate times. Same goes for when a question is no longer used within a course.&lt;br /&gt;
* Record an attempt made against a content item.&lt;br /&gt;
** Examples: A question has been attempted or an assignment submission has been graded.&lt;br /&gt;
* A way to retrieve associated outcomes.&lt;br /&gt;
* A way to update, delete or otherwise modify the associated outcomes.&lt;br /&gt;
* A way to pick outcome associations (EG: what the mform element would do).&lt;br /&gt;
* A method of syncing up attempts against a content item. This would be used when associating an outcome on content that has already been graded/attempted.&lt;br /&gt;
* API to cleanup tables on course deletion.&lt;br /&gt;
&lt;br /&gt;
== Supported plugin type plugins ==&lt;br /&gt;
&lt;br /&gt;
This may sound a little odd, but basically the point of these plugins is to add support for a plugin type to the outcome system. These types would assist in interpreting outcome content associations. Examples:&lt;br /&gt;
&lt;br /&gt;
* Given an outcome association, please provide a link to the mapped content.&lt;br /&gt;
** For an activity, this would be a link to the module.&lt;br /&gt;
** For a grading form, a link to the grading instance.&lt;br /&gt;
** For a question, a link to the question instance in the question bank.&lt;br /&gt;
* What are all of the content items that have not been mapped?&lt;br /&gt;
** For activities, this would return instances that are not mapped.&lt;br /&gt;
** For grading form, this would return sub-plugin specific information, like criteria.&lt;br /&gt;
** For questions, this would return questions from the course question bank that are not mapped.&lt;br /&gt;
* May assist with automatic cleanup when the content is deleted.&lt;br /&gt;
* Also other meta data could be derived, like plugin type name.&lt;br /&gt;
&lt;br /&gt;
This plugin would live under outcome/support/ and would initially ship with support of the following plugin types:&lt;br /&gt;
&lt;br /&gt;
* mod&lt;br /&gt;
* qtype&lt;br /&gt;
* gradingform: note that this integration would be deeper in that each gradingform plugin would need to implement something in order to help interpret associations. The reason being is that outcomes are being associated to plugin specific content, instead of something generic like the grading instance.&lt;br /&gt;
&lt;br /&gt;
== Import and export plugins ==&lt;br /&gt;
&lt;br /&gt;
The outcome system would support the exporting of outcome sets. The first export plugin would be a very simple JSON export that is specific to Moodle itself. This would be used for moving custom outcomes from one Moodle site to another.&lt;br /&gt;
&lt;br /&gt;
The outcome system would support importing outcome sets. Initially, there would be support for importing outcomes from [http://asn.jesandco.org Achievement Standards Network (ASN)] ([http://standards.jesandco.org/wiki/ASN_Application_Profile Format Specification]) and importing the JSON export from above.&lt;br /&gt;
&lt;br /&gt;
Both of the outcomes import and export processes would be a plugin based, so other formats could be supported by creating new plugins. The import and export plugins would live under outcome/import/ and outcome/export/.&lt;br /&gt;
&lt;br /&gt;
== Recommendation engine plugins ==&lt;br /&gt;
&lt;br /&gt;
The outcome system would provide a way to recommend to a teacher whether a student should be marked as completing the outcome or not. These plugins should have full Moodle plugin support because they may need to listen to events, run crons, have DB tables, global settings, etc. These plugins would live under outcome/engine/. Recommendations would be generated on demand and stored in MUC.&lt;br /&gt;
&lt;br /&gt;
Initially, the only plugin would be a percentage based recommendation engine. It would be configurable for a specific threshold that would determine if an attempt against an outcome should be considered correct or incorrect. It would then process the outcome attempts to determine the recommendation.&lt;br /&gt;
&lt;br /&gt;
Recommendation engines should also be enabled or disabled at the site level. This would require a “Manage recommendation engines” section in the admin site settings.&lt;br /&gt;
&lt;br /&gt;
= Reporting =&lt;br /&gt;
&lt;br /&gt;
== Site ==&lt;br /&gt;
&lt;br /&gt;
The following reports:&lt;br /&gt;
&lt;br /&gt;
* Outcomes Coverage report - shows outcomes that have been mapped to content in the site.&lt;br /&gt;
* Outcomes Performance report - shows performance on outcomes at the site level. Optionally broken down by course.&lt;br /&gt;
&lt;br /&gt;
== Course ==&lt;br /&gt;
&lt;br /&gt;
The following reports:&lt;br /&gt;
&lt;br /&gt;
* Outcomes Coverage report - shows outcomes that have been mapped in this course.&lt;br /&gt;
* Outcomes: Unmapped Content report - shows content that is not mapped to an outcome.&lt;br /&gt;
* Outcomes Performance report - shows aggregated performance on outcomes in the course.&lt;br /&gt;
* Outcomes Student Performance report - shows student performance on outcomes in the course for the teacher.&lt;br /&gt;
* Outcomes Personal Performance report - shows student performance on outcomes in the course for the student.&lt;br /&gt;
&lt;br /&gt;
== User profile ==&lt;br /&gt;
&lt;br /&gt;
At the very least, there will be a user site report where the user can see earned outcomes.&lt;br /&gt;
&lt;br /&gt;
= Grading =&lt;br /&gt;
&lt;br /&gt;
Outcome Completion Marking is done by course graders and is the final check point for if a learner has earned an outcome or not. The proposed location is to use the Outcome tab that is currently in the grades section of the course. This would also highjack the Outcomes link under Grade administration and Course administration.&lt;br /&gt;
&lt;br /&gt;
= Logging =&lt;br /&gt;
&lt;br /&gt;
We want to audit most actions in the Moodle log. These actions include:&lt;br /&gt;
&lt;br /&gt;
* CRUD type actions.&lt;br /&gt;
* Any association editing. EG: associating an outcome with a course, content item, etc.&lt;br /&gt;
* Outcome marking.&lt;br /&gt;
* User attempts against outcomes.&lt;br /&gt;
&lt;br /&gt;
= Role capabilities =&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Description&lt;br /&gt;
! Capability&lt;br /&gt;
|-&lt;br /&gt;
| Map outcomes to content&lt;br /&gt;
| moodle/outcome:contentmap&lt;br /&gt;
|-&lt;br /&gt;
| Map outcome sets to courses&lt;br /&gt;
| moodle/outcome:coursemap&lt;br /&gt;
|-&lt;br /&gt;
| Administering outcomes (Editing, importing, etc)&lt;br /&gt;
| moodle/outcome:edit&lt;br /&gt;
|-&lt;br /&gt;
| Each report will have a capability to view them.&lt;br /&gt;
| report/REPORTNAME:view&lt;br /&gt;
|-&lt;br /&gt;
| Marking outcomes by graders&lt;br /&gt;
| moodle/grade:edit&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Backup and restore =&lt;br /&gt;
&lt;br /&gt;
The workflow for backup and restore may go like:&lt;br /&gt;
&lt;br /&gt;
* Same site, then just map to existing outcomes via the identifier.&lt;br /&gt;
* Not same site, then the assumption is that the outcome set should be imported first, then we can map to existing outcomes via the identifier like in our same site scenario.&lt;br /&gt;
&lt;br /&gt;
Outcomes would probably take advantage of the backup plugin API to backup outcome associations to modules, question, etc. So, for example:&lt;br /&gt;
&lt;br /&gt;
* Outcomes would plug into activities in order to backup outcome associations and attempts.&lt;br /&gt;
* Outcomes would plug into questions in order to backup outcome associations and attempts.&lt;br /&gt;
* Grading forms would have to manually outcome associations and attempts. Will strive to make code re-usable.&lt;br /&gt;
&lt;br /&gt;
= Migration of old outcomes =&lt;br /&gt;
&lt;br /&gt;
Please first review [[Migration and Technical Issues]]. This still needs to be flushed out some more, but since the migration requires user interaction, we may need to create an admin tool to handle the migration. Until outcomes are migrated, it might make sense to continue to show the outcomes in the grade book, but remove the ability to do any editing of old outcomes.&lt;/div&gt;</summary>
		<author><name>Bushido</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=File:Outcome_ERD.jpg&amp;diff=38186</id>
		<title>File:Outcome ERD.jpg</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=File:Outcome_ERD.jpg&amp;diff=38186"/>
		<updated>2013-03-08T22:28:35Z</updated>

		<summary type="html">&lt;p&gt;Bushido: Outcomes ERD&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Outcomes ERD&lt;/div&gt;</summary>
		<author><name>Bushido</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=Outcomes_Technical_Specification&amp;diff=38185</id>
		<title>Outcomes Technical Specification</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=Outcomes_Technical_Specification&amp;diff=38185"/>
		<updated>2013-03-08T22:26:47Z</updated>

		<summary type="html">&lt;p&gt;Bushido: /* Data structure */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
&lt;br /&gt;
Please be familiar with the function specification as outlined in the [[Outcomes Specification]]. The functional specification will provide details about the concepts and goals of this project. In particular, the following sections provide the overview of the system by user role:&lt;br /&gt;
&lt;br /&gt;
* [[Outcomes Administrator Specification]]&lt;br /&gt;
* [[Outcomes Instructor Specification]]&lt;br /&gt;
* [[Outcomes Student Specification]]&lt;br /&gt;
&lt;br /&gt;
In addition, some features and use cases are known but not yet being implemented. Please see [[Specifically Excluded Use Cases]]. Specifically, this initial version will not be attempting to map an existing outcome set to a new version of the outcome set on import.&lt;br /&gt;
&lt;br /&gt;
This document attempts to capture how the functional specification would be implemented in Moodle.&lt;br /&gt;
&lt;br /&gt;
= Backwards compatibility breaks =&lt;br /&gt;
&lt;br /&gt;
First and foremost, it is important to identify key differences between the current outcome system and this proposal as there are some philosophical shifts as well as breaking of existing code.&lt;br /&gt;
&lt;br /&gt;
# Outcomes will now only be created at the site level and then mapped to courses and content. Outcomes will no longer be created at the course level.&lt;br /&gt;
# Anything using the current outcome API or tables will have to be updated to use the new outcomes when appropriate.&lt;br /&gt;
# Outcomes will no longer appear in the grade book.&lt;br /&gt;
# Outcomes will no longer support scales. It is just a simple pass or fail.&lt;br /&gt;
&lt;br /&gt;
= Settings =&lt;br /&gt;
&lt;br /&gt;
== Site ==&lt;br /&gt;
&lt;br /&gt;
At the site level, there will be an area to do all of the configuration and setup of outcome sets. The proposed location is under Settings &amp;gt; Site Administration &amp;gt; Grades &amp;gt; Outcomes.&lt;br /&gt;
&lt;br /&gt;
In addition to managing outcomes, there will be site settings page for general outcome settings. For example, a setting to toggle if outcome idnumbers are editable or not.&lt;br /&gt;
&lt;br /&gt;
== Course ==&lt;br /&gt;
&lt;br /&gt;
When editing a course, there will be a section to associate multiple outcome sets to the course. The section will appear below the course General settings.&lt;br /&gt;
&lt;br /&gt;
This association is used to determine the relevant outcomes for the course for reporting and as a way to pre-filter outcome pickers when associating outcomes to content.&lt;br /&gt;
&lt;br /&gt;
== Activity ==&lt;br /&gt;
&lt;br /&gt;
When editing an activity, there will be a section to associate individual outcomes to the activity. This section will be provided by the moodleform_mod::standard_coursemodule_elements() callback so that all activities will be able to be associated to outcomes automatically.  In the flow of the activity&#039;s form, the outcome mapping options would appear below the grades section.  Do note though that if an activity does not support grades, it can still be mapped to outcomes.&lt;br /&gt;
&lt;br /&gt;
Graded activities will have to add additional integration points with outcomes in order to capture user attempts.&lt;br /&gt;
&lt;br /&gt;
== Advanced grading ==&lt;br /&gt;
&lt;br /&gt;
Rubrics and Marking guides will be able to associate an outcome for a criteria. API will be provided to support this, but each grading method will have to integrate with outcomes where it makes sense.&lt;br /&gt;
&lt;br /&gt;
== Questions ==&lt;br /&gt;
&lt;br /&gt;
When editing a question, there will be a section to associate individual outcomes to the question. The section can be added to question_edit_form::definition() before the Tags section.&lt;br /&gt;
&lt;br /&gt;
This association UI might behave a little differently based on the context in Moodle. If the question is being authored at the site level, then the outcome association is more free form, meaning one can select any outcome from any outcome set. If the question is being authored at the course level, then the outcome association defaults to those outcome sets that are associated to the course.&lt;br /&gt;
&lt;br /&gt;
= Data structure =&lt;br /&gt;
&lt;br /&gt;
This diagram provides an overview of how the tables relate to each other and to core tables.  Please see the below sections for details about each table.&lt;br /&gt;
&lt;br /&gt;
[[Image:Outcome_ERD.png|frame|center|Outcomes ERD]]&lt;br /&gt;
&lt;br /&gt;
== outcome_sets ==&lt;br /&gt;
&lt;br /&gt;
Relations: none&lt;br /&gt;
&lt;br /&gt;
Purpose: An outcome set represents a collection of outcomes and perhaps some meta data regarding the revision or applicable region. Outcome sets are mapped to courses, which makes the outcomes within the set available to be mapped to course content. An example outcome set would be [http://asn.jesandco.org/resources/D2403043 Health Education Content Standards for California Public Schools, Kindergarten Through Grade Twelve].&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| idnumber&lt;br /&gt;
| varchar(255), unique index&lt;br /&gt;
| GUID that is auto-generated if missing. Generally on import, these are provided. This would be used to identify the outcome set during import or course restore.&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| varchar(255)&lt;br /&gt;
| The name of the outcome set&lt;br /&gt;
|-&lt;br /&gt;
| description&lt;br /&gt;
| text, default null, optional&lt;br /&gt;
| The plain text description of the outcome.&lt;br /&gt;
|-&lt;br /&gt;
| provider&lt;br /&gt;
| varchar(255), default null, optional&lt;br /&gt;
| Provider information regarding the outcome set. EG: Could be set to ASN.&lt;br /&gt;
|-&lt;br /&gt;
| revision&lt;br /&gt;
| varchar(255), default null, optional&lt;br /&gt;
| Version information regarding the outcome set. This will typically be a date or year, EG: 2011&lt;br /&gt;
|-&lt;br /&gt;
| region&lt;br /&gt;
| varchar(255), default null, optional&lt;br /&gt;
| Any region information. Example: In the US this could be a state name.&lt;br /&gt;
|-&lt;br /&gt;
| deleted&lt;br /&gt;
| int(1), default 0&lt;br /&gt;
| If the outcome set has been deleted.&lt;br /&gt;
|-&lt;br /&gt;
| timemodified&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time modified.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome_sets&lt;br /&gt;
&lt;br /&gt;
Purpose: Stores information regarding an individual outcome. Outcomes can be stored in a hierarchy, but the hierarchy is visual only. This means that if an outcome is earned, then only that outcome is earned, not it and all of its children. Also, if all child outcomes are earned, then parent outcomes are not also automatically earned. In addition, sometimes outcomes are not assessable, but are only there for extra context in the hierarchy. This identifies that the outcome cannot be mapped to content, nor can a student earn it.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomesetid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_sets table.&lt;br /&gt;
|-&lt;br /&gt;
| parentid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Self referencing key. Identifies the parent outcome in the hierarchy.&lt;br /&gt;
|-&lt;br /&gt;
| idnumber&lt;br /&gt;
| varchar(255), unique index&lt;br /&gt;
| GUID that is auto-generated if missing. Generally on import, these are provided. This would be used to identify the outcome set during import or course restore.&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| varchar(255)&lt;br /&gt;
| The name of the outcome.&lt;br /&gt;
|-&lt;br /&gt;
| docnum&lt;br /&gt;
| varchar(255), default null, optional&lt;br /&gt;
| Field for tracking additional information on the outcome. EG: 2.3.A&lt;br /&gt;
|-&lt;br /&gt;
| description&lt;br /&gt;
| text, default null, optional&lt;br /&gt;
| The plain text description of the outcome.&lt;br /&gt;
|-&lt;br /&gt;
| assessable&lt;br /&gt;
| int(1)&lt;br /&gt;
| If set to 1, then the outcome is assessable and can be mapped to content. If set to 0, then the outcome is not assessable and cannot be mapped to content.&lt;br /&gt;
|-&lt;br /&gt;
| deleted&lt;br /&gt;
| int(1), default 0&lt;br /&gt;
| If the outcome has been deleted.&lt;br /&gt;
|-&lt;br /&gt;
| sortorder&lt;br /&gt;
| int(10)&lt;br /&gt;
| The sort order. This is 0-X for all outcomes that belong to the same outcome set.&lt;br /&gt;
|-&lt;br /&gt;
| timemodified&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time modified.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_metadata ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome&lt;br /&gt;
&lt;br /&gt;
Purpose: Represents additional meta information regarding outcomes. Only support for “Education Level” (K, 1, … 12, etc.) and “Subjects” (e.g. Math, English, etc.) will be available out of the box, but additional data points can be added later (which would need to be added to the UI). One outcome could have many meta values. For example: an outcome could be associated to many educational levels and subjects.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| varchar(255), indexed&lt;br /&gt;
| The name of the meta data.&lt;br /&gt;
|-&lt;br /&gt;
| value&lt;br /&gt;
| varchar(1333), indexed&lt;br /&gt;
| The value of the meta data.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_areas ==&lt;br /&gt;
&lt;br /&gt;
Relations: dynamic with core tables&lt;br /&gt;
&lt;br /&gt;
Purpose: This represents that a content item has been mapped to an outcome or to multiple outcomes. Check the outcome_area_outcomes table for the specific outcomes.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| component&lt;br /&gt;
| varchar(255), indexed&lt;br /&gt;
| The name of the component.&lt;br /&gt;
|-&lt;br /&gt;
| area&lt;br /&gt;
| varchar(255), default null, indexed, optional&lt;br /&gt;
| The name of the area. Used when a component has multiple items to associate to outcomes.&lt;br /&gt;
|-&lt;br /&gt;
| itemid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| The item ID.&lt;br /&gt;
|-&lt;br /&gt;
| deleted&lt;br /&gt;
| int(1), default 0&lt;br /&gt;
| Soft delete if the outcome was disassociated from the content. Note, if the content is actually deleted, then this association will be deleted.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_area_outcomes ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome, outcome_areas&lt;br /&gt;
&lt;br /&gt;
Purpose: This represents the one to many relationship of a single content item mapped to many outcomes.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomeareaid&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Foreign key to outcome_areas table.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_used_areas ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome_areas, course_modules&lt;br /&gt;
&lt;br /&gt;
Purpose: Associates an outcome content item with an activity. For example: a question is created in the site question bank and outcomes are associated to the question. Once that question is added to a Quiz then that association is stored in this table so the outcome system knows that the content item and its outcomes are in use.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| cmid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to course_modules table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomeareaid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_areas table.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_used_sets ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome_sets, course&lt;br /&gt;
&lt;br /&gt;
Purpose: Associates an outcome set with the course. Filtering of the outcome set is optionally allowed since outcome sets can span multiple educational levels and even subjects. Once an outcome set is mapped to the course, then the outcomes in the outcome set are available to be mapped to course content.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| courseid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to course table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomesetid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_sets table.&lt;br /&gt;
|-&lt;br /&gt;
| filter&lt;br /&gt;
| text, default null&lt;br /&gt;
| Some outcome sets span multiple education levels and subjects. So, when mapping an outcome set to a course, it may make sense to restrict the available outcomes to a specific education level(s) and/or subject(s). This information would be serialized into this field.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_attempts ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome_used_areas, user&lt;br /&gt;
&lt;br /&gt;
Purpose: Track a user attempt against a content item within a particular activity. The idea here is to aggregate attempt information so that the recommendation engines (detailed below) have an easily accessible data set to process. This does not mean however that recommendation engines are only limited to this data as one could mine for additional data where needed.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomeusedareaid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_used_areas table.&lt;br /&gt;
|-&lt;br /&gt;
| userid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table.&lt;br /&gt;
|-&lt;br /&gt;
| percentgrade&lt;br /&gt;
| float(10,5)&lt;br /&gt;
| Percent grade earned on this attempt.&lt;br /&gt;
|-&lt;br /&gt;
| mingrade&lt;br /&gt;
| float(10,5)&lt;br /&gt;
| The minimum possible grade.&lt;br /&gt;
|-&lt;br /&gt;
| maxgrade&lt;br /&gt;
| float(10,5)&lt;br /&gt;
| The maximum possible grade.&lt;br /&gt;
|-&lt;br /&gt;
| rawgrade&lt;br /&gt;
| float(10,5)&lt;br /&gt;
| The points earned, should be between the minimum and maximum grades.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_marks ==&lt;br /&gt;
&lt;br /&gt;
Relations: course, user, outcome&lt;br /&gt;
&lt;br /&gt;
Purpose: Graders will manually mark the student as having Met or Not Met an outcome. The recommendation engines will make a recommendation to the grader based on user attempts against content that has been mapped to the outcome.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| courseid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to course table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| userid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table. This is the user who is receiving the mark.&lt;br /&gt;
|-&lt;br /&gt;
| graderid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table. This is the user is doing the marking.&lt;br /&gt;
|-&lt;br /&gt;
| result&lt;br /&gt;
| int(2)&lt;br /&gt;
| 0 is not pass, 1 is pass, null is that no decision has been made yet.&lt;br /&gt;
|-&lt;br /&gt;
| timemodified&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time modified.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_marks_history ==&lt;br /&gt;
&lt;br /&gt;
Relations: course, user, outcome, outcome_marks&lt;br /&gt;
&lt;br /&gt;
Purpose: Keep track of past markings.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomemarkid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_marks table. Though the record could be missing from outcome_marks.&lt;br /&gt;
|-&lt;br /&gt;
| courseid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to course table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| userid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table. This is the user who is receiving the mark.&lt;br /&gt;
|-&lt;br /&gt;
| graderid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table. This is the user is doing the marking.&lt;br /&gt;
|-&lt;br /&gt;
| result&lt;br /&gt;
| int(2)&lt;br /&gt;
| 0 is not pass, 1 is pass, null is that no decision has been made yet.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_awards ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome, user&lt;br /&gt;
&lt;br /&gt;
Purpose: This preserves any outcomes earned by a student, regardless if the course is deleted or not.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| userid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Architecture =&lt;br /&gt;
&lt;br /&gt;
The outcome API, outcome administrative settings, outcome associations and other UIs that drives outcomes will be located inside of the top level outcome/ directory.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Models and repository mappers:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* outcome: Represents a single outcome&lt;br /&gt;
* outcome set: Represents a group of outcomes&lt;br /&gt;
* outcome content: An outcome association to content.&lt;br /&gt;
* outcome attempt: An attempt made against an outcome.&lt;br /&gt;
* outcome mark: A teacher marking an outcome against a user.&lt;br /&gt;
* outcome award: An awarded outcome at the site level.&lt;br /&gt;
&lt;br /&gt;
A repository mapper would include ways to store the model and ways to retrieve them in a re-usable and organized manner.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Collections:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
A group of models that you may take action on or filter. Example of a third party library that helps to manage collections: https://github.com/doctrine/collections&lt;br /&gt;
&lt;br /&gt;
Collections may or may not be used, but some possible collections would be the following:&lt;br /&gt;
&lt;br /&gt;
* outcomes&lt;br /&gt;
* outcome attempts&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;New mform elements:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
For most plugins, the process of associating an outcome would be done through a Moodle form. Proposing adding a new Moodle form element that can be added to a form to provide the necessary UI. An API for validating and saving the new mform element will be provided. In addition, the mform element will just be a wrapper around a well formed API that could be used on it’s own when other use cases present themselves.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;API for plugins&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Beyond the mform element, plugins may interact with outcomes in order to provide a richer integration. An API will be provided to assist with the following (not an exhaustive list):&lt;br /&gt;
&lt;br /&gt;
* A way to notify the outcome system that a content item is or is not being used within a course.&lt;br /&gt;
** Example: When a question is authored at the site level and then is actually used within a course, it must inform the outcome system that it is in use. This could potentially be done via events or just direct API calls at the appropriate times. Same goes for when a question is no longer used within a course.&lt;br /&gt;
* Record an attempt made against a content item.&lt;br /&gt;
** Examples: A question has been attempted or an assignment submission has been graded.&lt;br /&gt;
* A way to retrieve associated outcomes.&lt;br /&gt;
* A way to update, delete or otherwise modify the associated outcomes.&lt;br /&gt;
* A way to pick outcome associations (EG: what the mform element would do).&lt;br /&gt;
* A method of syncing up attempts against a content item. This would be used when associating an outcome on content that has already been graded/attempted.&lt;br /&gt;
* API to cleanup tables on course deletion.&lt;br /&gt;
&lt;br /&gt;
== Supported plugin type plugins ==&lt;br /&gt;
&lt;br /&gt;
This may sound a little odd, but basically the point of these plugins is to add support for a plugin type to the outcome system. These types would assist in interpreting outcome content associations. Examples:&lt;br /&gt;
&lt;br /&gt;
* Given an outcome association, please provide a link to the mapped content.&lt;br /&gt;
** For an activity, this would be a link to the module.&lt;br /&gt;
** For a grading form, a link to the grading instance.&lt;br /&gt;
** For a question, a link to the question instance in the question bank.&lt;br /&gt;
* What are all of the content items that have not been mapped?&lt;br /&gt;
** For activities, this would return instances that are not mapped.&lt;br /&gt;
** For grading form, this would return sub-plugin specific information, like criteria.&lt;br /&gt;
** For questions, this would return questions from the course question bank that are not mapped.&lt;br /&gt;
* May assist with automatic cleanup when the content is deleted.&lt;br /&gt;
* Also other meta data could be derived, like plugin type name.&lt;br /&gt;
&lt;br /&gt;
This plugin would live under outcome/support/ and would initially ship with support of the following plugin types:&lt;br /&gt;
&lt;br /&gt;
* mod&lt;br /&gt;
* qtype&lt;br /&gt;
* gradingform: note that this integration would be deeper in that each gradingform plugin would need to implement something in order to help interpret associations. The reason being is that outcomes are being associated to plugin specific content, instead of something generic like the grading instance.&lt;br /&gt;
&lt;br /&gt;
== Import and export plugins ==&lt;br /&gt;
&lt;br /&gt;
The outcome system would support the exporting of outcome sets. The first export plugin would be a very simple JSON export that is specific to Moodle itself. This would be used for moving custom outcomes from one Moodle site to another.&lt;br /&gt;
&lt;br /&gt;
The outcome system would support importing outcome sets. Initially, there would be support for importing outcomes from [http://asn.jesandco.org Achievement Standards Network (ASN)] ([http://standards.jesandco.org/wiki/ASN_Application_Profile Format Specification]) and importing the JSON export from above.&lt;br /&gt;
&lt;br /&gt;
Both of the outcomes import and export processes would be a plugin based, so other formats could be supported by creating new plugins. The import and export plugins would live under outcome/import/ and outcome/export/.&lt;br /&gt;
&lt;br /&gt;
== Recommendation engine plugins ==&lt;br /&gt;
&lt;br /&gt;
The outcome system would provide a way to recommend to a teacher whether a student should be marked as completing the outcome or not. These plugins should have full Moodle plugin support because they may need to listen to events, run crons, have DB tables, global settings, etc. These plugins would live under outcome/engine/. Recommendations would be generated on demand and stored in MUC.&lt;br /&gt;
&lt;br /&gt;
Initially, the only plugin would be a percentage based recommendation engine. It would be configurable for a specific threshold that would determine if an attempt against an outcome should be considered correct or incorrect. It would then process the outcome attempts to determine the recommendation.&lt;br /&gt;
&lt;br /&gt;
Recommendation engines should also be enabled or disabled at the site level. This would require a “Manage recommendation engines” section in the admin site settings.&lt;br /&gt;
&lt;br /&gt;
= Reporting =&lt;br /&gt;
&lt;br /&gt;
== Site ==&lt;br /&gt;
&lt;br /&gt;
The following reports:&lt;br /&gt;
&lt;br /&gt;
* Outcomes Coverage report - shows outcomes that have been mapped to content in the site.&lt;br /&gt;
* Outcomes Performance report - shows performance on outcomes at the site level. Optionally broken down by course.&lt;br /&gt;
&lt;br /&gt;
== Course ==&lt;br /&gt;
&lt;br /&gt;
The following reports:&lt;br /&gt;
&lt;br /&gt;
* Outcomes Coverage report - shows outcomes that have been mapped in this course.&lt;br /&gt;
* Outcomes: Unmapped Content report - shows content that is not mapped to an outcome.&lt;br /&gt;
* Outcomes Performance report - shows aggregated performance on outcomes in the course.&lt;br /&gt;
* Outcomes Student Performance report - shows student performance on outcomes in the course for the teacher.&lt;br /&gt;
* Outcomes Personal Performance report - shows student performance on outcomes in the course for the student.&lt;br /&gt;
&lt;br /&gt;
== User profile ==&lt;br /&gt;
&lt;br /&gt;
At the very least, there will be a user site report where the user can see earned outcomes.&lt;br /&gt;
&lt;br /&gt;
= Grading =&lt;br /&gt;
&lt;br /&gt;
Outcome Completion Marking is done by course graders and is the final check point for if a learner has earned an outcome or not. The proposed location is to use the Outcome tab that is currently in the grades section of the course. This would also highjack the Outcomes link under Grade administration and Course administration.&lt;br /&gt;
&lt;br /&gt;
= Logging =&lt;br /&gt;
&lt;br /&gt;
We want to audit most actions in the Moodle log. These actions include:&lt;br /&gt;
&lt;br /&gt;
* CRUD type actions.&lt;br /&gt;
* Any association editing. EG: associating an outcome with a course, content item, etc.&lt;br /&gt;
* Outcome marking.&lt;br /&gt;
* User attempts against outcomes.&lt;br /&gt;
&lt;br /&gt;
= Role capabilities =&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Description&lt;br /&gt;
! Capability&lt;br /&gt;
|-&lt;br /&gt;
| Map outcomes to content&lt;br /&gt;
| moodle/outcome:contentmap&lt;br /&gt;
|-&lt;br /&gt;
| Map outcome sets to courses&lt;br /&gt;
| moodle/outcome:coursemap&lt;br /&gt;
|-&lt;br /&gt;
| Administering outcomes (Editing, importing, etc)&lt;br /&gt;
| moodle/outcome:edit&lt;br /&gt;
|-&lt;br /&gt;
| Each report will have a capability to view them.&lt;br /&gt;
| report/REPORTNAME:view&lt;br /&gt;
|-&lt;br /&gt;
| Marking outcomes by graders&lt;br /&gt;
| moodle/grade:edit&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Backup and restore =&lt;br /&gt;
&lt;br /&gt;
The workflow for backup and restore may go like:&lt;br /&gt;
&lt;br /&gt;
* Same site, then just map to existing outcomes via the identifier.&lt;br /&gt;
* Not same site, then the assumption is that the outcome set should be imported first, then we can map to existing outcomes via the identifier like in our same site scenario.&lt;br /&gt;
&lt;br /&gt;
Outcomes would probably take advantage of the backup plugin API to backup outcome associations to modules, question, etc. So, for example:&lt;br /&gt;
&lt;br /&gt;
* Outcomes would plug into activities in order to backup outcome associations and attempts.&lt;br /&gt;
* Outcomes would plug into questions in order to backup outcome associations and attempts.&lt;br /&gt;
* Grading forms would have to manually outcome associations and attempts. Will strive to make code re-usable.&lt;br /&gt;
&lt;br /&gt;
= Migration of old outcomes =&lt;br /&gt;
&lt;br /&gt;
Please first review [[Migration and Technical Issues]]. This still needs to be flushed out some more, but since the migration requires user interaction, we may need to create an admin tool to handle the migration. Until outcomes are migrated, it might make sense to continue to show the outcomes in the grade book, but remove the ability to do any editing of old outcomes.&lt;/div&gt;</summary>
		<author><name>Bushido</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=Outcomes_Technical_Specification&amp;diff=38142</id>
		<title>Outcomes Technical Specification</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=Outcomes_Technical_Specification&amp;diff=38142"/>
		<updated>2013-03-07T21:03:40Z</updated>

		<summary type="html">&lt;p&gt;Bushido: /* Course */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
&lt;br /&gt;
Please be familiar with the function specification as outlined in the [[Outcomes Specification]]. The functional specification will provide details about the concepts and goals of this project. In particular, the following sections provide the overview of the system by user role:&lt;br /&gt;
&lt;br /&gt;
* [[Outcomes Administrator Specification]]&lt;br /&gt;
* [[Outcomes Instructor Specification]]&lt;br /&gt;
* [[Outcomes Student Specification]]&lt;br /&gt;
&lt;br /&gt;
In addition, some features and use cases are known but not yet being implemented. Please see [[Specifically Excluded Use Cases]]. Specifically, this initial version will not be attempting to map an existing outcome set to a new version of the outcome set on import.&lt;br /&gt;
&lt;br /&gt;
This document attempts to capture how the functional specification would be implemented in Moodle.&lt;br /&gt;
&lt;br /&gt;
= Backwards compatibility breaks =&lt;br /&gt;
&lt;br /&gt;
First and foremost, it is important to identify key differences between the current outcome system and this proposal as there are some philosophical shifts as well as breaking of existing code.&lt;br /&gt;
&lt;br /&gt;
# Outcomes will now only be created at the site level and then mapped to courses and content. Outcomes will no longer be created at the course level.&lt;br /&gt;
# Anything using the current outcome API or tables will have to be updated to use the new outcomes when appropriate.&lt;br /&gt;
# Outcomes will no longer appear in the grade book.&lt;br /&gt;
# Outcomes will no longer support scales. It is just a simple pass or fail.&lt;br /&gt;
&lt;br /&gt;
= Settings =&lt;br /&gt;
&lt;br /&gt;
== Site ==&lt;br /&gt;
&lt;br /&gt;
At the site level, there will be an area to do all of the configuration and setup of outcome sets. The proposed location is under Settings &amp;gt; Site Administration &amp;gt; Grades &amp;gt; Outcomes.&lt;br /&gt;
&lt;br /&gt;
In addition to managing outcomes, there will be site settings page for general outcome settings. For example, a setting to toggle if outcome idnumbers are editable or not.&lt;br /&gt;
&lt;br /&gt;
== Course ==&lt;br /&gt;
&lt;br /&gt;
When editing a course, there will be a section to associate multiple outcome sets to the course. The section will appear below the course General settings.&lt;br /&gt;
&lt;br /&gt;
This association is used to determine the relevant outcomes for the course for reporting and as a way to pre-filter outcome pickers when associating outcomes to content.&lt;br /&gt;
&lt;br /&gt;
== Activity ==&lt;br /&gt;
&lt;br /&gt;
When editing an activity, there will be a section to associate individual outcomes to the activity. This section will be provided by the moodleform_mod::standard_coursemodule_elements() callback so that all activities will be able to be associated to outcomes automatically.  In the flow of the activity&#039;s form, the outcome mapping options would appear below the grades section.  Do note though that if an activity does not support grades, it can still be mapped to outcomes.&lt;br /&gt;
&lt;br /&gt;
Graded activities will have to add additional integration points with outcomes in order to capture user attempts.&lt;br /&gt;
&lt;br /&gt;
== Advanced grading ==&lt;br /&gt;
&lt;br /&gt;
Rubrics and Marking guides will be able to associate an outcome for a criteria. API will be provided to support this, but each grading method will have to integrate with outcomes where it makes sense.&lt;br /&gt;
&lt;br /&gt;
== Questions ==&lt;br /&gt;
&lt;br /&gt;
When editing a question, there will be a section to associate individual outcomes to the question. The section can be added to question_edit_form::definition() before the Tags section.&lt;br /&gt;
&lt;br /&gt;
This association UI might behave a little differently based on the context in Moodle. If the question is being authored at the site level, then the outcome association is more free form, meaning one can select any outcome from any outcome set. If the question is being authored at the course level, then the outcome association defaults to those outcome sets that are associated to the course.&lt;br /&gt;
&lt;br /&gt;
= Data structure =&lt;br /&gt;
&lt;br /&gt;
== outcome_sets ==&lt;br /&gt;
&lt;br /&gt;
Relations: none&lt;br /&gt;
&lt;br /&gt;
Purpose: An outcome set represents a collection of outcomes and perhaps some meta data regarding the revision or applicable region. Outcome sets are mapped to courses, which makes the outcomes within the set available to be mapped to course content. An example outcome set would be [http://asn.jesandco.org/resources/D2403043 Health Education Content Standards for California Public Schools, Kindergarten Through Grade Twelve].&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| idnumber&lt;br /&gt;
| varchar(255), unique index&lt;br /&gt;
| GUID that is auto-generated if missing. Generally on import, these are provided. This would be used to identify the outcome set during import or course restore.&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| varchar(255)&lt;br /&gt;
| The name of the outcome set&lt;br /&gt;
|-&lt;br /&gt;
| description&lt;br /&gt;
| text, default null, optional&lt;br /&gt;
| The plain text description of the outcome.&lt;br /&gt;
|-&lt;br /&gt;
| provider&lt;br /&gt;
| varchar(255), default null, optional&lt;br /&gt;
| Provider information regarding the outcome set. EG: Could be set to ASN.&lt;br /&gt;
|-&lt;br /&gt;
| revision&lt;br /&gt;
| varchar(255), default null, optional&lt;br /&gt;
| Version information regarding the outcome set. This will typically be a date or year, EG: 2011&lt;br /&gt;
|-&lt;br /&gt;
| region&lt;br /&gt;
| varchar(255), default null, optional&lt;br /&gt;
| Any region information. Example: In the US this could be a state name.&lt;br /&gt;
|-&lt;br /&gt;
| deleted&lt;br /&gt;
| int(1), default 0&lt;br /&gt;
| If the outcome set has been deleted.&lt;br /&gt;
|-&lt;br /&gt;
| timemodified&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time modified.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome_sets&lt;br /&gt;
&lt;br /&gt;
Purpose: Stores information regarding an individual outcome. Outcomes can be stored in a hierarchy, but the hierarchy is visual only. This means that if an outcome is earned, then only that outcome is earned, not it and all of its children. Also, if all child outcomes are earned, then parent outcomes are not also automatically earned. In addition, sometimes outcomes are not assessable, but are only there for extra context in the hierarchy. This identifies that the outcome cannot be mapped to content, nor can a student earn it.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomesetid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_sets table.&lt;br /&gt;
|-&lt;br /&gt;
| parentid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Self referencing key. Identifies the parent outcome in the hierarchy.&lt;br /&gt;
|-&lt;br /&gt;
| idnumber&lt;br /&gt;
| varchar(255), unique index&lt;br /&gt;
| GUID that is auto-generated if missing. Generally on import, these are provided. This would be used to identify the outcome set during import or course restore.&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| varchar(255)&lt;br /&gt;
| The name of the outcome.&lt;br /&gt;
|-&lt;br /&gt;
| docnum&lt;br /&gt;
| varchar(255), default null, optional&lt;br /&gt;
| Field for tracking additional information on the outcome. EG: 2.3.A&lt;br /&gt;
|-&lt;br /&gt;
| description&lt;br /&gt;
| text, default null, optional&lt;br /&gt;
| The plain text description of the outcome.&lt;br /&gt;
|-&lt;br /&gt;
| assessable&lt;br /&gt;
| int(1)&lt;br /&gt;
| If set to 1, then the outcome is assessable and can be mapped to content. If set to 0, then the outcome is not assessable and cannot be mapped to content.&lt;br /&gt;
|-&lt;br /&gt;
| deleted&lt;br /&gt;
| int(1), default 0&lt;br /&gt;
| If the outcome has been deleted.&lt;br /&gt;
|-&lt;br /&gt;
| sortorder&lt;br /&gt;
| int(10)&lt;br /&gt;
| The sort order. This is 0-X for all outcomes that belong to the same outcome set.&lt;br /&gt;
|-&lt;br /&gt;
| timemodified&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time modified.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_metadata ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome&lt;br /&gt;
&lt;br /&gt;
Purpose: Represents additional meta information regarding outcomes. Only support for “Education Level” (K, 1, … 12, etc.) and “Subjects” (e.g. Math, English, etc.) will be available out of the box, but additional data points can be added later (which would need to be added to the UI). One outcome could have many meta values. For example: an outcome could be associated to many educational levels and subjects.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| varchar(255), indexed&lt;br /&gt;
| The name of the meta data.&lt;br /&gt;
|-&lt;br /&gt;
| value&lt;br /&gt;
| varchar(1333), indexed&lt;br /&gt;
| The value of the meta data.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_areas ==&lt;br /&gt;
&lt;br /&gt;
Relations: dynamic with core tables&lt;br /&gt;
&lt;br /&gt;
Purpose: This represents that a content item has been mapped to an outcome or to multiple outcomes. Check the outcome_area_outcomes table for the specific outcomes.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| component&lt;br /&gt;
| varchar(255), indexed&lt;br /&gt;
| The name of the component.&lt;br /&gt;
|-&lt;br /&gt;
| area&lt;br /&gt;
| varchar(255), default null, indexed, optional&lt;br /&gt;
| The name of the area. Used when a component has multiple items to associate to outcomes.&lt;br /&gt;
|-&lt;br /&gt;
| itemid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| The item ID.&lt;br /&gt;
|-&lt;br /&gt;
| deleted&lt;br /&gt;
| int(1), default 0&lt;br /&gt;
| Soft delete if the outcome was disassociated from the content. Note, if the content is actually deleted, then this association will be deleted.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_area_outcomes ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome, outcome_areas&lt;br /&gt;
&lt;br /&gt;
Purpose: This represents the one to many relationship of a single content item mapped to many outcomes.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomeareaid&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Foreign key to outcome_areas table.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_used_areas ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome_areas, course_modules&lt;br /&gt;
&lt;br /&gt;
Purpose: Associates an outcome content item with an activity. For example: a question is created in the site question bank and outcomes are associated to the question. Once that question is added to a Quiz then that association is stored in this table so the outcome system knows that the content item and its outcomes are in use.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| cmid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to course_modules table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomeareaid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_areas table.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_used_sets ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome_sets, course&lt;br /&gt;
&lt;br /&gt;
Purpose: Associates an outcome set with the course. Filtering of the outcome set is optionally allowed since outcome sets can span multiple educational levels and even subjects. Once an outcome set is mapped to the course, then the outcomes in the outcome set are available to be mapped to course content.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| courseid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to course table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomesetid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_sets table.&lt;br /&gt;
|-&lt;br /&gt;
| filter&lt;br /&gt;
| text, default null&lt;br /&gt;
| Some outcome sets span multiple education levels and subjects. So, when mapping an outcome set to a course, it may make sense to restrict the available outcomes to a specific education level(s) and/or subject(s). This information would be serialized into this field.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_attempts ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome_used_areas, user&lt;br /&gt;
&lt;br /&gt;
Purpose: Track a user attempt against a content item within a particular activity. The idea here is to aggregate attempt information so that the recommendation engines (detailed below) have an easily accessible data set to process. This does not mean however that recommendation engines are only limited to this data as one could mine for additional data where needed.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomeusedareaid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_used_areas table.&lt;br /&gt;
|-&lt;br /&gt;
| userid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table.&lt;br /&gt;
|-&lt;br /&gt;
| percentgrade&lt;br /&gt;
| float(10,5)&lt;br /&gt;
| Percent grade earned on this attempt.&lt;br /&gt;
|-&lt;br /&gt;
| mingrade&lt;br /&gt;
| float(10,5)&lt;br /&gt;
| The minimum possible grade.&lt;br /&gt;
|-&lt;br /&gt;
| maxgrade&lt;br /&gt;
| float(10,5)&lt;br /&gt;
| The maximum possible grade.&lt;br /&gt;
|-&lt;br /&gt;
| rawgrade&lt;br /&gt;
| float(10,5)&lt;br /&gt;
| The points earned, should be between the minimum and maximum grades.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_marks ==&lt;br /&gt;
&lt;br /&gt;
Relations: course, user, outcome&lt;br /&gt;
&lt;br /&gt;
Purpose: Graders will manually mark the student as having Met or Not Met an outcome. The recommendation engines will make a recommendation to the grader based on user attempts against content that has been mapped to the outcome.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| courseid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to course table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| userid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table. This is the user who is receiving the mark.&lt;br /&gt;
|-&lt;br /&gt;
| graderid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table. This is the user is doing the marking.&lt;br /&gt;
|-&lt;br /&gt;
| result&lt;br /&gt;
| int(2)&lt;br /&gt;
| 0 is not pass, 1 is pass, null is that no decision has been made yet.&lt;br /&gt;
|-&lt;br /&gt;
| timemodified&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time modified.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_marks_history ==&lt;br /&gt;
&lt;br /&gt;
Relations: course, user, outcome, outcome_marks&lt;br /&gt;
&lt;br /&gt;
Purpose: Keep track of past markings.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomemarkid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_marks table. Though the record could be missing from outcome_marks.&lt;br /&gt;
|-&lt;br /&gt;
| courseid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to course table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| userid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table. This is the user who is receiving the mark.&lt;br /&gt;
|-&lt;br /&gt;
| graderid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table. This is the user is doing the marking.&lt;br /&gt;
|-&lt;br /&gt;
| result&lt;br /&gt;
| int(2)&lt;br /&gt;
| 0 is not pass, 1 is pass, null is that no decision has been made yet.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_awards ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome, user&lt;br /&gt;
&lt;br /&gt;
Purpose: This preserves any outcomes earned by a student, regardless if the course is deleted or not.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| userid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Architecture =&lt;br /&gt;
&lt;br /&gt;
The outcome API, outcome administrative settings, outcome associations and other UIs that drives outcomes will be located inside of the top level outcome/ directory.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Models and repository mappers:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* outcome: Represents a single outcome&lt;br /&gt;
* outcome set: Represents a group of outcomes&lt;br /&gt;
* outcome content: An outcome association to content.&lt;br /&gt;
* outcome attempt: An attempt made against an outcome.&lt;br /&gt;
* outcome mark: A teacher marking an outcome against a user.&lt;br /&gt;
* outcome award: An awarded outcome at the site level.&lt;br /&gt;
&lt;br /&gt;
A repository mapper would include ways to store the model and ways to retrieve them in a re-usable and organized manner.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Collections:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
A group of models that you may take action on or filter. Example of a third party library that helps to manage collections: https://github.com/doctrine/collections&lt;br /&gt;
&lt;br /&gt;
Collections may or may not be used, but some possible collections would be the following:&lt;br /&gt;
&lt;br /&gt;
* outcomes&lt;br /&gt;
* outcome attempts&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;New mform elements:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
For most plugins, the process of associating an outcome would be done through a Moodle form. Proposing adding a new Moodle form element that can be added to a form to provide the necessary UI. An API for validating and saving the new mform element will be provided. In addition, the mform element will just be a wrapper around a well formed API that could be used on it’s own when other use cases present themselves.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;API for plugins&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Beyond the mform element, plugins may interact with outcomes in order to provide a richer integration. An API will be provided to assist with the following (not an exhaustive list):&lt;br /&gt;
&lt;br /&gt;
* A way to notify the outcome system that a content item is or is not being used within a course.&lt;br /&gt;
** Example: When a question is authored at the site level and then is actually used within a course, it must inform the outcome system that it is in use. This could potentially be done via events or just direct API calls at the appropriate times. Same goes for when a question is no longer used within a course.&lt;br /&gt;
* Record an attempt made against a content item.&lt;br /&gt;
** Examples: A question has been attempted or an assignment submission has been graded.&lt;br /&gt;
* A way to retrieve associated outcomes.&lt;br /&gt;
* A way to update, delete or otherwise modify the associated outcomes.&lt;br /&gt;
* A way to pick outcome associations (EG: what the mform element would do).&lt;br /&gt;
* A method of syncing up attempts against a content item. This would be used when associating an outcome on content that has already been graded/attempted.&lt;br /&gt;
* API to cleanup tables on course deletion.&lt;br /&gt;
&lt;br /&gt;
== Supported plugin type plugins ==&lt;br /&gt;
&lt;br /&gt;
This may sound a little odd, but basically the point of these plugins is to add support for a plugin type to the outcome system. These types would assist in interpreting outcome content associations. Examples:&lt;br /&gt;
&lt;br /&gt;
* Given an outcome association, please provide a link to the mapped content.&lt;br /&gt;
** For an activity, this would be a link to the module.&lt;br /&gt;
** For a grading form, a link to the grading instance.&lt;br /&gt;
** For a question, a link to the question instance in the question bank.&lt;br /&gt;
* What are all of the content items that have not been mapped?&lt;br /&gt;
** For activities, this would return instances that are not mapped.&lt;br /&gt;
** For grading form, this would return sub-plugin specific information, like criteria.&lt;br /&gt;
** For questions, this would return questions from the course question bank that are not mapped.&lt;br /&gt;
* May assist with automatic cleanup when the content is deleted.&lt;br /&gt;
* Also other meta data could be derived, like plugin type name.&lt;br /&gt;
&lt;br /&gt;
This plugin would live under outcome/support/ and would initially ship with support of the following plugin types:&lt;br /&gt;
&lt;br /&gt;
* mod&lt;br /&gt;
* qtype&lt;br /&gt;
* gradingform: note that this integration would be deeper in that each gradingform plugin would need to implement something in order to help interpret associations. The reason being is that outcomes are being associated to plugin specific content, instead of something generic like the grading instance.&lt;br /&gt;
&lt;br /&gt;
== Import and export plugins ==&lt;br /&gt;
&lt;br /&gt;
The outcome system would support the exporting of outcome sets. The first export plugin would be a very simple JSON export that is specific to Moodle itself. This would be used for moving custom outcomes from one Moodle site to another.&lt;br /&gt;
&lt;br /&gt;
The outcome system would support importing outcome sets. Initially, there would be support for importing outcomes from [http://asn.jesandco.org Achievement Standards Network (ASN)] ([http://standards.jesandco.org/wiki/ASN_Application_Profile Format Specification]) and importing the JSON export from above.&lt;br /&gt;
&lt;br /&gt;
Both of the outcomes import and export processes would be a plugin based, so other formats could be supported by creating new plugins. The import and export plugins would live under outcome/import/ and outcome/export/.&lt;br /&gt;
&lt;br /&gt;
== Recommendation engine plugins ==&lt;br /&gt;
&lt;br /&gt;
The outcome system would provide a way to recommend to a teacher whether a student should be marked as completing the outcome or not. These plugins should have full Moodle plugin support because they may need to listen to events, run crons, have DB tables, global settings, etc. These plugins would live under outcome/engine/. Recommendations would be generated on demand and stored in MUC.&lt;br /&gt;
&lt;br /&gt;
Initially, the only plugin would be a percentage based recommendation engine. It would be configurable for a specific threshold that would determine if an attempt against an outcome should be considered correct or incorrect. It would then process the outcome attempts to determine the recommendation.&lt;br /&gt;
&lt;br /&gt;
Recommendation engines should also be enabled or disabled at the site level. This would require a “Manage recommendation engines” section in the admin site settings.&lt;br /&gt;
&lt;br /&gt;
= Reporting =&lt;br /&gt;
&lt;br /&gt;
== Site ==&lt;br /&gt;
&lt;br /&gt;
The following reports:&lt;br /&gt;
&lt;br /&gt;
* Outcomes Coverage report - shows outcomes that have been mapped to content in the site.&lt;br /&gt;
* Outcomes Performance report - shows performance on outcomes at the site level. Optionally broken down by course.&lt;br /&gt;
&lt;br /&gt;
== Course ==&lt;br /&gt;
&lt;br /&gt;
The following reports:&lt;br /&gt;
&lt;br /&gt;
* Outcomes Coverage report - shows outcomes that have been mapped in this course.&lt;br /&gt;
* Outcomes: Unmapped Content report - shows content that is not mapped to an outcome.&lt;br /&gt;
* Outcomes Performance report - shows aggregated performance on outcomes in the course.&lt;br /&gt;
* Outcomes Student Performance report - shows student performance on outcomes in the course for the teacher.&lt;br /&gt;
* Outcomes Personal Performance report - shows student performance on outcomes in the course for the student.&lt;br /&gt;
&lt;br /&gt;
== User profile ==&lt;br /&gt;
&lt;br /&gt;
At the very least, there will be a user site report where the user can see earned outcomes.&lt;br /&gt;
&lt;br /&gt;
= Grading =&lt;br /&gt;
&lt;br /&gt;
Outcome Completion Marking is done by course graders and is the final check point for if a learner has earned an outcome or not. The proposed location is to use the Outcome tab that is currently in the grades section of the course. This would also highjack the Outcomes link under Grade administration and Course administration.&lt;br /&gt;
&lt;br /&gt;
= Logging =&lt;br /&gt;
&lt;br /&gt;
We want to audit most actions in the Moodle log. These actions include:&lt;br /&gt;
&lt;br /&gt;
* CRUD type actions.&lt;br /&gt;
* Any association editing. EG: associating an outcome with a course, content item, etc.&lt;br /&gt;
* Outcome marking.&lt;br /&gt;
* User attempts against outcomes.&lt;br /&gt;
&lt;br /&gt;
= Role capabilities =&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Description&lt;br /&gt;
! Capability&lt;br /&gt;
|-&lt;br /&gt;
| Map outcomes to content&lt;br /&gt;
| moodle/outcome:contentmap&lt;br /&gt;
|-&lt;br /&gt;
| Map outcome sets to courses&lt;br /&gt;
| moodle/outcome:coursemap&lt;br /&gt;
|-&lt;br /&gt;
| Administering outcomes (Editing, importing, etc)&lt;br /&gt;
| moodle/outcome:edit&lt;br /&gt;
|-&lt;br /&gt;
| Each report will have a capability to view them.&lt;br /&gt;
| report/REPORTNAME:view&lt;br /&gt;
|-&lt;br /&gt;
| Marking outcomes by graders&lt;br /&gt;
| moodle/grade:edit&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Backup and restore =&lt;br /&gt;
&lt;br /&gt;
The workflow for backup and restore may go like:&lt;br /&gt;
&lt;br /&gt;
* Same site, then just map to existing outcomes via the identifier.&lt;br /&gt;
* Not same site, then the assumption is that the outcome set should be imported first, then we can map to existing outcomes via the identifier like in our same site scenario.&lt;br /&gt;
&lt;br /&gt;
Outcomes would probably take advantage of the backup plugin API to backup outcome associations to modules, question, etc. So, for example:&lt;br /&gt;
&lt;br /&gt;
* Outcomes would plug into activities in order to backup outcome associations and attempts.&lt;br /&gt;
* Outcomes would plug into questions in order to backup outcome associations and attempts.&lt;br /&gt;
* Grading forms would have to manually outcome associations and attempts. Will strive to make code re-usable.&lt;br /&gt;
&lt;br /&gt;
= Migration of old outcomes =&lt;br /&gt;
&lt;br /&gt;
Please first review [[Migration and Technical Issues]]. This still needs to be flushed out some more, but since the migration requires user interaction, we may need to create an admin tool to handle the migration. Until outcomes are migrated, it might make sense to continue to show the outcomes in the grade book, but remove the ability to do any editing of old outcomes.&lt;/div&gt;</summary>
		<author><name>Bushido</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=Outcomes_Technical_Specification&amp;diff=38141</id>
		<title>Outcomes Technical Specification</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=Outcomes_Technical_Specification&amp;diff=38141"/>
		<updated>2013-03-07T20:59:58Z</updated>

		<summary type="html">&lt;p&gt;Bushido: Renaming tables&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
&lt;br /&gt;
Please be familiar with the function specification as outlined in the [[Outcomes Specification]]. The functional specification will provide details about the concepts and goals of this project. In particular, the following sections provide the overview of the system by user role:&lt;br /&gt;
&lt;br /&gt;
* [[Outcomes Administrator Specification]]&lt;br /&gt;
* [[Outcomes Instructor Specification]]&lt;br /&gt;
* [[Outcomes Student Specification]]&lt;br /&gt;
&lt;br /&gt;
In addition, some features and use cases are known but not yet being implemented. Please see [[Specifically Excluded Use Cases]]. Specifically, this initial version will not be attempting to map an existing outcome set to a new version of the outcome set on import.&lt;br /&gt;
&lt;br /&gt;
This document attempts to capture how the functional specification would be implemented in Moodle.&lt;br /&gt;
&lt;br /&gt;
= Backwards compatibility breaks =&lt;br /&gt;
&lt;br /&gt;
First and foremost, it is important to identify key differences between the current outcome system and this proposal as there are some philosophical shifts as well as breaking of existing code.&lt;br /&gt;
&lt;br /&gt;
# Outcomes will now only be created at the site level and then mapped to courses and content. Outcomes will no longer be created at the course level.&lt;br /&gt;
# Anything using the current outcome API or tables will have to be updated to use the new outcomes when appropriate.&lt;br /&gt;
# Outcomes will no longer appear in the grade book.&lt;br /&gt;
# Outcomes will no longer support scales. It is just a simple pass or fail.&lt;br /&gt;
&lt;br /&gt;
= Settings =&lt;br /&gt;
&lt;br /&gt;
== Site ==&lt;br /&gt;
&lt;br /&gt;
At the site level, there will be an area to do all of the configuration and setup of outcome sets. The proposed location is under Settings &amp;gt; Site Administration &amp;gt; Grades &amp;gt; Outcomes.&lt;br /&gt;
&lt;br /&gt;
In addition to managing outcomes, there will be site settings page for general outcome settings. For example, a setting to toggle if outcome idnumbers are editable or not.&lt;br /&gt;
&lt;br /&gt;
== Course ==&lt;br /&gt;
&lt;br /&gt;
When editing a course, there will be a section to associate outcome sets to the course. The section will appear below the course General settings.&lt;br /&gt;
&lt;br /&gt;
This association is used to determine the relevant outcomes for the course for reporting and as a way to pre-filter outcome pickers when associating outcomes to content.&lt;br /&gt;
&lt;br /&gt;
== Activity ==&lt;br /&gt;
&lt;br /&gt;
When editing an activity, there will be a section to associate individual outcomes to the activity. This section will be provided by the moodleform_mod::standard_coursemodule_elements() callback so that all activities will be able to be associated to outcomes automatically.  In the flow of the activity&#039;s form, the outcome mapping options would appear below the grades section.  Do note though that if an activity does not support grades, it can still be mapped to outcomes.&lt;br /&gt;
&lt;br /&gt;
Graded activities will have to add additional integration points with outcomes in order to capture user attempts.&lt;br /&gt;
&lt;br /&gt;
== Advanced grading ==&lt;br /&gt;
&lt;br /&gt;
Rubrics and Marking guides will be able to associate an outcome for a criteria. API will be provided to support this, but each grading method will have to integrate with outcomes where it makes sense.&lt;br /&gt;
&lt;br /&gt;
== Questions ==&lt;br /&gt;
&lt;br /&gt;
When editing a question, there will be a section to associate individual outcomes to the question. The section can be added to question_edit_form::definition() before the Tags section.&lt;br /&gt;
&lt;br /&gt;
This association UI might behave a little differently based on the context in Moodle. If the question is being authored at the site level, then the outcome association is more free form, meaning one can select any outcome from any outcome set. If the question is being authored at the course level, then the outcome association defaults to those outcome sets that are associated to the course.&lt;br /&gt;
&lt;br /&gt;
= Data structure =&lt;br /&gt;
&lt;br /&gt;
== outcome_sets ==&lt;br /&gt;
&lt;br /&gt;
Relations: none&lt;br /&gt;
&lt;br /&gt;
Purpose: An outcome set represents a collection of outcomes and perhaps some meta data regarding the revision or applicable region. Outcome sets are mapped to courses, which makes the outcomes within the set available to be mapped to course content. An example outcome set would be [http://asn.jesandco.org/resources/D2403043 Health Education Content Standards for California Public Schools, Kindergarten Through Grade Twelve].&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| idnumber&lt;br /&gt;
| varchar(255), unique index&lt;br /&gt;
| GUID that is auto-generated if missing. Generally on import, these are provided. This would be used to identify the outcome set during import or course restore.&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| varchar(255)&lt;br /&gt;
| The name of the outcome set&lt;br /&gt;
|-&lt;br /&gt;
| description&lt;br /&gt;
| text, default null, optional&lt;br /&gt;
| The plain text description of the outcome.&lt;br /&gt;
|-&lt;br /&gt;
| provider&lt;br /&gt;
| varchar(255), default null, optional&lt;br /&gt;
| Provider information regarding the outcome set. EG: Could be set to ASN.&lt;br /&gt;
|-&lt;br /&gt;
| revision&lt;br /&gt;
| varchar(255), default null, optional&lt;br /&gt;
| Version information regarding the outcome set. This will typically be a date or year, EG: 2011&lt;br /&gt;
|-&lt;br /&gt;
| region&lt;br /&gt;
| varchar(255), default null, optional&lt;br /&gt;
| Any region information. Example: In the US this could be a state name.&lt;br /&gt;
|-&lt;br /&gt;
| deleted&lt;br /&gt;
| int(1), default 0&lt;br /&gt;
| If the outcome set has been deleted.&lt;br /&gt;
|-&lt;br /&gt;
| timemodified&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time modified.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome_sets&lt;br /&gt;
&lt;br /&gt;
Purpose: Stores information regarding an individual outcome. Outcomes can be stored in a hierarchy, but the hierarchy is visual only. This means that if an outcome is earned, then only that outcome is earned, not it and all of its children. Also, if all child outcomes are earned, then parent outcomes are not also automatically earned. In addition, sometimes outcomes are not assessable, but are only there for extra context in the hierarchy. This identifies that the outcome cannot be mapped to content, nor can a student earn it.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomesetid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_sets table.&lt;br /&gt;
|-&lt;br /&gt;
| parentid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Self referencing key. Identifies the parent outcome in the hierarchy.&lt;br /&gt;
|-&lt;br /&gt;
| idnumber&lt;br /&gt;
| varchar(255), unique index&lt;br /&gt;
| GUID that is auto-generated if missing. Generally on import, these are provided. This would be used to identify the outcome set during import or course restore.&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| varchar(255)&lt;br /&gt;
| The name of the outcome.&lt;br /&gt;
|-&lt;br /&gt;
| docnum&lt;br /&gt;
| varchar(255), default null, optional&lt;br /&gt;
| Field for tracking additional information on the outcome. EG: 2.3.A&lt;br /&gt;
|-&lt;br /&gt;
| description&lt;br /&gt;
| text, default null, optional&lt;br /&gt;
| The plain text description of the outcome.&lt;br /&gt;
|-&lt;br /&gt;
| assessable&lt;br /&gt;
| int(1)&lt;br /&gt;
| If set to 1, then the outcome is assessable and can be mapped to content. If set to 0, then the outcome is not assessable and cannot be mapped to content.&lt;br /&gt;
|-&lt;br /&gt;
| deleted&lt;br /&gt;
| int(1), default 0&lt;br /&gt;
| If the outcome has been deleted.&lt;br /&gt;
|-&lt;br /&gt;
| sortorder&lt;br /&gt;
| int(10)&lt;br /&gt;
| The sort order. This is 0-X for all outcomes that belong to the same outcome set.&lt;br /&gt;
|-&lt;br /&gt;
| timemodified&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time modified.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_metadata ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome&lt;br /&gt;
&lt;br /&gt;
Purpose: Represents additional meta information regarding outcomes. Only support for “Education Level” (K, 1, … 12, etc.) and “Subjects” (e.g. Math, English, etc.) will be available out of the box, but additional data points can be added later (which would need to be added to the UI). One outcome could have many meta values. For example: an outcome could be associated to many educational levels and subjects.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| varchar(255), indexed&lt;br /&gt;
| The name of the meta data.&lt;br /&gt;
|-&lt;br /&gt;
| value&lt;br /&gt;
| varchar(1333), indexed&lt;br /&gt;
| The value of the meta data.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_areas ==&lt;br /&gt;
&lt;br /&gt;
Relations: dynamic with core tables&lt;br /&gt;
&lt;br /&gt;
Purpose: This represents that a content item has been mapped to an outcome or to multiple outcomes. Check the outcome_area_outcomes table for the specific outcomes.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| component&lt;br /&gt;
| varchar(255), indexed&lt;br /&gt;
| The name of the component.&lt;br /&gt;
|-&lt;br /&gt;
| area&lt;br /&gt;
| varchar(255), default null, indexed, optional&lt;br /&gt;
| The name of the area. Used when a component has multiple items to associate to outcomes.&lt;br /&gt;
|-&lt;br /&gt;
| itemid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| The item ID.&lt;br /&gt;
|-&lt;br /&gt;
| deleted&lt;br /&gt;
| int(1), default 0&lt;br /&gt;
| Soft delete if the outcome was disassociated from the content. Note, if the content is actually deleted, then this association will be deleted.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_area_outcomes ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome, outcome_areas&lt;br /&gt;
&lt;br /&gt;
Purpose: This represents the one to many relationship of a single content item mapped to many outcomes.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomeareaid&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Foreign key to outcome_areas table.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_used_areas ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome_areas, course_modules&lt;br /&gt;
&lt;br /&gt;
Purpose: Associates an outcome content item with an activity. For example: a question is created in the site question bank and outcomes are associated to the question. Once that question is added to a Quiz then that association is stored in this table so the outcome system knows that the content item and its outcomes are in use.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| cmid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to course_modules table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomeareaid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_areas table.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_used_sets ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome_sets, course&lt;br /&gt;
&lt;br /&gt;
Purpose: Associates an outcome set with the course. Filtering of the outcome set is optionally allowed since outcome sets can span multiple educational levels and even subjects. Once an outcome set is mapped to the course, then the outcomes in the outcome set are available to be mapped to course content.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| courseid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to course table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomesetid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_sets table.&lt;br /&gt;
|-&lt;br /&gt;
| filter&lt;br /&gt;
| text, default null&lt;br /&gt;
| Some outcome sets span multiple education levels and subjects. So, when mapping an outcome set to a course, it may make sense to restrict the available outcomes to a specific education level(s) and/or subject(s). This information would be serialized into this field.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_attempts ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome_used_areas, user&lt;br /&gt;
&lt;br /&gt;
Purpose: Track a user attempt against a content item within a particular activity. The idea here is to aggregate attempt information so that the recommendation engines (detailed below) have an easily accessible data set to process. This does not mean however that recommendation engines are only limited to this data as one could mine for additional data where needed.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomeusedareaid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_used_areas table.&lt;br /&gt;
|-&lt;br /&gt;
| userid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table.&lt;br /&gt;
|-&lt;br /&gt;
| percentgrade&lt;br /&gt;
| float(10,5)&lt;br /&gt;
| Percent grade earned on this attempt.&lt;br /&gt;
|-&lt;br /&gt;
| mingrade&lt;br /&gt;
| float(10,5)&lt;br /&gt;
| The minimum possible grade.&lt;br /&gt;
|-&lt;br /&gt;
| maxgrade&lt;br /&gt;
| float(10,5)&lt;br /&gt;
| The maximum possible grade.&lt;br /&gt;
|-&lt;br /&gt;
| rawgrade&lt;br /&gt;
| float(10,5)&lt;br /&gt;
| The points earned, should be between the minimum and maximum grades.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_marks ==&lt;br /&gt;
&lt;br /&gt;
Relations: course, user, outcome&lt;br /&gt;
&lt;br /&gt;
Purpose: Graders will manually mark the student as having Met or Not Met an outcome. The recommendation engines will make a recommendation to the grader based on user attempts against content that has been mapped to the outcome.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| courseid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to course table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| userid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table. This is the user who is receiving the mark.&lt;br /&gt;
|-&lt;br /&gt;
| graderid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table. This is the user is doing the marking.&lt;br /&gt;
|-&lt;br /&gt;
| result&lt;br /&gt;
| int(2)&lt;br /&gt;
| 0 is not pass, 1 is pass, null is that no decision has been made yet.&lt;br /&gt;
|-&lt;br /&gt;
| timemodified&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time modified.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_marks_history ==&lt;br /&gt;
&lt;br /&gt;
Relations: course, user, outcome, outcome_marks&lt;br /&gt;
&lt;br /&gt;
Purpose: Keep track of past markings.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomemarkid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_marks table. Though the record could be missing from outcome_marks.&lt;br /&gt;
|-&lt;br /&gt;
| courseid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to course table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| userid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table. This is the user who is receiving the mark.&lt;br /&gt;
|-&lt;br /&gt;
| graderid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table. This is the user is doing the marking.&lt;br /&gt;
|-&lt;br /&gt;
| result&lt;br /&gt;
| int(2)&lt;br /&gt;
| 0 is not pass, 1 is pass, null is that no decision has been made yet.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_awards ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome, user&lt;br /&gt;
&lt;br /&gt;
Purpose: This preserves any outcomes earned by a student, regardless if the course is deleted or not.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| userid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Architecture =&lt;br /&gt;
&lt;br /&gt;
The outcome API, outcome administrative settings, outcome associations and other UIs that drives outcomes will be located inside of the top level outcome/ directory.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Models and repository mappers:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* outcome: Represents a single outcome&lt;br /&gt;
* outcome set: Represents a group of outcomes&lt;br /&gt;
* outcome content: An outcome association to content.&lt;br /&gt;
* outcome attempt: An attempt made against an outcome.&lt;br /&gt;
* outcome mark: A teacher marking an outcome against a user.&lt;br /&gt;
* outcome award: An awarded outcome at the site level.&lt;br /&gt;
&lt;br /&gt;
A repository mapper would include ways to store the model and ways to retrieve them in a re-usable and organized manner.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Collections:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
A group of models that you may take action on or filter. Example of a third party library that helps to manage collections: https://github.com/doctrine/collections&lt;br /&gt;
&lt;br /&gt;
Collections may or may not be used, but some possible collections would be the following:&lt;br /&gt;
&lt;br /&gt;
* outcomes&lt;br /&gt;
* outcome attempts&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;New mform elements:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
For most plugins, the process of associating an outcome would be done through a Moodle form. Proposing adding a new Moodle form element that can be added to a form to provide the necessary UI. An API for validating and saving the new mform element will be provided. In addition, the mform element will just be a wrapper around a well formed API that could be used on it’s own when other use cases present themselves.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;API for plugins&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Beyond the mform element, plugins may interact with outcomes in order to provide a richer integration. An API will be provided to assist with the following (not an exhaustive list):&lt;br /&gt;
&lt;br /&gt;
* A way to notify the outcome system that a content item is or is not being used within a course.&lt;br /&gt;
** Example: When a question is authored at the site level and then is actually used within a course, it must inform the outcome system that it is in use. This could potentially be done via events or just direct API calls at the appropriate times. Same goes for when a question is no longer used within a course.&lt;br /&gt;
* Record an attempt made against a content item.&lt;br /&gt;
** Examples: A question has been attempted or an assignment submission has been graded.&lt;br /&gt;
* A way to retrieve associated outcomes.&lt;br /&gt;
* A way to update, delete or otherwise modify the associated outcomes.&lt;br /&gt;
* A way to pick outcome associations (EG: what the mform element would do).&lt;br /&gt;
* A method of syncing up attempts against a content item. This would be used when associating an outcome on content that has already been graded/attempted.&lt;br /&gt;
* API to cleanup tables on course deletion.&lt;br /&gt;
&lt;br /&gt;
== Supported plugin type plugins ==&lt;br /&gt;
&lt;br /&gt;
This may sound a little odd, but basically the point of these plugins is to add support for a plugin type to the outcome system. These types would assist in interpreting outcome content associations. Examples:&lt;br /&gt;
&lt;br /&gt;
* Given an outcome association, please provide a link to the mapped content.&lt;br /&gt;
** For an activity, this would be a link to the module.&lt;br /&gt;
** For a grading form, a link to the grading instance.&lt;br /&gt;
** For a question, a link to the question instance in the question bank.&lt;br /&gt;
* What are all of the content items that have not been mapped?&lt;br /&gt;
** For activities, this would return instances that are not mapped.&lt;br /&gt;
** For grading form, this would return sub-plugin specific information, like criteria.&lt;br /&gt;
** For questions, this would return questions from the course question bank that are not mapped.&lt;br /&gt;
* May assist with automatic cleanup when the content is deleted.&lt;br /&gt;
* Also other meta data could be derived, like plugin type name.&lt;br /&gt;
&lt;br /&gt;
This plugin would live under outcome/support/ and would initially ship with support of the following plugin types:&lt;br /&gt;
&lt;br /&gt;
* mod&lt;br /&gt;
* qtype&lt;br /&gt;
* gradingform: note that this integration would be deeper in that each gradingform plugin would need to implement something in order to help interpret associations. The reason being is that outcomes are being associated to plugin specific content, instead of something generic like the grading instance.&lt;br /&gt;
&lt;br /&gt;
== Import and export plugins ==&lt;br /&gt;
&lt;br /&gt;
The outcome system would support the exporting of outcome sets. The first export plugin would be a very simple JSON export that is specific to Moodle itself. This would be used for moving custom outcomes from one Moodle site to another.&lt;br /&gt;
&lt;br /&gt;
The outcome system would support importing outcome sets. Initially, there would be support for importing outcomes from [http://asn.jesandco.org Achievement Standards Network (ASN)] ([http://standards.jesandco.org/wiki/ASN_Application_Profile Format Specification]) and importing the JSON export from above.&lt;br /&gt;
&lt;br /&gt;
Both of the outcomes import and export processes would be a plugin based, so other formats could be supported by creating new plugins. The import and export plugins would live under outcome/import/ and outcome/export/.&lt;br /&gt;
&lt;br /&gt;
== Recommendation engine plugins ==&lt;br /&gt;
&lt;br /&gt;
The outcome system would provide a way to recommend to a teacher whether a student should be marked as completing the outcome or not. These plugins should have full Moodle plugin support because they may need to listen to events, run crons, have DB tables, global settings, etc. These plugins would live under outcome/engine/. Recommendations would be generated on demand and stored in MUC.&lt;br /&gt;
&lt;br /&gt;
Initially, the only plugin would be a percentage based recommendation engine. It would be configurable for a specific threshold that would determine if an attempt against an outcome should be considered correct or incorrect. It would then process the outcome attempts to determine the recommendation.&lt;br /&gt;
&lt;br /&gt;
Recommendation engines should also be enabled or disabled at the site level. This would require a “Manage recommendation engines” section in the admin site settings.&lt;br /&gt;
&lt;br /&gt;
= Reporting =&lt;br /&gt;
&lt;br /&gt;
== Site ==&lt;br /&gt;
&lt;br /&gt;
The following reports:&lt;br /&gt;
&lt;br /&gt;
* Outcomes Coverage report - shows outcomes that have been mapped to content in the site.&lt;br /&gt;
* Outcomes Performance report - shows performance on outcomes at the site level. Optionally broken down by course.&lt;br /&gt;
&lt;br /&gt;
== Course ==&lt;br /&gt;
&lt;br /&gt;
The following reports:&lt;br /&gt;
&lt;br /&gt;
* Outcomes Coverage report - shows outcomes that have been mapped in this course.&lt;br /&gt;
* Outcomes: Unmapped Content report - shows content that is not mapped to an outcome.&lt;br /&gt;
* Outcomes Performance report - shows aggregated performance on outcomes in the course.&lt;br /&gt;
* Outcomes Student Performance report - shows student performance on outcomes in the course for the teacher.&lt;br /&gt;
* Outcomes Personal Performance report - shows student performance on outcomes in the course for the student.&lt;br /&gt;
&lt;br /&gt;
== User profile ==&lt;br /&gt;
&lt;br /&gt;
At the very least, there will be a user site report where the user can see earned outcomes.&lt;br /&gt;
&lt;br /&gt;
= Grading =&lt;br /&gt;
&lt;br /&gt;
Outcome Completion Marking is done by course graders and is the final check point for if a learner has earned an outcome or not. The proposed location is to use the Outcome tab that is currently in the grades section of the course. This would also highjack the Outcomes link under Grade administration and Course administration.&lt;br /&gt;
&lt;br /&gt;
= Logging =&lt;br /&gt;
&lt;br /&gt;
We want to audit most actions in the Moodle log. These actions include:&lt;br /&gt;
&lt;br /&gt;
* CRUD type actions.&lt;br /&gt;
* Any association editing. EG: associating an outcome with a course, content item, etc.&lt;br /&gt;
* Outcome marking.&lt;br /&gt;
* User attempts against outcomes.&lt;br /&gt;
&lt;br /&gt;
= Role capabilities =&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Description&lt;br /&gt;
! Capability&lt;br /&gt;
|-&lt;br /&gt;
| Map outcomes to content&lt;br /&gt;
| moodle/outcome:contentmap&lt;br /&gt;
|-&lt;br /&gt;
| Map outcome sets to courses&lt;br /&gt;
| moodle/outcome:coursemap&lt;br /&gt;
|-&lt;br /&gt;
| Administering outcomes (Editing, importing, etc)&lt;br /&gt;
| moodle/outcome:edit&lt;br /&gt;
|-&lt;br /&gt;
| Each report will have a capability to view them.&lt;br /&gt;
| report/REPORTNAME:view&lt;br /&gt;
|-&lt;br /&gt;
| Marking outcomes by graders&lt;br /&gt;
| moodle/grade:edit&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Backup and restore =&lt;br /&gt;
&lt;br /&gt;
The workflow for backup and restore may go like:&lt;br /&gt;
&lt;br /&gt;
* Same site, then just map to existing outcomes via the identifier.&lt;br /&gt;
* Not same site, then the assumption is that the outcome set should be imported first, then we can map to existing outcomes via the identifier like in our same site scenario.&lt;br /&gt;
&lt;br /&gt;
Outcomes would probably take advantage of the backup plugin API to backup outcome associations to modules, question, etc. So, for example:&lt;br /&gt;
&lt;br /&gt;
* Outcomes would plug into activities in order to backup outcome associations and attempts.&lt;br /&gt;
* Outcomes would plug into questions in order to backup outcome associations and attempts.&lt;br /&gt;
* Grading forms would have to manually outcome associations and attempts. Will strive to make code re-usable.&lt;br /&gt;
&lt;br /&gt;
= Migration of old outcomes =&lt;br /&gt;
&lt;br /&gt;
Please first review [[Migration and Technical Issues]]. This still needs to be flushed out some more, but since the migration requires user interaction, we may need to create an admin tool to handle the migration. Until outcomes are migrated, it might make sense to continue to show the outcomes in the grade book, but remove the ability to do any editing of old outcomes.&lt;/div&gt;</summary>
		<author><name>Bushido</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=Outcomes_Technical_Specification&amp;diff=38129</id>
		<title>Outcomes Technical Specification</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=Outcomes_Technical_Specification&amp;diff=38129"/>
		<updated>2013-03-06T22:11:02Z</updated>

		<summary type="html">&lt;p&gt;Bushido: /* outcome_attempt */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
&lt;br /&gt;
Please be familiar with the function specification as outlined in the [[Outcomes Specification]]. The functional specification will provide details about the concepts and goals of this project. In particular, the following sections provide the overview of the system by user role:&lt;br /&gt;
&lt;br /&gt;
* [[Outcomes Administrator Specification]]&lt;br /&gt;
* [[Outcomes Instructor Specification]]&lt;br /&gt;
* [[Outcomes Student Specification]]&lt;br /&gt;
&lt;br /&gt;
In addition, some features and use cases are known but not yet being implemented. Please see [[Specifically Excluded Use Cases]]. Specifically, this initial version will not be attempting to map an existing outcome set to a new version of the outcome set on import.&lt;br /&gt;
&lt;br /&gt;
This document attempts to capture how the functional specification would be implemented in Moodle.&lt;br /&gt;
&lt;br /&gt;
= Backwards compatibility breaks =&lt;br /&gt;
&lt;br /&gt;
First and foremost, it is important to identify key differences between the current outcome system and this proposal as there are some philosophical shifts as well as breaking of existing code.&lt;br /&gt;
&lt;br /&gt;
# Outcomes will now only be created at the site level and then mapped to courses and content. Outcomes will no longer be created at the course level.&lt;br /&gt;
# Anything using the current outcome API or tables will have to be updated to use the new outcomes when appropriate.&lt;br /&gt;
# Outcomes will no longer appear in the grade book.&lt;br /&gt;
# Outcomes will no longer support scales. It is just a simple pass or fail.&lt;br /&gt;
&lt;br /&gt;
= Settings =&lt;br /&gt;
&lt;br /&gt;
== Site ==&lt;br /&gt;
&lt;br /&gt;
At the site level, there will be an area to do all of the configuration and setup of outcome sets. The proposed location is under Settings &amp;gt; Site Administration &amp;gt; Grades &amp;gt; Outcomes.&lt;br /&gt;
&lt;br /&gt;
In addition to managing outcomes, there will be site settings page for general outcome settings. For example, a setting to toggle if outcome idnumbers are editable or not.&lt;br /&gt;
&lt;br /&gt;
== Course ==&lt;br /&gt;
&lt;br /&gt;
When editing a course, there will be a section to associate outcome sets to the course. The section will appear below the course General settings.&lt;br /&gt;
&lt;br /&gt;
This association is used to determine the relevant outcomes for the course for reporting and as a way to pre-filter outcome pickers when associating outcomes to content.&lt;br /&gt;
&lt;br /&gt;
== Activity ==&lt;br /&gt;
&lt;br /&gt;
When editing an activity, there will be a section to associate individual outcomes to the activity. This section will be provided by the moodleform_mod::standard_coursemodule_elements() callback so that all activities will be able to be associated to outcomes automatically.  In the flow of the activity&#039;s form, the outcome mapping options would appear below the grades section.  Do note though that if an activity does not support grades, it can still be mapped to outcomes.&lt;br /&gt;
&lt;br /&gt;
Graded activities will have to add additional integration points with outcomes in order to capture user attempts.&lt;br /&gt;
&lt;br /&gt;
== Advanced grading ==&lt;br /&gt;
&lt;br /&gt;
Rubrics and Marking guides will be able to associate an outcome for a criteria. API will be provided to support this, but each grading method will have to integrate with outcomes where it makes sense.&lt;br /&gt;
&lt;br /&gt;
== Questions ==&lt;br /&gt;
&lt;br /&gt;
When editing a question, there will be a section to associate individual outcomes to the question. The section can be added to question_edit_form::definition() before the Tags section.&lt;br /&gt;
&lt;br /&gt;
This association UI might behave a little differently based on the context in Moodle. If the question is being authored at the site level, then the outcome association is more free form, meaning one can select any outcome from any outcome set. If the question is being authored at the course level, then the outcome association defaults to those outcome sets that are associated to the course.&lt;br /&gt;
&lt;br /&gt;
= Data structure =&lt;br /&gt;
&lt;br /&gt;
== outcome_set ==&lt;br /&gt;
&lt;br /&gt;
Relations: none&lt;br /&gt;
&lt;br /&gt;
Purpose: An outcome set represents a collection of outcomes and perhaps some meta data regarding the revision or applicable region. Outcome sets are mapped to courses, which makes the outcomes within the set available to be mapped to course content. An example outcome set would be [http://asn.jesandco.org/resources/D2403043 Health Education Content Standards for California Public Schools, Kindergarten Through Grade Twelve].&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| idnumber&lt;br /&gt;
| varchar(255), unique index&lt;br /&gt;
| GUID that is auto-generated if missing. Generally on import, these are provided. This would be used to identify the outcome set during import or course restore.&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| varchar(255)&lt;br /&gt;
| The name of the outcome set&lt;br /&gt;
|-&lt;br /&gt;
| description&lt;br /&gt;
| text, default null, optional&lt;br /&gt;
| The plain text description of the outcome.&lt;br /&gt;
|-&lt;br /&gt;
| provider&lt;br /&gt;
| varchar(255), default null, optional&lt;br /&gt;
| Provider information regarding the outcome set. EG: Could be set to ASN.&lt;br /&gt;
|-&lt;br /&gt;
| revision&lt;br /&gt;
| varchar(255), default null, optional&lt;br /&gt;
| Version information regarding the outcome set. This will typically be a date or year, EG: 2011&lt;br /&gt;
|-&lt;br /&gt;
| region&lt;br /&gt;
| varchar(255), default null, optional&lt;br /&gt;
| Any region information. Example: In the US this could be a state name.&lt;br /&gt;
|-&lt;br /&gt;
| deleted&lt;br /&gt;
| int(1), default 0&lt;br /&gt;
| If the outcome set has been deleted.&lt;br /&gt;
|-&lt;br /&gt;
| timemodified&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time modified.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome_set&lt;br /&gt;
&lt;br /&gt;
Purpose: Stores information regarding an individual outcome. Outcomes can be stored in a hierarchy, but the hierarchy is visual only. This means that if an outcome is earned, then only that outcome is earned, not it and all of its children. Also, if all child outcomes are earned, then parent outcomes are not also automatically earned. In addition, sometimes outcomes are not assessable, but are only there for extra context in the hierarchy. This identifies that the outcome cannot be mapped to content, nor can a student earn it.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomesetid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_set table.&lt;br /&gt;
|-&lt;br /&gt;
| parentid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Self referencing key. Identifies the parent outcome in the hierarchy.&lt;br /&gt;
|-&lt;br /&gt;
| idnumber&lt;br /&gt;
| varchar(255), unique index&lt;br /&gt;
| GUID that is auto-generated if missing. Generally on import, these are provided. This would be used to identify the outcome set during import or course restore.&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| varchar(255)&lt;br /&gt;
| The name of the outcome.&lt;br /&gt;
|-&lt;br /&gt;
| docnum&lt;br /&gt;
| varchar(255), default null, optional&lt;br /&gt;
| Field for tracking additional information on the outcome. EG: 2.3.A&lt;br /&gt;
|-&lt;br /&gt;
| description&lt;br /&gt;
| text, default null, optional&lt;br /&gt;
| The plain text description of the outcome.&lt;br /&gt;
|-&lt;br /&gt;
| assessable&lt;br /&gt;
| int(1)&lt;br /&gt;
| If set to 1, then the outcome is assessable and can be mapped to content. If set to 0, then the outcome is not assessable and cannot be mapped to content.&lt;br /&gt;
|-&lt;br /&gt;
| deleted&lt;br /&gt;
| int(1), default 0&lt;br /&gt;
| If the outcome has been deleted.&lt;br /&gt;
|-&lt;br /&gt;
| sortorder&lt;br /&gt;
| int(10)&lt;br /&gt;
| The sort order. This is 0-X for all outcomes that belong to the same outcome set.&lt;br /&gt;
|-&lt;br /&gt;
| timemodified&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time modified.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_meta ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome&lt;br /&gt;
&lt;br /&gt;
Purpose: Represents additional meta information regarding outcomes. Only support for “Education Level” (K, 1, … 12, etc.) and “Subjects” (e.g. Math, English, etc.) will be available out of the box, but additional data points can be added later (which would need to be added to the UI). One outcome could have many meta values. For example: an outcome could be associated to many educational levels and subjects.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| varchar(255), indexed&lt;br /&gt;
| The name of the meta data.&lt;br /&gt;
|-&lt;br /&gt;
| value&lt;br /&gt;
| varchar(1333), indexed&lt;br /&gt;
| The value of the meta data.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_content ==&lt;br /&gt;
&lt;br /&gt;
Relations: dynamic with core tables&lt;br /&gt;
&lt;br /&gt;
Purpose: This represents that a content item has been mapped to an outcome or to multiple outcomes. Check the outcome_content_map table for the specific outcomes.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| component&lt;br /&gt;
| varchar(255), indexed&lt;br /&gt;
| The name of the component.&lt;br /&gt;
|-&lt;br /&gt;
| area&lt;br /&gt;
| varchar(255), default null, indexed, optional&lt;br /&gt;
| The name of the area. Used when a component has multiple items to associate to outcomes.&lt;br /&gt;
|-&lt;br /&gt;
| itemid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| The item ID.&lt;br /&gt;
|-&lt;br /&gt;
| deleted&lt;br /&gt;
| int(1), default 0&lt;br /&gt;
| Soft delete if the outcome was disassociated from the content. Note, if the content is actually deleted, then this association will be deleted.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_content_map ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome, outcome_content&lt;br /&gt;
&lt;br /&gt;
Purpose: This represents the one to many relationship of a single content item mapped to many outcomes.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomecontentid&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Foreign key to outcome_content table.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_mod_content_map ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome_content, course_modules&lt;br /&gt;
&lt;br /&gt;
Purpose: Associates an outcome content item with an activity. For example: a question is created in the site question bank and outcomes are associated to the question. Once that question is added to a Quiz then that association is stored in this table so the outcome system knows that the content item and its outcomes are in use.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| cmid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to course_modules table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomecontentid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_content table.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_set_course_map ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome_set, course&lt;br /&gt;
&lt;br /&gt;
Purpose: Associates an outcome set with the course. Filtering of the outcome set is optionally allowed since outcome sets can span multiple educational levels and even subjects. Once an outcome set is mapped to the course, then the outcomes in the outcome set are available to be mapped to course content.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| courseid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to course table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomesetid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_set table.&lt;br /&gt;
|-&lt;br /&gt;
| filter&lt;br /&gt;
| text, default null&lt;br /&gt;
| Some outcome sets span multiple education levels and subjects. So, when mapping an outcome set to a course, it may make sense to restrict the available outcomes to a specific education level(s) and/or subject(s). This information would be serialized into this field.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_attempt ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome_mod_content_map, user&lt;br /&gt;
&lt;br /&gt;
Purpose: Track a user attempt against a content item within a particular activity. The idea here is to aggregate attempt information so that the recommendation engines (detailed below) have an easily accessible data set to process. This does not mean however that recommendation engines are only limited to this data as one could mine for additional data where needed.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomemodcontentid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_mod_content_map table.&lt;br /&gt;
|-&lt;br /&gt;
| userid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table.&lt;br /&gt;
|-&lt;br /&gt;
| percentgrade&lt;br /&gt;
| float(10,5)&lt;br /&gt;
| Percent grade earned on this attempt.&lt;br /&gt;
|-&lt;br /&gt;
| mingrade&lt;br /&gt;
| float(10,5)&lt;br /&gt;
| The minimum possible grade.&lt;br /&gt;
|-&lt;br /&gt;
| maxgrade&lt;br /&gt;
| float(10,5)&lt;br /&gt;
| The maximum possible grade.&lt;br /&gt;
|-&lt;br /&gt;
| rawgrade&lt;br /&gt;
| float(10,5)&lt;br /&gt;
| The points earned, should be between the minimum and maximum grades.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_mark ==&lt;br /&gt;
&lt;br /&gt;
Relations: course, user, outcome&lt;br /&gt;
&lt;br /&gt;
Purpose: Graders will manually mark the student as having Met or Not Met an outcome. The recommendation engines will make a recommendation to the grader based on user attempts against content that has been mapped to the outcome.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| courseid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to course table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| userid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table. This is the user who is receiving the mark.&lt;br /&gt;
|-&lt;br /&gt;
| graderid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table. This is the user is doing the marking.&lt;br /&gt;
|-&lt;br /&gt;
| result&lt;br /&gt;
| int(2)&lt;br /&gt;
| 0 is not pass, 1 is pass, null is that no decision has been made yet.&lt;br /&gt;
|-&lt;br /&gt;
| timemodified&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time modified.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_mark_history ==&lt;br /&gt;
&lt;br /&gt;
Relations: course, user, outcome, outcome_mark&lt;br /&gt;
&lt;br /&gt;
Purpose: Keep track of past markings.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomemarkid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_mark table. Though the record could be missing from outcome_mark.&lt;br /&gt;
|-&lt;br /&gt;
| courseid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to course table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| userid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table. This is the user who is receiving the mark.&lt;br /&gt;
|-&lt;br /&gt;
| graderid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table. This is the user is doing the marking.&lt;br /&gt;
|-&lt;br /&gt;
| result&lt;br /&gt;
| int(2)&lt;br /&gt;
| 0 is not pass, 1 is pass, null is that no decision has been made yet.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_award ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome, user&lt;br /&gt;
&lt;br /&gt;
Purpose: This preserves any outcomes earned by a student, regardless if the course is deleted or not.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| userid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Architecture =&lt;br /&gt;
&lt;br /&gt;
The outcome API, outcome administrative settings, outcome associations and other UIs that drives outcomes will be located inside of the top level outcome/ directory.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Models and repository mappers:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* outcome: Represents a single outcome&lt;br /&gt;
* outcome set: Represents a group of outcomes&lt;br /&gt;
* outcome content: An outcome association to content.&lt;br /&gt;
* outcome attempt: An attempt made against an outcome.&lt;br /&gt;
* outcome mark: A teacher marking an outcome against a user.&lt;br /&gt;
* outcome award: An awarded outcome at the site level.&lt;br /&gt;
&lt;br /&gt;
A repository mapper would include ways to store the model and ways to retrieve them in a re-usable and organized manner.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Collections:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
A group of models that you may take action on or filter. Example of a third party library that helps to manage collections: https://github.com/doctrine/collections&lt;br /&gt;
&lt;br /&gt;
Collections may or may not be used, but some possible collections would be the following:&lt;br /&gt;
&lt;br /&gt;
* outcomes&lt;br /&gt;
* outcome attempts&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;New mform elements:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
For most plugins, the process of associating an outcome would be done through a Moodle form. Proposing adding a new Moodle form element that can be added to a form to provide the necessary UI. An API for validating and saving the new mform element will be provided. In addition, the mform element will just be a wrapper around a well formed API that could be used on it’s own when other use cases present themselves.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;API for plugins&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Beyond the mform element, plugins may interact with outcomes in order to provide a richer integration. An API will be provided to assist with the following (not an exhaustive list):&lt;br /&gt;
&lt;br /&gt;
* A way to notify the outcome system that a content item is or is not being used within a course.&lt;br /&gt;
** Example: When a question is authored at the site level and then is actually used within a course, it must inform the outcome system that it is in use. This could potentially be done via events or just direct API calls at the appropriate times. Same goes for when a question is no longer used within a course.&lt;br /&gt;
* Record an attempt made against a content item.&lt;br /&gt;
** Examples: A question has been attempted or an assignment submission has been graded.&lt;br /&gt;
* A way to retrieve associated outcomes.&lt;br /&gt;
* A way to update, delete or otherwise modify the associated outcomes.&lt;br /&gt;
* A way to pick outcome associations (EG: what the mform element would do).&lt;br /&gt;
* A method of syncing up attempts against a content item. This would be used when associating an outcome on content that has already been graded/attempted.&lt;br /&gt;
* API to cleanup tables on course deletion.&lt;br /&gt;
&lt;br /&gt;
== Supported plugin type plugins ==&lt;br /&gt;
&lt;br /&gt;
This may sound a little odd, but basically the point of these plugins is to add support for a plugin type to the outcome system. These types would assist in interpreting outcome content associations. Examples:&lt;br /&gt;
&lt;br /&gt;
* Given an outcome association, please provide a link to the mapped content.&lt;br /&gt;
** For an activity, this would be a link to the module.&lt;br /&gt;
** For a grading form, a link to the grading instance.&lt;br /&gt;
** For a question, a link to the question instance in the question bank.&lt;br /&gt;
* What are all of the content items that have not been mapped?&lt;br /&gt;
** For activities, this would return instances that are not mapped.&lt;br /&gt;
** For grading form, this would return sub-plugin specific information, like criteria.&lt;br /&gt;
** For questions, this would return questions from the course question bank that are not mapped.&lt;br /&gt;
* May assist with automatic cleanup when the content is deleted.&lt;br /&gt;
* Also other meta data could be derived, like plugin type name.&lt;br /&gt;
&lt;br /&gt;
This plugin would live under outcome/support/ and would initially ship with support of the following plugin types:&lt;br /&gt;
&lt;br /&gt;
* mod&lt;br /&gt;
* qtype&lt;br /&gt;
* gradingform: note that this integration would be deeper in that each gradingform plugin would need to implement something in order to help interpret associations. The reason being is that outcomes are being associated to plugin specific content, instead of something generic like the grading instance.&lt;br /&gt;
&lt;br /&gt;
== Import and export plugins ==&lt;br /&gt;
&lt;br /&gt;
The outcome system would support the exporting of outcome sets. The first export plugin would be a very simple JSON export that is specific to Moodle itself. This would be used for moving custom outcomes from one Moodle site to another.&lt;br /&gt;
&lt;br /&gt;
The outcome system would support importing outcome sets. Initially, there would be support for importing outcomes from [http://asn.jesandco.org Achievement Standards Network (ASN)] ([http://standards.jesandco.org/wiki/ASN_Application_Profile Format Specification]) and importing the JSON export from above.&lt;br /&gt;
&lt;br /&gt;
Both of the outcomes import and export processes would be a plugin based, so other formats could be supported by creating new plugins. The import and export plugins would live under outcome/import/ and outcome/export/.&lt;br /&gt;
&lt;br /&gt;
== Recommendation engine plugins ==&lt;br /&gt;
&lt;br /&gt;
The outcome system would provide a way to recommend to a teacher whether a student should be marked as completing the outcome or not. These plugins should have full Moodle plugin support because they may need to listen to events, run crons, have DB tables, global settings, etc. These plugins would live under outcome/engine/. Recommendations would be generated on demand and stored in MUC.&lt;br /&gt;
&lt;br /&gt;
Initially, the only plugin would be a percentage based recommendation engine. It would be configurable for a specific threshold that would determine if an attempt against an outcome should be considered correct or incorrect. It would then process the outcome attempts to determine the recommendation.&lt;br /&gt;
&lt;br /&gt;
Recommendation engines should also be enabled or disabled at the site level. This would require a “Manage recommendation engines” section in the admin site settings.&lt;br /&gt;
&lt;br /&gt;
= Reporting =&lt;br /&gt;
&lt;br /&gt;
== Site ==&lt;br /&gt;
&lt;br /&gt;
The following reports:&lt;br /&gt;
&lt;br /&gt;
* Outcomes Coverage report - shows outcomes that have been mapped to content in the site.&lt;br /&gt;
* Outcomes Performance report - shows performance on outcomes at the site level. Optionally broken down by course.&lt;br /&gt;
&lt;br /&gt;
== Course ==&lt;br /&gt;
&lt;br /&gt;
The following reports:&lt;br /&gt;
&lt;br /&gt;
* Outcomes Coverage report - shows outcomes that have been mapped in this course.&lt;br /&gt;
* Outcomes: Unmapped Content report - shows content that is not mapped to an outcome.&lt;br /&gt;
* Outcomes Performance report - shows aggregated performance on outcomes in the course.&lt;br /&gt;
* Outcomes Student Performance report - shows student performance on outcomes in the course for the teacher.&lt;br /&gt;
* Outcomes Personal Performance report - shows student performance on outcomes in the course for the student.&lt;br /&gt;
&lt;br /&gt;
== User profile ==&lt;br /&gt;
&lt;br /&gt;
At the very least, there will be a user site report where the user can see earned outcomes.&lt;br /&gt;
&lt;br /&gt;
= Grading =&lt;br /&gt;
&lt;br /&gt;
Outcome Completion Marking is done by course graders and is the final check point for if a learner has earned an outcome or not. The proposed location is to use the Outcome tab that is currently in the grades section of the course. This would also highjack the Outcomes link under Grade administration and Course administration.&lt;br /&gt;
&lt;br /&gt;
= Logging =&lt;br /&gt;
&lt;br /&gt;
We want to audit most actions in the Moodle log. These actions include:&lt;br /&gt;
&lt;br /&gt;
* CRUD type actions.&lt;br /&gt;
* Any association editing. EG: associating an outcome with a course, content item, etc.&lt;br /&gt;
* Outcome marking.&lt;br /&gt;
* User attempts against outcomes.&lt;br /&gt;
&lt;br /&gt;
= Role capabilities =&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Description&lt;br /&gt;
! Capability&lt;br /&gt;
|-&lt;br /&gt;
| Map outcomes to content&lt;br /&gt;
| moodle/outcome:contentmap&lt;br /&gt;
|-&lt;br /&gt;
| Map outcome sets to courses&lt;br /&gt;
| moodle/outcome:coursemap&lt;br /&gt;
|-&lt;br /&gt;
| Administering outcomes (Editing, importing, etc)&lt;br /&gt;
| moodle/outcome:edit&lt;br /&gt;
|-&lt;br /&gt;
| Each report will have a capability to view them.&lt;br /&gt;
| report/REPORTNAME:view&lt;br /&gt;
|-&lt;br /&gt;
| Marking outcomes by graders&lt;br /&gt;
| moodle/grade:edit&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Backup and restore =&lt;br /&gt;
&lt;br /&gt;
The workflow for backup and restore may go like:&lt;br /&gt;
&lt;br /&gt;
* Same site, then just map to existing outcomes via the identifier.&lt;br /&gt;
* Not same site, then the assumption is that the outcome set should be imported first, then we can map to existing outcomes via the identifier like in our same site scenario.&lt;br /&gt;
&lt;br /&gt;
Outcomes would probably take advantage of the backup plugin API to backup outcome associations to modules, question, etc. So, for example:&lt;br /&gt;
&lt;br /&gt;
* Outcomes would plug into activities in order to backup outcome associations and attempts.&lt;br /&gt;
* Outcomes would plug into questions in order to backup outcome associations and attempts.&lt;br /&gt;
* Grading forms would have to manually outcome associations and attempts. Will strive to make code re-usable.&lt;br /&gt;
&lt;br /&gt;
= Migration of old outcomes =&lt;br /&gt;
&lt;br /&gt;
Please first review [[Migration and Technical Issues]]. This still needs to be flushed out some more, but since the migration requires user interaction, we may need to create an admin tool to handle the migration. Until outcomes are migrated, it might make sense to continue to show the outcomes in the grade book, but remove the ability to do any editing of old outcomes.&lt;/div&gt;</summary>
		<author><name>Bushido</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=Outcomes_Technical_Specification&amp;diff=38128</id>
		<title>Outcomes Technical Specification</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=Outcomes_Technical_Specification&amp;diff=38128"/>
		<updated>2013-03-06T22:08:17Z</updated>

		<summary type="html">&lt;p&gt;Bushido: /* outcome_attempt */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
&lt;br /&gt;
Please be familiar with the function specification as outlined in the [[Outcomes Specification]]. The functional specification will provide details about the concepts and goals of this project. In particular, the following sections provide the overview of the system by user role:&lt;br /&gt;
&lt;br /&gt;
* [[Outcomes Administrator Specification]]&lt;br /&gt;
* [[Outcomes Instructor Specification]]&lt;br /&gt;
* [[Outcomes Student Specification]]&lt;br /&gt;
&lt;br /&gt;
In addition, some features and use cases are known but not yet being implemented. Please see [[Specifically Excluded Use Cases]]. Specifically, this initial version will not be attempting to map an existing outcome set to a new version of the outcome set on import.&lt;br /&gt;
&lt;br /&gt;
This document attempts to capture how the functional specification would be implemented in Moodle.&lt;br /&gt;
&lt;br /&gt;
= Backwards compatibility breaks =&lt;br /&gt;
&lt;br /&gt;
First and foremost, it is important to identify key differences between the current outcome system and this proposal as there are some philosophical shifts as well as breaking of existing code.&lt;br /&gt;
&lt;br /&gt;
# Outcomes will now only be created at the site level and then mapped to courses and content. Outcomes will no longer be created at the course level.&lt;br /&gt;
# Anything using the current outcome API or tables will have to be updated to use the new outcomes when appropriate.&lt;br /&gt;
# Outcomes will no longer appear in the grade book.&lt;br /&gt;
# Outcomes will no longer support scales. It is just a simple pass or fail.&lt;br /&gt;
&lt;br /&gt;
= Settings =&lt;br /&gt;
&lt;br /&gt;
== Site ==&lt;br /&gt;
&lt;br /&gt;
At the site level, there will be an area to do all of the configuration and setup of outcome sets. The proposed location is under Settings &amp;gt; Site Administration &amp;gt; Grades &amp;gt; Outcomes.&lt;br /&gt;
&lt;br /&gt;
In addition to managing outcomes, there will be site settings page for general outcome settings. For example, a setting to toggle if outcome idnumbers are editable or not.&lt;br /&gt;
&lt;br /&gt;
== Course ==&lt;br /&gt;
&lt;br /&gt;
When editing a course, there will be a section to associate outcome sets to the course. The section will appear below the course General settings.&lt;br /&gt;
&lt;br /&gt;
This association is used to determine the relevant outcomes for the course for reporting and as a way to pre-filter outcome pickers when associating outcomes to content.&lt;br /&gt;
&lt;br /&gt;
== Activity ==&lt;br /&gt;
&lt;br /&gt;
When editing an activity, there will be a section to associate individual outcomes to the activity. This section will be provided by the moodleform_mod::standard_coursemodule_elements() callback so that all activities will be able to be associated to outcomes automatically.  In the flow of the activity&#039;s form, the outcome mapping options would appear below the grades section.  Do note though that if an activity does not support grades, it can still be mapped to outcomes.&lt;br /&gt;
&lt;br /&gt;
Graded activities will have to add additional integration points with outcomes in order to capture user attempts.&lt;br /&gt;
&lt;br /&gt;
== Advanced grading ==&lt;br /&gt;
&lt;br /&gt;
Rubrics and Marking guides will be able to associate an outcome for a criteria. API will be provided to support this, but each grading method will have to integrate with outcomes where it makes sense.&lt;br /&gt;
&lt;br /&gt;
== Questions ==&lt;br /&gt;
&lt;br /&gt;
When editing a question, there will be a section to associate individual outcomes to the question. The section can be added to question_edit_form::definition() before the Tags section.&lt;br /&gt;
&lt;br /&gt;
This association UI might behave a little differently based on the context in Moodle. If the question is being authored at the site level, then the outcome association is more free form, meaning one can select any outcome from any outcome set. If the question is being authored at the course level, then the outcome association defaults to those outcome sets that are associated to the course.&lt;br /&gt;
&lt;br /&gt;
= Data structure =&lt;br /&gt;
&lt;br /&gt;
== outcome_set ==&lt;br /&gt;
&lt;br /&gt;
Relations: none&lt;br /&gt;
&lt;br /&gt;
Purpose: An outcome set represents a collection of outcomes and perhaps some meta data regarding the revision or applicable region. Outcome sets are mapped to courses, which makes the outcomes within the set available to be mapped to course content. An example outcome set would be [http://asn.jesandco.org/resources/D2403043 Health Education Content Standards for California Public Schools, Kindergarten Through Grade Twelve].&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| idnumber&lt;br /&gt;
| varchar(255), unique index&lt;br /&gt;
| GUID that is auto-generated if missing. Generally on import, these are provided. This would be used to identify the outcome set during import or course restore.&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| varchar(255)&lt;br /&gt;
| The name of the outcome set&lt;br /&gt;
|-&lt;br /&gt;
| description&lt;br /&gt;
| text, default null, optional&lt;br /&gt;
| The plain text description of the outcome.&lt;br /&gt;
|-&lt;br /&gt;
| provider&lt;br /&gt;
| varchar(255), default null, optional&lt;br /&gt;
| Provider information regarding the outcome set. EG: Could be set to ASN.&lt;br /&gt;
|-&lt;br /&gt;
| revision&lt;br /&gt;
| varchar(255), default null, optional&lt;br /&gt;
| Version information regarding the outcome set. This will typically be a date or year, EG: 2011&lt;br /&gt;
|-&lt;br /&gt;
| region&lt;br /&gt;
| varchar(255), default null, optional&lt;br /&gt;
| Any region information. Example: In the US this could be a state name.&lt;br /&gt;
|-&lt;br /&gt;
| deleted&lt;br /&gt;
| int(1), default 0&lt;br /&gt;
| If the outcome set has been deleted.&lt;br /&gt;
|-&lt;br /&gt;
| timemodified&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time modified.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome_set&lt;br /&gt;
&lt;br /&gt;
Purpose: Stores information regarding an individual outcome. Outcomes can be stored in a hierarchy, but the hierarchy is visual only. This means that if an outcome is earned, then only that outcome is earned, not it and all of its children. Also, if all child outcomes are earned, then parent outcomes are not also automatically earned. In addition, sometimes outcomes are not assessable, but are only there for extra context in the hierarchy. This identifies that the outcome cannot be mapped to content, nor can a student earn it.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomesetid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_set table.&lt;br /&gt;
|-&lt;br /&gt;
| parentid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Self referencing key. Identifies the parent outcome in the hierarchy.&lt;br /&gt;
|-&lt;br /&gt;
| idnumber&lt;br /&gt;
| varchar(255), unique index&lt;br /&gt;
| GUID that is auto-generated if missing. Generally on import, these are provided. This would be used to identify the outcome set during import or course restore.&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| varchar(255)&lt;br /&gt;
| The name of the outcome.&lt;br /&gt;
|-&lt;br /&gt;
| docnum&lt;br /&gt;
| varchar(255), default null, optional&lt;br /&gt;
| Field for tracking additional information on the outcome. EG: 2.3.A&lt;br /&gt;
|-&lt;br /&gt;
| description&lt;br /&gt;
| text, default null, optional&lt;br /&gt;
| The plain text description of the outcome.&lt;br /&gt;
|-&lt;br /&gt;
| assessable&lt;br /&gt;
| int(1)&lt;br /&gt;
| If set to 1, then the outcome is assessable and can be mapped to content. If set to 0, then the outcome is not assessable and cannot be mapped to content.&lt;br /&gt;
|-&lt;br /&gt;
| deleted&lt;br /&gt;
| int(1), default 0&lt;br /&gt;
| If the outcome has been deleted.&lt;br /&gt;
|-&lt;br /&gt;
| sortorder&lt;br /&gt;
| int(10)&lt;br /&gt;
| The sort order. This is 0-X for all outcomes that belong to the same outcome set.&lt;br /&gt;
|-&lt;br /&gt;
| timemodified&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time modified.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_meta ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome&lt;br /&gt;
&lt;br /&gt;
Purpose: Represents additional meta information regarding outcomes. Only support for “Education Level” (K, 1, … 12, etc.) and “Subjects” (e.g. Math, English, etc.) will be available out of the box, but additional data points can be added later (which would need to be added to the UI). One outcome could have many meta values. For example: an outcome could be associated to many educational levels and subjects.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| varchar(255), indexed&lt;br /&gt;
| The name of the meta data.&lt;br /&gt;
|-&lt;br /&gt;
| value&lt;br /&gt;
| varchar(1333), indexed&lt;br /&gt;
| The value of the meta data.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_content ==&lt;br /&gt;
&lt;br /&gt;
Relations: dynamic with core tables&lt;br /&gt;
&lt;br /&gt;
Purpose: This represents that a content item has been mapped to an outcome or to multiple outcomes. Check the outcome_content_map table for the specific outcomes.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| component&lt;br /&gt;
| varchar(255), indexed&lt;br /&gt;
| The name of the component.&lt;br /&gt;
|-&lt;br /&gt;
| area&lt;br /&gt;
| varchar(255), default null, indexed, optional&lt;br /&gt;
| The name of the area. Used when a component has multiple items to associate to outcomes.&lt;br /&gt;
|-&lt;br /&gt;
| itemid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| The item ID.&lt;br /&gt;
|-&lt;br /&gt;
| deleted&lt;br /&gt;
| int(1), default 0&lt;br /&gt;
| Soft delete if the outcome was disassociated from the content. Note, if the content is actually deleted, then this association will be deleted.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_content_map ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome, outcome_content&lt;br /&gt;
&lt;br /&gt;
Purpose: This represents the one to many relationship of a single content item mapped to many outcomes.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomecontentid&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Foreign key to outcome_content table.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_mod_content_map ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome_content, course_modules&lt;br /&gt;
&lt;br /&gt;
Purpose: Associates an outcome content item with an activity. For example: a question is created in the site question bank and outcomes are associated to the question. Once that question is added to a Quiz then that association is stored in this table so the outcome system knows that the content item and its outcomes are in use.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| cmid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to course_modules table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomecontentid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_content table.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_set_course_map ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome_set, course&lt;br /&gt;
&lt;br /&gt;
Purpose: Associates an outcome set with the course. Filtering of the outcome set is optionally allowed since outcome sets can span multiple educational levels and even subjects. Once an outcome set is mapped to the course, then the outcomes in the outcome set are available to be mapped to course content.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| courseid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to course table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomesetid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_set table.&lt;br /&gt;
|-&lt;br /&gt;
| filter&lt;br /&gt;
| text, default null&lt;br /&gt;
| Some outcome sets span multiple education levels and subjects. So, when mapping an outcome set to a course, it may make sense to restrict the available outcomes to a specific education level(s) and/or subject(s). This information would be serialized into this field.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_attempt ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome_mod_content_map, user&lt;br /&gt;
&lt;br /&gt;
Purpose: Track a user attempt against a content item within a particular activity. The idea here is to aggregate attempt information so that the recommendation engines (detailed below) have an easily accessible data set to process. This does not mean however that recommendation engines are only limited to this data as one could mine for additional data where needed.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomemodcontentid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_content table.&lt;br /&gt;
|-&lt;br /&gt;
| userid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table.&lt;br /&gt;
|-&lt;br /&gt;
| percentgrade&lt;br /&gt;
| float(10,5)&lt;br /&gt;
| Percent grade earned on this attempt.&lt;br /&gt;
|-&lt;br /&gt;
| mingrade&lt;br /&gt;
| float(10,5)&lt;br /&gt;
| The minimum possible grade.&lt;br /&gt;
|-&lt;br /&gt;
| maxgrade&lt;br /&gt;
| float(10,5)&lt;br /&gt;
| The maximum possible grade.&lt;br /&gt;
|-&lt;br /&gt;
| rawgrade&lt;br /&gt;
| float(10,5)&lt;br /&gt;
| The points earned, should be between the minimum and maximum grades.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_mark ==&lt;br /&gt;
&lt;br /&gt;
Relations: course, user, outcome&lt;br /&gt;
&lt;br /&gt;
Purpose: Graders will manually mark the student as having Met or Not Met an outcome. The recommendation engines will make a recommendation to the grader based on user attempts against content that has been mapped to the outcome.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| courseid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to course table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| userid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table. This is the user who is receiving the mark.&lt;br /&gt;
|-&lt;br /&gt;
| graderid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table. This is the user is doing the marking.&lt;br /&gt;
|-&lt;br /&gt;
| result&lt;br /&gt;
| int(2)&lt;br /&gt;
| 0 is not pass, 1 is pass, null is that no decision has been made yet.&lt;br /&gt;
|-&lt;br /&gt;
| timemodified&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time modified.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_mark_history ==&lt;br /&gt;
&lt;br /&gt;
Relations: course, user, outcome, outcome_mark&lt;br /&gt;
&lt;br /&gt;
Purpose: Keep track of past markings.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomemarkid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_mark table. Though the record could be missing from outcome_mark.&lt;br /&gt;
|-&lt;br /&gt;
| courseid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to course table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| userid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table. This is the user who is receiving the mark.&lt;br /&gt;
|-&lt;br /&gt;
| graderid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table. This is the user is doing the marking.&lt;br /&gt;
|-&lt;br /&gt;
| result&lt;br /&gt;
| int(2)&lt;br /&gt;
| 0 is not pass, 1 is pass, null is that no decision has been made yet.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_award ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome, user&lt;br /&gt;
&lt;br /&gt;
Purpose: This preserves any outcomes earned by a student, regardless if the course is deleted or not.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| userid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Architecture =&lt;br /&gt;
&lt;br /&gt;
The outcome API, outcome administrative settings, outcome associations and other UIs that drives outcomes will be located inside of the top level outcome/ directory.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Models and repository mappers:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* outcome: Represents a single outcome&lt;br /&gt;
* outcome set: Represents a group of outcomes&lt;br /&gt;
* outcome content: An outcome association to content.&lt;br /&gt;
* outcome attempt: An attempt made against an outcome.&lt;br /&gt;
* outcome mark: A teacher marking an outcome against a user.&lt;br /&gt;
* outcome award: An awarded outcome at the site level.&lt;br /&gt;
&lt;br /&gt;
A repository mapper would include ways to store the model and ways to retrieve them in a re-usable and organized manner.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Collections:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
A group of models that you may take action on or filter. Example of a third party library that helps to manage collections: https://github.com/doctrine/collections&lt;br /&gt;
&lt;br /&gt;
Collections may or may not be used, but some possible collections would be the following:&lt;br /&gt;
&lt;br /&gt;
* outcomes&lt;br /&gt;
* outcome attempts&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;New mform elements:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
For most plugins, the process of associating an outcome would be done through a Moodle form. Proposing adding a new Moodle form element that can be added to a form to provide the necessary UI. An API for validating and saving the new mform element will be provided. In addition, the mform element will just be a wrapper around a well formed API that could be used on it’s own when other use cases present themselves.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;API for plugins&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Beyond the mform element, plugins may interact with outcomes in order to provide a richer integration. An API will be provided to assist with the following (not an exhaustive list):&lt;br /&gt;
&lt;br /&gt;
* A way to notify the outcome system that a content item is or is not being used within a course.&lt;br /&gt;
** Example: When a question is authored at the site level and then is actually used within a course, it must inform the outcome system that it is in use. This could potentially be done via events or just direct API calls at the appropriate times. Same goes for when a question is no longer used within a course.&lt;br /&gt;
* Record an attempt made against a content item.&lt;br /&gt;
** Examples: A question has been attempted or an assignment submission has been graded.&lt;br /&gt;
* A way to retrieve associated outcomes.&lt;br /&gt;
* A way to update, delete or otherwise modify the associated outcomes.&lt;br /&gt;
* A way to pick outcome associations (EG: what the mform element would do).&lt;br /&gt;
* A method of syncing up attempts against a content item. This would be used when associating an outcome on content that has already been graded/attempted.&lt;br /&gt;
* API to cleanup tables on course deletion.&lt;br /&gt;
&lt;br /&gt;
== Supported plugin type plugins ==&lt;br /&gt;
&lt;br /&gt;
This may sound a little odd, but basically the point of these plugins is to add support for a plugin type to the outcome system. These types would assist in interpreting outcome content associations. Examples:&lt;br /&gt;
&lt;br /&gt;
* Given an outcome association, please provide a link to the mapped content.&lt;br /&gt;
** For an activity, this would be a link to the module.&lt;br /&gt;
** For a grading form, a link to the grading instance.&lt;br /&gt;
** For a question, a link to the question instance in the question bank.&lt;br /&gt;
* What are all of the content items that have not been mapped?&lt;br /&gt;
** For activities, this would return instances that are not mapped.&lt;br /&gt;
** For grading form, this would return sub-plugin specific information, like criteria.&lt;br /&gt;
** For questions, this would return questions from the course question bank that are not mapped.&lt;br /&gt;
* May assist with automatic cleanup when the content is deleted.&lt;br /&gt;
* Also other meta data could be derived, like plugin type name.&lt;br /&gt;
&lt;br /&gt;
This plugin would live under outcome/support/ and would initially ship with support of the following plugin types:&lt;br /&gt;
&lt;br /&gt;
* mod&lt;br /&gt;
* qtype&lt;br /&gt;
* gradingform: note that this integration would be deeper in that each gradingform plugin would need to implement something in order to help interpret associations. The reason being is that outcomes are being associated to plugin specific content, instead of something generic like the grading instance.&lt;br /&gt;
&lt;br /&gt;
== Import and export plugins ==&lt;br /&gt;
&lt;br /&gt;
The outcome system would support the exporting of outcome sets. The first export plugin would be a very simple JSON export that is specific to Moodle itself. This would be used for moving custom outcomes from one Moodle site to another.&lt;br /&gt;
&lt;br /&gt;
The outcome system would support importing outcome sets. Initially, there would be support for importing outcomes from [http://asn.jesandco.org Achievement Standards Network (ASN)] ([http://standards.jesandco.org/wiki/ASN_Application_Profile Format Specification]) and importing the JSON export from above.&lt;br /&gt;
&lt;br /&gt;
Both of the outcomes import and export processes would be a plugin based, so other formats could be supported by creating new plugins. The import and export plugins would live under outcome/import/ and outcome/export/.&lt;br /&gt;
&lt;br /&gt;
== Recommendation engine plugins ==&lt;br /&gt;
&lt;br /&gt;
The outcome system would provide a way to recommend to a teacher whether a student should be marked as completing the outcome or not. These plugins should have full Moodle plugin support because they may need to listen to events, run crons, have DB tables, global settings, etc. These plugins would live under outcome/engine/. Recommendations would be generated on demand and stored in MUC.&lt;br /&gt;
&lt;br /&gt;
Initially, the only plugin would be a percentage based recommendation engine. It would be configurable for a specific threshold that would determine if an attempt against an outcome should be considered correct or incorrect. It would then process the outcome attempts to determine the recommendation.&lt;br /&gt;
&lt;br /&gt;
Recommendation engines should also be enabled or disabled at the site level. This would require a “Manage recommendation engines” section in the admin site settings.&lt;br /&gt;
&lt;br /&gt;
= Reporting =&lt;br /&gt;
&lt;br /&gt;
== Site ==&lt;br /&gt;
&lt;br /&gt;
The following reports:&lt;br /&gt;
&lt;br /&gt;
* Outcomes Coverage report - shows outcomes that have been mapped to content in the site.&lt;br /&gt;
* Outcomes Performance report - shows performance on outcomes at the site level. Optionally broken down by course.&lt;br /&gt;
&lt;br /&gt;
== Course ==&lt;br /&gt;
&lt;br /&gt;
The following reports:&lt;br /&gt;
&lt;br /&gt;
* Outcomes Coverage report - shows outcomes that have been mapped in this course.&lt;br /&gt;
* Outcomes: Unmapped Content report - shows content that is not mapped to an outcome.&lt;br /&gt;
* Outcomes Performance report - shows aggregated performance on outcomes in the course.&lt;br /&gt;
* Outcomes Student Performance report - shows student performance on outcomes in the course for the teacher.&lt;br /&gt;
* Outcomes Personal Performance report - shows student performance on outcomes in the course for the student.&lt;br /&gt;
&lt;br /&gt;
== User profile ==&lt;br /&gt;
&lt;br /&gt;
At the very least, there will be a user site report where the user can see earned outcomes.&lt;br /&gt;
&lt;br /&gt;
= Grading =&lt;br /&gt;
&lt;br /&gt;
Outcome Completion Marking is done by course graders and is the final check point for if a learner has earned an outcome or not. The proposed location is to use the Outcome tab that is currently in the grades section of the course. This would also highjack the Outcomes link under Grade administration and Course administration.&lt;br /&gt;
&lt;br /&gt;
= Logging =&lt;br /&gt;
&lt;br /&gt;
We want to audit most actions in the Moodle log. These actions include:&lt;br /&gt;
&lt;br /&gt;
* CRUD type actions.&lt;br /&gt;
* Any association editing. EG: associating an outcome with a course, content item, etc.&lt;br /&gt;
* Outcome marking.&lt;br /&gt;
* User attempts against outcomes.&lt;br /&gt;
&lt;br /&gt;
= Role capabilities =&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Description&lt;br /&gt;
! Capability&lt;br /&gt;
|-&lt;br /&gt;
| Map outcomes to content&lt;br /&gt;
| moodle/outcome:contentmap&lt;br /&gt;
|-&lt;br /&gt;
| Map outcome sets to courses&lt;br /&gt;
| moodle/outcome:coursemap&lt;br /&gt;
|-&lt;br /&gt;
| Administering outcomes (Editing, importing, etc)&lt;br /&gt;
| moodle/outcome:edit&lt;br /&gt;
|-&lt;br /&gt;
| Each report will have a capability to view them.&lt;br /&gt;
| report/REPORTNAME:view&lt;br /&gt;
|-&lt;br /&gt;
| Marking outcomes by graders&lt;br /&gt;
| moodle/grade:edit&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Backup and restore =&lt;br /&gt;
&lt;br /&gt;
The workflow for backup and restore may go like:&lt;br /&gt;
&lt;br /&gt;
* Same site, then just map to existing outcomes via the identifier.&lt;br /&gt;
* Not same site, then the assumption is that the outcome set should be imported first, then we can map to existing outcomes via the identifier like in our same site scenario.&lt;br /&gt;
&lt;br /&gt;
Outcomes would probably take advantage of the backup plugin API to backup outcome associations to modules, question, etc. So, for example:&lt;br /&gt;
&lt;br /&gt;
* Outcomes would plug into activities in order to backup outcome associations and attempts.&lt;br /&gt;
* Outcomes would plug into questions in order to backup outcome associations and attempts.&lt;br /&gt;
* Grading forms would have to manually outcome associations and attempts. Will strive to make code re-usable.&lt;br /&gt;
&lt;br /&gt;
= Migration of old outcomes =&lt;br /&gt;
&lt;br /&gt;
Please first review [[Migration and Technical Issues]]. This still needs to be flushed out some more, but since the migration requires user interaction, we may need to create an admin tool to handle the migration. Until outcomes are migrated, it might make sense to continue to show the outcomes in the grade book, but remove the ability to do any editing of old outcomes.&lt;/div&gt;</summary>
		<author><name>Bushido</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=Outcomes_Technical_Specification&amp;diff=38127</id>
		<title>Outcomes Technical Specification</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=Outcomes_Technical_Specification&amp;diff=38127"/>
		<updated>2013-03-06T22:06:40Z</updated>

		<summary type="html">&lt;p&gt;Bushido: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
&lt;br /&gt;
Please be familiar with the function specification as outlined in the [[Outcomes Specification]]. The functional specification will provide details about the concepts and goals of this project. In particular, the following sections provide the overview of the system by user role:&lt;br /&gt;
&lt;br /&gt;
* [[Outcomes Administrator Specification]]&lt;br /&gt;
* [[Outcomes Instructor Specification]]&lt;br /&gt;
* [[Outcomes Student Specification]]&lt;br /&gt;
&lt;br /&gt;
In addition, some features and use cases are known but not yet being implemented. Please see [[Specifically Excluded Use Cases]]. Specifically, this initial version will not be attempting to map an existing outcome set to a new version of the outcome set on import.&lt;br /&gt;
&lt;br /&gt;
This document attempts to capture how the functional specification would be implemented in Moodle.&lt;br /&gt;
&lt;br /&gt;
= Backwards compatibility breaks =&lt;br /&gt;
&lt;br /&gt;
First and foremost, it is important to identify key differences between the current outcome system and this proposal as there are some philosophical shifts as well as breaking of existing code.&lt;br /&gt;
&lt;br /&gt;
# Outcomes will now only be created at the site level and then mapped to courses and content. Outcomes will no longer be created at the course level.&lt;br /&gt;
# Anything using the current outcome API or tables will have to be updated to use the new outcomes when appropriate.&lt;br /&gt;
# Outcomes will no longer appear in the grade book.&lt;br /&gt;
# Outcomes will no longer support scales. It is just a simple pass or fail.&lt;br /&gt;
&lt;br /&gt;
= Settings =&lt;br /&gt;
&lt;br /&gt;
== Site ==&lt;br /&gt;
&lt;br /&gt;
At the site level, there will be an area to do all of the configuration and setup of outcome sets. The proposed location is under Settings &amp;gt; Site Administration &amp;gt; Grades &amp;gt; Outcomes.&lt;br /&gt;
&lt;br /&gt;
In addition to managing outcomes, there will be site settings page for general outcome settings. For example, a setting to toggle if outcome idnumbers are editable or not.&lt;br /&gt;
&lt;br /&gt;
== Course ==&lt;br /&gt;
&lt;br /&gt;
When editing a course, there will be a section to associate outcome sets to the course. The section will appear below the course General settings.&lt;br /&gt;
&lt;br /&gt;
This association is used to determine the relevant outcomes for the course for reporting and as a way to pre-filter outcome pickers when associating outcomes to content.&lt;br /&gt;
&lt;br /&gt;
== Activity ==&lt;br /&gt;
&lt;br /&gt;
When editing an activity, there will be a section to associate individual outcomes to the activity. This section will be provided by the moodleform_mod::standard_coursemodule_elements() callback so that all activities will be able to be associated to outcomes automatically.  In the flow of the activity&#039;s form, the outcome mapping options would appear below the grades section.  Do note though that if an activity does not support grades, it can still be mapped to outcomes.&lt;br /&gt;
&lt;br /&gt;
Graded activities will have to add additional integration points with outcomes in order to capture user attempts.&lt;br /&gt;
&lt;br /&gt;
== Advanced grading ==&lt;br /&gt;
&lt;br /&gt;
Rubrics and Marking guides will be able to associate an outcome for a criteria. API will be provided to support this, but each grading method will have to integrate with outcomes where it makes sense.&lt;br /&gt;
&lt;br /&gt;
== Questions ==&lt;br /&gt;
&lt;br /&gt;
When editing a question, there will be a section to associate individual outcomes to the question. The section can be added to question_edit_form::definition() before the Tags section.&lt;br /&gt;
&lt;br /&gt;
This association UI might behave a little differently based on the context in Moodle. If the question is being authored at the site level, then the outcome association is more free form, meaning one can select any outcome from any outcome set. If the question is being authored at the course level, then the outcome association defaults to those outcome sets that are associated to the course.&lt;br /&gt;
&lt;br /&gt;
= Data structure =&lt;br /&gt;
&lt;br /&gt;
== outcome_set ==&lt;br /&gt;
&lt;br /&gt;
Relations: none&lt;br /&gt;
&lt;br /&gt;
Purpose: An outcome set represents a collection of outcomes and perhaps some meta data regarding the revision or applicable region. Outcome sets are mapped to courses, which makes the outcomes within the set available to be mapped to course content. An example outcome set would be [http://asn.jesandco.org/resources/D2403043 Health Education Content Standards for California Public Schools, Kindergarten Through Grade Twelve].&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| idnumber&lt;br /&gt;
| varchar(255), unique index&lt;br /&gt;
| GUID that is auto-generated if missing. Generally on import, these are provided. This would be used to identify the outcome set during import or course restore.&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| varchar(255)&lt;br /&gt;
| The name of the outcome set&lt;br /&gt;
|-&lt;br /&gt;
| description&lt;br /&gt;
| text, default null, optional&lt;br /&gt;
| The plain text description of the outcome.&lt;br /&gt;
|-&lt;br /&gt;
| provider&lt;br /&gt;
| varchar(255), default null, optional&lt;br /&gt;
| Provider information regarding the outcome set. EG: Could be set to ASN.&lt;br /&gt;
|-&lt;br /&gt;
| revision&lt;br /&gt;
| varchar(255), default null, optional&lt;br /&gt;
| Version information regarding the outcome set. This will typically be a date or year, EG: 2011&lt;br /&gt;
|-&lt;br /&gt;
| region&lt;br /&gt;
| varchar(255), default null, optional&lt;br /&gt;
| Any region information. Example: In the US this could be a state name.&lt;br /&gt;
|-&lt;br /&gt;
| deleted&lt;br /&gt;
| int(1), default 0&lt;br /&gt;
| If the outcome set has been deleted.&lt;br /&gt;
|-&lt;br /&gt;
| timemodified&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time modified.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome_set&lt;br /&gt;
&lt;br /&gt;
Purpose: Stores information regarding an individual outcome. Outcomes can be stored in a hierarchy, but the hierarchy is visual only. This means that if an outcome is earned, then only that outcome is earned, not it and all of its children. Also, if all child outcomes are earned, then parent outcomes are not also automatically earned. In addition, sometimes outcomes are not assessable, but are only there for extra context in the hierarchy. This identifies that the outcome cannot be mapped to content, nor can a student earn it.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomesetid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_set table.&lt;br /&gt;
|-&lt;br /&gt;
| parentid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Self referencing key. Identifies the parent outcome in the hierarchy.&lt;br /&gt;
|-&lt;br /&gt;
| idnumber&lt;br /&gt;
| varchar(255), unique index&lt;br /&gt;
| GUID that is auto-generated if missing. Generally on import, these are provided. This would be used to identify the outcome set during import or course restore.&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| varchar(255)&lt;br /&gt;
| The name of the outcome.&lt;br /&gt;
|-&lt;br /&gt;
| docnum&lt;br /&gt;
| varchar(255), default null, optional&lt;br /&gt;
| Field for tracking additional information on the outcome. EG: 2.3.A&lt;br /&gt;
|-&lt;br /&gt;
| description&lt;br /&gt;
| text, default null, optional&lt;br /&gt;
| The plain text description of the outcome.&lt;br /&gt;
|-&lt;br /&gt;
| assessable&lt;br /&gt;
| int(1)&lt;br /&gt;
| If set to 1, then the outcome is assessable and can be mapped to content. If set to 0, then the outcome is not assessable and cannot be mapped to content.&lt;br /&gt;
|-&lt;br /&gt;
| deleted&lt;br /&gt;
| int(1), default 0&lt;br /&gt;
| If the outcome has been deleted.&lt;br /&gt;
|-&lt;br /&gt;
| sortorder&lt;br /&gt;
| int(10)&lt;br /&gt;
| The sort order. This is 0-X for all outcomes that belong to the same outcome set.&lt;br /&gt;
|-&lt;br /&gt;
| timemodified&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time modified.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_meta ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome&lt;br /&gt;
&lt;br /&gt;
Purpose: Represents additional meta information regarding outcomes. Only support for “Education Level” (K, 1, … 12, etc.) and “Subjects” (e.g. Math, English, etc.) will be available out of the box, but additional data points can be added later (which would need to be added to the UI). One outcome could have many meta values. For example: an outcome could be associated to many educational levels and subjects.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| varchar(255), indexed&lt;br /&gt;
| The name of the meta data.&lt;br /&gt;
|-&lt;br /&gt;
| value&lt;br /&gt;
| varchar(1333), indexed&lt;br /&gt;
| The value of the meta data.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_content ==&lt;br /&gt;
&lt;br /&gt;
Relations: dynamic with core tables&lt;br /&gt;
&lt;br /&gt;
Purpose: This represents that a content item has been mapped to an outcome or to multiple outcomes. Check the outcome_content_map table for the specific outcomes.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| component&lt;br /&gt;
| varchar(255), indexed&lt;br /&gt;
| The name of the component.&lt;br /&gt;
|-&lt;br /&gt;
| area&lt;br /&gt;
| varchar(255), default null, indexed, optional&lt;br /&gt;
| The name of the area. Used when a component has multiple items to associate to outcomes.&lt;br /&gt;
|-&lt;br /&gt;
| itemid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| The item ID.&lt;br /&gt;
|-&lt;br /&gt;
| deleted&lt;br /&gt;
| int(1), default 0&lt;br /&gt;
| Soft delete if the outcome was disassociated from the content. Note, if the content is actually deleted, then this association will be deleted.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_content_map ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome, outcome_content&lt;br /&gt;
&lt;br /&gt;
Purpose: This represents the one to many relationship of a single content item mapped to many outcomes.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomecontentid&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Foreign key to outcome_content table.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_mod_content_map ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome_content, course_modules&lt;br /&gt;
&lt;br /&gt;
Purpose: Associates an outcome content item with an activity. For example: a question is created in the site question bank and outcomes are associated to the question. Once that question is added to a Quiz then that association is stored in this table so the outcome system knows that the content item and its outcomes are in use.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| cmid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to course_modules table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomecontentid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_content table.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_set_course_map ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome_set, course&lt;br /&gt;
&lt;br /&gt;
Purpose: Associates an outcome set with the course. Filtering of the outcome set is optionally allowed since outcome sets can span multiple educational levels and even subjects. Once an outcome set is mapped to the course, then the outcomes in the outcome set are available to be mapped to course content.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| courseid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to course table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomesetid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_set table.&lt;br /&gt;
|-&lt;br /&gt;
| filter&lt;br /&gt;
| text, default null&lt;br /&gt;
| Some outcome sets span multiple education levels and subjects. So, when mapping an outcome set to a course, it may make sense to restrict the available outcomes to a specific education level(s) and/or subject(s). This information would be serialized into this field.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_attempt ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome_content, user&lt;br /&gt;
&lt;br /&gt;
Purpose: Track a user attempt against a content item. The idea here is to aggregate attempt information so that the recommendation engines (detailed below) have an easily accessible data set to process. This does not mean however that recommendation engines are only limited to this data as one could mine for additional data where needed.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomecontentid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_content table.&lt;br /&gt;
|-&lt;br /&gt;
| userid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table.&lt;br /&gt;
|-&lt;br /&gt;
| percentgrade&lt;br /&gt;
| float(10,5)&lt;br /&gt;
| Percent grade earned on this attempt.&lt;br /&gt;
|-&lt;br /&gt;
| mingrade&lt;br /&gt;
| float(10,5)&lt;br /&gt;
| The minimum possible grade.&lt;br /&gt;
|-&lt;br /&gt;
| maxgrade&lt;br /&gt;
| float(10,5)&lt;br /&gt;
| The maximum possible grade.&lt;br /&gt;
|-&lt;br /&gt;
| rawgrade&lt;br /&gt;
| float(10,5)&lt;br /&gt;
| The points earned, should be between the minimum and maximum grades.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_mark ==&lt;br /&gt;
&lt;br /&gt;
Relations: course, user, outcome&lt;br /&gt;
&lt;br /&gt;
Purpose: Graders will manually mark the student as having Met or Not Met an outcome. The recommendation engines will make a recommendation to the grader based on user attempts against content that has been mapped to the outcome.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| courseid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to course table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| userid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table. This is the user who is receiving the mark.&lt;br /&gt;
|-&lt;br /&gt;
| graderid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table. This is the user is doing the marking.&lt;br /&gt;
|-&lt;br /&gt;
| result&lt;br /&gt;
| int(2)&lt;br /&gt;
| 0 is not pass, 1 is pass, null is that no decision has been made yet.&lt;br /&gt;
|-&lt;br /&gt;
| timemodified&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time modified.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_mark_history ==&lt;br /&gt;
&lt;br /&gt;
Relations: course, user, outcome, outcome_mark&lt;br /&gt;
&lt;br /&gt;
Purpose: Keep track of past markings.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomemarkid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_mark table. Though the record could be missing from outcome_mark.&lt;br /&gt;
|-&lt;br /&gt;
| courseid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to course table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| userid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table. This is the user who is receiving the mark.&lt;br /&gt;
|-&lt;br /&gt;
| graderid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table. This is the user is doing the marking.&lt;br /&gt;
|-&lt;br /&gt;
| result&lt;br /&gt;
| int(2)&lt;br /&gt;
| 0 is not pass, 1 is pass, null is that no decision has been made yet.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_award ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome, user&lt;br /&gt;
&lt;br /&gt;
Purpose: This preserves any outcomes earned by a student, regardless if the course is deleted or not.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| userid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Architecture =&lt;br /&gt;
&lt;br /&gt;
The outcome API, outcome administrative settings, outcome associations and other UIs that drives outcomes will be located inside of the top level outcome/ directory.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Models and repository mappers:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* outcome: Represents a single outcome&lt;br /&gt;
* outcome set: Represents a group of outcomes&lt;br /&gt;
* outcome content: An outcome association to content.&lt;br /&gt;
* outcome attempt: An attempt made against an outcome.&lt;br /&gt;
* outcome mark: A teacher marking an outcome against a user.&lt;br /&gt;
* outcome award: An awarded outcome at the site level.&lt;br /&gt;
&lt;br /&gt;
A repository mapper would include ways to store the model and ways to retrieve them in a re-usable and organized manner.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Collections:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
A group of models that you may take action on or filter. Example of a third party library that helps to manage collections: https://github.com/doctrine/collections&lt;br /&gt;
&lt;br /&gt;
Collections may or may not be used, but some possible collections would be the following:&lt;br /&gt;
&lt;br /&gt;
* outcomes&lt;br /&gt;
* outcome attempts&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;New mform elements:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
For most plugins, the process of associating an outcome would be done through a Moodle form. Proposing adding a new Moodle form element that can be added to a form to provide the necessary UI. An API for validating and saving the new mform element will be provided. In addition, the mform element will just be a wrapper around a well formed API that could be used on it’s own when other use cases present themselves.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;API for plugins&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Beyond the mform element, plugins may interact with outcomes in order to provide a richer integration. An API will be provided to assist with the following (not an exhaustive list):&lt;br /&gt;
&lt;br /&gt;
* A way to notify the outcome system that a content item is or is not being used within a course.&lt;br /&gt;
** Example: When a question is authored at the site level and then is actually used within a course, it must inform the outcome system that it is in use. This could potentially be done via events or just direct API calls at the appropriate times. Same goes for when a question is no longer used within a course.&lt;br /&gt;
* Record an attempt made against a content item.&lt;br /&gt;
** Examples: A question has been attempted or an assignment submission has been graded.&lt;br /&gt;
* A way to retrieve associated outcomes.&lt;br /&gt;
* A way to update, delete or otherwise modify the associated outcomes.&lt;br /&gt;
* A way to pick outcome associations (EG: what the mform element would do).&lt;br /&gt;
* A method of syncing up attempts against a content item. This would be used when associating an outcome on content that has already been graded/attempted.&lt;br /&gt;
* API to cleanup tables on course deletion.&lt;br /&gt;
&lt;br /&gt;
== Supported plugin type plugins ==&lt;br /&gt;
&lt;br /&gt;
This may sound a little odd, but basically the point of these plugins is to add support for a plugin type to the outcome system. These types would assist in interpreting outcome content associations. Examples:&lt;br /&gt;
&lt;br /&gt;
* Given an outcome association, please provide a link to the mapped content.&lt;br /&gt;
** For an activity, this would be a link to the module.&lt;br /&gt;
** For a grading form, a link to the grading instance.&lt;br /&gt;
** For a question, a link to the question instance in the question bank.&lt;br /&gt;
* What are all of the content items that have not been mapped?&lt;br /&gt;
** For activities, this would return instances that are not mapped.&lt;br /&gt;
** For grading form, this would return sub-plugin specific information, like criteria.&lt;br /&gt;
** For questions, this would return questions from the course question bank that are not mapped.&lt;br /&gt;
* May assist with automatic cleanup when the content is deleted.&lt;br /&gt;
* Also other meta data could be derived, like plugin type name.&lt;br /&gt;
&lt;br /&gt;
This plugin would live under outcome/support/ and would initially ship with support of the following plugin types:&lt;br /&gt;
&lt;br /&gt;
* mod&lt;br /&gt;
* qtype&lt;br /&gt;
* gradingform: note that this integration would be deeper in that each gradingform plugin would need to implement something in order to help interpret associations. The reason being is that outcomes are being associated to plugin specific content, instead of something generic like the grading instance.&lt;br /&gt;
&lt;br /&gt;
== Import and export plugins ==&lt;br /&gt;
&lt;br /&gt;
The outcome system would support the exporting of outcome sets. The first export plugin would be a very simple JSON export that is specific to Moodle itself. This would be used for moving custom outcomes from one Moodle site to another.&lt;br /&gt;
&lt;br /&gt;
The outcome system would support importing outcome sets. Initially, there would be support for importing outcomes from [http://asn.jesandco.org Achievement Standards Network (ASN)] ([http://standards.jesandco.org/wiki/ASN_Application_Profile Format Specification]) and importing the JSON export from above.&lt;br /&gt;
&lt;br /&gt;
Both of the outcomes import and export processes would be a plugin based, so other formats could be supported by creating new plugins. The import and export plugins would live under outcome/import/ and outcome/export/.&lt;br /&gt;
&lt;br /&gt;
== Recommendation engine plugins ==&lt;br /&gt;
&lt;br /&gt;
The outcome system would provide a way to recommend to a teacher whether a student should be marked as completing the outcome or not. These plugins should have full Moodle plugin support because they may need to listen to events, run crons, have DB tables, global settings, etc. These plugins would live under outcome/engine/. Recommendations would be generated on demand and stored in MUC.&lt;br /&gt;
&lt;br /&gt;
Initially, the only plugin would be a percentage based recommendation engine. It would be configurable for a specific threshold that would determine if an attempt against an outcome should be considered correct or incorrect. It would then process the outcome attempts to determine the recommendation.&lt;br /&gt;
&lt;br /&gt;
Recommendation engines should also be enabled or disabled at the site level. This would require a “Manage recommendation engines” section in the admin site settings.&lt;br /&gt;
&lt;br /&gt;
= Reporting =&lt;br /&gt;
&lt;br /&gt;
== Site ==&lt;br /&gt;
&lt;br /&gt;
The following reports:&lt;br /&gt;
&lt;br /&gt;
* Outcomes Coverage report - shows outcomes that have been mapped to content in the site.&lt;br /&gt;
* Outcomes Performance report - shows performance on outcomes at the site level. Optionally broken down by course.&lt;br /&gt;
&lt;br /&gt;
== Course ==&lt;br /&gt;
&lt;br /&gt;
The following reports:&lt;br /&gt;
&lt;br /&gt;
* Outcomes Coverage report - shows outcomes that have been mapped in this course.&lt;br /&gt;
* Outcomes: Unmapped Content report - shows content that is not mapped to an outcome.&lt;br /&gt;
* Outcomes Performance report - shows aggregated performance on outcomes in the course.&lt;br /&gt;
* Outcomes Student Performance report - shows student performance on outcomes in the course for the teacher.&lt;br /&gt;
* Outcomes Personal Performance report - shows student performance on outcomes in the course for the student.&lt;br /&gt;
&lt;br /&gt;
== User profile ==&lt;br /&gt;
&lt;br /&gt;
At the very least, there will be a user site report where the user can see earned outcomes.&lt;br /&gt;
&lt;br /&gt;
= Grading =&lt;br /&gt;
&lt;br /&gt;
Outcome Completion Marking is done by course graders and is the final check point for if a learner has earned an outcome or not. The proposed location is to use the Outcome tab that is currently in the grades section of the course. This would also highjack the Outcomes link under Grade administration and Course administration.&lt;br /&gt;
&lt;br /&gt;
= Logging =&lt;br /&gt;
&lt;br /&gt;
We want to audit most actions in the Moodle log. These actions include:&lt;br /&gt;
&lt;br /&gt;
* CRUD type actions.&lt;br /&gt;
* Any association editing. EG: associating an outcome with a course, content item, etc.&lt;br /&gt;
* Outcome marking.&lt;br /&gt;
* User attempts against outcomes.&lt;br /&gt;
&lt;br /&gt;
= Role capabilities =&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Description&lt;br /&gt;
! Capability&lt;br /&gt;
|-&lt;br /&gt;
| Map outcomes to content&lt;br /&gt;
| moodle/outcome:contentmap&lt;br /&gt;
|-&lt;br /&gt;
| Map outcome sets to courses&lt;br /&gt;
| moodle/outcome:coursemap&lt;br /&gt;
|-&lt;br /&gt;
| Administering outcomes (Editing, importing, etc)&lt;br /&gt;
| moodle/outcome:edit&lt;br /&gt;
|-&lt;br /&gt;
| Each report will have a capability to view them.&lt;br /&gt;
| report/REPORTNAME:view&lt;br /&gt;
|-&lt;br /&gt;
| Marking outcomes by graders&lt;br /&gt;
| moodle/grade:edit&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Backup and restore =&lt;br /&gt;
&lt;br /&gt;
The workflow for backup and restore may go like:&lt;br /&gt;
&lt;br /&gt;
* Same site, then just map to existing outcomes via the identifier.&lt;br /&gt;
* Not same site, then the assumption is that the outcome set should be imported first, then we can map to existing outcomes via the identifier like in our same site scenario.&lt;br /&gt;
&lt;br /&gt;
Outcomes would probably take advantage of the backup plugin API to backup outcome associations to modules, question, etc. So, for example:&lt;br /&gt;
&lt;br /&gt;
* Outcomes would plug into activities in order to backup outcome associations and attempts.&lt;br /&gt;
* Outcomes would plug into questions in order to backup outcome associations and attempts.&lt;br /&gt;
* Grading forms would have to manually outcome associations and attempts. Will strive to make code re-usable.&lt;br /&gt;
&lt;br /&gt;
= Migration of old outcomes =&lt;br /&gt;
&lt;br /&gt;
Please first review [[Migration and Technical Issues]]. This still needs to be flushed out some more, but since the migration requires user interaction, we may need to create an admin tool to handle the migration. Until outcomes are migrated, it might make sense to continue to show the outcomes in the grade book, but remove the ability to do any editing of old outcomes.&lt;/div&gt;</summary>
		<author><name>Bushido</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=Outcomes_Technical_Specification&amp;diff=38126</id>
		<title>Outcomes Technical Specification</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=Outcomes_Technical_Specification&amp;diff=38126"/>
		<updated>2013-03-06T22:03:00Z</updated>

		<summary type="html">&lt;p&gt;Bushido: /* Questions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
&lt;br /&gt;
Please be familiar with the function specification as outlined in the [[Outcomes Specification]]. The functional specification will provide details about the concepts and goals of this project. In particular, the following sections provide the overview of the system by user role:&lt;br /&gt;
&lt;br /&gt;
* [[Outcomes Administrator Specification]]&lt;br /&gt;
* [[Outcomes Instructor Specification]]&lt;br /&gt;
* [[Outcomes Student Specification]]&lt;br /&gt;
&lt;br /&gt;
In addition, some features and use cases are known but not yet being implemented. Please see [[Specifically Excluded Use Cases]]. Specifically, this initial version will not be attempting to map an existing outcome set to a new version of the outcome set on import.&lt;br /&gt;
&lt;br /&gt;
This document attempts to capture how the functional specification would be implemented in Moodle.&lt;br /&gt;
&lt;br /&gt;
= Backwards compatibility breaks =&lt;br /&gt;
&lt;br /&gt;
First and foremost, it is important to identify key differences between the current outcome system and this proposal as there are some philosophical shifts as well as breaking of existing code.&lt;br /&gt;
&lt;br /&gt;
# Outcomes will now only be created at the site level and then mapped to courses and content. Outcomes will no longer be created at the course level.&lt;br /&gt;
# Anything using the current outcome API or tables will have to be updated to use the new outcomes when appropriate.&lt;br /&gt;
# Outcomes will no longer appear in the grade book.&lt;br /&gt;
# Outcomes will no longer support scales. It is just a simple pass or fail.&lt;br /&gt;
&lt;br /&gt;
= Settings =&lt;br /&gt;
&lt;br /&gt;
== Site ==&lt;br /&gt;
&lt;br /&gt;
At the site level, there will be an area to do all of the configuration and setup of outcome sets. The proposed location is under Settings &amp;gt; Site Administration &amp;gt; Grades &amp;gt; Outcomes.&lt;br /&gt;
&lt;br /&gt;
In addition to managing outcomes, there will be site settings page for general outcome settings. For example, a setting to toggle if outcome idnumbers are editable or not.&lt;br /&gt;
&lt;br /&gt;
== Course ==&lt;br /&gt;
&lt;br /&gt;
When editing a course, there will be a section to associate outcome sets to the course. The section will appear below the course General settings.&lt;br /&gt;
&lt;br /&gt;
This association is used to determine the relevant outcomes for the course for reporting and as a way to pre-filter outcome pickers when associating outcomes to content.&lt;br /&gt;
&lt;br /&gt;
== Activity ==&lt;br /&gt;
&lt;br /&gt;
When editing an activity, there will be a section to associate individual outcomes to the activity. This section will be provided by the moodleform_mod::standard_coursemodule_elements() callback so that all activities will be able to be associated to outcomes automatically.  In the flow of the activity&#039;s form, the outcome mapping options would appear below the grades section.  Do note though that if an activity does not support grades, it can still be mapped to outcomes.&lt;br /&gt;
&lt;br /&gt;
Graded activities will have to add additional integration points with outcomes in order to capture user attempts.&lt;br /&gt;
&lt;br /&gt;
== Advanced grading ==&lt;br /&gt;
&lt;br /&gt;
Rubrics and Marking guides will be able to associate an outcome for a criteria. API will be provided to support this, but each grading method will have to integrate with outcomes where it makes sense.&lt;br /&gt;
&lt;br /&gt;
== Questions ==&lt;br /&gt;
&lt;br /&gt;
When editing a question, there will be a section to associate individual outcomes to the question. The section can be added to question_edit_form::definition() before the Tags section.&lt;br /&gt;
&lt;br /&gt;
This association UI might behave a little differently based on the context in Moodle. If the question is being authored at the site level, then the outcome association is more free form, meaning one can select any outcome from any outcome set. If the question is being authored at the course level, then the outcome association defaults to those outcome sets that are associated to the course.&lt;br /&gt;
&lt;br /&gt;
= Data structure =&lt;br /&gt;
&lt;br /&gt;
== outcome_set ==&lt;br /&gt;
&lt;br /&gt;
Relations: none&lt;br /&gt;
&lt;br /&gt;
Purpose: An outcome set represents a collection of outcomes and perhaps some meta data regarding the revision or applicable region. Outcome sets are mapped to courses, which makes the outcomes within the set available to be mapped to course content. An example outcome set would be [http://asn.jesandco.org/resources/D2403043 Health Education Content Standards for California Public Schools, Kindergarten Through Grade Twelve].&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| idnumber&lt;br /&gt;
| varchar(255), unique index&lt;br /&gt;
| GUID that is auto-generated if missing. Generally on import, these are provided. This would be used to identify the outcome set during import or course restore.&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| varchar(255)&lt;br /&gt;
| The name of the outcome set&lt;br /&gt;
|-&lt;br /&gt;
| description&lt;br /&gt;
| text, default null, optional&lt;br /&gt;
| The plain text description of the outcome.&lt;br /&gt;
|-&lt;br /&gt;
| provider&lt;br /&gt;
| varchar(255), default null, optional&lt;br /&gt;
| Provider information regarding the outcome set. EG: Could be set to ASN.&lt;br /&gt;
|-&lt;br /&gt;
| revision&lt;br /&gt;
| varchar(255), default null, optional&lt;br /&gt;
| Version information regarding the outcome set. This will typically be a date or year, EG: 2011&lt;br /&gt;
|-&lt;br /&gt;
| region&lt;br /&gt;
| varchar(255), default null, optional&lt;br /&gt;
| Any region information. Example: In the US this could be a state name.&lt;br /&gt;
|-&lt;br /&gt;
| deleted&lt;br /&gt;
| int(1), default 0&lt;br /&gt;
| If the outcome set has been deleted.&lt;br /&gt;
|-&lt;br /&gt;
| timemodified&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time modified.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome_set&lt;br /&gt;
&lt;br /&gt;
Purpose: Stores information regarding an individual outcome. Outcomes can be stored in a hierarchy, but the hierarchy is visual only. This means that if an outcome is earned, then only that outcome is earned, not it and all of its children. Also, if all child outcomes are earned, then parent outcomes are not also automatically earned. In addition, sometimes outcomes are not assessable, but are only there for extra context in the hierarchy. This identifies that the outcome cannot be mapped to content, nor can a student earn it.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomesetid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_set table.&lt;br /&gt;
|-&lt;br /&gt;
| parentid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Self referencing key. Identifies the parent outcome in the hierarchy.&lt;br /&gt;
|-&lt;br /&gt;
| idnumber&lt;br /&gt;
| varchar(255), unique index&lt;br /&gt;
| GUID that is auto-generated if missing. Generally on import, these are provided. This would be used to identify the outcome set during import or course restore.&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| varchar(255)&lt;br /&gt;
| The name of the outcome.&lt;br /&gt;
|-&lt;br /&gt;
| docnum&lt;br /&gt;
| varchar(255), default null, optional&lt;br /&gt;
| Field for tracking additional information on the outcome. EG: 2.3.A&lt;br /&gt;
|-&lt;br /&gt;
| description&lt;br /&gt;
| text, default null, optional&lt;br /&gt;
| The plain text description of the outcome.&lt;br /&gt;
|-&lt;br /&gt;
| assessable&lt;br /&gt;
| int(1)&lt;br /&gt;
| If set to 1, then the outcome is assessable and can be mapped to content. If set to 0, then the outcome is not assessable and cannot be mapped to content.&lt;br /&gt;
|-&lt;br /&gt;
| deleted&lt;br /&gt;
| int(1), default 0&lt;br /&gt;
| If the outcome has been deleted.&lt;br /&gt;
|-&lt;br /&gt;
| sortorder&lt;br /&gt;
| int(10)&lt;br /&gt;
| The sort order. This is 0-X for all outcomes that belong to the same outcome set.&lt;br /&gt;
|-&lt;br /&gt;
| timemodified&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time modified.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_meta ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome&lt;br /&gt;
&lt;br /&gt;
Purpose: Represents additional meta information regarding outcomes. Only support for “Education Level” (K, 1, … 12, etc.) and “Subjects” (e.g. Math, English, etc.) will be available out of the box, but additional data points can be added later (which would need to be added to the UI). One outcome could have many meta values. For example: an outcome could be associated to many educational levels and subjects.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| varchar(255), indexed&lt;br /&gt;
| The name of the meta data.&lt;br /&gt;
|-&lt;br /&gt;
| value&lt;br /&gt;
| varchar(1333), indexed&lt;br /&gt;
| The value of the meta data.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_content ==&lt;br /&gt;
&lt;br /&gt;
Relations: dynamic with core tables&lt;br /&gt;
&lt;br /&gt;
Purpose: This represents that a content item has been mapped to an outcome or to multiple outcomes. Check the outcome_content_map table for the specific outcomes.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| component&lt;br /&gt;
| varchar(255), indexed&lt;br /&gt;
| The name of the component.&lt;br /&gt;
|-&lt;br /&gt;
| area&lt;br /&gt;
| varchar(255), default null, indexed, optional&lt;br /&gt;
| The name of the area. Used when a component has multiple items to associate to outcomes.&lt;br /&gt;
|-&lt;br /&gt;
| itemid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| The item ID.&lt;br /&gt;
|-&lt;br /&gt;
| deleted&lt;br /&gt;
| int(1), default 0&lt;br /&gt;
| Soft delete if the outcome was disassociated from the content. Note, if the content is actually deleted, then this association will be deleted.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_content_map ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome, outcome_content&lt;br /&gt;
&lt;br /&gt;
Purpose: This represents the one to many relationship of a single content item mapped to many outcomes.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomecontentid&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Foreign key to outcome_content table.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_mod_content_map ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome_content, course_modules&lt;br /&gt;
&lt;br /&gt;
Purpose: Associates an outcome content item with an activity. For example: a question is created in the site question bank and outcomes are associated to the question. Once that question is added to a Quiz then that association is stored in this table so the outcome system knows that the content item and its outcomes are in use.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| cmid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to course_modules table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomecontentid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_content table.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_set_course_map ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome_set, course&lt;br /&gt;
&lt;br /&gt;
Purpose: Associates an outcome set with the course. Filtering of the outcome set is optionally allowed since outcome sets can span multiple educational levels and even subjects. Once an outcome set is mapped to the course, then the outcomes in the outcome set are available to be mapped to course content.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| courseid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to course table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomesetid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_set table.&lt;br /&gt;
|-&lt;br /&gt;
| filter&lt;br /&gt;
| text, default null&lt;br /&gt;
| Some outcome sets span multiple education levels and subjects. So, when mapping an outcome set to a course, it may make sense to restrict the available outcomes to a specific education level(s) and/or subject(s). This information would be serialized into this field.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_attempt ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome_content, user&lt;br /&gt;
&lt;br /&gt;
Purpose: Track a user attempt against a content item. The idea here is to aggregate attempt information so that the recommendation engines (detailed below) have an easily accessible data set to process. This does not mean however that recommendation engines are only limited to this data as one could mine for additional data where needed.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomecontentid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_content table.&lt;br /&gt;
|-&lt;br /&gt;
| userid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table.&lt;br /&gt;
|-&lt;br /&gt;
| percentgrade&lt;br /&gt;
| float(10,5)&lt;br /&gt;
| Percent grade earned on this attempt.&lt;br /&gt;
|-&lt;br /&gt;
| mingrade&lt;br /&gt;
| float(10,5)&lt;br /&gt;
| The minimum possible grade.&lt;br /&gt;
|-&lt;br /&gt;
| maxgrade&lt;br /&gt;
| float(10,5)&lt;br /&gt;
| The maximum possible grade.&lt;br /&gt;
|-&lt;br /&gt;
| rawgrade&lt;br /&gt;
| float(10,5)&lt;br /&gt;
| The points earned, should be between the minimum and maximum grades.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_mark ==&lt;br /&gt;
&lt;br /&gt;
Relations: course, user, outcome&lt;br /&gt;
&lt;br /&gt;
Purpose: Graders will manually mark the student as having Met or Not Met an outcome. The recommendation engines will make a recommendation to the grader based on user attempts against content that has been mapped to the outcome.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| courseid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to course table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| userid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table. This is the user who is receiving the mark.&lt;br /&gt;
|-&lt;br /&gt;
| graderid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table. This is the user is doing the marking.&lt;br /&gt;
|-&lt;br /&gt;
| result&lt;br /&gt;
| int(2)&lt;br /&gt;
| 0 is not pass, 1 is pass, null is that no decision has been made yet.&lt;br /&gt;
|-&lt;br /&gt;
| timemodified&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time modified.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_mark_history ==&lt;br /&gt;
&lt;br /&gt;
Relations: course, user, outcome, outcome_mark&lt;br /&gt;
&lt;br /&gt;
Purpose: Keep track of past markings.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomemarkid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_mark table. Though the record could be missing from outcome_mark.&lt;br /&gt;
|-&lt;br /&gt;
| courseid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to course table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| userid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table. This is the user who is receiving the mark.&lt;br /&gt;
|-&lt;br /&gt;
| graderid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table. This is the user is doing the marking.&lt;br /&gt;
|-&lt;br /&gt;
| result&lt;br /&gt;
| int(2)&lt;br /&gt;
| 0 is not pass, 1 is pass, null is that no decision has been made yet.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_award ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome, user&lt;br /&gt;
&lt;br /&gt;
Purpose: This preserves any outcomes earned by a student, regardless if the course is deleted or not.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| userid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Architecture =&lt;br /&gt;
&lt;br /&gt;
The API that drives outcomes could be located inside of lib/outcome/ directory. Any UI like the administrative settings, outcome associations, etc could be located inside of a top level outcome/ directory. Alternatively, the administrative UI could live under the admin/outcome/ directory while all non-administrative UIs could live under the top level outcome/ directory.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Models and repository mappers:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* outcome: Represents a single outcome&lt;br /&gt;
* outcome set: Represents a group of outcomes&lt;br /&gt;
* outcome content: An outcome association to content.&lt;br /&gt;
* outcome attempt: An attempt made against an outcome.&lt;br /&gt;
* outcome mark: A teacher marking an outcome against a user.&lt;br /&gt;
* outcome award: An awarded outcome at the site level.&lt;br /&gt;
&lt;br /&gt;
A repository mapper would include ways to store the model and ways to retrieve them in a re-usable and organized manner.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Collections:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
A group of models that you may take action on or filter. Example of a third party library that helps to manage collections: https://github.com/doctrine/collections&lt;br /&gt;
&lt;br /&gt;
Collections may or may not be used, but some possible collections would be the following:&lt;br /&gt;
&lt;br /&gt;
* outcomes&lt;br /&gt;
* outcome attempts&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;New mform elements:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
For most plugins, the process of associating an outcome would be done through a Moodle form. Proposing adding a new Moodle form element that can be added to a form to provide the necessary UI. An API for validating and saving the new mform element will be provided. In addition, the mform element will just be a wrapper around a well formed API that could be used on it’s own when other use cases present themselves.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;API for plugins&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Beyond the mform element, plugins may interact with outcomes in order to provide a richer integration. An API will be provided to assist with the following (not an exhaustive list):&lt;br /&gt;
&lt;br /&gt;
* A way to notify the outcome system that a content item is or is not being used within a course.&lt;br /&gt;
** Example: When a question is authored at the site level and then is actually used within a course, it must inform the outcome system that it is in use. This could potentially be done via events or just direct API calls at the appropriate times. Same goes for when a question is no longer used within a course.&lt;br /&gt;
* Record an attempt made against a content item.&lt;br /&gt;
** Examples: A question has been attempted or an assignment submission has been graded.&lt;br /&gt;
* A way to retrieve associated outcomes.&lt;br /&gt;
* A way to update, delete or otherwise modify the associated outcomes.&lt;br /&gt;
* A way to pick outcome associations (EG: what the mform element would do).&lt;br /&gt;
* A method of syncing up attempts against a content item. This would be used when associating an outcome on content that has already been graded/attempted.&lt;br /&gt;
* API to cleanup tables on course deletion.&lt;br /&gt;
&lt;br /&gt;
== Supported plugin type plugins ==&lt;br /&gt;
&lt;br /&gt;
This may sound a little odd, but basically the point of these plugins is to add support for a plugin type to the outcome system. These types would assist in interpreting outcome content associations. Examples:&lt;br /&gt;
&lt;br /&gt;
* Given an outcome association, please provide a link to the mapped content.&lt;br /&gt;
** For an activity, this would be a link to the module.&lt;br /&gt;
** For a grading form, a link to the grading instance.&lt;br /&gt;
** For a question, a link to the question instance in the question bank.&lt;br /&gt;
* What are all of the content items that have not been mapped?&lt;br /&gt;
** For activities, this would return instances that are not mapped.&lt;br /&gt;
** For grading form, this would return sub-plugin specific information, like criteria.&lt;br /&gt;
** For questions, this would return questions from the course question bank that are not mapped.&lt;br /&gt;
* May assist with automatic cleanup when the content is deleted.&lt;br /&gt;
* Also other meta data could be derived, like plugin type name.&lt;br /&gt;
&lt;br /&gt;
This plugin would live under lib/outcome/support/ and would initially ship with support of the following plugin types:&lt;br /&gt;
&lt;br /&gt;
* mod&lt;br /&gt;
* qtype&lt;br /&gt;
* gradingform: note that this integration would be deeper in that each gradingform plugin would need to implement something in order to help interpret associations. The reason being is that outcomes are being associated to plugin specific content, instead of something generic like the grading instance.&lt;br /&gt;
&lt;br /&gt;
== Import and export plugins ==&lt;br /&gt;
&lt;br /&gt;
The outcome system would support the exporting of outcome sets. The first export plugin would be a very simple JSON export that is specific to Moodle itself. This would be used for moving custom outcomes from one Moodle site to another.&lt;br /&gt;
&lt;br /&gt;
The outcome system would support importing outcome sets. Initially, there would be support for importing outcomes from [http://asn.jesandco.org Achievement Standards Network (ASN)] ([http://standards.jesandco.org/wiki/ASN_Application_Profile Format Specification]) and importing the JSON export from above.&lt;br /&gt;
&lt;br /&gt;
Both of the outcomes import and export processes would be a plugin based, so other formats could be supported by creating new plugins. The import and export plugins would live under lib/outcome/import/ and lib/outcome/export/.&lt;br /&gt;
&lt;br /&gt;
== Recommendation engine plugins ==&lt;br /&gt;
&lt;br /&gt;
The outcome system would provide a way to recommend to a teacher whether a student should be marked as completing the outcome or not. These plugins should have full Moodle plugin support because they may need to listen to events, run crons, have DB tables, global settings, etc. These plugins would live under lib/outcome/engine/. Recommendations would be generated on demand and stored in MUC.&lt;br /&gt;
&lt;br /&gt;
Initially, the only plugin would be a percentage based recommendation engine. It would be configurable for a specific threshold that would determine if an attempt against an outcome should be considered correct or incorrect. It would then process the outcome attempts to determine the recommendation.&lt;br /&gt;
&lt;br /&gt;
Recommendation engines should also be enabled or disabled at the site level. This would require a “Manage recommendation engines” section in the admin site settings.&lt;br /&gt;
&lt;br /&gt;
= Reporting =&lt;br /&gt;
&lt;br /&gt;
== Site ==&lt;br /&gt;
&lt;br /&gt;
The following reports:&lt;br /&gt;
&lt;br /&gt;
* Outcomes Coverage report - shows outcomes that have been mapped to content in the site.&lt;br /&gt;
* Outcomes Performance report - shows performance on outcomes at the site level. Optionally broken down by course.&lt;br /&gt;
&lt;br /&gt;
== Course ==&lt;br /&gt;
&lt;br /&gt;
The following reports:&lt;br /&gt;
&lt;br /&gt;
* Outcomes Coverage report - shows outcomes that have been mapped in this course.&lt;br /&gt;
* Outcomes: Unmapped Content report - shows content that is not mapped to an outcome.&lt;br /&gt;
* Outcomes Performance report - shows aggregated performance on outcomes in the course.&lt;br /&gt;
* Outcomes Student Performance report - shows student performance on outcomes in the course for the teacher.&lt;br /&gt;
* Outcomes Personal Performance report - shows student performance on outcomes in the course for the student.&lt;br /&gt;
&lt;br /&gt;
== User profile ==&lt;br /&gt;
&lt;br /&gt;
At the very least, there will be a user site report where the user can see earned outcomes.&lt;br /&gt;
&lt;br /&gt;
= Grading =&lt;br /&gt;
&lt;br /&gt;
Outcome Completion Marking is done by course graders and is the final check point for if a learner has earned an outcome or not. The proposed location is to use the Outcome tab that is currently in the grades section of the course. This would also highjack the Outcomes link under Grade administration and Course administration.&lt;br /&gt;
&lt;br /&gt;
= Logging =&lt;br /&gt;
&lt;br /&gt;
We want to audit most actions in the Moodle log. These actions include:&lt;br /&gt;
&lt;br /&gt;
* CRUD type actions.&lt;br /&gt;
* Any association editing. EG: associating an outcome with a course, content item, etc.&lt;br /&gt;
* Outcome marking.&lt;br /&gt;
* User attempts against outcomes.&lt;br /&gt;
&lt;br /&gt;
= Role capabilities =&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Description&lt;br /&gt;
! Capability&lt;br /&gt;
|-&lt;br /&gt;
| Map outcomes to content&lt;br /&gt;
| moodle/outcome:contentmap&lt;br /&gt;
|-&lt;br /&gt;
| Map outcome sets to courses&lt;br /&gt;
| moodle/outcome:coursemap&lt;br /&gt;
|-&lt;br /&gt;
| Administering outcomes (Editing, importing, etc)&lt;br /&gt;
| moodle/outcome:edit&lt;br /&gt;
|-&lt;br /&gt;
| Each report will have a capability to view them.&lt;br /&gt;
| report/REPORTNAME:view&lt;br /&gt;
|-&lt;br /&gt;
| Marking outcomes by graders&lt;br /&gt;
| moodle/grade:edit&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Backup and restore =&lt;br /&gt;
&lt;br /&gt;
The workflow for backup and restore may go like:&lt;br /&gt;
&lt;br /&gt;
* Same site, then just map to existing outcomes via the identifier.&lt;br /&gt;
* Not same site, then the assumption is that the outcome set should be imported first, then we can map to existing outcomes via the identifier like in our same site scenario.&lt;br /&gt;
&lt;br /&gt;
Outcomes would probably take advantage of the backup plugin API to backup outcome associations to modules, question, etc. So, for example:&lt;br /&gt;
&lt;br /&gt;
* Outcomes would plug into activities in order to backup outcome associations and attempts.&lt;br /&gt;
* Outcomes would plug into questions in order to backup outcome associations and attempts.&lt;br /&gt;
* Grading forms would have to manually outcome associations and attempts. Will strive to make code re-usable.&lt;br /&gt;
&lt;br /&gt;
= Migration of old outcomes =&lt;br /&gt;
&lt;br /&gt;
Please first review [[Migration and Technical Issues]]. This still needs to be flushed out some more, but since the migration requires user interaction, we may need to create an admin tool to handle the migration. Until outcomes are migrated, it might make sense to continue to show the outcomes in the grade book, but remove the ability to do any editing of old outcomes.&lt;/div&gt;</summary>
		<author><name>Bushido</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=Outcomes_Technical_Specification&amp;diff=38125</id>
		<title>Outcomes Technical Specification</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=Outcomes_Technical_Specification&amp;diff=38125"/>
		<updated>2013-03-06T22:02:28Z</updated>

		<summary type="html">&lt;p&gt;Bushido: /* Activity */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
&lt;br /&gt;
Please be familiar with the function specification as outlined in the [[Outcomes Specification]]. The functional specification will provide details about the concepts and goals of this project. In particular, the following sections provide the overview of the system by user role:&lt;br /&gt;
&lt;br /&gt;
* [[Outcomes Administrator Specification]]&lt;br /&gt;
* [[Outcomes Instructor Specification]]&lt;br /&gt;
* [[Outcomes Student Specification]]&lt;br /&gt;
&lt;br /&gt;
In addition, some features and use cases are known but not yet being implemented. Please see [[Specifically Excluded Use Cases]]. Specifically, this initial version will not be attempting to map an existing outcome set to a new version of the outcome set on import.&lt;br /&gt;
&lt;br /&gt;
This document attempts to capture how the functional specification would be implemented in Moodle.&lt;br /&gt;
&lt;br /&gt;
= Backwards compatibility breaks =&lt;br /&gt;
&lt;br /&gt;
First and foremost, it is important to identify key differences between the current outcome system and this proposal as there are some philosophical shifts as well as breaking of existing code.&lt;br /&gt;
&lt;br /&gt;
# Outcomes will now only be created at the site level and then mapped to courses and content. Outcomes will no longer be created at the course level.&lt;br /&gt;
# Anything using the current outcome API or tables will have to be updated to use the new outcomes when appropriate.&lt;br /&gt;
# Outcomes will no longer appear in the grade book.&lt;br /&gt;
# Outcomes will no longer support scales. It is just a simple pass or fail.&lt;br /&gt;
&lt;br /&gt;
= Settings =&lt;br /&gt;
&lt;br /&gt;
== Site ==&lt;br /&gt;
&lt;br /&gt;
At the site level, there will be an area to do all of the configuration and setup of outcome sets. The proposed location is under Settings &amp;gt; Site Administration &amp;gt; Grades &amp;gt; Outcomes.&lt;br /&gt;
&lt;br /&gt;
In addition to managing outcomes, there will be site settings page for general outcome settings. For example, a setting to toggle if outcome idnumbers are editable or not.&lt;br /&gt;
&lt;br /&gt;
== Course ==&lt;br /&gt;
&lt;br /&gt;
When editing a course, there will be a section to associate outcome sets to the course. The section will appear below the course General settings.&lt;br /&gt;
&lt;br /&gt;
This association is used to determine the relevant outcomes for the course for reporting and as a way to pre-filter outcome pickers when associating outcomes to content.&lt;br /&gt;
&lt;br /&gt;
== Activity ==&lt;br /&gt;
&lt;br /&gt;
When editing an activity, there will be a section to associate individual outcomes to the activity. This section will be provided by the moodleform_mod::standard_coursemodule_elements() callback so that all activities will be able to be associated to outcomes automatically.  In the flow of the activity&#039;s form, the outcome mapping options would appear below the grades section.  Do note though that if an activity does not support grades, it can still be mapped to outcomes.&lt;br /&gt;
&lt;br /&gt;
Graded activities will have to add additional integration points with outcomes in order to capture user attempts.&lt;br /&gt;
&lt;br /&gt;
== Advanced grading ==&lt;br /&gt;
&lt;br /&gt;
Rubrics and Marking guides will be able to associate an outcome for a criteria. API will be provided to support this, but each grading method will have to integrate with outcomes where it makes sense.&lt;br /&gt;
&lt;br /&gt;
== Questions ==&lt;br /&gt;
&lt;br /&gt;
When editing a question, there will be a section to associate individual outcomes to the question. The section can be added to question_edit_form::definition() after the General section.&lt;br /&gt;
&lt;br /&gt;
This association UI might behave a little differently based on the context in Moodle. If the question is being authored at the site level, then the outcome association is more free form, meaning one can select any outcome from any outcome set. If the question is being authored at the course level, then the outcome association defaults to those outcome sets that are associated to the course.&lt;br /&gt;
&lt;br /&gt;
= Data structure =&lt;br /&gt;
&lt;br /&gt;
== outcome_set ==&lt;br /&gt;
&lt;br /&gt;
Relations: none&lt;br /&gt;
&lt;br /&gt;
Purpose: An outcome set represents a collection of outcomes and perhaps some meta data regarding the revision or applicable region. Outcome sets are mapped to courses, which makes the outcomes within the set available to be mapped to course content. An example outcome set would be [http://asn.jesandco.org/resources/D2403043 Health Education Content Standards for California Public Schools, Kindergarten Through Grade Twelve].&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| idnumber&lt;br /&gt;
| varchar(255), unique index&lt;br /&gt;
| GUID that is auto-generated if missing. Generally on import, these are provided. This would be used to identify the outcome set during import or course restore.&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| varchar(255)&lt;br /&gt;
| The name of the outcome set&lt;br /&gt;
|-&lt;br /&gt;
| description&lt;br /&gt;
| text, default null, optional&lt;br /&gt;
| The plain text description of the outcome.&lt;br /&gt;
|-&lt;br /&gt;
| provider&lt;br /&gt;
| varchar(255), default null, optional&lt;br /&gt;
| Provider information regarding the outcome set. EG: Could be set to ASN.&lt;br /&gt;
|-&lt;br /&gt;
| revision&lt;br /&gt;
| varchar(255), default null, optional&lt;br /&gt;
| Version information regarding the outcome set. This will typically be a date or year, EG: 2011&lt;br /&gt;
|-&lt;br /&gt;
| region&lt;br /&gt;
| varchar(255), default null, optional&lt;br /&gt;
| Any region information. Example: In the US this could be a state name.&lt;br /&gt;
|-&lt;br /&gt;
| deleted&lt;br /&gt;
| int(1), default 0&lt;br /&gt;
| If the outcome set has been deleted.&lt;br /&gt;
|-&lt;br /&gt;
| timemodified&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time modified.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome_set&lt;br /&gt;
&lt;br /&gt;
Purpose: Stores information regarding an individual outcome. Outcomes can be stored in a hierarchy, but the hierarchy is visual only. This means that if an outcome is earned, then only that outcome is earned, not it and all of its children. Also, if all child outcomes are earned, then parent outcomes are not also automatically earned. In addition, sometimes outcomes are not assessable, but are only there for extra context in the hierarchy. This identifies that the outcome cannot be mapped to content, nor can a student earn it.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomesetid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_set table.&lt;br /&gt;
|-&lt;br /&gt;
| parentid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Self referencing key. Identifies the parent outcome in the hierarchy.&lt;br /&gt;
|-&lt;br /&gt;
| idnumber&lt;br /&gt;
| varchar(255), unique index&lt;br /&gt;
| GUID that is auto-generated if missing. Generally on import, these are provided. This would be used to identify the outcome set during import or course restore.&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| varchar(255)&lt;br /&gt;
| The name of the outcome.&lt;br /&gt;
|-&lt;br /&gt;
| docnum&lt;br /&gt;
| varchar(255), default null, optional&lt;br /&gt;
| Field for tracking additional information on the outcome. EG: 2.3.A&lt;br /&gt;
|-&lt;br /&gt;
| description&lt;br /&gt;
| text, default null, optional&lt;br /&gt;
| The plain text description of the outcome.&lt;br /&gt;
|-&lt;br /&gt;
| assessable&lt;br /&gt;
| int(1)&lt;br /&gt;
| If set to 1, then the outcome is assessable and can be mapped to content. If set to 0, then the outcome is not assessable and cannot be mapped to content.&lt;br /&gt;
|-&lt;br /&gt;
| deleted&lt;br /&gt;
| int(1), default 0&lt;br /&gt;
| If the outcome has been deleted.&lt;br /&gt;
|-&lt;br /&gt;
| sortorder&lt;br /&gt;
| int(10)&lt;br /&gt;
| The sort order. This is 0-X for all outcomes that belong to the same outcome set.&lt;br /&gt;
|-&lt;br /&gt;
| timemodified&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time modified.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_meta ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome&lt;br /&gt;
&lt;br /&gt;
Purpose: Represents additional meta information regarding outcomes. Only support for “Education Level” (K, 1, … 12, etc.) and “Subjects” (e.g. Math, English, etc.) will be available out of the box, but additional data points can be added later (which would need to be added to the UI). One outcome could have many meta values. For example: an outcome could be associated to many educational levels and subjects.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| varchar(255), indexed&lt;br /&gt;
| The name of the meta data.&lt;br /&gt;
|-&lt;br /&gt;
| value&lt;br /&gt;
| varchar(1333), indexed&lt;br /&gt;
| The value of the meta data.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_content ==&lt;br /&gt;
&lt;br /&gt;
Relations: dynamic with core tables&lt;br /&gt;
&lt;br /&gt;
Purpose: This represents that a content item has been mapped to an outcome or to multiple outcomes. Check the outcome_content_map table for the specific outcomes.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| component&lt;br /&gt;
| varchar(255), indexed&lt;br /&gt;
| The name of the component.&lt;br /&gt;
|-&lt;br /&gt;
| area&lt;br /&gt;
| varchar(255), default null, indexed, optional&lt;br /&gt;
| The name of the area. Used when a component has multiple items to associate to outcomes.&lt;br /&gt;
|-&lt;br /&gt;
| itemid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| The item ID.&lt;br /&gt;
|-&lt;br /&gt;
| deleted&lt;br /&gt;
| int(1), default 0&lt;br /&gt;
| Soft delete if the outcome was disassociated from the content. Note, if the content is actually deleted, then this association will be deleted.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_content_map ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome, outcome_content&lt;br /&gt;
&lt;br /&gt;
Purpose: This represents the one to many relationship of a single content item mapped to many outcomes.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomecontentid&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Foreign key to outcome_content table.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_mod_content_map ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome_content, course_modules&lt;br /&gt;
&lt;br /&gt;
Purpose: Associates an outcome content item with an activity. For example: a question is created in the site question bank and outcomes are associated to the question. Once that question is added to a Quiz then that association is stored in this table so the outcome system knows that the content item and its outcomes are in use.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| cmid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to course_modules table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomecontentid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_content table.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_set_course_map ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome_set, course&lt;br /&gt;
&lt;br /&gt;
Purpose: Associates an outcome set with the course. Filtering of the outcome set is optionally allowed since outcome sets can span multiple educational levels and even subjects. Once an outcome set is mapped to the course, then the outcomes in the outcome set are available to be mapped to course content.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| courseid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to course table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomesetid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_set table.&lt;br /&gt;
|-&lt;br /&gt;
| filter&lt;br /&gt;
| text, default null&lt;br /&gt;
| Some outcome sets span multiple education levels and subjects. So, when mapping an outcome set to a course, it may make sense to restrict the available outcomes to a specific education level(s) and/or subject(s). This information would be serialized into this field.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_attempt ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome_content, user&lt;br /&gt;
&lt;br /&gt;
Purpose: Track a user attempt against a content item. The idea here is to aggregate attempt information so that the recommendation engines (detailed below) have an easily accessible data set to process. This does not mean however that recommendation engines are only limited to this data as one could mine for additional data where needed.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomecontentid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_content table.&lt;br /&gt;
|-&lt;br /&gt;
| userid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table.&lt;br /&gt;
|-&lt;br /&gt;
| percentgrade&lt;br /&gt;
| float(10,5)&lt;br /&gt;
| Percent grade earned on this attempt.&lt;br /&gt;
|-&lt;br /&gt;
| mingrade&lt;br /&gt;
| float(10,5)&lt;br /&gt;
| The minimum possible grade.&lt;br /&gt;
|-&lt;br /&gt;
| maxgrade&lt;br /&gt;
| float(10,5)&lt;br /&gt;
| The maximum possible grade.&lt;br /&gt;
|-&lt;br /&gt;
| rawgrade&lt;br /&gt;
| float(10,5)&lt;br /&gt;
| The points earned, should be between the minimum and maximum grades.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_mark ==&lt;br /&gt;
&lt;br /&gt;
Relations: course, user, outcome&lt;br /&gt;
&lt;br /&gt;
Purpose: Graders will manually mark the student as having Met or Not Met an outcome. The recommendation engines will make a recommendation to the grader based on user attempts against content that has been mapped to the outcome.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| courseid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to course table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| userid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table. This is the user who is receiving the mark.&lt;br /&gt;
|-&lt;br /&gt;
| graderid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table. This is the user is doing the marking.&lt;br /&gt;
|-&lt;br /&gt;
| result&lt;br /&gt;
| int(2)&lt;br /&gt;
| 0 is not pass, 1 is pass, null is that no decision has been made yet.&lt;br /&gt;
|-&lt;br /&gt;
| timemodified&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time modified.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_mark_history ==&lt;br /&gt;
&lt;br /&gt;
Relations: course, user, outcome, outcome_mark&lt;br /&gt;
&lt;br /&gt;
Purpose: Keep track of past markings.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomemarkid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_mark table. Though the record could be missing from outcome_mark.&lt;br /&gt;
|-&lt;br /&gt;
| courseid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to course table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| userid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table. This is the user who is receiving the mark.&lt;br /&gt;
|-&lt;br /&gt;
| graderid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table. This is the user is doing the marking.&lt;br /&gt;
|-&lt;br /&gt;
| result&lt;br /&gt;
| int(2)&lt;br /&gt;
| 0 is not pass, 1 is pass, null is that no decision has been made yet.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_award ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome, user&lt;br /&gt;
&lt;br /&gt;
Purpose: This preserves any outcomes earned by a student, regardless if the course is deleted or not.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| userid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Architecture =&lt;br /&gt;
&lt;br /&gt;
The API that drives outcomes could be located inside of lib/outcome/ directory. Any UI like the administrative settings, outcome associations, etc could be located inside of a top level outcome/ directory. Alternatively, the administrative UI could live under the admin/outcome/ directory while all non-administrative UIs could live under the top level outcome/ directory.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Models and repository mappers:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* outcome: Represents a single outcome&lt;br /&gt;
* outcome set: Represents a group of outcomes&lt;br /&gt;
* outcome content: An outcome association to content.&lt;br /&gt;
* outcome attempt: An attempt made against an outcome.&lt;br /&gt;
* outcome mark: A teacher marking an outcome against a user.&lt;br /&gt;
* outcome award: An awarded outcome at the site level.&lt;br /&gt;
&lt;br /&gt;
A repository mapper would include ways to store the model and ways to retrieve them in a re-usable and organized manner.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Collections:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
A group of models that you may take action on or filter. Example of a third party library that helps to manage collections: https://github.com/doctrine/collections&lt;br /&gt;
&lt;br /&gt;
Collections may or may not be used, but some possible collections would be the following:&lt;br /&gt;
&lt;br /&gt;
* outcomes&lt;br /&gt;
* outcome attempts&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;New mform elements:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
For most plugins, the process of associating an outcome would be done through a Moodle form. Proposing adding a new Moodle form element that can be added to a form to provide the necessary UI. An API for validating and saving the new mform element will be provided. In addition, the mform element will just be a wrapper around a well formed API that could be used on it’s own when other use cases present themselves.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;API for plugins&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Beyond the mform element, plugins may interact with outcomes in order to provide a richer integration. An API will be provided to assist with the following (not an exhaustive list):&lt;br /&gt;
&lt;br /&gt;
* A way to notify the outcome system that a content item is or is not being used within a course.&lt;br /&gt;
** Example: When a question is authored at the site level and then is actually used within a course, it must inform the outcome system that it is in use. This could potentially be done via events or just direct API calls at the appropriate times. Same goes for when a question is no longer used within a course.&lt;br /&gt;
* Record an attempt made against a content item.&lt;br /&gt;
** Examples: A question has been attempted or an assignment submission has been graded.&lt;br /&gt;
* A way to retrieve associated outcomes.&lt;br /&gt;
* A way to update, delete or otherwise modify the associated outcomes.&lt;br /&gt;
* A way to pick outcome associations (EG: what the mform element would do).&lt;br /&gt;
* A method of syncing up attempts against a content item. This would be used when associating an outcome on content that has already been graded/attempted.&lt;br /&gt;
* API to cleanup tables on course deletion.&lt;br /&gt;
&lt;br /&gt;
== Supported plugin type plugins ==&lt;br /&gt;
&lt;br /&gt;
This may sound a little odd, but basically the point of these plugins is to add support for a plugin type to the outcome system. These types would assist in interpreting outcome content associations. Examples:&lt;br /&gt;
&lt;br /&gt;
* Given an outcome association, please provide a link to the mapped content.&lt;br /&gt;
** For an activity, this would be a link to the module.&lt;br /&gt;
** For a grading form, a link to the grading instance.&lt;br /&gt;
** For a question, a link to the question instance in the question bank.&lt;br /&gt;
* What are all of the content items that have not been mapped?&lt;br /&gt;
** For activities, this would return instances that are not mapped.&lt;br /&gt;
** For grading form, this would return sub-plugin specific information, like criteria.&lt;br /&gt;
** For questions, this would return questions from the course question bank that are not mapped.&lt;br /&gt;
* May assist with automatic cleanup when the content is deleted.&lt;br /&gt;
* Also other meta data could be derived, like plugin type name.&lt;br /&gt;
&lt;br /&gt;
This plugin would live under lib/outcome/support/ and would initially ship with support of the following plugin types:&lt;br /&gt;
&lt;br /&gt;
* mod&lt;br /&gt;
* qtype&lt;br /&gt;
* gradingform: note that this integration would be deeper in that each gradingform plugin would need to implement something in order to help interpret associations. The reason being is that outcomes are being associated to plugin specific content, instead of something generic like the grading instance.&lt;br /&gt;
&lt;br /&gt;
== Import and export plugins ==&lt;br /&gt;
&lt;br /&gt;
The outcome system would support the exporting of outcome sets. The first export plugin would be a very simple JSON export that is specific to Moodle itself. This would be used for moving custom outcomes from one Moodle site to another.&lt;br /&gt;
&lt;br /&gt;
The outcome system would support importing outcome sets. Initially, there would be support for importing outcomes from [http://asn.jesandco.org Achievement Standards Network (ASN)] ([http://standards.jesandco.org/wiki/ASN_Application_Profile Format Specification]) and importing the JSON export from above.&lt;br /&gt;
&lt;br /&gt;
Both of the outcomes import and export processes would be a plugin based, so other formats could be supported by creating new plugins. The import and export plugins would live under lib/outcome/import/ and lib/outcome/export/.&lt;br /&gt;
&lt;br /&gt;
== Recommendation engine plugins ==&lt;br /&gt;
&lt;br /&gt;
The outcome system would provide a way to recommend to a teacher whether a student should be marked as completing the outcome or not. These plugins should have full Moodle plugin support because they may need to listen to events, run crons, have DB tables, global settings, etc. These plugins would live under lib/outcome/engine/. Recommendations would be generated on demand and stored in MUC.&lt;br /&gt;
&lt;br /&gt;
Initially, the only plugin would be a percentage based recommendation engine. It would be configurable for a specific threshold that would determine if an attempt against an outcome should be considered correct or incorrect. It would then process the outcome attempts to determine the recommendation.&lt;br /&gt;
&lt;br /&gt;
Recommendation engines should also be enabled or disabled at the site level. This would require a “Manage recommendation engines” section in the admin site settings.&lt;br /&gt;
&lt;br /&gt;
= Reporting =&lt;br /&gt;
&lt;br /&gt;
== Site ==&lt;br /&gt;
&lt;br /&gt;
The following reports:&lt;br /&gt;
&lt;br /&gt;
* Outcomes Coverage report - shows outcomes that have been mapped to content in the site.&lt;br /&gt;
* Outcomes Performance report - shows performance on outcomes at the site level. Optionally broken down by course.&lt;br /&gt;
&lt;br /&gt;
== Course ==&lt;br /&gt;
&lt;br /&gt;
The following reports:&lt;br /&gt;
&lt;br /&gt;
* Outcomes Coverage report - shows outcomes that have been mapped in this course.&lt;br /&gt;
* Outcomes: Unmapped Content report - shows content that is not mapped to an outcome.&lt;br /&gt;
* Outcomes Performance report - shows aggregated performance on outcomes in the course.&lt;br /&gt;
* Outcomes Student Performance report - shows student performance on outcomes in the course for the teacher.&lt;br /&gt;
* Outcomes Personal Performance report - shows student performance on outcomes in the course for the student.&lt;br /&gt;
&lt;br /&gt;
== User profile ==&lt;br /&gt;
&lt;br /&gt;
At the very least, there will be a user site report where the user can see earned outcomes.&lt;br /&gt;
&lt;br /&gt;
= Grading =&lt;br /&gt;
&lt;br /&gt;
Outcome Completion Marking is done by course graders and is the final check point for if a learner has earned an outcome or not. The proposed location is to use the Outcome tab that is currently in the grades section of the course. This would also highjack the Outcomes link under Grade administration and Course administration.&lt;br /&gt;
&lt;br /&gt;
= Logging =&lt;br /&gt;
&lt;br /&gt;
We want to audit most actions in the Moodle log. These actions include:&lt;br /&gt;
&lt;br /&gt;
* CRUD type actions.&lt;br /&gt;
* Any association editing. EG: associating an outcome with a course, content item, etc.&lt;br /&gt;
* Outcome marking.&lt;br /&gt;
* User attempts against outcomes.&lt;br /&gt;
&lt;br /&gt;
= Role capabilities =&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Description&lt;br /&gt;
! Capability&lt;br /&gt;
|-&lt;br /&gt;
| Map outcomes to content&lt;br /&gt;
| moodle/outcome:contentmap&lt;br /&gt;
|-&lt;br /&gt;
| Map outcome sets to courses&lt;br /&gt;
| moodle/outcome:coursemap&lt;br /&gt;
|-&lt;br /&gt;
| Administering outcomes (Editing, importing, etc)&lt;br /&gt;
| moodle/outcome:edit&lt;br /&gt;
|-&lt;br /&gt;
| Each report will have a capability to view them.&lt;br /&gt;
| report/REPORTNAME:view&lt;br /&gt;
|-&lt;br /&gt;
| Marking outcomes by graders&lt;br /&gt;
| moodle/grade:edit&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Backup and restore =&lt;br /&gt;
&lt;br /&gt;
The workflow for backup and restore may go like:&lt;br /&gt;
&lt;br /&gt;
* Same site, then just map to existing outcomes via the identifier.&lt;br /&gt;
* Not same site, then the assumption is that the outcome set should be imported first, then we can map to existing outcomes via the identifier like in our same site scenario.&lt;br /&gt;
&lt;br /&gt;
Outcomes would probably take advantage of the backup plugin API to backup outcome associations to modules, question, etc. So, for example:&lt;br /&gt;
&lt;br /&gt;
* Outcomes would plug into activities in order to backup outcome associations and attempts.&lt;br /&gt;
* Outcomes would plug into questions in order to backup outcome associations and attempts.&lt;br /&gt;
* Grading forms would have to manually outcome associations and attempts. Will strive to make code re-usable.&lt;br /&gt;
&lt;br /&gt;
= Migration of old outcomes =&lt;br /&gt;
&lt;br /&gt;
Please first review [[Migration and Technical Issues]]. This still needs to be flushed out some more, but since the migration requires user interaction, we may need to create an admin tool to handle the migration. Until outcomes are migrated, it might make sense to continue to show the outcomes in the grade book, but remove the ability to do any editing of old outcomes.&lt;/div&gt;</summary>
		<author><name>Bushido</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=Outcomes_Technical_Specification&amp;diff=37983</id>
		<title>Outcomes Technical Specification</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=Outcomes_Technical_Specification&amp;diff=37983"/>
		<updated>2013-02-25T23:45:55Z</updated>

		<summary type="html">&lt;p&gt;Bushido: /* outcome_attempt */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
&lt;br /&gt;
Please be familiar with the function specification as outlined in the [[Outcomes Specification]]. The functional specification will provide details about the concepts and goals of this project. In particular, the following sections provide the overview of the system by user role:&lt;br /&gt;
&lt;br /&gt;
* [[Outcomes Administrator Specification]]&lt;br /&gt;
* [[Outcomes Instructor Specification]]&lt;br /&gt;
* [[Outcomes Student Specification]]&lt;br /&gt;
&lt;br /&gt;
In addition, some features and use cases are known but not yet being implemented. Please see [[Specifically Excluded Use Cases]]. Specifically, this initial version will not be attempting to map an existing outcome set to a new version of the outcome set on import.&lt;br /&gt;
&lt;br /&gt;
This document attempts to capture how the functional specification would be implemented in Moodle.&lt;br /&gt;
&lt;br /&gt;
= Backwards compatibility breaks =&lt;br /&gt;
&lt;br /&gt;
First and foremost, it is important to identify key differences between the current outcome system and this proposal as there are some philosophical shifts as well as breaking of existing code.&lt;br /&gt;
&lt;br /&gt;
# Outcomes will now only be created at the site level and then mapped to courses and content. Outcomes will no longer be created at the course level.&lt;br /&gt;
# Anything using the current outcome API or tables will have to be updated to use the new outcomes when appropriate.&lt;br /&gt;
# Outcomes will no longer appear in the grade book.&lt;br /&gt;
# Outcomes will no longer support scales. It is just a simple pass or fail.&lt;br /&gt;
&lt;br /&gt;
= Settings =&lt;br /&gt;
&lt;br /&gt;
== Site ==&lt;br /&gt;
&lt;br /&gt;
At the site level, there will be an area to do all of the configuration and setup of outcome sets. The proposed location is under Settings &amp;gt; Site Administration &amp;gt; Grades &amp;gt; Outcomes.&lt;br /&gt;
&lt;br /&gt;
In addition to managing outcomes, there will be site settings page for general outcome settings. For example, a setting to toggle if outcome idnumbers are editable or not.&lt;br /&gt;
&lt;br /&gt;
== Course ==&lt;br /&gt;
&lt;br /&gt;
When editing a course, there will be a section to associate outcome sets to the course. The section will appear below the course General settings.&lt;br /&gt;
&lt;br /&gt;
This association is used to determine the relevant outcomes for the course for reporting and as a way to pre-filter outcome pickers when associating outcomes to content.&lt;br /&gt;
&lt;br /&gt;
== Activity ==&lt;br /&gt;
&lt;br /&gt;
When editing an activity, there will be a section to associate individual outcomes to the activity. This section will be provided by the moodleform_mod::standard_coursemodule_elements() callback so that all activities will be able to be associated to outcomes automatically.&lt;br /&gt;
&lt;br /&gt;
Graded activities will have to add additional integration points with outcomes in order to capture user attempts.&lt;br /&gt;
&lt;br /&gt;
== Advanced grading ==&lt;br /&gt;
&lt;br /&gt;
Rubrics and Marking guides will be able to associate an outcome for a criteria. API will be provided to support this, but each grading method will have to integrate with outcomes where it makes sense.&lt;br /&gt;
&lt;br /&gt;
== Questions ==&lt;br /&gt;
&lt;br /&gt;
When editing a question, there will be a section to associate individual outcomes to the question. The section can be added to question_edit_form::definition() after the General section.&lt;br /&gt;
&lt;br /&gt;
This association UI might behave a little differently based on the context in Moodle. If the question is being authored at the site level, then the outcome association is more free form, meaning one can select any outcome from any outcome set. If the question is being authored at the course level, then the outcome association defaults to those outcome sets that are associated to the course.&lt;br /&gt;
&lt;br /&gt;
= Data structure =&lt;br /&gt;
&lt;br /&gt;
== outcome_set ==&lt;br /&gt;
&lt;br /&gt;
Relations: none&lt;br /&gt;
&lt;br /&gt;
Purpose: An outcome set represents a collection of outcomes and perhaps some meta data regarding the revision or applicable region. Outcome sets are mapped to courses, which makes the outcomes within the set available to be mapped to course content. An example outcome set would be [http://asn.jesandco.org/resources/D2403043 Health Education Content Standards for California Public Schools, Kindergarten Through Grade Twelve].&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| idnumber&lt;br /&gt;
| varchar(255), unique index&lt;br /&gt;
| GUID that is auto-generated if missing. Generally on import, these are provided. This would be used to identify the outcome set during import or course restore.&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| varchar(255)&lt;br /&gt;
| The name of the outcome set&lt;br /&gt;
|-&lt;br /&gt;
| description&lt;br /&gt;
| text, default null, optional&lt;br /&gt;
| The plain text description of the outcome.&lt;br /&gt;
|-&lt;br /&gt;
| provider&lt;br /&gt;
| varchar(255), default null, optional&lt;br /&gt;
| Provider information regarding the outcome set. EG: Could be set to ASN.&lt;br /&gt;
|-&lt;br /&gt;
| revision&lt;br /&gt;
| varchar(255), default null, optional&lt;br /&gt;
| Version information regarding the outcome set. This will typically be a date or year, EG: 2011&lt;br /&gt;
|-&lt;br /&gt;
| region&lt;br /&gt;
| varchar(255), default null, optional&lt;br /&gt;
| Any region information. Example: In the US this could be a state name.&lt;br /&gt;
|-&lt;br /&gt;
| deleted&lt;br /&gt;
| int(1), default 0&lt;br /&gt;
| If the outcome set has been deleted.&lt;br /&gt;
|-&lt;br /&gt;
| timemodified&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time modified.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome_set&lt;br /&gt;
&lt;br /&gt;
Purpose: Stores information regarding an individual outcome. Outcomes can be stored in a hierarchy, but the hierarchy is visual only. This means that if an outcome is earned, then only that outcome is earned, not it and all of its children. Also, if all child outcomes are earned, then parent outcomes are not also automatically earned. In addition, sometimes outcomes are not assessable, but are only there for extra context in the hierarchy. This identifies that the outcome cannot be mapped to content, nor can a student earn it.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomesetid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_set table.&lt;br /&gt;
|-&lt;br /&gt;
| parentid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Self referencing key. Identifies the parent outcome in the hierarchy.&lt;br /&gt;
|-&lt;br /&gt;
| idnumber&lt;br /&gt;
| varchar(255), unique index&lt;br /&gt;
| GUID that is auto-generated if missing. Generally on import, these are provided. This would be used to identify the outcome set during import or course restore.&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| varchar(255)&lt;br /&gt;
| The name of the outcome.&lt;br /&gt;
|-&lt;br /&gt;
| docnum&lt;br /&gt;
| varchar(255), default null, optional&lt;br /&gt;
| Field for tracking additional information on the outcome. EG: 2.3.A&lt;br /&gt;
|-&lt;br /&gt;
| description&lt;br /&gt;
| text, default null, optional&lt;br /&gt;
| The plain text description of the outcome.&lt;br /&gt;
|-&lt;br /&gt;
| assessable&lt;br /&gt;
| int(1)&lt;br /&gt;
| If set to 1, then the outcome is assessable and can be mapped to content. If set to 0, then the outcome is not assessable and cannot be mapped to content.&lt;br /&gt;
|-&lt;br /&gt;
| deleted&lt;br /&gt;
| int(1), default 0&lt;br /&gt;
| If the outcome has been deleted.&lt;br /&gt;
|-&lt;br /&gt;
| sortorder&lt;br /&gt;
| int(10)&lt;br /&gt;
| The sort order. This is 0-X for all outcomes that belong to the same outcome set.&lt;br /&gt;
|-&lt;br /&gt;
| timemodified&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time modified.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_meta ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome&lt;br /&gt;
&lt;br /&gt;
Purpose: Represents additional meta information regarding outcomes. Only support for “Education Level” (K, 1, … 12, etc.) and “Subjects” (e.g. Math, English, etc.) will be available out of the box, but additional data points can be added later (which would need to be added to the UI). One outcome could have many meta values. For example: an outcome could be associated to many educational levels and subjects.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| varchar(255), indexed&lt;br /&gt;
| The name of the meta data.&lt;br /&gt;
|-&lt;br /&gt;
| value&lt;br /&gt;
| varchar(1333), indexed&lt;br /&gt;
| The value of the meta data.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_content ==&lt;br /&gt;
&lt;br /&gt;
Relations: dynamic with core tables&lt;br /&gt;
&lt;br /&gt;
Purpose: This represents that a content item has been mapped to an outcome or to multiple outcomes. Check the outcome_content_map table for the specific outcomes.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| component&lt;br /&gt;
| varchar(255), indexed&lt;br /&gt;
| The name of the component.&lt;br /&gt;
|-&lt;br /&gt;
| area&lt;br /&gt;
| varchar(255), default null, indexed, optional&lt;br /&gt;
| The name of the area. Used when a component has multiple items to associate to outcomes.&lt;br /&gt;
|-&lt;br /&gt;
| itemid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| The item ID.&lt;br /&gt;
|-&lt;br /&gt;
| deleted&lt;br /&gt;
| int(1), default 0&lt;br /&gt;
| Soft delete if the outcome was disassociated from the content. Note, if the content is actually deleted, then this association will be deleted.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_content_map ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome, outcome_content&lt;br /&gt;
&lt;br /&gt;
Purpose: This represents the one to many relationship of a single content item mapped to many outcomes.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomecontentid&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Foreign key to outcome_content table.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_mod_content_map ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome_content, course_modules&lt;br /&gt;
&lt;br /&gt;
Purpose: Associates an outcome content item with an activity. For example: a question is created in the site question bank and outcomes are associated to the question. Once that question is added to a Quiz then that association is stored in this table so the outcome system knows that the content item and its outcomes are in use.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| cmid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to course_modules table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomecontentid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_content table.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_set_course_map ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome_set, course&lt;br /&gt;
&lt;br /&gt;
Purpose: Associates an outcome set with the course. Filtering of the outcome set is optionally allowed since outcome sets can span multiple educational levels and even subjects. Once an outcome set is mapped to the course, then the outcomes in the outcome set are available to be mapped to course content.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| courseid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to course table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomesetid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_set table.&lt;br /&gt;
|-&lt;br /&gt;
| filter&lt;br /&gt;
| text, default null&lt;br /&gt;
| Some outcome sets span multiple education levels and subjects. So, when mapping an outcome set to a course, it may make sense to restrict the available outcomes to a specific education level(s) and/or subject(s). This information would be serialized into this field.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_attempt ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome_content, user&lt;br /&gt;
&lt;br /&gt;
Purpose: Track a user attempt against a content item. The idea here is to aggregate attempt information so that the recommendation engines (detailed below) have an easily accessible data set to process. This does not mean however that recommendation engines are only limited to this data as one could mine for additional data where needed.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomecontentid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_content table.&lt;br /&gt;
|-&lt;br /&gt;
| userid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table.&lt;br /&gt;
|-&lt;br /&gt;
| percentgrade&lt;br /&gt;
| float(10,5)&lt;br /&gt;
| Percent grade earned on this attempt.&lt;br /&gt;
|-&lt;br /&gt;
| mingrade&lt;br /&gt;
| float(10,5)&lt;br /&gt;
| The minimum possible grade.&lt;br /&gt;
|-&lt;br /&gt;
| maxgrade&lt;br /&gt;
| float(10,5)&lt;br /&gt;
| The maximum possible grade.&lt;br /&gt;
|-&lt;br /&gt;
| rawgrade&lt;br /&gt;
| float(10,5)&lt;br /&gt;
| The points earned, should be between the minimum and maximum grades.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_mark ==&lt;br /&gt;
&lt;br /&gt;
Relations: course, user, outcome&lt;br /&gt;
&lt;br /&gt;
Purpose: Graders will manually mark the student as having Met or Not Met an outcome. The recommendation engines will make a recommendation to the grader based on user attempts against content that has been mapped to the outcome.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| courseid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to course table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| userid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table. This is the user who is receiving the mark.&lt;br /&gt;
|-&lt;br /&gt;
| graderid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table. This is the user is doing the marking.&lt;br /&gt;
|-&lt;br /&gt;
| result&lt;br /&gt;
| int(2)&lt;br /&gt;
| 0 is not pass, 1 is pass, null is that no decision has been made yet.&lt;br /&gt;
|-&lt;br /&gt;
| timemodified&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time modified.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_mark_history ==&lt;br /&gt;
&lt;br /&gt;
Relations: course, user, outcome, outcome_mark&lt;br /&gt;
&lt;br /&gt;
Purpose: Keep track of past markings.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomemarkid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome_mark table. Though the record could be missing from outcome_mark.&lt;br /&gt;
|-&lt;br /&gt;
| courseid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to course table.&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| userid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table. This is the user who is receiving the mark.&lt;br /&gt;
|-&lt;br /&gt;
| graderid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table. This is the user is doing the marking.&lt;br /&gt;
|-&lt;br /&gt;
| result&lt;br /&gt;
| int(2)&lt;br /&gt;
| 0 is not pass, 1 is pass, null is that no decision has been made yet.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== outcome_award ==&lt;br /&gt;
&lt;br /&gt;
Relations: outcome, user&lt;br /&gt;
&lt;br /&gt;
Purpose: This preserves any outcomes earned by a student, regardless if the course is deleted or not.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10), unique index&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| outcomeid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to outcome table.&lt;br /&gt;
|-&lt;br /&gt;
| userid&lt;br /&gt;
| int(10), indexed&lt;br /&gt;
| Foreign key to user table.&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Time created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Architecture =&lt;br /&gt;
&lt;br /&gt;
The API that drives outcomes could be located inside of lib/outcome/ directory. Any UI like the administrative settings, outcome associations, etc could be located inside of a top level outcome/ directory. Alternatively, the administrative UI could live under the admin/outcome/ directory while all non-administrative UIs could live under the top level outcome/ directory.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Models and repository mappers:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* outcome: Represents a single outcome&lt;br /&gt;
* outcome set: Represents a group of outcomes&lt;br /&gt;
* outcome content: An outcome association to content.&lt;br /&gt;
* outcome attempt: An attempt made against an outcome.&lt;br /&gt;
* outcome mark: A teacher marking an outcome against a user.&lt;br /&gt;
* outcome award: An awarded outcome at the site level.&lt;br /&gt;
&lt;br /&gt;
A repository mapper would include ways to store the model and ways to retrieve them in a re-usable and organized manner.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Collections:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
A group of models that you may take action on or filter. Example of a third party library that helps to manage collections: https://github.com/doctrine/collections&lt;br /&gt;
&lt;br /&gt;
Collections may or may not be used, but some possible collections would be the following:&lt;br /&gt;
&lt;br /&gt;
* outcomes&lt;br /&gt;
* outcome attempts&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;New mform elements:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
For most plugins, the process of associating an outcome would be done through a Moodle form. Proposing adding a new Moodle form element that can be added to a form to provide the necessary UI. An API for validating and saving the new mform element will be provided. In addition, the mform element will just be a wrapper around a well formed API that could be used on it’s own when other use cases present themselves.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;API for plugins&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Beyond the mform element, plugins may interact with outcomes in order to provide a richer integration. An API will be provided to assist with the following (not an exhaustive list):&lt;br /&gt;
&lt;br /&gt;
* A way to notify the outcome system that a content item is or is not being used within a course.&lt;br /&gt;
** Example: When a question is authored at the site level and then is actually used within a course, it must inform the outcome system that it is in use. This could potentially be done via events or just direct API calls at the appropriate times. Same goes for when a question is no longer used within a course.&lt;br /&gt;
* Record an attempt made against a content item.&lt;br /&gt;
** Examples: A question has been attempted or an assignment submission has been graded.&lt;br /&gt;
* A way to retrieve associated outcomes.&lt;br /&gt;
* A way to update, delete or otherwise modify the associated outcomes.&lt;br /&gt;
* A way to pick outcome associations (EG: what the mform element would do).&lt;br /&gt;
* A method of syncing up attempts against a content item. This would be used when associating an outcome on content that has already been graded/attempted.&lt;br /&gt;
* API to cleanup tables on course deletion.&lt;br /&gt;
&lt;br /&gt;
== Supported plugin type plugins ==&lt;br /&gt;
&lt;br /&gt;
This may sound a little odd, but basically the point of these plugins is to add support for a plugin type to the outcome system. These types would assist in interpreting outcome content associations. Examples:&lt;br /&gt;
&lt;br /&gt;
* Given an outcome association, please provide a link to the mapped content.&lt;br /&gt;
** For an activity, this would be a link to the module.&lt;br /&gt;
** For a grading form, a link to the grading instance.&lt;br /&gt;
** For a question, a link to the question instance in the question bank.&lt;br /&gt;
* What are all of the content items that have not been mapped?&lt;br /&gt;
** For activities, this would return instances that are not mapped.&lt;br /&gt;
** For grading form, this would return sub-plugin specific information, like criteria.&lt;br /&gt;
** For questions, this would return questions from the course question bank that are not mapped.&lt;br /&gt;
* May assist with automatic cleanup when the content is deleted.&lt;br /&gt;
* Also other meta data could be derived, like plugin type name.&lt;br /&gt;
&lt;br /&gt;
This plugin would live under lib/outcome/support/ and would initially ship with support of the following plugin types:&lt;br /&gt;
&lt;br /&gt;
* mod&lt;br /&gt;
* qtype&lt;br /&gt;
* gradingform: note that this integration would be deeper in that each gradingform plugin would need to implement something in order to help interpret associations. The reason being is that outcomes are being associated to plugin specific content, instead of something generic like the grading instance.&lt;br /&gt;
&lt;br /&gt;
== Import and export plugins ==&lt;br /&gt;
&lt;br /&gt;
The outcome system would support the exporting of outcome sets. The first export plugin would be a very simple JSON export that is specific to Moodle itself. This would be used for moving custom outcomes from one Moodle site to another.&lt;br /&gt;
&lt;br /&gt;
The outcome system would support importing outcome sets. Initially, there would be support for importing outcomes from [http://asn.jesandco.org Achievement Standards Network (ASN)] ([http://standards.jesandco.org/wiki/ASN_Application_Profile Format Specification]) and importing the JSON export from above.&lt;br /&gt;
&lt;br /&gt;
Both of the outcomes import and export processes would be a plugin based, so other formats could be supported by creating new plugins. The import and export plugins would live under lib/outcome/import/ and lib/outcome/export/.&lt;br /&gt;
&lt;br /&gt;
== Recommendation engine plugins ==&lt;br /&gt;
&lt;br /&gt;
The outcome system would provide a way to recommend to a teacher whether a student should be marked as completing the outcome or not. These plugins should have full Moodle plugin support because they may need to listen to events, run crons, have DB tables, global settings, etc. These plugins would live under lib/outcome/engine/. Recommendations would be generated on demand and stored in MUC.&lt;br /&gt;
&lt;br /&gt;
Initially, the only plugin would be a percentage based recommendation engine. It would be configurable for a specific threshold that would determine if an attempt against an outcome should be considered correct or incorrect. It would then process the outcome attempts to determine the recommendation.&lt;br /&gt;
&lt;br /&gt;
Recommendation engines should also be enabled or disabled at the site level. This would require a “Manage recommendation engines” section in the admin site settings.&lt;br /&gt;
&lt;br /&gt;
= Reporting =&lt;br /&gt;
&lt;br /&gt;
== Site ==&lt;br /&gt;
&lt;br /&gt;
The following reports:&lt;br /&gt;
&lt;br /&gt;
* Outcomes Coverage report - shows outcomes that have been mapped to content in the site.&lt;br /&gt;
* Outcomes Performance report - shows performance on outcomes at the site level. Optionally broken down by course.&lt;br /&gt;
&lt;br /&gt;
== Course ==&lt;br /&gt;
&lt;br /&gt;
The following reports:&lt;br /&gt;
&lt;br /&gt;
* Outcomes Coverage report - shows outcomes that have been mapped in this course.&lt;br /&gt;
* Outcomes: Unmapped Content report - shows content that is not mapped to an outcome.&lt;br /&gt;
* Outcomes Performance report - shows aggregated performance on outcomes in the course.&lt;br /&gt;
* Outcomes Student Performance report - shows student performance on outcomes in the course for the teacher.&lt;br /&gt;
* Outcomes Personal Performance report - shows student performance on outcomes in the course for the student.&lt;br /&gt;
&lt;br /&gt;
== User profile ==&lt;br /&gt;
&lt;br /&gt;
At the very least, there will be a user site report where the user can see earned outcomes.&lt;br /&gt;
&lt;br /&gt;
= Grading =&lt;br /&gt;
&lt;br /&gt;
Outcome Completion Marking is done by course graders and is the final check point for if a learner has earned an outcome or not. The proposed location is to use the Outcome tab that is currently in the grades section of the course. This would also highjack the Outcomes link under Grade administration and Course administration.&lt;br /&gt;
&lt;br /&gt;
= Logging =&lt;br /&gt;
&lt;br /&gt;
We want to audit most actions in the Moodle log. These actions include:&lt;br /&gt;
&lt;br /&gt;
* CRUD type actions.&lt;br /&gt;
* Any association editing. EG: associating an outcome with a course, content item, etc.&lt;br /&gt;
* Outcome marking.&lt;br /&gt;
* User attempts against outcomes.&lt;br /&gt;
&lt;br /&gt;
= Role capabilities =&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Description&lt;br /&gt;
! Capability&lt;br /&gt;
|-&lt;br /&gt;
| Map outcomes to content&lt;br /&gt;
| moodle/outcome:contentmap&lt;br /&gt;
|-&lt;br /&gt;
| Map outcome sets to courses&lt;br /&gt;
| moodle/outcome:coursemap&lt;br /&gt;
|-&lt;br /&gt;
| Administering outcomes (Editing, importing, etc)&lt;br /&gt;
| moodle/outcome:edit&lt;br /&gt;
|-&lt;br /&gt;
| Each report will have a capability to view them.&lt;br /&gt;
| report/REPORTNAME:view&lt;br /&gt;
|-&lt;br /&gt;
| Marking outcomes by graders&lt;br /&gt;
| moodle/grade:edit&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Backup and restore =&lt;br /&gt;
&lt;br /&gt;
The workflow for backup and restore may go like:&lt;br /&gt;
&lt;br /&gt;
* Same site, then just map to existing outcomes via the identifier.&lt;br /&gt;
* Not same site, then the assumption is that the outcome set should be imported first, then we can map to existing outcomes via the identifier like in our same site scenario.&lt;br /&gt;
&lt;br /&gt;
Outcomes would probably take advantage of the backup plugin API to backup outcome associations to modules, question, etc. So, for example:&lt;br /&gt;
&lt;br /&gt;
* Outcomes would plug into activities in order to backup outcome associations and attempts.&lt;br /&gt;
* Outcomes would plug into questions in order to backup outcome associations and attempts.&lt;br /&gt;
* Grading forms would have to manually outcome associations and attempts. Will strive to make code re-usable.&lt;br /&gt;
&lt;br /&gt;
= Migration of old outcomes =&lt;br /&gt;
&lt;br /&gt;
Please first review [[Migration and Technical Issues]]. This still needs to be flushed out some more, but since the migration requires user interaction, we may need to create an admin tool to handle the migration. Until outcomes are migrated, it might make sense to continue to show the outcomes in the grade book, but remove the ability to do any editing of old outcomes.&lt;/div&gt;</summary>
		<author><name>Bushido</name></author>
	</entry>
</feed>