~ubuntu-branches/ubuntu/jaunty/moodle/jaunty

« back to all changes in this revision

Viewing changes to mod/workshop/submissions.php

  • Committer: Bazaar Package Importer
  • Author(s): Jordan Mantha, Matt Oquist
  • Date: 2009-02-25 15:16:22 UTC
  • mfrom: (1.1.11 upstream)
  • Revision ID: james.westby@ubuntu.com-20090225151622-0ekt1liwhv2obfza
Tags: 1.9.4.dfsg-0ubuntu1
* Merge with Debian git (Closes LP: #322961, #239481, #334611):
  - use Ubuntu's smarty lib directory for linking
  - use internal yui library 
  - add update-notifier support back in

[Matt Oquist]
  * renamed prerm script
  * significantly rewrote postinst and other maintainer scripts to improve
    user experience and package maintainability
    (Closes LP: #225662, #325450, #327843, #303078, #234609)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<?php  // $Id: submissions.php,v 1.56 2007/01/10 08:29:42 toyomoyo Exp $
 
1
<?php  // $Id: submissions.php,v 1.60.2.3 2008/07/10 09:48:48 scyrma Exp $
2
2
 
3
3
/*************************************************
4
4
    ACTIONS handled are:
51
51
    $strsubmissions = get_string("submissions", "workshop");
52
52
 
53
53
    // ... print the header and...
54
 
    print_header_simple(format_string($workshop->name), "",
55
 
                 "<a href=\"index.php?id=$course->id\">$strworkshops</a> ->
56
 
                  <a href=\"view.php?id=$cm->id\">".format_string($workshop->name,true)."</a> -> $strsubmissions",
 
54
    $navigation = build_navigation($strsubmissions, $cm);
 
55
    print_header_simple(format_string($workshop->name), "", $navigation,
57
56
                  "", "", true);
58
57
 
59
58
    //...get the action or set up an suitable default
239
238
            error("Edit submission: Userids do not match");
240
239
        }
241
240
        if (($submission->timecreated < ($timenow - $CFG->maxeditingtime)) and ($workshop->assessmentstart < $timenow)) {
242
 
            error(get_string('notallowed', 'workshop'));
 
241
            print_error('notallowed', 'workshop');
243
242
        }
244
243
        ?>
245
244
        <form id="editform" enctype="multipart/form-data" action="submissions.php" method="post">
265
264
                        "workshop")."\" onclick=\"getElementById('editform').action.value='removeattachments';
266
265
                        getElementById('editform').submit();\"/></div></td></tr>\n";
267
266
                    $n = 1;
 
267
                    require_once($CFG->libdir .'/filelib.php');
268
268
                    foreach ($files as $file) {
269
269
                        $icon = mimeinfo("icon", $file);
270
 
                        if ($CFG->slasharguments) {
271
 
                            $ffurl = "file.php/$filearea/$file";
272
 
                        } else {
273
 
                            $ffurl = "file.php?file=/$filearea/$file";
274
 
                        }
 
270
                        $ffurl = get_file_url("$filearea/$file");
275
271
                        // removed target=\"uploadedfile\" 
276
272
                        // as it does not validate MDL_7861
277
273
                        echo "<tr><td>".get_string("attachment", "workshop")." $n: <img src=\"$CFG->pixpath/f/$icon\"
278
274
                            class=\"icon\" alt=\"".get_string('file')."\" />".
279
 
                            "&nbsp;<a href=\"$CFG->wwwroot/$ffurl\">$file</a></td></tr>\n";
 
275
                            "&nbsp;<a href=\"$ffurl\">$file</a></td></tr>\n";
280
276
                    }
281
277
                } else {
282
278
                    echo "<tr><td><b>".get_string("noattachments", "workshop")."</b></td></tr>\n";