Commit graph

105 commits

Author SHA1 Message Date
Neill Magill
06a69802d6 MDL-64336 assign: Teachers should be able to see all submissions
Before this change a teacher would be able to see users listed if:

* They have an active enrolment and can submit
* They have an an inactive enrolment for a role that can submit

After this change they will additonally be able to see users listed:

* That have an active enrolment and have submitted
* That have an inactive enrolment and have submitted

This means that if an assignment has it's context frozen all users
that have made some form of submission will still be listed.

It will also apply if the submission capability is removed from a
user.

If a user's enrolment is deleted they will not be listed.

The submission and grading counts have also been updated so
they will reflect the new rules.
2021-04-21 15:14:14 +01:00
Neill Magill
1f55fff393 MDL-64336 assign: Submissions should be visible while frozen
Before this change if a student visited an assignment that is
frozen they would only see the title and description even if
they had made a submission to it.

After the change they will be able to see the status of their
submission and any feedback and grades they have recived.

It will also make the Moodle app recognise that submission
should not happen because the assignment is frozen.

Tests based on ones created by Andrew Nicols
2021-04-21 15:14:14 +01:00
Marina Glancy
0eada7a5f9 MDL-70893 various: optional function arguments must be in the end 2021-02-15 16:53:37 +01:00
Dani Palou
8c84eeeeac MDL-68098 ws: Fix WebServices broken by filters HTML 2020-09-22 09:43:03 +02:00
Tim Schroeder
3786de22f2
MDL-68605 mod_assign: return grp submissns from ws
Co-authored-by: Septatrix <24257556+Septatrix@users.noreply.github.com>
2020-07-07 12:55:04 +02:00
Juan Leyva
62ff1b954f MDL-66877 mod: Fix WebServices returning unfiltered activity names 2019-11-28 17:18:29 +01:00
Eloy Lafuente (stronk7)
1b22fec64f Merge branch 'MDL-65026-master' of git://github.com/jleyva/moodle 2019-09-18 00:49:21 +02:00
Juan Leyva
dfd4881589 MDL-65026 course: Fix modules intro formatting in WS
The Web Service seems to be doing excessive text cleaning.
2019-09-16 13:04:26 +02:00
Juan Leyva
0b9f2215d0 MDL-66113 assign: Apply user overrides in get_submission_status WS 2019-09-16 12:05:55 +02:00
Jake Dallimore
d0cff2367a MDL-66147 mod_assign: external get_participant supports relative dates 2019-08-13 15:09:13 +08:00
Davo Smith
8773296b77 MDL-64811 mod_assign: fix webservice return type 2019-07-01 11:22:57 +01:00
Eloy Lafuente (stronk7)
3c1bb2334d Merge branch 'MDL-64444-master' of git://github.com/jleyva/moodle 2019-02-28 01:19:13 +01:00
Dani Palou
208e1376be MDL-64761 assign: Return grader -1 when hidden in get_submission_status 2019-02-04 15:29:47 +01:00
Juan Leyva
cf0cad920c MDL-64444 mod_assign: Use correct permissions for context locking
Some WebServices does not use the correct permissions.
This mean that when a context is locked, they don't behave as expected.
2019-01-30 15:07:58 +01:00
Andrew Nicols
bf197c166c Merge branch 'MDL-62223-master' of git://github.com/Kathrin84/moodle 2018-12-20 11:32:50 +08:00
Jun Pataleta
e63084ec1b Merge branch 'MDL-60474-master' of git://github.com/damyon/moodle 2018-12-19 10:14:13 +08:00
Damyon Wiese
064f15033f MDL-60474 assign: Consistent user filters
Use the current filters and sorting on the user grading table in the single
page grading app when it is possible.

This replaces the popover used to configure the filters to one that closely matches the
one from the grading table. It supports standard filters, workflow filters and allocated marker filters.

It will also support group filtering and suspended user filtering but we don't show the controls for those in
the single grading page.
2018-12-19 10:10:23 +08:00
Dan Marsden
91a2215eea MDL-49673 mod_assign: Tidy up hidegrader patch 2018-12-18 14:33:42 +13:00
Kathrin Osswald
ee6484497b MDL-62223 mod_assign: Improve submission statements 2018-12-11 13:59:10 +01:00
Juan Leyva
df3d877656 MDL-63832 assign: Check current user can view submission 2018-11-14 16:53:34 +01:00
Juan Leyva
ff626f7bb1 MDL-58711 mod_assign: Handle groups in get_submission_status 2018-01-11 15:03:08 +01:00
Juan Leyva
9a62cd02db MDL-60233 mod_assign: Avoid HTML in the item field of external warnings
The item field is defined as PARAM_TEXT (no HTML tags allowed except
for multilang).
Using the s that add quotes to HTML characters we avoid potential Web
Services invalid parameters errors.
2017-09-26 12:12:50 +02:00
Andrew Nicols
fbc15bb977 Merge branch 'MDL-55371-master' of git://github.com/jleyva/moodle 2017-05-05 09:57:40 +08:00
Juan Leyva
396395b8d3 MDL-55371 mod_assign: Do not return empty users in get_participant WS
The WS was returning null users making the WS to fail.
2017-05-04 10:09:35 +02:00
Juan Leyva
3b07da4a6d MDL-58707 mod_assign: Fix param type for returned field
The ‘description’ field is populated via a get_string call, this means
that it may content html.
The component used for translation is also fixed in this commit.
2017-04-25 14:41:24 +02:00
Mark Nelson
3e1c027532 MDL-57938 mod_assign: added new 'gradingduedate' setting
Part of MDL-55611 epic.
2017-04-03 11:36:07 +08:00
Tony Butler
eb43ef6c97 MDL-57602 mod_assign: Add 'Granted extension' filter for grading UI 2017-02-16 11:23:41 +00:00
Juan Leyva
9db43c7341 MDL-57629 webservice: Fix external functions phpdoc
Replace external_external_function_parameters with
external_function_parameters
2017-01-11 16:56:25 +01:00
David Mudrák
82a8d0d21d MDL-57580 mod_assign: Fix the incorrect type of some input parameters
The PARAM_TEXT has been misused in certain cases here. The 'action'
parameter seems to always be alphabetic, with values like
savesubmission, editsubmission and others as handled in assign::view().

Fixing the action handling fixes the reported XSS issue. While working
on it, I spotted two more places where PARAM_TEXT does not seem
appropriate. I include changes for them too, even if they are no
strictly related to the reported bug and there are no known ways to
abuse it.

* The 'plugin' looks like PARAM_PLUGIN and is even declared as such in
  some other parts of the assignment code (such as feedback forms).

* The 'workflowstate' is one of the ASSIGN_MARKING_WORKFLOW_STATE
  constants and is supposed to be alpha in external function input
  parameters handling, too.
2017-01-05 17:39:36 +01:00
Adrian Greeve
f65db49765 MDL-56363 mod_assign: Restrictions added for tutors.
If the grader does not have the accessallgroups capability,
or groups mode is set to separate groups and the user is not
a member of the group then no participants are shown.
2016-11-11 00:28:33 +01:00
David Monllao
cf4019cf40 Merge branch 'MDL-29795_master' of https://github.com/dmonllao/moodle 2016-11-07 09:20:59 +08:00
Andrew Nicols
711e2ab184 Merge branch 'MDL-56583-master' of git://github.com/crazyserver/moodle 2016-10-31 13:42:46 +08:00
Pau Ferrer Ocaña
1f84c2c5ea MDL-56638 assign: Don't check sesskey using submit_grading_form from WS 2016-10-28 13:44:19 +02:00
Pau Ferrer Ocaña
59111fa937 MDL-56583 assign: Add info about the user submission capability 2016-10-27 15:40:03 +02:00
Kenneth Hendricks
e47c002c75 MDL-29795 assign: Tweak user-info section in grader view
- also mirror due date removal in boost template
2016-10-27 17:09:58 +11:00
Pau Ferrer Ocaña
8845688ce4 MDL-56534 assign: Add grading status on get_submissions WS 2016-10-24 13:24:18 +02:00
Juan Leyva
a18cb9d84f MDL-29795 assign: Apply overrides to get_assignments
This commit also fix a problem in the previous commit
2016-10-24 11:24:40 +01:00
Damyon Wiese
6b8e798db1 MDL-29795 assign: Apply overrides before saving a submission
From the webservice.
2016-10-24 11:04:10 +01:00
Ilya Tregubov
d685b95935 MDL-29795 mod_assign: Add user/group override assignment module 2016-10-24 11:03:49 +01:00
Jean-Philippe Gaudreau
6399ecd743 MDL-55630 mod_assign: Exclude users courses from user details
Exclude users' enrolled courses for performance reason.
A new 'includeenrolments' parameter was added
to mod_assign::list_particpants.
2016-10-14 09:28:18 -04:00
Juan Leyva
30cdddb017 MDL-55129 mod_assign: Allow plugins to handle configs for external
Until now in the get_assignments WS all the settings for assignment
plugins (submission and feedback) are returned, this was bad because:

- It was returning settings for plugins that may not be enabled
- It was returning settings that would be a security risk (a third
party plugin including a password or credentials for connecting a
remote site)
- Some values was returned "raw" without further processing, for
example, maxsubmissionsizebytes returned 0 when using the plugin
default value instead a valid size
- Assignment plugins implemented an API for communication with the
external API, see for example: get_external_parameters, it didn’t make
sense had an API for the received parameters and not the returned data.
2016-10-04 20:28:38 +01:00
Dan Poltawski
372dd3711e Merge branch 'MDL-55225-master' of git://github.com/dpalou/moodle 2016-08-09 09:21:07 +01:00
Juan Leyva
145900708c MDL-54941 webservice: Refactor file handling in WS
This commit reduces boilerplate code.
It also forces WS returning files to always return the following
fields: filename, filepath, mimetype, filesize, timemodified and
fileurl.
2016-07-28 12:07:04 +02:00
Dani Palou
38b1f8fd99 MDL-55225 assign: Format assignment submission text in WS 2016-07-27 13:30:47 +02:00
Eloy Lafuente (stronk7)
e23faa4c81 Merge branch 'MDL-55046-master' of git://github.com/dpalou/moodle 2016-07-26 19:40:52 +02:00
Dan Poltawski
12811fcc34 Merge branch 'MDL-55284-master' of git://github.com/damyon/moodle 2016-07-25 15:53:41 +01:00
Damyon Wiese
771f8df153 MDL-55284 assign: Add missing webservice param 'onlyids'
Mod assign list_participants webservice is supposed to accept a param to limit the
returned data to only show user ids and not the full user details. It is missing
and so the full user records are fetched every time. This has a major impact on the
performance of the new assignment grading interface.
2016-07-20 15:18:01 +08:00
David Monllao
f60a16ad9d Merge branch 'MDL-55162-master' of git://github.com/jleyva/moodle
Conflicts:
	mod/assign/externallib.php
2016-07-18 20:35:50 +02:00
Dani Palou
9ac99220c5 MDL-55046 assign: Return submissionstatement in get_assignments 2016-07-18 09:22:12 +02:00
Juan Leyva
b93ea100fc MDL-55162 mod_assign: Refactor to use new validate_assign helper 2016-07-12 14:39:24 +01:00