Welcome to TiddlyWiki created by Jeremy Ruston, Copyright © 2007 UnaMesa Association
Aug 14, 2007
Repeat fix, new instance
July 20, 2007
the following change was made in course/lib.php
change COURSE_MAX_SUMMARIES_PER_PAGE? = 25
line 13 should read
define('COURSE_MAX_SUMMARIES_PER_PAGE?', 25); // courses
Assignment grading interface: turn quickgrade on as default, increase default number of assignments shown to 20, and remove instructor from the list.
in moodle/mod/assignment/lib.php
line 682
$perpage = get_user_preferences('assignment_perpage', 20);
line 684
$quickgrade = get_user_preferences('assignment_quickgrade', 1);
line 982
$teacherattempts = false; /// Temporary measure
This course deals with more advanced ICT applications for schools.
[[podcasting]]
[[blogging]]
[[wikis]]
[[moodle]]
[[open courseware]]
August 14, 2007
Already in config.php; carried forward
July 20, 2007 1.8.2 instance
Add the following to moodle/config
June 20, 2007
Find moodle/config.php, lines 20-25
Find the defaultblocks_topics line and replace with this. Also change
the string for defalutblocks_weeks. Don't change social though.
$CFG->defaultblocks_topics =
'course_menu,myCourses:activity_modules,calendar_upcoming,quickmail';
$CFG->defaultblocks_weeks =
'course_menu,myCourses:activity_modules,calendar_upcoming,quickmail';
Elect not to add attendance. Everyone does not use this block.
June 20, 2007
Find moodle/config.php, lines 20-25
Add this
$CFG->defaultblocks_topics =
'course_menu,myCourses:activity_modules,calendar_upcoming,quickmail';
$CFG->defaultblocks_weeks =
'course_menu,myCourses:activity_modules,calendar_upcoming,quickmail';
Note--consider adding attendance later when it is ready.
Aug 14, 2007
repeated for new instance.
Added default topics = 15.
This change repeated for July 20, 2007 1.8.2 instance
changes made in course/edit_form.php
98 change
$mform->setDefault('format', 'weeks');
to
$mform->setDefault('format', 'topics');
June 20, 2007 1.8.1 instance
changes made in course/edit_form.php
98 change
$mform->setDefault('format', 'weeks');
to
$mform->setDefault('format', 'topics');
If you wanted to, you could change the default number of topics/weeks in a course. See
104 $mform->setDefault('numsections', 10);
[[Welcome]] Using this wiki
[[Moodle Stuff]] Notes on Moodle instances
[[MMA2310]] Intro to Multimedia
[[CSC3315]] Advanced Technology in Schools
[img[http://farm3.static.flickr.com/2032/1812918045_56166946ba_m.jpg]]
[img[http://farm3.static.flickr.com/2335/1851345424_25039c7a91_m.jpg]]
[img[http://farm3.static.flickr.com/2357/1905265975_f42075aa49_m.jpg]]
[img[http://farm3.static.flickr.com/2321/2036460675_6af162b8bb_m.jpg]]
Techniques:
[[Rule of thirds]]
[[Repetition]]
[[Depth of Field]]
[[Macro]]
[[Reflections]]
[[Framing]]
[[Lighting]]
[[Interesting angles]]
[[Leading lines]]
[img[http://farm3.static.flickr.com/2238/1962123556_d7a9ede846_m.jpg]]
[img[http://farm3.static.flickr.com/2013/1653151902_87814ce0bb_m.jpg]]
[img[http://farm3.static.flickr.com/2311/1917240253_4a7a0ca73e_m.jpg]]
[img[http://farm3.static.flickr.com/2194/2113456514_ddec4c4833_m.jpg]]
[img[http://farm3.static.flickr.com/2219/2121964672_79c71bf23e_m.jpg]]
[img[http://farm3.static.flickr.com/2336/2202290990_6127865160_m.jpg]]
To get started with this blank TiddlyWiki, you'll need to modify the following tiddlers:
* SiteTitle & SiteSubtitle: The title and subtitle of the site, as shown above (after saving, they will also appear in the browser title bar)
* MainMenu: The menu (usually on the left)
* DefaultTiddlers: Contains the names of the tiddlers that you want to appear when the TiddlyWiki is opened
You'll also need to enter your username for signing your edits: <<option txtUserName>>
Here are a list of things I have found that look interesting, but I haven't done yet!
[[fixing the display of the message window when html area is enabled for messaging]]
[[force everything to download instead of embed in IE]]
August 14, 2007
This is partially fixed. Now the maxlength is 100, which is actually a lot more than I had needed. I still increased the display of the text field to 20 so it doesn't hide most of my characters.
In moodle/course/edit_form.php, around line 70
$mform->addElement('text','shortname', get_string('shortname'),'maxlength="100" size="20"');
July 20, 2007 1.8.2 instance
In moodle/course/edit_form.php
line 72
$mform->addElement('text','shortname', get_string('shortname'),'maxlength="25" size="25"');
Elect not to use course request, therefore remaining changes not done.
----------------------
June 20, 2007 1.8.1 instance
In moodle/course/edit_form.php
line 72
$mform->addElement('text','shortname', get_string('shortname'),'maxlength="25" size="25"');
moodle/course/request_form.php
line 13
$mform->addElement('text', 'shortname', get_string('shortname'), 'maxlength="25" size="25"');
[img[http://farm3.static.flickr.com/2341/1808982380_c169302001_m.jpg]]
[img[http://farm3.static.flickr.com/2003/1706859078_cca392a88c_m.jpg]]
[img[http://farm3.static.flickr.com/2267/1758973244_3d5f348b4b_m.jpg]]
[img[http://farm3.static.flickr.com/2001/2001998692_0bb3b82ecf_m.jpg]]
[img[http://farm3.static.flickr.com/2083/2241978963_76c5741edd_m.jpg]]
http://www.flickr.com/photos/bauvana/1640889626/
[img[http://farm3.static.flickr.com/2377/1680365024_09a55f74ee_m.jpg]]
[img[http://farm3.static.flickr.com/2205/1829604087_a9ff6a3438_m.jpg]]
/***
|''Name:''|LoadRemoteFileThroughProxy (previous LoadRemoteFileHijack)|
|''Description:''|When the TiddlyWiki file is located on the web (view over http) the content of [[SiteProxy]] tiddler is added in front of the file url. If [[SiteProxy]] does not exist "/proxy/" is added. |
|''Version:''|1.1.0|
|''Date:''|mar 17, 2007|
|''Source:''|http://tiddlywiki.bidix.info/#LoadRemoteFileHijack|
|''Author:''|BidiX (BidiX (at) bidix (dot) info)|
|''License:''|[[BSD open source license|http://tiddlywiki.bidix.info/#%5B%5BBSD%20open%20source%20license%5D%5D ]]|
|''~CoreVersion:''|2.2.0|
***/
//{{{
version.extensions.LoadRemoteFileThroughProxy = {
major: 1, minor: 1, revision: 0,
date: new Date("mar 17, 2007"),
source: "http://tiddlywiki.bidix.info/#LoadRemoteFileThroughProxy"};
if (!window.bidix) window.bidix = {}; // bidix namespace
if (!bidix.core) bidix.core = {};
bidix.core.loadRemoteFile = loadRemoteFile;
loadRemoteFile = function(url,callback,params)
{
if ((document.location.toString().substr(0,4) == "http") && (url.substr(0,4) == "http")){
url = store.getTiddlerText("SiteProxy", "/proxy/") + url;
}
return bidix.core.loadRemoteFile(url,callback,params);
}
//}}}
August 14, 2007
Already installed. Carried forward.
July 20, 2007 1.8.2 instance
Edit local language pack one more time (found a few more 'enrol' strings). Copy to language folder.
June 20, 2007 1.8.1 instance
Following these excellent directions from Tim Allen:
http://moodle.org/mod/forum/discuss.php?d=49150#p225224
In particular:
"The local pack en_utf8_local will not appear in the language menus for selection and your users do not need to change their settings." So the reason you are not seeing the customized language pack in the menu is because you are not supposed to! wink The local pack en_utf8_local and the main pack en_utf8 are checked together (local one first, then the main one) and the language menu only shows one entry for both of them.
So, I did as suggested. First, copy the en_utf8 language pack, rename it, and go through with text editor and change all the desired strings. Things like "instructor" not teacher; "enroll" not "enrol", "expiration" not "expiry", and "course prefix and number" not "shortname". Also, include all the extra language files from the blocks I have installed (quickmail, course menu plus, mycourses, gradebook enhancements). (Well, I have never been quite straight on where those need to go, so I put them in local anyway. I wanted to keep all my changes together).
Important things to note:
The file must be named en_utf8_local. The first time around, I named it something else and of course it didn't work properly!
The file must be placed in the moodle/lang folder.
Default site language is en_utf8.
Do not include more than the necessary files. If strings are changed in main moodle language files, having the same file here will pre-empt loading of altered strings and help files.
[[Digital Photography]] Resources for exploring Digital Photography
[img[http://farm3.static.flickr.com/2311/2018756387_6a81b53032_m.jpg]]
[[Welcome]] Using this wiki
[[Moodle Stuff]] Notes on Moodle instances
[[MMA2310]] Intro to Multimedia
[[CSC3315]] Advanced Technology in Schools
[[Hacks and add-ons of interest]]
[[code changes]]
[[Third party modules]]
[img[http://farm3.static.flickr.com/2348/1841355647_bc960ede5a_m.jpg]]
[img[http://farm3.static.flickr.com/2061/1813727800_1fdcc1bcb7_m.jpg]]
[img[http://farm3.static.flickr.com/2247/2119924191_301a705636_m.jpg]]
[img[http://farm3.static.flickr.com/2356/1878141432_312cc1e40f_m.jpg]]
[img[http://farm3.static.flickr.com/2074/2115831236_0cbe2ab663_m.jpg]]
[img[http://farm3.static.flickr.com/2256/2198379027_c246c9e13a_m.jpg]]
[img[http://farm3.static.flickr.com/2032/2213440252_b664f88f64_m.jpg]]
[img[http://farm3.static.flickr.com/2226/2244372292_b072be0029_m.jpg]]
an experimental academic wiki
[[Attendance]]
[[Course menu]]
[[Feedback]]
[[Quickmail]]
[[Sidebar]]
an experimental academic wiki
/***
Contains the stuff you need to use Tiddlyspot
Note you must also have UploadPlugin installed
***/
//{{{
// edit this if you are migrating sites or retrofitting an existing TW
config.tiddlyspotSiteId = 'awyatt';
// make it so you can by default see edit controls via http
config.options.chkHttpReadOnly = false;
window.readOnly = false; // make sure of it (for tw 2.2)
// disable autosave in d3
if (window.location.protocol != "file:")
config.options.chkGTDLazyAutoSave = false;
// tweak shadow tiddlers to add upload button, password entry box etc
with (config.shadowTiddlers) {
SiteUrl = 'http://'+config.tiddlyspotSiteId+'.tiddlyspot.com';
SideBarOptions = SideBarOptions.replace(/(<<saveChanges>>)/,"$1<<tiddler TspotSidebar>>");
OptionsPanel = OptionsPanel.replace(/^/,"<<tiddler TspotOptions>>");
DefaultTiddlers = DefaultTiddlers.replace(/^/,"[[Welcome to Tiddlyspot]] ");
MainMenu = MainMenu.replace(/^/,"[[Welcome to Tiddlyspot]] ");
}
// create some shadow tiddler content
merge(config.shadowTiddlers,{
'Welcome to Tiddlyspot':[
"This document is a ~TiddlyWiki from tiddlyspot.com. A ~TiddlyWiki is an electronic notebook that is great for managing todo lists, personal information, and all sorts of things.",
"",
"@@font-weight:bold;font-size:1.3em;color:#444; //What now?// @@ Before you can save any changes, you need to enter your password in the form below. Then configure privacy and other site settings at your [[control panel|http://" + config.tiddlyspotSiteId + ".tiddlyspot.com/controlpanel]] (your control panel username is //" + config.tiddlyspotSiteId + "//).",
"<<tiddler TspotControls>>",
"See also GettingStarted.",
"",
"@@font-weight:bold;font-size:1.3em;color:#444; //Working online// @@ You can edit this ~TiddlyWiki right now, and save your changes using the \"save to web\" button in the column on the right.",
"",
"@@font-weight:bold;font-size:1.3em;color:#444; //Working offline// @@ A fully functioning copy of this ~TiddlyWiki can be saved onto your hard drive or USB stick. You can make changes and save them locally without being connected to the Internet. When you're ready to sync up again, just click \"upload\" and your ~TiddlyWiki will be saved back to tiddlyspot.com.",
"",
"@@font-weight:bold;font-size:1.3em;color:#444; //Help!// @@ Find out more about ~TiddlyWiki at [[TiddlyWiki.com|http://tiddlywiki.com]]. Also visit [[TiddlyWiki Guides|http://tiddlywikiguides.org]] for documentation on learning and using ~TiddlyWiki. New users are especially welcome on the [[TiddlyWiki mailing list|http://groups.google.com/group/TiddlyWiki]], which is an excellent place to ask questions and get help. If you have a tiddlyspot related problem email [[tiddlyspot support|mailto:support@tiddlyspot.com]].",
"",
"@@font-weight:bold;font-size:1.3em;color:#444; //Enjoy :)// @@ We hope you like using your tiddlyspot.com site. Please email [[feedback@tiddlyspot.com|mailto:feedback@tiddlyspot.com]] with any comments or suggestions."
].join("\n"),
'TspotControls':[
"| tiddlyspot password:|<<option pasUploadPassword>>|",
"| site management:|<<upload http://" + config.tiddlyspotSiteId + ".tiddlyspot.com/store.cgi index.html . . " + config.tiddlyspotSiteId + ">>//(requires tiddlyspot password)//<<br>>[[control panel|http://" + config.tiddlyspotSiteId + ".tiddlyspot.com/controlpanel]], [[download (go offline)|http://" + config.tiddlyspotSiteId + ".tiddlyspot.com/download]]|",
"| links:|[[tiddlyspot.com|http://tiddlyspot.com/]], [[FAQs|http://faq.tiddlyspot.com/]], [[announcements|http://announce.tiddlyspot.com/]], [[blog|http://tiddlyspot.com/blog/]], email [[support|mailto:support@tiddlyspot.com]] & [[feedback|mailto:feedback@tiddlyspot.com]], [[donate|http://tiddlyspot.com/?page=donate]]|"
].join("\n"),
'TspotSidebar':[
"<<upload http://" + config.tiddlyspotSiteId + ".tiddlyspot.com/store.cgi index.html . . " + config.tiddlyspotSiteId + ">><html><a href='http://" + config.tiddlyspotSiteId + ".tiddlyspot.com/download' class='button'>download</a></html>"
].join("\n"),
'TspotOptions':[
"tiddlyspot password:",
"<<option pasUploadPassword>>",
""
].join("\n")
});
//}}}
This script allows you to use a csv file to upload a set of courses.
This is something that can be added on to moodle, and (I think) should be part of the moodle core.
First you have to have the users all in the system. I create a "sandbox" course, really an empty course, and run uploadusers with a csv file to create the accounts and enroll all the students students into the sandbox course. This course can be deleted or hidden, as desired.
Second, you upload the courses and the user assigned will become the instructor. To do this, you need to install uploadcourse.php to your moodle/admin directory and create a csv file with the required information to create the courses. (See conversation at http://moodle.org/mod/forum/discuss.php?d=30126, and detailed instructions and sample files at http://moodle.org/mod/forum/discuss.php?d=30126#p339447)
You can create categories in this fashion, but the categories are only created if at least one course exists in them. The categories are created in the order of the csv file, which can be a plus, but if you make a mistake the category order is tedious to change afterwards.
I used a tba user to create a dummy course for categories that I needed, but did yet have courses in. I did not want to create a course for every single class offered at the University. Only about half of ours use moodle, so it seemed counter-productive to have a lot of empty courses with student enrolled but no instructor activity. I did, however, want to create categories and was fairly confident that courses might be requested later for those categories.
This process worked very well to create portfolio courses for our portfolio instance.
You trigger this script manually. I haven't figured out how to add it to the admin menu!
add info here about the csv file
| !date | !user | !location | !storeUrl | !uploadDir | !toFilename | !backupdir | !origin |
| 21/01/2008 07:59:59 | awyatt | [[/|http://awyatt.tiddlyspot.com/]] | [[store.cgi|http://awyatt.tiddlyspot.com/store.cgi]] | . | [[index.html | http://awyatt.tiddlyspot.com/index.html]] | . | ok |
| 21/01/2008 09:00:14 | awyatt | [[/|http://awyatt.tiddlyspot.com/]] | [[store.cgi|http://awyatt.tiddlyspot.com/store.cgi]] | . | [[index.html | http://awyatt.tiddlyspot.com/index.html]] | . |
| 21/01/2008 16:02:07 | awyatt | [[/|http://awyatt.tiddlyspot.com/]] | [[store.cgi|http://awyatt.tiddlyspot.com/store.cgi]] | . | [[index.html | http://awyatt.tiddlyspot.com/index.html]] | . |
| 22/01/2008 17:17:45 | awyatt | [[/|http://awyatt.tiddlyspot.com/]] | [[store.cgi|http://awyatt.tiddlyspot.com/store.cgi]] | . | [[index.html | http://awyatt.tiddlyspot.com/index.html]] | . | ok |
| 22/01/2008 17:37:19 | awyatt | [[/|http://awyatt.tiddlyspot.com/]] | [[store.cgi|http://awyatt.tiddlyspot.com/store.cgi]] | . | [[index.html | http://awyatt.tiddlyspot.com/index.html]] | . |
| 24/01/2008 10:13:18 | awyatt | [[/|http://awyatt.tiddlyspot.com/]] | [[store.cgi|http://awyatt.tiddlyspot.com/store.cgi]] | . | [[index.html | http://awyatt.tiddlyspot.com/index.html]] | . |
| 27/01/2008 14:49:46 | awyatt | [[/|http://awyatt.tiddlyspot.com/]] | [[store.cgi|http://awyatt.tiddlyspot.com/store.cgi]] | . | [[index.html | http://awyatt.tiddlyspot.com/index.html]] | . |
| 06/02/2008 12:34:12 | awyatt | [[/|http://awyatt.tiddlyspot.com/]] | [[store.cgi|http://awyatt.tiddlyspot.com/store.cgi]] | . | [[index.html | http://awyatt.tiddlyspot.com/index.html]] | . | ok |
| 06/02/2008 12:39:17 | awyatt | [[/|http://awyatt.tiddlyspot.com/]] | [[store.cgi|http://awyatt.tiddlyspot.com/store.cgi]] | . | [[index.html | http://awyatt.tiddlyspot.com/index.html]] | . |
| 13/02/2008 20:01:29 | awyatt | [[/|http://awyatt.tiddlyspot.com/]] | [[store.cgi|http://awyatt.tiddlyspot.com/store.cgi]] | . | [[index.html | http://awyatt.tiddlyspot.com/index.html]] | . |
/***
|''Name:''|PasswordOptionPlugin|
|''Description:''|Extends TiddlyWiki options with non encrypted password option.|
|''Version:''|1.0.2|
|''Date:''|Apr 19, 2007|
|''Source:''|http://tiddlywiki.bidix.info/#PasswordOptionPlugin|
|''Author:''|BidiX (BidiX (at) bidix (dot) info)|
|''License:''|[[BSD open source license|http://tiddlywiki.bidix.info/#%5B%5BBSD%20open%20source%20license%5D%5D ]]|
|''~CoreVersion:''|2.2.0 (Beta 5)|
***/
//{{{
version.extensions.PasswordOptionPlugin = {
major: 1, minor: 0, revision: 2,
date: new Date("Apr 19, 2007"),
source: 'http://tiddlywiki.bidix.info/#PasswordOptionPlugin',
author: 'BidiX (BidiX (at) bidix (dot) info',
license: '[[BSD open source license|http://tiddlywiki.bidix.info/#%5B%5BBSD%20open%20source%20license%5D%5D]]',
coreVersion: '2.2.0 (Beta 5)'
};
config.macros.option.passwordCheckboxLabel = "Save this password on this computer";
config.macros.option.passwordInputType = "password"; // password | text
setStylesheet(".pasOptionInput {width: 11em;}\n","passwordInputTypeStyle");
merge(config.macros.option.types, {
'pas': {
elementType: "input",
valueField: "value",
eventName: "onkeyup",
className: "pasOptionInput",
typeValue: config.macros.option.passwordInputType,
create: function(place,type,opt,className,desc) {
// password field
config.macros.option.genericCreate(place,'pas',opt,className,desc);
// checkbox linked with this password "save this password on this computer"
config.macros.option.genericCreate(place,'chk','chk'+opt,className,desc);
// text savePasswordCheckboxLabel
place.appendChild(document.createTextNode(config.macros.option.passwordCheckboxLabel));
},
onChange: config.macros.option.genericOnChange
}
});
merge(config.optionHandlers['chk'], {
get: function(name) {
// is there an option linked with this chk ?
var opt = name.substr(3);
if (config.options[opt])
saveOptionCookie(opt);
return config.options[name] ? "true" : "false";
}
});
merge(config.optionHandlers, {
'pas': {
get: function(name) {
if (config.options["chk"+name]) {
return encodeCookie(config.options[name].toString());
} else {
return "";
}
},
set: function(name,value) {config.options[name] = decodeCookie(value);}
}
});
// need to reload options to load passwordOptions
loadOptionsCookie();
/*
if (!config.options['pasPassword'])
config.options['pasPassword'] = '';
merge(config.optionsDesc,{
pasPassword: "Test password"
});
*/
//}}}
/***
|''Name:''|UploadPlugin|
|''Description:''|Save to web a TiddlyWiki|
|''Version:''|4.1.0|
|''Date:''|May 5, 2007|
|''Source:''|http://tiddlywiki.bidix.info/#UploadPlugin|
|''Documentation:''|http://tiddlywiki.bidix.info/#UploadPluginDoc|
|''Author:''|BidiX (BidiX (at) bidix (dot) info)|
|''License:''|[[BSD open source license|http://tiddlywiki.bidix.info/#%5B%5BBSD%20open%20source%20license%5D%5D ]]|
|''~CoreVersion:''|2.2.0 (#3125)|
|''Requires:''|PasswordOptionPlugin|
***/
//{{{
version.extensions.UploadPlugin = {
major: 4, minor: 1, revision: 0,
date: new Date("May 5, 2007"),
source: 'http://tiddlywiki.bidix.info/#UploadPlugin',
author: 'BidiX (BidiX (at) bidix (dot) info',
coreVersion: '2.2.0 (#3125)'
};
//
// Environment
//
if (!window.bidix) window.bidix = {}; // bidix namespace
bidix.debugMode = false; // true to activate both in Plugin and UploadService
//
// Upload Macro
//
config.macros.upload = {
// default values
defaultBackupDir: '', //no backup
defaultStoreScript: "store.php",
defaultToFilename: "index.html",
defaultUploadDir: ".",
authenticateUser: true // UploadService Authenticate User
};
config.macros.upload.label = {
promptOption: "Save and Upload this TiddlyWiki with UploadOptions",
promptParamMacro: "Save and Upload this TiddlyWiki in %0",
saveLabel: "save to web",
saveToDisk: "save to disk",
uploadLabel: "upload"
};
config.macros.upload.messages = {
noStoreUrl: "No store URL in parmeters or options",
usernameOrPasswordMissing: "Username or password missing"
};
config.macros.upload.handler = function(place,macroName,params) {
if (readOnly)
return;
var label;
if (document.location.toString().substr(0,4) == "http")
label = this.label.saveLabel;
else
label = this.label.uploadLabel;
var prompt;
if (params[0]) {
prompt = this.label.promptParamMacro.toString().format([this.destFile(params[0],
(params[1] ? params[1]:bidix.basename(window.location.toString())), params[3])]);
} else {
prompt = this.label.promptOption;
}
createTiddlyButton(place, label, prompt, function() {config.macros.upload.action(params);}, null, null, this.accessKey);
};
config.macros.upload.action = function(params)
{
// for missing macro parameter set value from options
var storeUrl = params[0] ? params[0] : config.options.txtUploadStoreUrl;
var toFilename = params[1] ? params[1] : config.options.txtUploadFilename;
var backupDir = params[2] ? params[2] : config.options.txtUploadBackupDir;
var uploadDir = params[3] ? params[3] : config.options.txtUploadDir;
var username = params[4] ? params[4] : config.options.txtUploadUserName;
var password = config.options.pasUploadPassword; // for security reason no password as macro parameter
// for still missing parameter set default value
if ((!storeUrl) && (document.location.toString().substr(0,4) == "http"))
storeUrl = bidix.dirname(document.location.toString())+'/'+config.macros.upload.defaultStoreScript;
if (storeUrl.substr(0,4) != "http")
storeUrl = bidix.dirname(document.location.toString()) +'/'+ storeUrl;
if (!toFilename)
toFilename = bidix.basename(window.location.toString());
if (!toFilename)
toFilename = config.macros.upload.defaultToFilename;
if (!uploadDir)
uploadDir = config.macros.upload.defaultUploadDir;
if (!backupDir)
backupDir = config.macros.upload.defaultBackupDir;
// report error if still missing
if (!storeUrl) {
alert(config.macros.upload.messages.noStoreUrl);
clearMessage();
return false;
}
if (config.macros.upload.authenticateUser && (!username || !password)) {
alert(config.macros.upload.messages.usernameOrPasswordMissing);
clearMessage();
return false;
}
bidix.upload.uploadChanges(false,null,storeUrl, toFilename, uploadDir, backupDir, username, password);
return false;
};
config.macros.upload.destFile = function(storeUrl, toFilename, uploadDir)
{
if (!storeUrl)
return null;
var dest = bidix.dirname(storeUrl);
if (uploadDir && uploadDir != '.')
dest = dest + '/' + uploadDir;
dest = dest + '/' + toFilename;
return dest;
};
//
// uploadOptions Macro
//
config.macros.uploadOptions = {
handler: function(place,macroName,params) {
var wizard = new Wizard();
wizard.createWizard(place,this.wizardTitle);
wizard.addStep(this.step1Title,this.step1Html);
var markList = wizard.getElement("markList");
var listWrapper = document.createElement("div");
markList.parentNode.insertBefore(listWrapper,markList);
wizard.setValue("listWrapper",listWrapper);
this.refreshOptions(listWrapper,false);
var uploadCaption;
if (document.location.toString().substr(0,4) == "http")
uploadCaption = config.macros.upload.label.saveLabel;
else
uploadCaption = config.macros.upload.label.uploadLabel;
wizard.setButtons([
{caption: uploadCaption, tooltip: config.macros.upload.label.promptOption,
onClick: config.macros.upload.action},
{caption: this.cancelButton, tooltip: this.cancelButtonPrompt, onClick: this.onCancel}
]);
},
refreshOptions: function(listWrapper) {
var uploadOpts = [
"txtUploadUserName",
"pasUploadPassword",
"txtUploadStoreUrl",
"txtUploadDir",
"txtUploadFilename",
"txtUploadBackupDir",
"chkUploadLog",
"txtUploadLogMaxLine",
]
var opts = [];
for(i=0; i<uploadOpts.length; i++) {
var opt = {};
opts.push()
opt.option = "";
n = uploadOpts[i];
opt.name = n;
opt.lowlight = !config.optionsDesc[n];
opt.description = opt.lowlight ? this.unknownDescription : config.optionsDesc[n];
opts.push(opt);
}
var listview = ListView.create(listWrapper,opts,this.listViewTemplate);
for(n=0; n<opts.length; n++) {
var type = opts[n].name.substr(0,3);
var h = config.macros.option.types[type];
if (h && h.create) {
h.create(opts[n].colElements['option'],type,opts[n].name,opts[n].name,"no");
}
}
},
onCancel: function(e)
{
backstage.switchTab(null);
return false;
},
wizardTitle: "Upload with options",
step1Title: "These options are saved in cookies in your browser",
step1Html: "<input type='hidden' name='markList'></input><br>",
cancelButton: "Cancel",
cancelButtonPrompt: "Cancel prompt",
listViewTemplate: {
columns: [
{name: 'Description', field: 'description', title: "Description", type: 'WikiText'},
{name: 'Option', field: 'option', title: "Option", type: 'String'},
{name: 'Name', field: 'name', title: "Name", type: 'String'}
],
rowClasses: [
{className: 'lowlight', field: 'lowlight'}
]}
}
//
// upload functions
//
if (!bidix.upload) bidix.upload = {};
if (!bidix.upload.messages) bidix.upload.messages = {
//from saving
invalidFileError: "The original file '%0' does not appear to be a valid TiddlyWiki",
backupSaved: "Backup saved",
backupFailed: "Failed to upload backup file",
rssSaved: "RSS feed uploaded",
rssFailed: "Failed to upload RSS feed file",
emptySaved: "Empty template uploaded",
emptyFailed: "Failed to upload empty template file",
mainSaved: "Main TiddlyWiki file uploaded",
mainFailed: "Failed to upload main TiddlyWiki file. Your changes have not been saved",
//specific upload
loadOriginalHttpPostError: "Can't get original file",
aboutToSaveOnHttpPost: 'About to upload on %0 ...',
storePhpNotFound: "The store script '%0' was not found."
};
bidix.upload.uploadChanges = function(onlyIfDirty,tiddlers,storeUrl,toFilename,uploadDir,backupDir,username,password)
{
var callback = function(status,uploadParams,original,url,xhr) {
if (!status) {
displayMessage(bidix.upload.messages.loadOriginalHttpPostError);
return;
}
if (bidix.debugMode)
alert(original.substr(0,500)+"\n...");
// Locate the storeArea div's
var posDiv = locateStoreArea(original);
if((posDiv[0] == -1) || (posDiv[1] == -1)) {
alert(config.messages.invalidFileError.format([localPath]));
return;
}
bidix.upload.uploadRss(uploadParams,original,posDiv);
};
if(onlyIfDirty && !store.isDirty())
return;
clearMessage();
// save on localdisk ?
if (document.location.toString().substr(0,4) == "file") {
var path = document.location.toString();
var localPath = getLocalPath(path);
saveChanges();
}
// get original
var uploadParams = Array(storeUrl,toFilename,uploadDir,backupDir,username,password);
var originalPath = document.location.toString();
// If url is a directory : add index.html
if (originalPath.charAt(originalPath.length-1) == "/")
originalPath = originalPath + "index.html";
var dest = config.macros.upload.destFile(storeUrl,toFilename,uploadDir);
var log = new bidix.UploadLog();
log.startUpload(storeUrl, dest, uploadDir, backupDir);
displayMessage(bidix.upload.messages.aboutToSaveOnHttpPost.format([dest]));
if (bidix.debugMode)
alert("about to execute Http - GET on "+originalPath);
var r = doHttp("GET",originalPath,null,null,null,null,callback,uploadParams,null);
if (typeof r == "string")
displayMessage(r);
return r;
};
bidix.upload.uploadRss = function(uploadParams,original,posDiv)
{
var callback = function(status,params,responseText,url,xhr) {
if(status) {
var destfile = responseText.substring(responseText.indexOf("destfile:")+9,responseText.indexOf("\n", responseText.indexOf("destfile:")));
displayMessage(bidix.upload.messages.rssSaved,bidix.dirname(url)+'/'+destfile);
bidix.upload.uploadMain(params[0],params[1],params[2]);
} else {
displayMessage(bidix.upload.messages.rssFailed);
}
};
// do uploadRss
if(config.options.chkGenerateAnRssFeed) {
var rssPath = uploadParams[1].substr(0,uploadParams[1].lastIndexOf(".")) + ".xml";
var rssUploadParams = Array(uploadParams[0],rssPath,uploadParams[2],'',uploadParams[4],uploadParams[5]);
bidix.upload.httpUpload(rssUploadParams,convertUnicodeToUTF8(generateRss()),callback,Array(uploadParams,original,posDiv));
} else {
bidix.upload.uploadMain(uploadParams,original,posDiv);
}
};
bidix.upload.uploadMain = function(uploadParams,original,posDiv)
{
var callback = function(status,params,responseText,url,xhr) {
var log = new bidix.UploadLog();
if(status) {
// if backupDir specified
if ((params[3]) && (responseText.indexOf("backupfile:") > -1)) {
var backupfile = responseText.substring(responseText.indexOf("backupfile:")+11,responseText.indexOf("\n", responseText.indexOf("backupfile:")));
displayMessage(bidix.upload.messages.backupSaved,bidix.dirname(url)+'/'+backupfile);
}
var destfile = responseText.substring(responseText.indexOf("destfile:")+9,responseText.indexOf("\n", responseText.indexOf("destfile:")));
displayMessage(bidix.upload.messages.mainSaved,bidix.dirname(url)+'/'+destfile);
store.setDirty(false);
log.endUpload("ok");
} else {
alert(bidix.upload.messages.mainFailed);
displayMessage(bidix.upload.messages.mainFailed);
log.endUpload("failed");
}
};
// do uploadMain
var revised = bidix.upload.updateOriginal(original,posDiv);
bidix.upload.httpUpload(uploadParams,revised,callback,uploadParams);
};
bidix.upload.httpUpload = function(uploadParams,data,callback,params)
{
var localCallback = function(status,params,responseText,url,xhr) {
url = (url.indexOf("nocache=") < 0 ? url : url.substring(0,url.indexOf("nocache=")-1));
if (xhr.status == httpStatus.NotFound)
alert(bidix.upload.messages.storePhpNotFound.format([url]));
if ((bidix.debugMode) || (responseText.indexOf("Debug mode") >= 0 )) {
alert(responseText);
if (responseText.indexOf("Debug mode") >= 0 )
responseText = responseText.substring(responseText.indexOf("\n\n")+2);
} else if (responseText.charAt(0) != '0')
alert(responseText);
if (responseText.charAt(0) != '0')
status = null;
callback(status,params,responseText,url,xhr);
};
// do httpUpload
var boundary = "---------------------------"+"AaB03x";
var uploadFormName = "UploadPlugin";
// compose headers data
var sheader = "";
sheader += "--" + boundary + "\r\nContent-disposition: form-data; name=\"";
sheader += uploadFormName +"\"\r\n\r\n";
sheader += "backupDir="+uploadParams[3] +
";user=" + uploadParams[4] +
";password=" + uploadParams[5] +
";uploaddir=" + uploadParams[2];
if (bidix.debugMode)
sheader += ";debug=1";
sheader += ";;\r\n";
sheader += "\r\n" + "--" + boundary + "\r\n";
sheader += "Content-disposition: form-data; name=\"userfile\"; filename=\""+uploadParams[1]+"\"\r\n";
sheader += "Content-Type: text/html;charset=UTF-8" + "\r\n";
sheader += "Content-Length: " + data.length + "\r\n\r\n";
// compose trailer data
var strailer = new String();
strailer = "\r\n--" + boundary + "--\r\n";
data = sheader + data + strailer;
if (bidix.debugMode) alert("about to execute Http - POST on "+uploadParams[0]+"\n with \n"+data.substr(0,500)+ " ... ");
var r = doHttp("POST",uploadParams[0],data,"multipart/form-data; boundary="+boundary,uploadParams[4],uploadParams[5],localCallback,params,null);
if (typeof r == "string")
displayMessage(r);
return r;
};
// same as Saving's updateOriginal but without convertUnicodeToUTF8 calls
bidix.upload.updateOriginal = function(original, posDiv)
{
if (!posDiv)
posDiv = locateStoreArea(original);
if((posDiv[0] == -1) || (posDiv[1] == -1)) {
alert(config.messages.invalidFileError.format([localPath]));
return;
}
var revised = original.substr(0,posDiv[0] + startSaveArea.length) + "\n" +
store.allTiddlersAsHtml() + "\n" +
original.substr(posDiv[1]);
var newSiteTitle = getPageTitle().htmlEncode();
revised = revised.replaceChunk("<title"+">","</title"+">"," " + newSiteTitle + " ");
revised = updateMarkupBlock(revised,"PRE-HEAD","MarkupPreHead");
revised = updateMarkupBlock(revised,"POST-HEAD","MarkupPostHead");
revised = updateMarkupBlock(revised,"PRE-BODY","MarkupPreBody");
revised = updateMarkupBlock(revised,"POST-SCRIPT","MarkupPostBody");
return revised;
};
//
// UploadLog
//
// config.options.chkUploadLog :
// false : no logging
// true : logging
// config.options.txtUploadLogMaxLine :
// -1 : no limit
// 0 : no Log lines but UploadLog is still in place
// n : the last n lines are only kept
// NaN : no limit (-1)
bidix.UploadLog = function() {
if (!config.options.chkUploadLog)
return; // this.tiddler = null
this.tiddler = store.getTiddler("UploadLog");
if (!this.tiddler) {
this.tiddler = new Tiddler();
this.tiddler.title = "UploadLog";
this.tiddler.text = "| !date | !user | !location | !storeUrl | !uploadDir | !toFilename | !backupdir | !origin |";
this.tiddler.created = new Date();
this.tiddler.modifier = config.options.txtUserName;
this.tiddler.modified = new Date();
store.addTiddler(this.tiddler);
}
return this;
};
bidix.UploadLog.prototype.addText = function(text) {
if (!this.tiddler)
return;
// retrieve maxLine when we need it
var maxLine = parseInt(config.options.txtUploadLogMaxLine,10);
if (isNaN(maxLine))
maxLine = -1;
// add text
if (maxLine != 0)
this.tiddler.text = this.tiddler.text + text;
// Trunck to maxLine
if (maxLine >= 0) {
var textArray = this.tiddler.text.split('\n');
if (textArray.length > maxLine + 1)
textArray.splice(1,textArray.length-1-maxLine);
this.tiddler.text = textArray.join('\n');
}
// update tiddler fields
this.tiddler.modifier = config.options.txtUserName;
this.tiddler.modified = new Date();
store.addTiddler(this.tiddler);
// refresh and notifiy for immediate update
story.refreshTiddler(this.tiddler.title);
store.notify(this.tiddler.title, true);
};
bidix.UploadLog.prototype.startUpload = function(storeUrl, toFilename, uploadDir, backupDir) {
if (!this.tiddler)
return;
var now = new Date();
var text = "\n| ";
var filename = bidix.basename(document.location.toString());
if (!filename) filename = '/';
text += now.formatString("0DD/0MM/YYYY 0hh:0mm:0ss") +" | ";
text += config.options.txtUserName + " | ";
text += "[["+filename+"|"+location + "]] |";
text += " [[" + bidix.basename(storeUrl) + "|" + storeUrl + "]] | ";
text += uploadDir + " | ";
text += "[[" + bidix.basename(toFilename) + " | " +toFilename + "]] | ";
text += backupDir + " |";
this.addText(text);
};
bidix.UploadLog.prototype.endUpload = function(status) {
if (!this.tiddler)
return;
this.addText(" "+status+" |");
};
//
// Utilities
//
bidix.checkPlugin = function(plugin, major, minor, revision) {
var ext = version.extensions[plugin];
if (!
(ext &&
((ext.major > major) ||
((ext.major == major) && (ext.minor > minor)) ||
((ext.major == major) && (ext.minor == minor) && (ext.revision >= revision))))) {
// write error in PluginManager
if (pluginInfo)
pluginInfo.log.push("Requires " + plugin + " " + major + "." + minor + "." + revision);
eval(plugin); // generate an error : "Error: ReferenceError: xxxx is not defined"
}
};
bidix.dirname = function(filePath) {
if (!filePath)
return;
var lastpos;
if ((lastpos = filePath.lastIndexOf("/")) != -1) {
return filePath.substring(0, lastpos);
} else {
return filePath.substring(0, filePath.lastIndexOf("\\"));
}
};
bidix.basename = function(filePath) {
if (!filePath)
return;
var lastpos;
if ((lastpos = filePath.lastIndexOf("#")) != -1)
filePath = filePath.substring(0, lastpos);
if ((lastpos = filePath.lastIndexOf("/")) != -1) {
return filePath.substring(lastpos + 1);
} else
return filePath.substring(filePath.lastIndexOf("\\")+1);
};
bidix.initOption = function(name,value) {
if (!config.options[name])
config.options[name] = value;
};
//
// Initializations
//
// require PasswordOptionPlugin 1.0.1 or better
bidix.checkPlugin("PasswordOptionPlugin", 1, 0, 1);
// styleSheet
setStylesheet('.txtUploadStoreUrl, .txtUploadBackupDir, .txtUploadDir {width: 22em;}',"uploadPluginStyles");
//optionsDesc
merge(config.optionsDesc,{
txtUploadStoreUrl: "Url of the UploadService script (default: store.php)",
txtUploadFilename: "Filename of the uploaded file (default: in index.html)",
txtUploadDir: "Relative Directory where to store the file (default: . (downloadService directory))",
txtUploadBackupDir: "Relative Directory where to backup the file. If empty no backup. (default: ''(empty))",
txtUploadUserName: "Upload Username",
pasUploadPassword: "Upload Password",
chkUploadLog: "do Logging in UploadLog (default: true)",
txtUploadLogMaxLine: "Maximum of lines in UploadLog (default: 10)"
});
// Options Initializations
bidix.initOption('txtUploadStoreUrl','');
bidix.initOption('txtUploadFilename','');
bidix.initOption('txtUploadDir','');
bidix.initOption('txtUploadBackupDir','');
bidix.initOption('txtUploadUserName','');
bidix.initOption('pasUploadPassword','');
bidix.initOption('chkUploadLog',true);
bidix.initOption('txtUploadLogMaxLine','10');
/* don't want this for tiddlyspot sites
// Backstage
merge(config.tasks,{
uploadOptions: {text: "upload", tooltip: "Change UploadOptions and Upload", content: '<<uploadOptions>>'}
});
config.backstageTasks.push("uploadOptions");
*/
//}}}
This wiki is to keep notes and links to resources that A. T. Wyatt and students might find helpful.
Please use the links on the left to access different topics.
--------------------------------------------------------------------------
Tiddlywiki resources:
[[Tiddlywiki markup|http://giffmex.org/twfortherestofus.html]]
August 14, 2007
These changes repeated on new instance.
-------------------------------
Two hacks, supplied by A. Borrow
1) Change the display to lastname, firstname when assigning students to a course
rename originalassign.php in moodle/admin/roles
rename originalassign.html in moodle/admin/roles
copy in Anthony's files
2) Change the display to lastname, firstname when assigning students to groups
http://tracker.moodle.org/browse/MDL-7163#action_28075
Anthony Borrow - [18/Mar/07 12:54 PM ] To change the order of the list of members in the group members box I changed line 63 of /group/lib/utillib.php
from:
$fullname = fullname($user, true);
to:
$fullname = $user->lastname.', '.$user->firstname;
[[Adjust course max summaries]]
[[Default course settings]]
[[Increase shortname field length]]
[[Default course blocks]]
[[Local language pack]]
[[gradebook v2]]
[[alphabetical order and lastname, firstname format]]
[[powerpoint hack]]
[[Upload Courses]]
[[Assignment Grading Interface]]
by Frederic Pouyot - Saturday, 20 October 2007, 01:28 AM
http://moodle.org/mod/forum/discuss.php?d=82740
Instructions:
. . . if you want to do is resize the texteara html tag, you should be able to do that from the /<moodlepath>/message/discussion.php file, around line 164. You can edit that file using an FTP client such as Filezilla, WinSCP or server side editing tools within Webmin's File Manager (under Other).
Now, if the reason why you want to resize that area is because like many people, you and your users can only see the top of the Send Message button, then read suggestions below these codes.
I set mine to (important part is the 80 in print_textarea(true, 8, 34, 80, 100, 'message', $refreshedmessage);):
--------------------------------------------
if ($usehtmleditor) {
print_textarea(true, 8, 34, 80, 100, 'message', $refreshedmessage);
use_html_editor('message', 'formatblock subscript superscript copy cut paste clean undo redo justifyleft justifycenter justifyright justifyfull lefttoright righttoleft insertorderedlist insertunorderedlist outdent indent inserthorizontalrule createanchor nolink inserttable');
echo '<input type="hidden" name="format" value="'.FORMAT_HTML.'" />';
} else {
print_textarea(false, 8, 50, 0, 0, 'message', $refreshedmessage);
echo '<input type="hidden" name="format" value="'.FORMAT_MOODLE.'" />';
}
--------------------------------------------
The Window to send messages is divided into 4 frames, with no border, and by default no resizable. Around line 38 of that same discussion.php file you will see something like what follows: (important part is the 250 in <frameset rows="110,*,0,250">)
<frameset rows="110,*,0,250">
//was rows="110,*,0,200"
<noframes><body><?php
echo '<a href="discussion.php?id='.$userid.'&noframesjs=1">'.get_string('noframesjs', 'message').'<a/>';
?></body></noframes>
<frame src="user.php?id=<?php p($user->id)?>&frame=user" name="user"
scrolling="no" marginwidth="0" marginheight="0" frameborder="0" />
<frame src="messages.php" name="messages"
scrolling="yes" marginwidth="10" marginheight="10" frameborder="0" />
<frame src="refresh.php?id=<?php p($user->id)?>&name=<?php echo urlencode(fullname($user)) ?>" name="refresh"
scrolling="no" marginwidth="0" marginheight="0" frameborder="0" />
<frame src="send.php?id=<?php p($user->id)?>" name="send"
scrolling="yes" marginwidth="2" marginheight="2" frameborder="0" />
</frameset>
http://moodle.org/mod/forum/discuss.php?d=38425
August 14, 2007
A number of changes here. Not sure this is actually ready to go.
Problem with grade exceptions which I attempted to fix based on information here: http://moodle.org/mod/forum/discuss.php?d=71428#p345463
Remaining files from CVS, August 14
July 27, 2007
Adding this as soon as Anthony okays it:
http://moodle.org/mod/forum/discuss.php?d=76494&parent=341918
July 24, 2007
Went back with cvs version provided here:
http://moodle.org/file.php/5/moddata/forum/397/340416/gbpv2_18_beta_20070722.zip
Will ignore the strange formatting in the first column. I don't understand how to fix it.
July 20, 2007
I have determined that there are still bugs in the cvs version of GBv2. I went back to the emailed code. He says he is working on it this weekend, so maybe we will have an updated copy soon.
July 19, 2007
Anthony Borrow sent me his copy of the gradebook enhancements so we could use this for 1.8. Humboldt doesn't seem to be maintaining this code, and we can't plan to move to Moodle 1.9 for fall.
This code seems to work, but I have heard reports of the excel export having some issues.
My copy is a little older than this, but here is the latest discussion:
http://moodle.org/mod/forum/discuss.php?d=50154#p337076
Moodle is a powerful and accessible course management tool! Teachers can use it both to deliver content to students and to create interactive assignments. It does have some collaborative tools as well as the more traditional methods of uploading completed assignments.
This is a very interesting moodle site
[[http://moodle.sandi.net/course/view.php?id=1198|Steve Guadarrama]]
http://ocw.usu.edu/Instructional_Technology/
We have been having a problem with powerpoint files opening as a blank white screen in IE7. I really think this is a browser problem, but this is how I attempted to fix the problem:
FILE: moodle/mod/resource/type/file/resource.class.php
605-616 in my file, because I added some comments. (Also note that some of my syntax, such as double slashes for comments, is missing because of tiddlywiki markup. . .)
echo '</div>';
echo "<div class=\"popupnotice\">(<a href=\"$fullurl\">$fullurl</a>)</div>";
}
//add this code to force download string to be appended to all ppt resources
//because IE7 will only show a single blank slide when linking to a presentation
if($mimetype=="application/vnd.ms-powerpoint") {
$fullurl=$fullurl."?forcedownload=1";
}
redirect($fullurl);
}
References:
http://moodle.org/mod/forum/discuss.php?d=76374
and
http://moodle.org/mod/forum/discuss.php?d=76969
Essentially, this method can be realized manually by adding
?forcedownload=1
To the end of every url as you link the resource in moodle. The problem with that method is that it requires a lot of work if you have to do it to very many powerpoint links.