Skip to content

Ludo's LRT blog

just another Learning and Research Technologies weblog

Archive

Category: web development

This post is password protected. To view it please enter your password below:

MMUnion web content snapshot

MMUnion web content snapshot

MMUnion contacted LRT to ask us to put some material relating to two MMUnion campaigns on the Welcome page of the student portal, myMMU.

Below is the resulting code I put on the portal’s Home page.  A picture of the web content as it appeared on myMMU is visible to the left.

 

<h2>Student Elections!</h2>
<div style="font-size:1.4em;">
<img alt="MMUnion eleXions - eXperience of a lifetime - nominations close 26 feb" src="https://my.mmu.ac.uk/PublishingImages/elections-image-s.jpg" style="float:left; margin-right: 10px; margin-bottom: 6px;">
<p>MMUnion are offering you the career opportunity of a lifetime!
Think you could represent and make decisions for over 34,000 students... and get paid for it? Then stand in the student elections now!</p>
<p>
We have <strong>6 paid positions</strong> available for full-time student officers for 2011/2012. Any student can run for election whether you are half way through your studies or graduating this year.
</p>
 
<p>
This is an opportunity you won't find anywhere else. You will become a trustee for a large charitable organisation, represent over 34,000 students and get the chance to make a real difference to the lives of MMU students.
</p><p>
With ONLY 6 positions available, what are you waiting for? Visit <b><a href="http://www.mmunion.co.uk/elections" target="blank">www.mmunion.co.uk/elections</a></b> to find out more about this unique role and to nominate yourself!
</p>
<p>
Nominations close Sunday 26th Feb.
</p>
</div>
 
<br/>
<br/>
<h2 style="clear:both;">MMUnion Teaching Awards</h2>
 
<div style="font-size:1.4em;">
<img alt="MMUnion teaching awards: girl with hands in heart shape: I love my lecturer logo" src="https://my.mmu.ac.uk/PublishingImages/teaching-award-image-s.jpg" style="float:right; margin-left: 10px; margin-bottom: 6px;"></img><p>
Vote now in the MMUnion Teaching Awards and reward someone who has made a difference to your learning!
</p>
<p>
The MMUnion Teaching Awards is your opportunity to recognise and reward individuals, courses or departments for excellence in teaching and a commitment to making your learning experience the best it can be.
</p>
<p>
Do you know a hard working course rep, an inspiring teacher or just simply love your course? If so, we want to hear about it.
There are <strong>9 awards up for grabs</strong> and it's up to <strong>you</strong> who wins them. Check out the full list of the categories and nominate at <b><a href="http://www.mmunion.co.uk/ilovemylecturer" target="blank">www.mmunion.co.uk/ilovemylecturer</a></b>. 
 
</p>
<p>
Those nominated will be judged by a set of criteria and shortlisted before a winner is decided at a high profile awards evening.
</p>
</div>

This is a “reprint” of an article originally published on a private wiki not open to the public by me in July 2009.

Add & Deploy
To install a SharePoint solution called solution.wsp from C:\MMU Web Parts\ on your SharePoint farm (you should be able to run these commands from any web server in the farm):

Add:
stsadm -o addsolution -filename "C:\MMU Web Parts\solution.wsp"

Now deploy it to the web application of your SharePoint site:

Deploy:
stsadm -o deploysolution -name "solution.wsp" -url "https://my.mmu.ac.uk" -immediate [-allowgacdeployment]

Enumerate current solutions

If you’d just like to see which solutions are installed on your SharePoint server farm:

stsadm -o enumsolutions

But this spits out a lot of XML that’s very difficult to read on the command line (or at all). Here’s a Perl script to run to get enumsolutions without all the surrounding flim-flam:

@o=split /</,`stsadm -o enumsolutions`;
while(<@o>){
chop;
print qq[$_\n] if /^Name=.*wsp/;
}

or on the Windows cmd line:

perl -e "@o=split /</,`stsadm -o enumsolutions`; while(<@o>){chop;print qq[$_\n] if /^Name=.*wsp/;}"

Retract & Delete

To uninstall a SharePoint solution from your farm run both of these commands:

stsadm -o retractsolution -name "solution.wsp" -url "https://my.mmu.ac.uk" -immediate

stsadm -o deletesolution -name "solution.wsp"

Lastly, here’s an improved Perl one-liner for taming the tidal wave of XML output from enumsolutions.

Can’t access central administration on your SharePoint farm?  Well, try excluding it from your proxy settings.

(Assuming you’ve already added the URL you’re trying to use to access it to its own Alternate Access Mappings list – if you haven’t, try accessing CA from one of the SP servers it’s running on using the Start Menu ‘Central Administration’ shortcut).

Sven has given my poure blogue physic and menderated it!

Open up Central Administration for your SharePoint 2007 farm > Application Management > section “SharePoint Web Application Management” > Web application general settings.

Inside the “Web application general settings” page you can set Maximum Upload File Size for each top-level site collection.

Note that it may also be necessary to increase “Maximum Timeout” settings on your IIS box(es) if it takes your network / server hardware a long time to deal with the bigger files.

The above applies probably only to SP1. We found instructions referring to a section in Central Admin called “Virtual Server Configuration”, which we do not have in our CA. This may refer to the CA on a farm running MOSS 2007 SP2.

If you want to set up HTTPS (HTTP over SSL) to allow secure, encrypted browsing to an IIS (6 or 7) website, you had better be sure you have your private key. A digital certificate for your domain name alone doesn’t cut it.

This can be a problem if, for example, you’ve completely junked your server since the last time you ordered an SSL certificate for your domain name. In this case, if you haven’t backed up the private key, you will need to order a new certificate.

The private key is created at the same time as you start the certificate ordering process by creating a CSR (certificate signed request). This can be done on Windows servers by going into IIS Manager > any website’s properties > Directory Security (tab) > Server Certificate… and then following the options for ordering or creating a new cert. This will create a short text file of encrypted text. This is your CSR which your Network Security platoon will send off to a certificate provider authority thingy and eventually get back to you with the certificate file[s].

At this point, don’t just try installing the certificate. You won’t be able to access your website. You have to export the private key, which was created on your server when you created the CSR, along with the cert as a .pfx file. To do this, run mmc, install the Certificates (a.k.a. Certificate Manager) snap-in, r-click the certificate enrollment requests [sic] cert store, go to All Tasks > export as a .pfx file. If you’ve installed the returned cert on the server you created the CSR on (which is a good idea) then the cert/private key combo should be stored here. Bear in mind that you will be asked to set a password, so be sure to record it in a sensible place.

Once you have exported the .pfx file containing the certificate and the exportable private key, you can install it on your own PC or server, or someone else’s.

Generally speaking, the destination machine will have to be pretty similar to the source. This is certainly the case with our SharePoint farm, whose servers are all based on the same Windows 2003 Server. You certainly cannot move a cert from a 32-bit server to a 64-bit server, I hear.

use RegisterClientScriptBlock

Last week I was delighted to be heavily involved in the development, testing and deployment of the Postgraduate Taught Experience Survey web part on behalf of CASQE.

http://bit.ly/pgsurvey

The survey link is available on its own web part page. Although this can be accessed by any SharePoint user, the web part hides itself from non-postgrads, instead displaying a suitable message.

The web part achieves this by accessing a database table containing a list of all known postgrads to check whether the logged-in user is among them. If so, a link to the survey is displayed.

The initial spec involved the use of Javascript in the web part to pop open the survey in a new window when a button was clicked. However, after concerns at the design stage that a lot of browsers block pop-ups with varying degrees of visibility, it was decided to replace the button with a simple link.

My Pipes Workflow

My Pipes Workflow

Yahoo! Pipes is a programmable data wrangling system from Yahoo! that allows you to chop up webpages and pull out only the data you want in all sorts of formats.

I used it for one of its most straightforward possible purposes: aggregating all of the LRT staff blog posts into a single RSS feed. The picture adorning this post is an automatically generated representation of the workflow of the “Pipe” I created.

Here are some pipes that look great to me:

    eBay Price Watch finds products by keyword in a specific price range on eBay
    Social Media Firehose searches the popular social media sites via their own APIs (faster) for search terms specified by you (I tried searching for “iSlate” – which took a good few seconds!)

The workspace is a visual editor that allows you to pull in modules to do what you want. Modules includes data sources, such as RSS feed modules, operators, such as Union, Filter and Sort modules, user inputs, mathematical and string manipulation modules. There’s even a regular expression search module.

Modules are linked by Pipes. Data flows from module to module via the pipes, and is operated upon by each module according to your settings. Everything has to be piped to a Pipe Output module at the end.

It’s brilliant for messing around with RSS / Atom feeds. It’s also brilliant for extracting information from any website and doing what you want with it. It’s a fully-featured programming environment for the Web!