<?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=Ghenrick</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=Ghenrick"/>
	<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/Special:Contributions/Ghenrick"/>
	<updated>2026-10-07T14:56:21Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.5</generator>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=Assignment&amp;diff=30635</id>
		<title>Assignment</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=Assignment&amp;diff=30635"/>
		<updated>2011-11-23T00:12:16Z</updated>

		<summary type="html">&lt;p&gt;Ghenrick: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Work in progress}}&lt;br /&gt;
{{Infobox Project&lt;br /&gt;
|name = Assignment module&lt;br /&gt;
|state = Scoping&lt;br /&gt;
|tracker = TBA&lt;br /&gt;
|discussion = TBA&lt;br /&gt;
|assignee = Netspot&lt;br /&gt;
}}&lt;br /&gt;
{{Moodle 2.3}}&lt;br /&gt;
&lt;br /&gt;
== Project goals ==&lt;br /&gt;
To redevelop the Moodle Assignment Module to address common problems around usability and extensibility and to implement web services to ease integration with third party tools, and address common needs of the user community which are currently not met.&lt;br /&gt;
&lt;br /&gt;
The following four problems have been highlighted requiring attention:&lt;br /&gt;
* The four core subtypes are confusing to new users, and are in fact all very similar.&lt;br /&gt;
* There is no good support for team-based assignments.&lt;br /&gt;
* The support of subtypes makes it slightly easier to write new assignment types but also makes them less flexible, and so people tend to create hacks&lt;br /&gt;
* Third party tools such as Lightwork and the Moodle mobile app require the use of web services to be able to access all functionality of Moodle&lt;br /&gt;
&lt;br /&gt;
== Scope ==&lt;br /&gt;
* resolution of the four problems identified by HQ&lt;br /&gt;
* implementing features desired by the Electronic Assignment Management (EAM) Consortium and the Moodle community as time and funding permits. The project may be split into phases to allow prioritisation of development work. &lt;br /&gt;
&lt;br /&gt;
These four problems may be addressed by collapsing the four assignment subtypes into one assignment type which supports:&lt;br /&gt;
* Teacher-written text to students &lt;br /&gt;
* Teacher-supplied files to students&lt;br /&gt;
* Student-written text for teacher&lt;br /&gt;
* Student-supplied files for teacher&lt;br /&gt;
&lt;br /&gt;
The assignment activity should support groups and groupings not just from the teacher perspective (for grading purposes) but also for students, such that, if desired, teams of students can submit assignments by sharing uploading to a common file area and entering text into a shared text response. A grade for a group submission would apply to all students but would allow manual overriding for individual students. This may be achieved though a new setting in the assignment module.&lt;br /&gt;
&lt;br /&gt;
Logging of activity in the assignment module will be even more important than previously if multiple students can modify each others&#039; (common) work.&lt;br /&gt;
&lt;br /&gt;
The framework of the assignment module should allow for other activity modules to declare themselves &amp;quot;Assignments&amp;quot; such that they can be grouped in the UI if required.&lt;br /&gt;
&lt;br /&gt;
A facility will need to be provided (through lib/assignmentlib.php) to convert assignment from the old four-pronged Assignment module to the new Assignment module with the appropriate settings. &lt;br /&gt;
&lt;br /&gt;
The Assignment module needs to provide web services which allow other tools to view, contribute, submit and grade assignments.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Use Cases ==&lt;br /&gt;
=== Use Case 1: File Upload Assignment ===&lt;br /&gt;
In a traditional use case a teacher may require the students to write an essay and submit the file to Moodle for grading. So far, the &amp;quot;Upload a Single File&amp;quot; and &amp;quot;Advanced Uploading of Files&amp;quot; Assignment types have been used. (&amp;quot;Upload a Single File&amp;quot; does not allow the teacher to upload a response file, whereas &amp;quot;Advanced Uploading&amp;quot; does). &lt;br /&gt;
&lt;br /&gt;
With editing turned on, the teacher would select &amp;quot;Assignment&amp;quot; from the &amp;quot;Add an Activity&amp;quot; dropdown menu. &lt;br /&gt;
The teacher specifies a name, description, available from and available to dates and times and a grade for the assignment. &lt;br /&gt;
The teacher specifies the maximum number of files a student is allowed to submit, and the size per file (or all files together?).&lt;br /&gt;
&lt;br /&gt;
Once the assignment opens, each student opens the assignment activity and uploads their files form their computer. This may be done over several visits. When the required files are uploaded, the student presses a button to indicate this and the assignment is locked from further changes by the student. (THis is the Send for marking/Draft mode behaviour of the Advanced file upload)&lt;br /&gt;
&lt;br /&gt;
This process described does not have any facility for the teacher to upload a file with instructions for the students, or a data file to process in the assignment. THis is a common request and should be added.&lt;br /&gt;
&lt;br /&gt;
=== Use Case 2: Statistics Assignment ===&lt;br /&gt;
The Teacher wishes to provide the students with a data file which is to be processed. The students will have to supply output from a statistics program with graphs and a report written in a word processor to complete the assignment. &lt;br /&gt;
&lt;br /&gt;
This is similar to Use Case 1 but the teacher uploads the data file as a assignment instruction file when creating the assignment.&lt;br /&gt;
&lt;br /&gt;
=== Use Case 3: Anonymous marking  ===&lt;br /&gt;
# Teacher creates the assignment with normal settings&lt;br /&gt;
# Teacher select to use Anonymous marking for this assignment&lt;br /&gt;
# Teacher selects the &amp;quot;post&amp;quot; or go live date for the results (this is also the date which the teacher will see student names for assignments)&lt;br /&gt;
# Students upload the assignments&lt;br /&gt;
# The papers are giving a unique submissionID for referencing&lt;br /&gt;
# Teacher / or Non-editing teacher then downloads the file with no access to knowing who the student is just the submissionID&lt;br /&gt;
# Teacher then grades the assignment &lt;br /&gt;
# When the post date / go live date arrives, grades are posted to the gradebook and the teacher can now see names in the activity&lt;br /&gt;
&lt;br /&gt;
=== Use Case 4: Offline Assignment ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Use Case 5: Zip &amp;amp; download, offline marking  ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Use Case 6: Student uploads assignment, would like to retract file ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Use Case 7: Students work in teams and submit one common set of files. All students receive the same grade ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Use Case 8: Students work in teams and submit one common set of files. All students receive individual grades based on their contributions ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Use Case 9: Individual assignments, but a teacher only marks assignments in one group ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Use Case 10: Online Text ===&lt;br /&gt;
&lt;br /&gt;
=== Use Case 11: Second Marking process ===&lt;br /&gt;
&lt;br /&gt;
There are a number of second marking methods this is one common process.&lt;br /&gt;
&lt;br /&gt;
The first marker assesses and provides comments and awards a mark&lt;br /&gt;
The second marker checks the grading and comments of the first marker to check for fairness and consistency in standards. This includes the calculation of the grade/marks.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This may be done for (and option should be available for)&lt;br /&gt;
* all the submissions&lt;br /&gt;
* a random sample of submissions&lt;br /&gt;
* any fails&lt;br /&gt;
* firsts&lt;br /&gt;
* borderlines&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
There is also another common use case&lt;br /&gt;
&lt;br /&gt;
Double blind marking  &lt;br /&gt;
* This is where both markers mark the paper without reference to each other&lt;br /&gt;
* They ensure there is a clear audit trail for the rationale of the marks&lt;br /&gt;
* they then reconcile the marks through discussion and agree final mark and comments.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Mock-Ups ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Implementation Plan ==&lt;br /&gt;
Once specifications have been collected the project will be split into phases based on the importance of features - the four problems will be addressed in the first phase.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Database Schema ==&lt;/div&gt;</summary>
		<author><name>Ghenrick</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=Assignment&amp;diff=30631</id>
		<title>Assignment</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=Assignment&amp;diff=30631"/>
		<updated>2011-11-22T23:48:34Z</updated>

		<summary type="html">&lt;p&gt;Ghenrick: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Work in progress}}&lt;br /&gt;
{{Infobox Project&lt;br /&gt;
|name = Assignment module&lt;br /&gt;
|state = Scoping&lt;br /&gt;
|tracker = TBA&lt;br /&gt;
|discussion = TBA&lt;br /&gt;
|assignee = Netspot&lt;br /&gt;
}}&lt;br /&gt;
{{Moodle 2.3}}&lt;br /&gt;
&lt;br /&gt;
== Project goals ==&lt;br /&gt;
To redevelop the Moodle Assignment Module to address common problems around usability and extensibility and to implement web services to ease integration with third party tools. &lt;br /&gt;
&lt;br /&gt;
The following four problems have been highlighted requiring attention:&lt;br /&gt;
* The four core subtypes are confusing to new users, and are in fact all very similar.&lt;br /&gt;
* There is no good support for team-based assignments.&lt;br /&gt;
* The support of subtypes makes it slightly easier to write new assignment types but also makes them less flexible, and so people tend to create hacks&lt;br /&gt;
* Third party tools such as Lightwork and the Moodle mobile app require the use of web services to be able to access all functionality of Moodle&lt;br /&gt;
&lt;br /&gt;
These goals are to be achieved by collapsing the four assignment subtypes into one assignment type which supports:&lt;br /&gt;
* Teacher-written text to students &lt;br /&gt;
* Teacher-supplied files to students&lt;br /&gt;
* Student-written text for teacher&lt;br /&gt;
* Student-supplied files for teacher&lt;br /&gt;
&lt;br /&gt;
The assignment activity should support groups and groupings not just from the teacher perspective (for grading purposes) but also for students, such that, if desired, teams of students can submit assignments by sharing uploading to a common file area and entering text into a shared text response. A grade for a group submission would apply to all students but would allow manual overriding for individual students. This may be achieved though a new setting in the assignment module.&lt;br /&gt;
&lt;br /&gt;
Logging of activity in the assignment module will be even more important than previously if multiple students can modify each others&#039; (common) work.&lt;br /&gt;
&lt;br /&gt;
The framework of the assignment module should allow for other activity modules to declare themselves &amp;quot;Assignments&amp;quot; such that they can be grouped in the UI if required.&lt;br /&gt;
&lt;br /&gt;
A facility will need to be provided (through lib/assignmentlib.php) to convert assignment from the old four-pronged Assignment module to the new Assignment module with the appropriate settings. &lt;br /&gt;
&lt;br /&gt;
The Assignment module needs to provide web services which allow other tools to view, contribute, submit and grade assignments.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Use Cases ==&lt;br /&gt;
=== Use Case 1: File Upload Assignment ===&lt;br /&gt;
In a traditional use case a teacher may require the students to write an essay and submit the file to Moodle for grading. So far, the &amp;quot;Upload a Single File&amp;quot; and &amp;quot;Advanced Uploading of Files&amp;quot; Assignment types have been used. (&amp;quot;Upload a Single File&amp;quot; does not allow the teacher to upload a response file, whereas &amp;quot;Advanced Uploading&amp;quot; does). &lt;br /&gt;
&lt;br /&gt;
With editing turned on, the teacher would select &amp;quot;Assignment&amp;quot; from the &amp;quot;Add an Activity&amp;quot; dropdown menu. &lt;br /&gt;
The teacher specifies a name, description, available from and available to dates and times and a grade for the assignment. &lt;br /&gt;
The teacher specifies the maximum number of files a student is allowed to submit, and the size per file (or all files together?).&lt;br /&gt;
&lt;br /&gt;
Once the assignment opens, each student opens the assignment activity and uploads their files form their computer. This may be done over several visits. When the required files are uploaded, the student presses a button to indicate this and the assignment is locked from further changes by the student. (THis is the Send for marking/Draft mode behaviour of the Advanced file upload)&lt;br /&gt;
&lt;br /&gt;
This process described does not have any facility for the teacher to upload a file with instructions for the students, or a data file to process in the assignment. THis is a common request and should be added.&lt;br /&gt;
&lt;br /&gt;
=== Use Case 1: Statistics Assignment ===&lt;br /&gt;
The Teacher wishes to provide the students with a data file which is to be processed. THe students will have to supply output from a stats program with graphs and a report written in a word processor to complete the assignment. &lt;br /&gt;
&lt;br /&gt;
This is similar to Use Case 1 but the teacher uploads the data file as a assignment instruction file when creating the assignment.&lt;br /&gt;
&lt;br /&gt;
=== Use Case 3: Anonymous marking  ===&lt;br /&gt;
Teacher creates the assignment with normal settings&lt;br /&gt;
Teacher select to use Anonymous marking for this assignment&lt;br /&gt;
Teacher selects the &amp;quot;post&amp;quot; or go live date for the results (this is also the date which the teacher will see student names for assignments)&lt;br /&gt;
Students upload the assignments&lt;br /&gt;
The papers are giving a unique submissionID for referencing&lt;br /&gt;
Teacher / or Non-editing teacher then downloads the file with no access to knowing who the student is just the submissionID&lt;br /&gt;
Teacher then grades the assignment &lt;br /&gt;
When the post date / go live date arrives, grades are posted to the gradebook and the teacher can now see names in the activity&lt;br /&gt;
&lt;br /&gt;
== Mock-Ups ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Implementation Plan ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Database Schema ==&lt;/div&gt;</summary>
		<author><name>Ghenrick</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=Assignment&amp;diff=30630</id>
		<title>Assignment</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=Assignment&amp;diff=30630"/>
		<updated>2011-11-22T23:48:10Z</updated>

		<summary type="html">&lt;p&gt;Ghenrick: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Work in progress}}&lt;br /&gt;
{{Infobox Project&lt;br /&gt;
|name = Assignment module&lt;br /&gt;
|state = Scoping&lt;br /&gt;
|tracker = TBA&lt;br /&gt;
|discussion = TBA&lt;br /&gt;
|assignee = Netspot&lt;br /&gt;
}}&lt;br /&gt;
{{Moodle 2.3}}&lt;br /&gt;
&lt;br /&gt;
== Project goals ==&lt;br /&gt;
To redevelop the Moodle Assignment Module to address common problems around usability and extensibility and to implement web services to ease integration with third party tools. &lt;br /&gt;
&lt;br /&gt;
The following four problems have been highlighted requiring attention:&lt;br /&gt;
* The four core subtypes are confusing to new users, and are in fact all very similar.&lt;br /&gt;
* There is no good support for team-based assignments.&lt;br /&gt;
* The support of subtypes makes it slightly easier to write new assignment types but also makes them less flexible, and so people tend to create hacks&lt;br /&gt;
* Third party tools such as Lightwork and the Moodle mobile app require the use of web services to be able to access all functionality of Moodle&lt;br /&gt;
&lt;br /&gt;
These goals are to be achieved by collapsing the four assignment subtypes into one assignment type which supports:&lt;br /&gt;
* Teacher-written text to students &lt;br /&gt;
* Teacher-supplied files to students&lt;br /&gt;
* Student-written text for teacher&lt;br /&gt;
* Student-supplied files for teacher&lt;br /&gt;
&lt;br /&gt;
The assignment activity should support groups and groupings not just from the teacher perspective (for grading purposes) but also for students, such that, if desired, teams of students can submit assignments by sharing uploading to a common file area and entering text into a shared text response. A grade for a group submission would apply to all students but would allow manual overriding for individual students. This may be achieved though a new setting in the assignment module.&lt;br /&gt;
&lt;br /&gt;
Logging of activity in the assignment module will be even more important than previously if multiple students can modify each others&#039; (common) work.&lt;br /&gt;
&lt;br /&gt;
The framework of the assignment module should allow for other activity modules to declare themselves &amp;quot;Assignments&amp;quot; such that they can be grouped in the UI if required.&lt;br /&gt;
&lt;br /&gt;
A facility will need to be provided (through lib/assignmentlib.php) to convert assignment from the old four-pronged Assignment module to the new Assignment module with the appropriate settings. &lt;br /&gt;
&lt;br /&gt;
The Assignment module needs to provide web services which allow other tools to view, contribute, submit and grade assignments.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Use Cases ==&lt;br /&gt;
=== Use Case 1: File Upload Assignment ===&lt;br /&gt;
In a traditional use case a teacher may require the students to write an essay and submit the file to Moodle for grading. So far, the &amp;quot;Upload a Single File&amp;quot; and &amp;quot;Advanced Uploading of Files&amp;quot; Assignment types have been used. (&amp;quot;Upload a Single File&amp;quot; does not allow the teacher to upload a response file, whereas &amp;quot;Advanced Uploading&amp;quot; does). &lt;br /&gt;
&lt;br /&gt;
With editing turned on, the teacher would select &amp;quot;Assignment&amp;quot; from the &amp;quot;Add an Activity&amp;quot; dropdown menu. &lt;br /&gt;
The teacher specifies a name, description, available from and available to dates and times and a grade for the assignment. &lt;br /&gt;
The teacher specifies the maximum number of files a student is allowed to submit, and the size per file (or all files together?).&lt;br /&gt;
&lt;br /&gt;
Once the assignment opens, each student opens the assignment activity and uploads their files form their computer. This may be done over several visits. When the required files are uploaded, the student presses a button to indicate this and the assignment is locked from further changes by the student. (THis is the Send for marking/Draft mode behaviour of the Advanced file upload)&lt;br /&gt;
&lt;br /&gt;
This process described does not have any facility for the teacher to upload a file with instructions for the students, or a data file to process in the assignment. THis is a common request and should be added.&lt;br /&gt;
&lt;br /&gt;
=== Use Case 1: Statistics Assignment ===&lt;br /&gt;
The Teacher wishes to provide the students with a data file which is to be processed. THe students will have to supply output from a stats program with graphs and a report written in a word processor to complete the assignment. &lt;br /&gt;
&lt;br /&gt;
This is similar to Use Case 1 but the teacher uploads the data file as a assignment instruction file when creating the assignment.&lt;br /&gt;
&lt;br /&gt;
=== Use Case 3:  ===&lt;br /&gt;
Anonymous marking&lt;br /&gt;
Teacher creates the assignment with normal settings&lt;br /&gt;
Teacher select to use Anonymous marking for this assignment&lt;br /&gt;
Teacher selects the &amp;quot;post&amp;quot; or go live date for the results (this is also the date which the teacher will see student names for assignments)&lt;br /&gt;
Students upload the assignments&lt;br /&gt;
The papers are giving a unique submissionID for referencing&lt;br /&gt;
Teacher / or Non-editing teacher then downloads the file with no access to knowing who the student is just the submissionID&lt;br /&gt;
Teacher then grades the assignment &lt;br /&gt;
When the post date / go live date arrives, grades are posted to the gradebook and the teacher can now see names in the activity&lt;br /&gt;
&lt;br /&gt;
== Mock-Ups ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Implementation Plan ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Database Schema ==&lt;/div&gt;</summary>
		<author><name>Ghenrick</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=Talk:Portfolio_API&amp;diff=27735</id>
		<title>Talk:Portfolio API</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=Talk:Portfolio_API&amp;diff=27735"/>
		<updated>2008-07-01T00:43:07Z</updated>

		<summary type="html">&lt;p&gt;Ghenrick: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===Comments on specification===&lt;br /&gt;
&lt;br /&gt;
Please leave your name and indent according to reply structure.&lt;br /&gt;
&lt;br /&gt;
===Comments from Tim Hunt===&lt;br /&gt;
&lt;br /&gt;
====Do we have to restrict it so that only admins can configure repositories====&lt;br /&gt;
&lt;br /&gt;
Here is an example user story:&lt;br /&gt;
&lt;br /&gt;
A course somewhere out there about good online teaching requires students to participate in an online community, say, Moodle.org, and record evidence of their activity to their Portfolio. Moodle.org is a nice open place, so wants to help this sort of thing. Therefore, Martin configures it so that any user can go to their user profile, and configure any portfolio plugin for their own use, so students on this course can easily export from moodle.org to their own Portfolio.&lt;br /&gt;
&lt;br /&gt;
Similarly, this may be a way to deal with Facebook authentication issues. Each student configures the facebook plugin for themselves, including some sort of secret key.&lt;br /&gt;
&lt;br /&gt;
=====Penny&#039;s reply=====&lt;br /&gt;
&lt;br /&gt;
Hmm. I agree with your user story but I&#039;m not sure of the implications of it.  At any rate, the portfolio plugin system must support multiple instances of a plugin being configured (iirc, this will be the first instance of this in moodle?) but then in terms of permissions I&#039;m not sure how it would work - it&#039;s almost a new context level - so that any user could configure a plugin instance and then grant access.   I think it should definitely be able to be turned off though (by an admin)&lt;br /&gt;
&lt;br /&gt;
[[User:Martin Dougiamas|Martin Dougiamas]] 04:11, 24  June 2008 (CDT) Absolutely agree with Tim&#039;s picture, that is the same way the repositories API will work.  Yes, the admin should choose to allow users to configure their own portfolios.  This is basically saving user preferences for each plugin type, and could be part of the &amp;quot;save&amp;quot; process (use checkbox to save this portfolio for next time).&lt;br /&gt;
&lt;br /&gt;
Yeah but still we have the model of admins creating instances of plugins and users can just configure them. They can&#039;t create their own instances - [[User:Penny Leach|Penny Leach]]&lt;br /&gt;
&lt;br /&gt;
====Do we really need transport APIs====&lt;br /&gt;
&lt;br /&gt;
I am not if transport layers really need to be pluggable APIs as such. Surely almost all Portfolio plugins will use a single transport method.&lt;br /&gt;
&lt;br /&gt;
Of course, each transport method will have a library of code, for example a SOAP library, or the mnet libraries, and the Portfolio plugins will use these, but I don&#039;t see any need for all the transport mechanisms to implement some common interface. Different transport mechanisms work very differently, and tend to have different interfaces in their standard libraries. Trying to put a common wrapper round all of them seems difficult and unnecessary to me.&lt;br /&gt;
&lt;br /&gt;
=====Penny&#039;s reply=====&lt;br /&gt;
&lt;br /&gt;
Well theoretically moodle-moodle and moodle-mahara would both use mnet, although I guess you&#039;re right that it might be overly difficult. I was trying to avoid multiple wrappers around the same library.  We started off as having formats as a plugin too and moved away from it in favour of libraries.  I wonder if we gain anything in terms of test framework by adhering to one API for transport layers (think mock objects).. I&#039;ll ask Nico.&lt;br /&gt;
&lt;br /&gt;
=====Nico&#039;s reply=====&lt;br /&gt;
&lt;br /&gt;
I am fine with the idea of using libraries directly in portfolio/repository code, BUT with the following requirements:&lt;br /&gt;
* Libraries must be object-oriented&lt;br /&gt;
* The Transport object must be a member variable of the Portfolio class&lt;br /&gt;
There is no way to do proper unit testing without proper object orientation. If there is to be only one transport method per portfolio instance, then it should be a private member with public setters/getters. This will allow unit tests to mock the transport object, and test the portfolio code without having to worry about the transport code. &lt;br /&gt;
&lt;br /&gt;
Here is some pseudo-code:&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;?php&lt;br /&gt;
  $portfolio = new PortFolio();&lt;br /&gt;
  $transport = new Transport_Mnet();&lt;br /&gt;
  $portfolio-&amp;gt;set_transport($transport);&lt;br /&gt;
  ?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;?php&lt;br /&gt;
  class Portfolio {&lt;br /&gt;
    private $transport;&lt;br /&gt;
  &lt;br /&gt;
    function query($query) {&lt;br /&gt;
      $this-&amp;gt;transport-&amp;gt;query($query);&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Comments from Gavin Henrick===&lt;br /&gt;
&lt;br /&gt;
====Content &amp;amp; Formats / Meta data====&lt;br /&gt;
&lt;br /&gt;
2 examples to think on:&lt;br /&gt;
case1. A user exports his thesis to his portfolio, you get the meta data from the install/course/grade/anything he adds and the file (any type)&lt;br /&gt;
case2. A user exports his forum post to his portfolio, you get the meta data from the install/course/grade/forum, you get his content of his post (txt/html?) and optionally have a file (any type)&lt;br /&gt;
case3. A user exports his case history from a database module which has 4 graphics files in it. you get the meta data from the install/course/grade/database instance, you get his content of entry(txt/html?) and the files&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
IN the first case, you end up with meta data and a file of some type to export, how can a user define export format when its unlikely all will have servers capable of transforming to the chosen format. &lt;br /&gt;
&lt;br /&gt;
In the second case, you have data, content (txt) and a file of some format - again how can you transpose the content and the file and data into any given format?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When we did the export we had the the end result as up to N files, the xml file(this is the meta data and could be csv,rtf, or html too), the html content file and the raw files which may be attached. Depending on where it is going, the meta data may end up as fields being pushed with the file, or so on. but i think holding it in a workable object (xml object or something else would be useful.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Therefore I would propose that txt level output + files this be the lowest common denominator since everyone can generate it. xml,csv, or html for the meta data, and  txt or html or rtf (since not all will be able to generate pdfs, and some content isnt that great in some pdf engines).&lt;br /&gt;
&lt;br /&gt;
Obviously the design leaves room for those who may xpose into pdf the doc, ppt etc attachments, and so on (we automate this for some clients on a seperate box using open office)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====User Actions====&lt;br /&gt;
&lt;br /&gt;
Pertaining mostly to portfolios, and perhaps student workspaces, some have asked about automating this completely. I think if you look at the stages &lt;br /&gt;
- initiating xfer&lt;br /&gt;
- meta data&lt;br /&gt;
&lt;br /&gt;
Could we not have a flag (per course? or instance or student?) perhaps to automate the transfer once something is complete (submitted graded etc..). It may also be useful to have an admin action to initiate this for all students &amp;quot;send all student data to portfolio&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Could we not have a flag to not prompt students for more data as the people we have talked to mostly want this to be a &amp;quot;2 click&amp;quot; event, choose to export and confirm. I think it may be more difficult and create a barrier to use if students are prompted for meta data, so having this optional at admin level would be good.&lt;br /&gt;
&lt;br /&gt;
So a default simple install would automatically xfer all finalised content on enable modules to the students portfolio so they have it whether they forget to do so or not.&lt;/div&gt;</summary>
		<author><name>Ghenrick</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=Talk:Portfolio_API&amp;diff=27734</id>
		<title>Talk:Portfolio API</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=Talk:Portfolio_API&amp;diff=27734"/>
		<updated>2008-07-01T00:33:02Z</updated>

		<summary type="html">&lt;p&gt;Ghenrick: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===Comments on specification===&lt;br /&gt;
&lt;br /&gt;
Please leave your name and indent according to reply structure.&lt;br /&gt;
&lt;br /&gt;
===Comments from Tim Hunt===&lt;br /&gt;
&lt;br /&gt;
====Do we have to restrict it so that only admins can configure repositories====&lt;br /&gt;
&lt;br /&gt;
Here is an example user story:&lt;br /&gt;
&lt;br /&gt;
A course somewhere out there about good online teaching requires students to participate in an online community, say, Moodle.org, and record evidence of their activity to their Portfolio. Moodle.org is a nice open place, so wants to help this sort of thing. Therefore, Martin configures it so that any user can go to their user profile, and configure any portfolio plugin for their own use, so students on this course can easily export from moodle.org to their own Portfolio.&lt;br /&gt;
&lt;br /&gt;
Similarly, this may be a way to deal with Facebook authentication issues. Each student configures the facebook plugin for themselves, including some sort of secret key.&lt;br /&gt;
&lt;br /&gt;
=====Penny&#039;s reply=====&lt;br /&gt;
&lt;br /&gt;
Hmm. I agree with your user story but I&#039;m not sure of the implications of it.  At any rate, the portfolio plugin system must support multiple instances of a plugin being configured (iirc, this will be the first instance of this in moodle?) but then in terms of permissions I&#039;m not sure how it would work - it&#039;s almost a new context level - so that any user could configure a plugin instance and then grant access.   I think it should definitely be able to be turned off though (by an admin)&lt;br /&gt;
&lt;br /&gt;
[[User:Martin Dougiamas|Martin Dougiamas]] 04:11, 24  June 2008 (CDT) Absolutely agree with Tim&#039;s picture, that is the same way the repositories API will work.  Yes, the admin should choose to allow users to configure their own portfolios.  This is basically saving user preferences for each plugin type, and could be part of the &amp;quot;save&amp;quot; process (use checkbox to save this portfolio for next time).&lt;br /&gt;
&lt;br /&gt;
Yeah but still we have the model of admins creating instances of plugins and users can just configure them. They can&#039;t create their own instances - [[User:Penny Leach|Penny Leach]]&lt;br /&gt;
&lt;br /&gt;
====Do we really need transport APIs====&lt;br /&gt;
&lt;br /&gt;
I am not if transport layers really need to be pluggable APIs as such. Surely almost all Portfolio plugins will use a single transport method.&lt;br /&gt;
&lt;br /&gt;
Of course, each transport method will have a library of code, for example a SOAP library, or the mnet libraries, and the Portfolio plugins will use these, but I don&#039;t see any need for all the transport mechanisms to implement some common interface. Different transport mechanisms work very differently, and tend to have different interfaces in their standard libraries. Trying to put a common wrapper round all of them seems difficult and unnecessary to me.&lt;br /&gt;
&lt;br /&gt;
=====Penny&#039;s reply=====&lt;br /&gt;
&lt;br /&gt;
Well theoretically moodle-moodle and moodle-mahara would both use mnet, although I guess you&#039;re right that it might be overly difficult. I was trying to avoid multiple wrappers around the same library.  We started off as having formats as a plugin too and moved away from it in favour of libraries.  I wonder if we gain anything in terms of test framework by adhering to one API for transport layers (think mock objects).. I&#039;ll ask Nico.&lt;br /&gt;
&lt;br /&gt;
=====Nico&#039;s reply=====&lt;br /&gt;
&lt;br /&gt;
I am fine with the idea of using libraries directly in portfolio/repository code, BUT with the following requirements:&lt;br /&gt;
* Libraries must be object-oriented&lt;br /&gt;
* The Transport object must be a member variable of the Portfolio class&lt;br /&gt;
There is no way to do proper unit testing without proper object orientation. If there is to be only one transport method per portfolio instance, then it should be a private member with public setters/getters. This will allow unit tests to mock the transport object, and test the portfolio code without having to worry about the transport code. &lt;br /&gt;
&lt;br /&gt;
Here is some pseudo-code:&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;?php&lt;br /&gt;
  $portfolio = new PortFolio();&lt;br /&gt;
  $transport = new Transport_Mnet();&lt;br /&gt;
  $portfolio-&amp;gt;set_transport($transport);&lt;br /&gt;
  ?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;?php&lt;br /&gt;
  class Portfolio {&lt;br /&gt;
    private $transport;&lt;br /&gt;
  &lt;br /&gt;
    function query($query) {&lt;br /&gt;
      $this-&amp;gt;transport-&amp;gt;query($query);&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Comments from Gavin Henrick===&lt;br /&gt;
&lt;br /&gt;
====Content &amp;amp; Formats / Meta data====&lt;br /&gt;
&lt;br /&gt;
2 examples to think on:&lt;br /&gt;
case1. A user exports his thesis to his portfolio, you get the meta data from the install/course/grade/anything he adds and the file (any type)&lt;br /&gt;
case2. A user exports his forum post to his portfolio, you get the meta data from the install/course/grade/forum, you get his content of his post (txt/html?) and optionally have a file (any type)&lt;br /&gt;
case3. A user exports his case history from a database module which has 4 graphics files in it. you get the meta data from the install/course/grade/database instance, you get his content of entry(txt/html?) and the files&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
IN the first case, you end up with meta data and a file of some type to export, how can a user define export format when its unlikely all will have servers capable of transforming to the chosen format. &lt;br /&gt;
&lt;br /&gt;
In the second case, you have data, content (txt) and a file of some format - again how can you transpose the content and the file and data into any given format?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When we did the export we had the the end result as up to N files, the xml file(this is the meta data and could be csv,rtf, or html too), the html content file and the raw files which may be attached. Depending on where it is going, the meta data may end up as fields being pushed with the file, or so on. but i think holding it in a workable object (xml object or something else would be useful.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Therefore I would propose that txt level output + files this be the lowest common denominator since everyone can generate it. xml,csv, or html for the meta data, and  txt or html or rtf (since not all will be able to generate pdfs, and some content isnt that great in some pdf engines).&lt;br /&gt;
&lt;br /&gt;
Obviously the design leaves room for those who may xpose into pdf the doc, ppt etc attachments, and so on (we automate this for some clients on a seperate box using open office)&lt;/div&gt;</summary>
		<author><name>Ghenrick</name></author>
	</entry>
</feed>