Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-47425

Assignment without any Submission types and Use marking workflow to Yes

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.6.5, 2.7.2, 2.8
    • 2.7.5, 2.8.3
    • Assignment
    • MOODLE_26_STABLE, MOODLE_27_STABLE, MOODLE_28_STABLE
    • MOODLE_27_STABLE, MOODLE_28_STABLE
    • Hide
      1. Create an assignment with the following:
        1. No submission types.
        2. Use Marking Work Flow to YES.
      2. Save and display.
      3. Click View/grade all submissions
      4. Click the header "sort".
      5. Marvel at the lack of errors and that it sorts.
      Show
      Create an assignment with the following: No submission types. Use Marking Work Flow to YES. Save and display. Click View/grade all submissions Click the header "sort". Marvel at the lack of errors and that it sorts.

    Description

      When I create assignment without any submission type selected and using the workflow marking to yes, when I try to order by user Status on view/grade all submissions mod/assign/view.php?id=XXX&action=grading we got a Database error message.

      The problem is that creates the following SQL

      SELECT
      u.id,u.picture,u.firstname,u.lastname,u.firstnamephonetic,u.lastnamephonetic,u.middlename,u.alternatename,u.imagealt,u.email, u.id as userid, s.status as status, s.id as submissionid, s.timecreated as firstsubmission, s.timemodified as timesubmitted, s.attemptnumber as attemptnumber, g.id as gradeid, g.grade as grade, g.timemodified as timemarked, g.timecreated as firstmarked, uf.mailed as mailed, uf.locked as locked, uf.extensionduedate as extensionduedate, uf.workflowstate as workflowstate, uf.allocatedmarker as allocatedmarker
      FROM mdl_user u
      LEFT JOIN ( SELECT mxs.userid, MAX(mxs.attemptnumber) AS maxattempt
      FROM mdl_assign_submission mxs
      WHERE mxs.assignment = '6085' GROUP BY mxs.userid ) smx ON u.id = smx.userid
      LEFT JOIN ( SELECT mxg.userid, MAX(mxg.attemptnumber) AS maxattempt
      FROM mdl_assign_grades mxg
      WHERE mxg.assignment = '6085' GROUP BY mxg.userid ) gmx ON u.id = gmx.userid
      LEFT JOIN mdl_assign_submission s ON
      u.id = s.userid AND
      s.assignment = '6085' AND
      s.attemptnumber = smx.maxattempt
      LEFT JOIN mdl_assign_grades g ON
      u.id = g.userid AND
      g.assignment = '6085' AND
      g.attemptnumber = gmx.maxattempt
      LEFT JOIN mdl_assign_user_flags uf ON u.id = uf.userid AND uf.assignment = '6085'
      WHERE u.id IN ('888','687','1049','1548','1523','1151','1530','769','437','1042','1051','1131','1654','1770','1756','1227','1233','1632','1336','1685','53','55','1071','1747','56','1423','1831','1639','1631','1560','1708','1286','1194','1554','1008','1390','1706','1513','603','1805','1798','435','1409','1296','1601','1761','1772','1097','1339','1544','999','1085','1660','67','1701','1588','1781','1055','1340','808','1655','71','1324','1329','1333','938','439','588','1570','853','1681','1115','1556','765','1774','1620','1220','1814','944','77','1827','1762','1205','1719','752','1507','1816','1585','953','1674','1241','1641','433','733','1670','1780','1758','401','1837','1156','1688','1602','1569','1603','1684','1516','1792','962','1181','1116','1623','1580','1771','1515','84','1424','1436','1439','1244','959','1323','86','1211','683','1610','1550','1500','1721','492','89','1312','1128','1800','1733','1726','764','1549','814','748','1739','1021','1807','93','1300','1279','934','1551','1189','95','458','99','1165','102','1703','1734','1532','598','104','453','1308','1846','428','1223','1821','1218','780','1405','107','863','1716','1785','452','1577','1849','1584','1155','1519','1575','427','1377','1511','1741','110','1832','1373','1547','1529','1645','584','1735','495','771','1848','1736','112','1009','113','1574','1571','745','1673','507','1420','116','688','469','644','1578','1369','1419','1851','1725','1694','1209','1326','1759','1162','122','1691','931','643','1538','1618','1528','728','1186','124','1370','1202','506','678','802','1546','513','399','1555','996','805','928','1806','1817','1699','1587','1294','1801','1509','844','1026','1599','1696','132','137','1757','1712','423','957','1581','1498','1238','1640','595','716','134','1190','941','744','1833','1682','641','593','1707','1016','1261','467','140','1072','1745','1769','1108','621','779','1646','1095','1847','1812','1522','1521','1627','743','1273','1558','155','150','1690','742','1254','741','1292','1636','1704','1819','639','449','1649','1109','933','973','762','1012','1174','1619','1740','1803','1783','1356','976','1346','1697','770','618','1319','1828','1693','1314','1325','870','1394','1779','988','1612','1354','1663','1744','1505','171','1389','1367','1643','1564','1705','1753','1541','857','172','1773','1635','972','1591','1170','1628','1501','1121','1010','1527','615','1838','1767','1615','1582','790','519','179','1589','1782','477','1829','1642','1616','782','777','1411','1622','1850','476','1714','1124','859','1514','494','1537','1835','1840','1506','500','1572','1764','1614','1752','1005','1397','1318','1818','1613','1653','1499','485','1036','1562','1000','1414','761','1750','1746','1748','1141','1644','1823','1457','1127','1662','1163','456','1788','209','849','1600','1738','1099','1648','475','210','1731','674','1596','1794','1787','760','1686','1598','1718','1406','1789','1586','1224','1402','1278','1197','484','1290','1058','447','1081','1425','510','1535','1715','1381','1668','1450','1775','1630','1777','978','1568','231','1542','1039','232','446','1360','1563','1545','1536','1540','975','1617','1567','1658','1755','238','792','1330','1722','483','1206','1592','1240','1427','1826','1607','1820','1328','1111','1583','1595','1804','1070','1303','525','707','1047','1749','1811','248','1754','1557','251','1822','1362','445','252','1503','1611','253','1096','1159','383','1634','1720','416','1504','1683','259','1553','1751','465','1799','1637','1518','1552','1791','1839','800','1813','1626','989','1524','1605','1717','1650','1675','1676','1664','1680','1510','1647','1576','264','737','1621','270','1604','993','1638','1088','1723','1710','464','1068','271','1172','1061','1651','1624','1508','1533','609','1778','1671','1808','1146','278','413','1594','1565','1305','1221','705','1730','704','1825','1289','736','1283','1841','1184','1512','1802','1139','1776','1724','1107','1531','412','1809','1579','759','1260','1048','1656','288','289','997','1609','1200','632','1629','1743','1766','841','701','1351','1590','1262','292','293','294','1689','1711','408','1692','1293','1217','812','1836','960','1593','1852','1561','1606','303','1698','1379','1534','1177','304','1059','1129','1270','1277','1713','1110','1608','1065','1410','397','1678','1687','1035','929','1543','1573','498','1657','1123','1502','482','1732','1830','629','497','1784','1416','1737','1652','605','758','1192','591','1810','735','1729','1797','1672','1702','1539','1677','592','1332','1728','322','1140','650','1666','1727','795','1763','522','1796','1700','855','801','1103','325','1566','326','1407','1625','846','1520','1667','1359','1526','328','1695','589','1786','1659','1525','1517','1253','329','1790','1633','1178','1014','755','731','1665','1597','331','754','1382','1321','1669','332','1045','1251','734','1661','1765','1815','516','1793','1742','662','1132','1679','336','935','1265','1709','1768','1795','856','1122','1431','1824','693','1559','627','480','1225','1760','1834','1093','461')
      ORDER BY workflowstatus;

      but the ORDER BY column doesn't exist.

      I think that the problem could be fix changing gradingtable.php file on line 281 on which the columname assigned to the array is wrong, I change it to 'workflostate' and it works!

      If I'm wrong let check it out how to fix it properly.

      Thanks for all

      Attachments

        Issue Links

          Activity

            People

              zac Zachary Durber
              arodriguez Antton Rodriguez
              Zachary Durber Zachary Durber
              Andrew Lyons Andrew Lyons
              Rajesh Taneja Rajesh Taneja
              Adrian Greeve, Ilya Tregubov, Kevin Percy, Mathew May, Mihail Geshoski, Shamim Rezaie
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                2/Feb/15