~azzar1/unity/add-show-desktop-key

« back to all changes in this revision

Viewing changes to www/media/common/codepress/codepress.html

  • Committer: Matt Giuca
  • Date: 2009-01-19 17:28:59 UTC
  • mto: This revision was merged to the branch mainline in revision 1090.
  • Revision ID: matt.giuca@gmail.com-20090119172859-htjq3rfpp0fhtpc9
ivle.worksheet: Added calculate_score. This is a nice clean Storm port of
    ivle.db.calculate_worksheet_score.
tutorial: Replaced use of ivle.db.calculate_worksheet_score with
    ivle.worksheet.calculate_score.
    Guess What!! Removed this module's dependency on ivle.db! Hooray!
    (Note: tutorialservice still depends on it).
bin/ivle-marks: Updated this script to use ivle.worksheet_calculate_score.
    Note that this DOES NOT execute properly -- it seems it didn't even
    before my changes (tries to call db.get_users). Not my fault; I'm
    committing and going to bed!
ivle.db: Removed calculate_worksheet_score.
    As this removes the dependency on get_problem_status, removed that too!
    Almost all the worksheet stuff is gone now!

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 
2
<html>
 
3
<head>
 
4
        <title>CodePress - Real Time Syntax Highlighting Editor written in JavaScript</title>
 
5
        <meta name="description" content="CodePress - source code editor window" />
 
6
 
 
7
        <script type="text/javascript">
 
8
        var language = 'generic';
 
9
        var engine = 'older';
 
10
        var ua = navigator.userAgent;
 
11
        var ts = (new Date).getTime(); // timestamp to avoid cache
 
12
        var lh = location.href;
 
13
        
 
14
        if(ua.match('MSIE')) engine = 'msie';
 
15
        else if(ua.match('KHTML')) engine = 'khtml'; 
 
16
        else if(ua.match('Opera')) engine = 'opera'; 
 
17
        else if(ua.match('Gecko')) engine = 'gecko';
 
18
 
 
19
        if(lh.match('language=')) language = lh.replace(/.*language=(.*?)(&.*)?$/,'$1');
 
20
 
 
21
        document.write('<link type="text/css" href="codepress.css?ts='+ts+'" rel="stylesheet" />');
 
22
        document.write('<link type="text/css" href="languages/'+language+'.css?ts='+ts+'" rel="stylesheet" id="cp-lang-style" />');
 
23
        document.write('<scr'+'ipt type="text/javascript" src="engines/'+engine+'.js?ts='+ts+'"></scr'+'ipt>');
 
24
        document.write('<scr'+'ipt type="text/javascript" src="languages/'+language+'.js?ts='+ts+'"></scr'+'ipt>');
 
25
        </script>
 
26
 
 
27
</head>
 
28
 
 
29
<script type="text/javascript">
 
30
if(engine == "msie" || engine == "gecko") document.write('<body><pre> </pre></body>');
 
31
else if(engine == "opera") document.write('<body></body>');
 
32
// else if(engine == "khtml") document.write('<body> </body>');
 
33
</script>
 
34
 
 
35
</html>