Index: lib.php =================================================================== RCS file: /cvsroot/moodle/moodle/mod/assignment/lib.php,v retrieving revision 1.277.2.4 diff -u -r1.277.2.4 lib.php --- lib.php 13 Nov 2007 16:59:13 -0000 1.277.2.4 +++ lib.php 14 Nov 2007 08:39:38 -0000 @@ -119,7 +119,8 @@ $this->view_header(); $this->view_intro(); - + global $CFG; + $navigation = build_navigation(array(array('name'=>get_string('grades', 'grades'), 'link'=>"$CFG->wwwroot/grade/report/grader/index.php?id={$this->course->id}", 'type'=>'misc'),array('name'=>$this->strsubmissions, 'link'=>null, 'type'=>'misc')),$this->cm); $this->view_dates(); $this->view_feedback(); @@ -1025,8 +1026,9 @@ $tabindex = 1; //tabindex for quick grading tabbing; Not working for dropdowns yet add_to_log($course->id, 'assignment', 'view submission', 'submissions.php?id='.$this->assignment->id, $this->assignment->id, $this->cm->id); - - $navigation = build_navigation($this->strsubmissions, $this->cm); +//Patch GVA 13 Nov, 2007 + $navigation = build_navigation(array(array('name'=>get_string('grades', 'grades'), 'link'=>"$CFG->wwwroot/grade/report/grader/index.php?id={$this->course->id}", 'type'=>'misc'),array('name'=>$this->strsubmissions, 'link'=>null, 'type'=>'misc')),$this->cm); +//End Patch//$navigation = build_navigation($this->strsubmissions, $this->cm); print_header_simple(format_string($this->assignment->name,true), "", $navigation, '', '', true, update_module_button($cm->id, $course->id, $this->strassignment), navmenu($course, $cm)); Index: mod_form.php =================================================================== RCS file: /cvsroot/moodle/moodle/mod/assignment/mod_form.php,v retrieving revision 1.5 diff -u -r1.5 mod_form.php --- mod_form.php 26 Aug 2007 23:50:09 -0000 1.5 +++ mod_form.php 14 Nov 2007 14:57:54 -0000 @@ -38,7 +38,8 @@ $mform->addElement('htmleditor', 'description', get_string('description', 'assignment')); $mform->setType('description', PARAM_RAW); $mform->setHelpButton('description', array('writing', 'questions', 'richtext'), false, 'editorhelpbutton'); - $mform->addRule('description', get_string('required'), 'required', null, 'client'); +//GVA Patch 14 Nov 2007 +//End Patch//$mform->addRule('description', get_string('required'), 'required', null, 'client'); $mform->addElement('modgrade', 'grade', get_string('grade')); $mform->setDefault('grade', 100); @@ -52,7 +53,20 @@ $mform->addElement('select', 'preventlate', get_string('preventlate', 'assignment'), $ynoptions); $mform->setDefault('preventlate', 0); - +//GVA 14 Nov, 2008 + if ($mform->elementExists('timeavailable')) { + $mform->setAdvanced('timeavailable'); + } + if ($mform->elementExists('preventlate')) { + $mform->setAdvanced('preventlate'); + } + if ($mform->elementExists('visible')) { + $mform->setAdvanced('visible'); + } + if ($mform->elementExists('groupingid')) { + $mform->removeElement('groupingid'); + } +//End Patch $mform->addElement('header', 'typedesc', get_string('type'.$type,'assignment')); $assignmentinstance->setup_elements($mform); @@ -68,4 +82,4 @@ } -?> \ No newline at end of file +?> Index: type/online/assignment.class.php =================================================================== RCS file: /cvsroot/moodle/moodle/mod/assignment/type/online/assignment.class.php,v retrieving revision 1.46 diff -u -r1.46 assignment.class.php --- type/online/assignment.class.php 16 Sep 2007 21:06:56 -0000 1.46 +++ type/online/assignment.class.php 15 Nov 2007 00:42:27 -0000 @@ -249,6 +249,19 @@ $mform->setHelpButton('var1', array('commentinline', get_string('commentinline', 'assignment'), 'assignment')); $mform->setDefault('var1', 0); +//GVA 14 Nov, 2008 + $mform->setDefault('resubmit', 1);//Resubmit as creation and modificed dates are available to teachers and students + + if ($mform->elementExists('resubmit')) { + $mform->setAdvanced('resubmit'); + } + if ($mform->elementExists('emailteachers')) { + $mform->setAdvanced('emailteachers'); + } + if ($mform->elementExists('var1')) { + $mform->setAdvanced('var1'); + } +//End Patch } } Index: type/upload/assignment.class.php =================================================================== RCS file: /cvsroot/moodle/moodle/mod/assignment/type/upload/assignment.class.php,v retrieving revision 1.32 diff -u -r1.32 assignment.class.php --- type/upload/assignment.class.php 6 Aug 2007 13:28:40 -0000 1.32 +++ type/upload/assignment.class.php 14 Nov 2007 20:07:20 -0000 @@ -948,7 +948,32 @@ $mform->addElement('select', 'emailteachers', get_string("emailteachers", "assignment"), $ynoptions); $mform->setHelpButton('emailteachers', array('emailteachers', get_string('emailteachers', 'assignment'), 'assignment')); $mform->setDefault('emailteachers', 0); - +//GVA 14 Nov, 2008 + $mform->setDefault('var1', 20);//Don't limit uploaded files too much by default; hard disk space is cheap + $mform->setDefault('var2', 1); //Sure, let students comment on their submissions or us this as an alternative to files + + if ($mform->elementExists('maxbytes')) { + $mform->setAdvanced('maxbytes'); + } + if ($mform->elementExists('resubmit')) { + $mform->setAdvanced('resubmit'); + } + if ($mform->elementExists('allowmaxfiles')) { + $mform->setAdvanced('allowmaxfiles'); + } + if ($mform->elementExists('emailteachers')) { + $mform->setAdvanced('emailteachers'); + } + if ($mform->elementExists('var1')) { //number of files allowed + $mform->setAdvanced('var1'); + } + if ($mform->elementExists('var2')) { + $mform->setAdvanced('var2'); + } + if ($mform->elementExists('var3')) { + $mform->setAdvanced('var3'); + } +//End Patch } Index: type/uploadsingle/assignment.class.php =================================================================== RCS file: /cvsroot/moodle/moodle/mod/assignment/type/uploadsingle/assignment.class.php,v retrieving revision 1.33 diff -u -r1.33 assignment.class.php --- type/uploadsingle/assignment.class.php 6 Aug 2007 13:28:41 -0000 1.33 +++ type/uploadsingle/assignment.class.php 14 Nov 2007 20:13:42 -0000 @@ -176,7 +176,17 @@ $choices[0] = get_string('courseuploadlimit') . ' ('.display_size($COURSE->maxbytes).')'; $mform->addElement('select', 'maxbytes', get_string('maximumsize', 'assignment'), $choices); $mform->setDefault('maxbytes', $CFG->assignment_maxbytes); - +//GVA 14 Nov, 2008 + if ($mform->elementExists('resubmit')) { + $mform->setAdvanced('resubmit'); + } + if ($mform->elementExists('emailteachers')) { + $mform->setAdvanced('emailteachers'); + } + if ($mform->elementExists('maxbytes')) { + $mform->setAdvanced('maxbytes'); + } +//End Patch } }