mirror of
https://github.com/moodle/moodle.git
synced 2025-03-14 20:50:21 +01:00
MDL-52954 assign: Fix the reasonable cibot warnings.
This commit is contained in:
parent
07a7d9a5f1
commit
6853cd5ed4
@ -2408,8 +2408,8 @@ class file_storage {
|
||||
$rs->close();
|
||||
mtrace('done.');
|
||||
|
||||
// remove orphaned converted files (that is files in the core documentconversion filearea without
|
||||
// the existing original file)
|
||||
// Remove orphaned converted files (that is files in the core documentconversion filearea without
|
||||
// the existing original file).
|
||||
mtrace('Deleting orphaned document conversion files... ', '');
|
||||
cron_trace_time_and_memory();
|
||||
$sql = "SELECT p.*
|
||||
|
@ -161,7 +161,8 @@ abstract class moodleform {
|
||||
* @param bool $editable
|
||||
* @param array $ajaxformdata Forms submitted via ajax, must pass their data here, instead of relying on _GET and _POST.
|
||||
*/
|
||||
public function __construct($action=null, $customdata=null, $method='post', $target='', $attributes=null, $editable=true, $ajaxformdata=null) {
|
||||
public function __construct($action=null, $customdata=null, $method='post', $target='', $attributes=null, $editable=true,
|
||||
$ajaxformdata=null) {
|
||||
global $CFG, $FULLME;
|
||||
// no standard mform in moodle should allow autocomplete with the exception of user signup
|
||||
if (empty($attributes)) {
|
||||
|
@ -18,7 +18,6 @@
|
||||
* Test unoconv functionality.
|
||||
*
|
||||
* @package core
|
||||
* @category phpunit
|
||||
* @copyright 2016 Damyon Wiese
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
@ -30,13 +29,14 @@ defined('MOODLE_INTERNAL') || die();
|
||||
* A set of tests for some of the unoconv functionality within Moodle.
|
||||
*
|
||||
* @package core
|
||||
* @category phpunit
|
||||
* @copyright 2016 Damyon Wiese
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
class core_unoconv_testcase extends advanced_testcase {
|
||||
|
||||
/** @var $testfile1 */
|
||||
private $testfile1 = null;
|
||||
/** @var $testfile2 */
|
||||
private $testfile2 = null;
|
||||
|
||||
public function setUp() {
|
||||
|
@ -42,17 +42,17 @@ use stdClass;
|
||||
class grading_app implements templatable, renderable {
|
||||
|
||||
/**
|
||||
* The initial user id.
|
||||
* @var $userid - The initial user id.
|
||||
*/
|
||||
public $userid = 0;
|
||||
|
||||
/**
|
||||
* The initial group id.
|
||||
* @var $groupid - The initial group id.
|
||||
*/
|
||||
public $groupid = 0;
|
||||
|
||||
/**
|
||||
* The assignment instance.
|
||||
* @var $assignment - The assignment instance.
|
||||
*/
|
||||
public $assignment = null;
|
||||
|
||||
|
@ -1537,9 +1537,11 @@ class mod_assign_external extends external_api {
|
||||
require_once($CFG->dirroot . '/mod/assign/gradeform.php');
|
||||
|
||||
$params = self::validate_parameters(self::submit_grading_form_parameters(),
|
||||
array('assignmentid' => $assignmentid,
|
||||
array(
|
||||
'assignmentid' => $assignmentid,
|
||||
'userid' => $userid,
|
||||
'jsonformdata' => $jsonformdata));
|
||||
'jsonformdata' => $jsonformdata
|
||||
));
|
||||
|
||||
$cm = get_coursemodule_from_instance('assign', $params['assignmentid'], 0, false, MUST_EXIST);
|
||||
$context = context_module::instance($cm->id);
|
||||
@ -1554,10 +1556,12 @@ class mod_assign_external extends external_api {
|
||||
|
||||
$warnings = array();
|
||||
|
||||
$options = array('userid'=>$params['userid'],
|
||||
$options = array(
|
||||
'userid' => $params['userid'],
|
||||
'attemptnumber' => $data['attemptnumber'],
|
||||
'rownum' => 0,
|
||||
'gradingpanel' => true);
|
||||
'gradingpanel' => true
|
||||
);
|
||||
|
||||
$customdata = (object) $data;
|
||||
$formparams = array($assignment, $customdata, $options);
|
||||
@ -2582,7 +2586,7 @@ class mod_assign_external extends external_api {
|
||||
'filter' => new external_value(PARAM_RAW, 'search string to filter the results'),
|
||||
'skip' => new external_value(PARAM_INT, 'number of records to skip', VALUE_DEFAULT, 0),
|
||||
'limit' => new external_value(PARAM_INT, 'maximum number of records to return', VALUE_DEFAULT, 0),
|
||||
'onlyids' => new external_value(PARAM_BOOL, 'Do not return all user fields - only the id and flags (requiresgrading etc)', VALUE_DEFAULT, false),
|
||||
'onlyids' => new external_value(PARAM_BOOL, 'Do not return all user fields', VALUE_DEFAULT, false),
|
||||
)
|
||||
);
|
||||
}
|
||||
|
@ -24,7 +24,9 @@
|
||||
namespace assignfeedback_editpdf\event;
|
||||
|
||||
/**
|
||||
* Simple task to run the grade cron.
|
||||
* An event observer.
|
||||
* @copyright 2016 Damyon Wiese
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
class observer {
|
||||
|
||||
|
@ -211,7 +211,9 @@ class assignfeedback_editpdf_renderer extends plugin_renderer_base {
|
||||
$canvas = html_writer::div($canvas, 'drawingregion');
|
||||
$changesmessage = html_writer::tag('div',
|
||||
get_string('draftchangessaved', 'assignfeedback_editpdf'),
|
||||
array('class'=>'assignfeedback_editpdf_unsavedchanges warning label label-info'));
|
||||
array(
|
||||
'class' => 'assignfeedback_editpdf_unsavedchanges warning label label-info'
|
||||
));
|
||||
|
||||
$changesmessage = html_writer::div($changesmessage, 'unsaved-changes');
|
||||
$canvas .= $changesmessage;
|
||||
|
@ -29,7 +29,9 @@ use context_module;
|
||||
use assign;
|
||||
|
||||
/**
|
||||
* Simple task to run the grade cron.
|
||||
* Simple task to convert submissions to pdf in the background.
|
||||
* @copyright 2016 Damyon Wiese
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
class convert_submissions extends scheduled_task {
|
||||
|
||||
|
@ -15,13 +15,9 @@
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Definition of core scheduled tasks.
|
||||
* Definition of editpdf scheduled tasks.
|
||||
*
|
||||
* The handlers defined on this file are processed and registered into
|
||||
* the Moodle DB after any install or upgrade operation. All plugins
|
||||
* support this.
|
||||
*
|
||||
* @package core
|
||||
* @package mod_assign
|
||||
* @category task
|
||||
* @copyright 2016 Damyon Wiese
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
|
@ -65,7 +65,5 @@ function xmldb_assignfeedback_editpdf_upgrade($oldversion) {
|
||||
upgrade_plugin_savepoint(true, 2016021600, 'assignfeedback', 'editpdf');
|
||||
}
|
||||
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -1426,7 +1426,6 @@ class assign {
|
||||
* If this is a group assignment, group info is also returned.
|
||||
*
|
||||
* @param int $currentgroup
|
||||
* @param bool $idsonly
|
||||
* @return array List of user records with extra fields 'submitted', 'notsubmitted', 'requiregrading', 'groupid', 'groupname'
|
||||
*/
|
||||
public function list_participants_with_filter_status_and_group($currentgroup) {
|
||||
|
@ -1456,7 +1456,7 @@ class mod_assign_renderer extends plugin_renderer_base {
|
||||
/**
|
||||
* Defer to template..
|
||||
*
|
||||
* @param grading_app - All the data to render the grading app.
|
||||
* @param grading_app $app - All the data to render the grading app.
|
||||
*/
|
||||
public function render_grading_app(grading_app $app) {
|
||||
$context = $app->export_for_template($this);
|
||||
|
@ -955,7 +955,7 @@
|
||||
}
|
||||
.path-mod-assign [data-region="grade-panel"] .mform .fitem .fcheckbox > span,
|
||||
.path-mod-assign [data-region="grade-panel"] .mform .fitem .fradio > span,
|
||||
.path-mod-assign [data-region="grade-panel"] .mform .fitem .fgroup > span,
|
||||
.path-mod-assign [data-region="grade-panel"] .mform .fitem .fgroup > span {
|
||||
margin-top: 4px;
|
||||
}
|
||||
.path-mod-assign [data-region="grade-panel"] .mform .femptylabel .fitemtitle {
|
||||
|
Loading…
x
Reference in New Issue
Block a user